Skip to content

Commit 52b9734

Browse files
committed
feat: Desktop Shell Mode homepage
- Shell becomes the new startup/home screen; hidden behind a feature flag - has a searchable grid, providing an overview of chats, communities, wallets, settings etc - some related smaller component and storybook page fixes - cleanup some clazy warnings Fixes #17971
1 parent 66f52d5 commit 52b9734

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2740
-88
lines changed

src/app/global/feature_flags.nim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const DEFAULT_FLAG_SEND_VIA_PERSONAL_CHAT_ENABLED = true
2121
const DEFAULT_FLAG_PAYMENT_REQUEST_ENABLED = true
2222
const DEFAULT_FLAG_SIMPLE_SEND_ENABLED = true
2323
const DEFAULT_FLAG_MARKET_ENABLED = true
24+
const DEFAULT_FLAG_SHELL_ENABLED = false
2425

2526
# Compile time feature flags
2627
const DEFAULT_FLAG_DAPPS_ENABLED = true
@@ -35,6 +36,7 @@ featureFlag("SEND_VIA_PERSONAL_CHAT_ENABLED", DEFAULT_FLAG_SEND_VIA_PERSONAL_CHA
3536
featureFlag("PAYMENT_REQUEST_ENABLED", DEFAULT_FLAG_PAYMENT_REQUEST_ENABLED)
3637
featureFlag("SIMPLE_SEND_ENABLED", DEFAULT_FLAG_SIMPLE_SEND_ENABLED)
3738
featureFlag("MARKET_ENABLED", DEFAULT_FLAG_MARKET_ENABLED)
39+
featureFlag("SHELL_ENABLED", DEFAULT_FLAG_SHELL_ENABLED)
3840

3941
featureFlag("DAPPS_ENABLED", DEFAULT_FLAG_DAPPS_ENABLED, true)
4042
featureFlag("CONNECTOR_ENABLED", DEFAULT_FLAG_CONNECTOR_ENABLED, true)
@@ -81,6 +83,7 @@ QtObject:
8183
simpleSendEnabled: bool
8284
keycardEnabled: bool
8385
marketEnabled: bool
86+
shellEnabled: bool
8487

8588
proc setup(self: FeatureFlags) =
8689
self.QObject.setup()
@@ -92,6 +95,7 @@ QtObject:
9295
self.simpleSendEnabled = SIMPLE_SEND_ENABLED
9396
self.keycardEnabled = KEYCARD_ENABLED
9497
self.marketEnabled = MARKET_ENABLED
98+
self.shellEnabled = SHELL_ENABLED
9599

96100
proc delete*(self: FeatureFlags) =
97101
self.QObject.delete()
@@ -147,3 +151,9 @@ QtObject:
147151

148152
proc getMarketEnabled*(self: FeatureFlags): bool {.slot.} =
149153
return self.marketEnabled
154+
155+
QtProperty[bool] shellEnabled:
156+
read = getShellEnabled
157+
158+
proc getShellEnabled*(self: FeatureFlags): bool {.slot.} =
159+
return self.shellEnabled

src/app/modules/shared_models/section_model.nim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ QtObject:
309309
updateRoleWithValue(joined, Joined, item.joined)
310310
updateRoleWithValue(spectated, Spectated, item.spectated)
311311
updateRoleWithValue(isMember, IsMember, item.isMember)
312-
updateRoleWithValue(isMember, IsMember, item.isMember)
313312
updateRoleWithValue(canManageUsers, CanManageUsers, item.canManageUsers)
314313
updateRoleWithValue(canRequestAccess, CanRequestAccess, item.canRequestAccess)
315314
updateRoleWithValue(access, Access, item.access)

storybook/pages/ColorsPage.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ SplitView {
137137
font.weight: Font.Medium
138138
}
139139
TextField {
140+
Layout.preferredWidth: 200
140141
readonly property string searchText: text.toLowerCase()
141142
id: searchField
142143
}
@@ -280,3 +281,4 @@ SplitView {
280281
}
281282

282283
// category: Core
284+
// status: good

storybook/pages/CommunitiesPortalDummyModel.qml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
import QtQuick 2.14
1+
import QtQuick 2.15
22

33
import Models 1.0
44

55
ListModel {
66

77
readonly property var emptyModel: ListModel {}
88

9-
Component.onCompleted: append([
9+
Component.onCompleted: append(entries)
10+
11+
readonly property var entries: [
1012
{
1113
featured: false,
1214
id: "id1",
1315
loaded: true,
1416
icon: ModelsData.icons.status,
1517
banner: ModelsData.banners.status,
16-
color: "blue",
18+
color: "mediumblue",
1719
name: "Status.app",
1820
description: "Your portal to Web3. Secure wallet. Private messaging. Requires secret tokens to join",
1921
members: 130,
@@ -43,7 +45,9 @@ ListModel {
4345
},
4446
]),
4547
permissionsModel: PermissionsModel.privatePermissionsMemberNotMetModel,
46-
allTokenRequirementsMet: false
48+
allTokenRequirementsMet: false,
49+
hasNotification: true,
50+
notificationsCount: 3
4751
},
4852
{
4953
featured: true,
@@ -73,7 +77,9 @@ ListModel {
7377
},
7478
]),
7579
permissionsModel: PermissionsModel.twoShortPermissionsModel,
76-
allTokenRequirementsMet: false
80+
allTokenRequirementsMet: false,
81+
hasNotification: true,
82+
notificationsCount: 0
7783
},
7884
{
7985
featured: true,
@@ -108,7 +114,7 @@ ListModel {
108114
icon: ModelsData.icons.dragonereum,
109115
banner: ModelsData.banners.dragonereum,
110116
color: "black",
111-
name: "Dragonereum",
117+
name: "Dragonereum lorem ipsum dolor sit amet",
112118
description: "A community of cat lovers, meow!",
113119
members: 34,
114120
activeMembers: 20,
@@ -138,7 +144,9 @@ ListModel {
138144
available: true,
139145
tags: JSON.stringify([]),
140146
permissionsModel: PermissionsModel.channelsOnlyPermissionsModelNotMet,
141-
allTokenRequirementsMet: false
147+
allTokenRequirementsMet: false,
148+
hasNotification: true,
149+
notificationsCount: 33
142150
},
143151
{
144152
featured: false,
@@ -168,7 +176,9 @@ ListModel {
168176
},
169177
]),
170178
permissionsModel: PermissionsModel.threeShortPermissionsModel,
171-
allTokenRequirementsMet: false
179+
allTokenRequirementsMet: false,
180+
hasNotification: false,
181+
notificationsCount: 33
172182
},
173183
{
174184
featured: false,
@@ -219,7 +229,9 @@ ListModel {
219229
},
220230
]),
221231
permissionsModel: PermissionsModel.twoLongPermissionsModel,
222-
allTokenRequirementsMet: true
232+
allTokenRequirementsMet: true,
233+
hasNotification: true,
234+
notificationsCount: 0
223235
},
224236
{
225237
featured: false,
@@ -236,7 +248,9 @@ ListModel {
236248
available: true,
237249
tags: JSON.stringify([]),
238250
permissionsModel: emptyModel,
239-
allTokenRequirementsMet: false
251+
allTokenRequirementsMet: false,
252+
hasNotification: true,
253+
notificationsCount: 100
240254
}
241-
])
255+
]
242256
}

storybook/pages/CommunitiesViewPage.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ SplitView {
5757
logs.logEvent("profileSectionStore::communitiesProfileModule::leaveCommunity", ["communityId"], arguments)
5858
}
5959
}
60-
property var communitiesList: ctrlEmptyView.checked ? emptyModel : communitiesModel
60+
readonly property var communitiesList: ctrlEmptyView.checked ? emptyModel : communitiesModel
6161
}
6262
rootStore: AppLayoutsStores.RootStore {
6363
function isMyCommunityRequestPending(communityId) {
@@ -90,5 +90,5 @@ SplitView {
9090
}
9191

9292
// category: Views
93-
93+
// status: good
9494
// https://www.figma.com/file/idUoxN7OIW2Jpp3PMJ1Rl8/%E2%9A%99%EF%B8%8F-Settings-%7C-Desktop?type=design&node-id=16089-387522&t=HRT9BmZXnl7Lt55Q-0

0 commit comments

Comments
 (0)