-
Notifications
You must be signed in to change notification settings - Fork 82
feat: new Shell (jump to) home screen #17916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c846d41
bbbd213
d57f3f4
e45d3a8
fa16c0d
81443b7
8ab85aa
6b6585a
ab5346b
93cccd6
9bb7d69
3fb9f3c
799ab74
8d30d28
fc29adb
1639cbb
e44114a
b4db567
49c6ecd
f07fd8c
2e10611
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On Qt 5.15.2 it reports bunch of warnings when launched and used:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And on Qt 6.9:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I can have a look but I think Jo fixed it here (in a followup PR): 2d356b2#diff-6ddeba0597852c62e6c0a914206e286d48b2ea35ee179c2e284567d2c64c0432R306 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
|
||
import StatusQ 0.1 | ||
import StatusQ.Core 0.1 | ||
import StatusQ.Components 0.1 | ||
|
||
import Models 1.0 | ||
import Storybook 1.0 | ||
|
||
import utils 1.0 | ||
|
||
import AppLayouts.Shell 1.0 | ||
import AppLayouts.Profile.stores 1.0 as ProfileStores | ||
|
||
SplitView { | ||
id: root | ||
|
||
orientation: Qt.Vertical | ||
|
||
Logs { id: logs } | ||
|
||
ShellContainer { | ||
id: shell | ||
SplitView.fillWidth: true | ||
SplitView.fillHeight: true | ||
|
||
ShellAdaptor { | ||
id: shellAdaptor | ||
|
||
sectionsBaseModel: SectionsModel {} | ||
chatsBaseModel: ChatsModel {} | ||
walletsBaseModel: WalletAccountsModel {} | ||
dappsBaseModel: DappsModel {} | ||
|
||
showCommunities: ctrlShowCommunities.checked || ctrlShowAllEntries.checked | ||
showSettings: ctrlShowSettings.checked || ctrlShowAllEntries.checked | ||
showChats: ctrlShowChats.checked || ctrlShowAllEntries.checked | ||
showWallets: ctrlShowWallets.checked || ctrlShowAllEntries.checked | ||
showDapps: ctrlShowDapps.checked || ctrlShowAllEntries.checked | ||
|
||
showEnabledSectionsOnly: ctrlShowEnabledSectionsOnly.checked | ||
marketEnabled: ctrlMarketEnabled.checked | ||
caybro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
syncingBadgeCount: 2 | ||
messagingBadgeCount: 4 | ||
showBackUpSeed: true | ||
|
||
searchPhrase: shell.searchPhrase | ||
|
||
profileId: profileStore.pubkey | ||
} | ||
|
||
shellEntriesModel: shellAdaptor.shellEntriesModel | ||
sectionsModel: shellAdaptor.sectionsModel | ||
pinnedModel: shellAdaptor.pinnedModel | ||
|
||
profileStore: ProfileStores.ProfileStore { | ||
id: profileStore | ||
readonly property string pubkey: "0xdeadbeef" | ||
readonly property string compressedPubKey: "zxDeadBeef" | ||
readonly property string name: "John Roe" | ||
readonly property string icon: ModelsData.icons.rarible | ||
readonly property int colorId: 7 | ||
readonly property var colorHash: [{colorId: 7, segmentLength: 1}, {colorId: 6, segmentLength: 2}] | ||
property int currentUserStatus: Constants.currentUserStatus.automatic | ||
} | ||
|
||
getEmojiHashFn: function(pubKey) { // <- root.utilsStore.getEmojiHash(pubKey) | ||
if (pubKey === "") | ||
return "" | ||
|
||
return["👨🏻🍼", "🏃🏿♂️", "🌇", "🤶🏿", "🏮","🤷🏻♂️", "🤦🏻", "📣", "🤎", "👷🏽", "😺", "🥞", "🔃", "🧝🏽♂️"] | ||
} | ||
getLinkToProfileFn: function(pubKey) { // <- root.rootStore.contactStore.getLinkToProfile(pubKey) | ||
return Constants.userLinkPrefix + pubKey | ||
} | ||
|
||
useNewDockIcons: ctrlNewIcons.checked | ||
hasUnseenACNotifications: ctrlHasNotifications.checked | ||
aCNotificationCount: ctrlNotificationsCount.value | ||
|
||
onItemActivated: function(key, sectionType, itemId) { | ||
shellAdaptor.setTimestamp(key, new Date().valueOf()) | ||
logs.logEvent("onItemActivated", ["key", "sectionType", "itemId"], arguments) | ||
console.info("!!! ITEM ACTIVATED; key:", key, "; sectionType:", sectionType, "; itemId:", itemId) | ||
} | ||
onItemPinRequested: function(key, pin) { | ||
shellAdaptor.setPinned(key, pin) | ||
if (pin) | ||
shellAdaptor.setTimestamp(key, new Date().valueOf()) // update the timestamp so that the pinned dock items are sorted by their recency | ||
logs.logEvent("onItemPinRequested", ["key", "pin"], arguments) | ||
console.info("!!! ITEM", key, "PINNED:", pin) | ||
} | ||
onDappDisconnectRequested: function(dappUrl) { | ||
logs.logEvent("onDappDisconnectRequested", ["dappUrl"], arguments) | ||
console.info("!!! DAPP DISCONNECT:", dappUrl) | ||
} | ||
|
||
onNotificationButtonClicked: { | ||
logs.logEvent("onNotificationButtonClicked") // <- openActivityCenterPopup() | ||
} | ||
onSetCurrentUserStatusRequested: function (status) { | ||
profileStore.currentUserStatus = status | ||
logs.logEvent("onSetCurrentUserStatusRequested", ["status"], arguments) // <- root.rootStore.setCurrentUserStatus(status) | ||
} | ||
onViewProfileRequested: function(pubKey) { | ||
logs.logEvent("onViewProfileRequested", ["pubKey"], arguments) // <- Global.openProfilePopup(pubKey) | ||
} | ||
} | ||
|
||
LogsAndControlsPanel { | ||
SplitView.minimumHeight: 300 | ||
SplitView.preferredHeight: 300 | ||
SplitView.fillWidth: true | ||
|
||
logsView.logText: logs.logText | ||
|
||
ColumnLayout { | ||
Switch { | ||
id: ctrlNewIcons | ||
text: "Use new dock icons" | ||
checked: true | ||
} | ||
Switch { | ||
id: ctrlShowEnabledSectionsOnly | ||
text: "Show enabled sections only" | ||
} | ||
Switch { | ||
id: ctrlMarketEnabled | ||
text: "Market enabled" | ||
checked: true | ||
} | ||
RowLayout { | ||
Switch { | ||
id: ctrlShowAllEntries | ||
text: "Show all entries" | ||
checked: true | ||
} | ||
Switch { | ||
id: ctrlShowCommunities | ||
text: "Show Communities" | ||
checked: true | ||
enabled: !ctrlShowAllEntries.checked | ||
} | ||
Switch { | ||
id: ctrlShowChats | ||
text: "Show Chats" | ||
checked: true | ||
enabled: !ctrlShowAllEntries.checked | ||
} | ||
Switch { | ||
id: ctrlShowWallets | ||
text: "Show Wallets" | ||
checked: true | ||
enabled: !ctrlShowAllEntries.checked | ||
} | ||
Switch { | ||
id: ctrlShowSettings | ||
text: "Show Settings" | ||
checked: true | ||
enabled: !ctrlShowAllEntries.checked | ||
} | ||
Switch { | ||
id: ctrlShowDapps | ||
text: "Show dApps" | ||
checked: true | ||
enabled: !ctrlShowAllEntries.checked | ||
} | ||
} | ||
RowLayout { | ||
Switch { | ||
id: ctrlHasNotifications | ||
text: "Has unseen notifications" | ||
} | ||
Label { text: " Count:" } | ||
SpinBox { | ||
id: ctrlNotificationsCount | ||
from: 0 | ||
to: 100 | ||
value: 0 | ||
enabled: ctrlHasNotifications.checked | ||
} | ||
} | ||
Button { | ||
text: "Reset" | ||
onClicked: shellAdaptor.clear() | ||
} | ||
} | ||
} | ||
} | ||
|
||
// category: Sections | ||
// status: good | ||
// https://www.figma.com/design/uXJKlC0LaUjvwL5MEsI9v4/Shell----Desktop?node-id=251-357756&m=dev |
Uh oh!
There was an error while loading. Please reload this page.