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 QtQuick.Layouts 1.13
import "../../../../imports" import "../../../../imports"
import "../../../../shared" import "../../../../shared"
import "../data/channelList.js" as ChannelJSON
import "./" import "./"
ModalPopup { ModalPopup {
@ -10,7 +11,6 @@ ModalPopup {
if(channelName.text === "") return; if(channelName.text === "") return;
chatsModel.joinChat(channelName.text, Constants.chatTypePublic); chatsModel.joinChat(channelName.text, Constants.chatTypePublic);
popup.close(); popup.close();
} }
id: popup id: popup
@ -49,41 +49,64 @@ ModalPopup {
icon: "../../../img/hash.svg" icon: "../../../img/hash.svg"
} }
RowLayout { // RowLayout {
id: row // id: row
Layout.fillHeight: false // Layout.fillHeight: false
Layout.fillWidth: true // Layout.fillWidth: true
anchors.right: parent.right // anchors.right: parent.right
anchors.rightMargin: 35 // anchors.rightMargin: 35
anchors.left: parent.left // anchors.left: parent.left
anchors.leftMargin: 35 // anchors.leftMargin: 35
anchors.top: channelName.bottom // anchors.top: channelName.bottom
anchors.topMargin: 37 // anchors.topMargin: 37
ScrollView {
id: sview
// clip: true
anchors.top: channelName.bottom
anchors.topMargin: Style.current.smallPadding
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
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 { Flow {
Layout.fillHeight: false Layout.fillHeight: false
Layout.fillWidth: true Layout.fillWidth: true
anchors.top: parent.children[0].bottom
anchors.topMargin: 5
width: parent.width
spacing: 20 spacing: 20
Repeater {
SuggestedChannel { channel: "ethereum"; onJoin: function() { popup.close() } } model: modelData.channels
SuggestedChannel { channel: "status"; onJoin: function() { popup.close() } } SuggestedChannel { channel: modelData }
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 { footer: Button {
width: 44 width: 44
height: 44 height: 44

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/InviteFriendsPopup.qml \
app/AppLayouts/Chat/components/MessageContextMenu.qml \ app/AppLayouts/Chat/components/MessageContextMenu.qml \
app/AppLayouts/Chat/components/NicknamePopup.qml \ app/AppLayouts/Chat/components/NicknamePopup.qml \
app/AppLayouts/Chat/data/channelList.js \
app/AppLayouts/Profile/LeftTab/Constants.js \ app/AppLayouts/Profile/LeftTab/Constants.js \
app/AppLayouts/Profile/LeftTab/components/MenuButton.qml \ app/AppLayouts/Profile/LeftTab/components/MenuButton.qml \
app/AppLayouts/Chat/data/EmojiReactions.qml \ app/AppLayouts/Chat/data/EmojiReactions.qml \