update join chat suggested channels to include the full list of categories and channels

This commit is contained in:
Iuri Matias 2020-09-23 09:51:49 -04:00
parent eb7b9c2383
commit 52d394ded4
3 changed files with 208 additions and 30 deletions

View File

@ -3,6 +3,7 @@ import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import "../../../../imports"
import "../../../../shared"
import "../data/channelList.js" as ChannelJSON
import "./"
ModalPopup {
@ -10,7 +11,6 @@ ModalPopup {
if(channelName.text === "") return;
chatsModel.joinChat(channelName.text, Constants.chatTypePublic);
popup.close();
}
id: popup
@ -49,39 +49,62 @@ ModalPopup {
icon: "../../../img/hash.svg"
}
RowLayout {
id: row
Layout.fillHeight: false
Layout.fillWidth: true
anchors.right: parent.right
anchors.rightMargin: 35
anchors.left: parent.left
anchors.leftMargin: 35
// RowLayout {
// id: row
// Layout.fillHeight: false
// Layout.fillWidth: true
// anchors.right: parent.right
// anchors.rightMargin: 35
// anchors.left: parent.left
// anchors.leftMargin: 35
// anchors.top: channelName.bottom
// anchors.topMargin: 37
ScrollView {
id: sview
// clip: true
anchors.top: channelName.bottom
anchors.topMargin: 37
anchors.topMargin: Style.current.smallPadding
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
Flow {
Layout.fillHeight: false
Layout.fillWidth: true
spacing: 20
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
Layout.fillHeight: true
Layout.fillWidth: true
contentHeight: channelSuggestionList.height
Repeater {
model: ChannelJSON.categories
ColumnLayout {
id: channelSuggestionList
width: popup.width - Style.current.padding
height: children[1].height
Text {
text: modelData.name
font.pixelSize: 15
}
Flow {
Layout.fillHeight: false
Layout.fillWidth: true
anchors.top: parent.children[0].bottom
anchors.topMargin: 5
width: parent.width
spacing: 20
Repeater {
model: modelData.channels
SuggestedChannel { channel: modelData }
}
}
}
SuggestedChannel { channel: "ethereum"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "status"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "general"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "dapps"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "crypto"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "introductions"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "tech"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "ama"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "gaming"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "sexychat"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "nsfw"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "science"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "music"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "movies"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "sports"; onJoin: function() { popup.close() } }
SuggestedChannel { channel: "politics"; onJoin: function() { popup.close() } }
}
// }
}
footer: Button {

View File

@ -0,0 +1,154 @@
var categories = [
{
name: "Featured chats",
channels: [
"status",
"support",
"crypto",
"chitchat",
"defi",
"markets",
"dap-ps",
"devcon",
"eth2"
]
},
{
name: "General",
channels: [
"chitchat",
"chitchat",
"hello",
"worldnews",
"status",
"support"
]
},
{
name: "Entertainment",
channels: [
"music",
"movies",
"podcasts",
"books",
"gaming",
"adult",
"tv-shows"
]
},
{
name: "Interests",
channels: [
"sports",
"travel",
"design",
"food",
"automotive"
]
},
{
name: "Society",
channels: [
"climatechange",
"blacklivesmatter",
"politics",
"hongkong",
"privacy"
]
},
{
name: "Crypto",
channels: [
"crypto",
"markets",
"crypto-education",
"ethereum",
"bitcoin",
"chainlink",
"avalanche",
"eth2",
"eips",
"dap-ps",
"cryptolife",
"governance",
"staking",
"defi",
"cryptopayments",
"tokenomics",
"web3",
"web3design",
"devcon",
"exchange",
"validators"
]
},
{
name: "Technologies",
channels: [
"tech",
"ai",
"vr-ar",
"networks"
]
},
{
name: "Status",
channels: [
"status",
"support",
"statusphere",
"status-townhall-questions",
"status-core-ui",
"status-keycard",
"nimbus-general",
"status-assemble",
"status-marketing",
"status-protocol",
"status-desktop",
"status-watercooler",
"status-security",
"waku",
"status-docs",
"status-general",
"status-design",
"status-core-ui"
]
},
{
name: "Development",
channels: [
"ethereum-clients",
"storage",
"indexing",
"sidechains",
"layer2",
"devops",
"smart-contracts",
"embark-community",
"subspace",
"open-source",
"security"
]
},
{
name: "Languages",
channels: [
"status-spanish",
"statusbrasil",
"status-german",
"status-french",
"status-italiano",
"status-dutch",
"status-russian",
"status-chinese",
"status-korean",
"status-japanese",
"status-farsi",
"status-turkish",
"status-filipino",
"status-naija",
"status-indian",
"indonesian"
]
}
]

View File

@ -157,6 +157,7 @@ DISTFILES += \
app/AppLayouts/Chat/components/InviteFriendsPopup.qml \
app/AppLayouts/Chat/components/MessageContextMenu.qml \
app/AppLayouts/Chat/components/NicknamePopup.qml \
app/AppLayouts/Chat/data/channelList.js \
app/AppLayouts/Profile/LeftTab/Constants.js \
app/AppLayouts/Profile/LeftTab/components/MenuButton.qml \
app/AppLayouts/Chat/data/EmojiReactions.qml \