Skip to content

Commit 1d8da0c

Browse files
fix(@desktop/privacy): Complete privacy mode , update colors and enable
by default fixes #18514
1 parent 3874ed4 commit 1d8da0c

File tree

11 files changed

+37
-34
lines changed

11 files changed

+37
-34
lines changed

src/app/global/feature_flags.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const DEFAULT_FLAG_SIMPLE_SEND_ENABLED = true
2323
const DEFAULT_FLAG_MARKET_ENABLED = true
2424
const DEFAULT_FLAG_HOMEPAGE_ENABLED = true
2525
const DEFAULT_FLAG_LOCAL_BACKUP_ENABLED = true
26-
const DEFAULT_FLAG_PRIVACY_MODE_FEATURE_ENABLED = false
26+
const DEFAULT_FLAG_PRIVACY_MODE_FEATURE_ENABLED = true
2727

2828
# Compile time feature flags
2929
const DEFAULT_FLAG_DAPPS_ENABLED = true

storybook/pages/StatusNavBarTabButtonPage.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SplitView {
2323
SplitView.fillWidth: true
2424
SplitView.fillHeight: true
2525

26-
color: thirdpartyServicesCtrl.checked ? Theme.palette.statusAppNavBar.backgroundColor: Theme.palette.privacyModeColors.navBarColor
26+
color: thirdpartyServicesCtrl.checked ? Theme.palette.statusAppNavBar.backgroundColor: Theme.palette.privacyColors.primary
2727

2828
Column {
2929
id: column

ui/StatusQ/include/StatusQ/themepalette.h

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,23 +148,15 @@ class CustomisationColors {
148148
camel, magenta, yinYang, purple2;
149149
};
150150

151-
class PrivacyModeColors {
152-
Q_GADGET
153-
Q_PROPERTY(QColor navBarColor MEMBER navBarColor CONSTANT)
154-
Q_PROPERTY(QColor navButtonColor MEMBER navButtonColor CONSTANT)
155-
Q_PROPERTY(QColor navButtonHighlightedColor MEMBER navButtonHighlightedColor CONSTANT)
156-
public:
157-
QColor navBarColor, navButtonColor, navButtonHighlightedColor;
158-
};
159-
160151
class PrivacyColors {
161152
Q_GADGET
162153
Q_PROPERTY(QColor primary MEMBER primary CONSTANT)
163154
Q_PROPERTY(QColor secondary MEMBER secondary CONSTANT)
164155
Q_PROPERTY(QColor tertiary MEMBER tertiary CONSTANT)
165156
Q_PROPERTY(QColor tertiaryOpaque MEMBER tertiaryOpaque CONSTANT)
157+
Q_PROPERTY(QColor iconColor MEMBER iconColor CONSTANT)
166158
public:
167-
QColor primary, secondary, tertiary, tertiaryOpaque;
159+
QColor primary, secondary, tertiary, tertiaryOpaque, iconColor;
168160
};
169161

170162
// Main ThemePalette class
@@ -288,7 +280,7 @@ class ThemePalette : public QObject {
288280
Q_PROPERTY(StatusSelect statusSelect MEMBER statusSelect CONSTANT)
289281
Q_PROPERTY(StatusMessage statusMessage MEMBER statusMessage CONSTANT)
290282
Q_PROPERTY(CustomisationColors customisationColors MEMBER customisationColors CONSTANT)
291-
Q_PROPERTY(PrivacyModeColors privacyModeColors MEMBER privacyModeColors CONSTANT)
283+
Q_PROPERTY(PrivacyColors privacyColors MEMBER privacyColors CONSTANT)
292284

293285
public:
294286
explicit ThemePalette(QObject* parent = nullptr);
@@ -346,7 +338,6 @@ class ThemePalette : public QObject {
346338
StatusSelect statusSelect;
347339
StatusMessage statusMessage;
348340
CustomisationColors customisationColors;
349-
PrivacyModeColors privacyModeColors;
350341
PrivacyColors privacyColors;
351342
};
352343

ui/StatusQ/src/StatusQ/Controls/StatusNavBarTabButton.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ StatusIconTabButton {
1818
identicon.asset.color: (statusNavBarTabButton.hovered || highlighted || statusNavBarTabButton.checked) ?
1919
statusNavBarTabButton.thirdpartyServicesEnabled ?
2020
Theme.palette.primaryColor1 :
21-
Theme.palette.privacyModeColors.navButtonHighlightedColor :
21+
Theme.palette.privacyColors.tertiary :
2222
statusNavBarTabButton.thirdpartyServicesEnabled ?
2323
Theme.palette.baseColor1 :
24-
Theme.palette.privacyModeColors.navButtonColor
24+
Theme.palette.privacyColors.iconColor
2525

2626
StatusToolTip {
2727
id: statusTooltip

ui/StatusQ/src/StatusQ/Layout/StatusAppNavBar.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Rectangle {
3030
implicitWidth: 78
3131

3232
color: root.thirdpartyServicesEnabled ? Theme.palette.statusAppNavBar.backgroundColor :
33-
Theme.palette.privacyModeColors.navBarColor
33+
Theme.palette.privacyColors.primary
3434

3535
QtObject {
3636
id: d
436 KB
Loading
443 KB
Loading

ui/StatusQ/src/themepalette.cpp

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,12 @@ std::unique_ptr<ThemePalette> createDarkThemePalette(QObject* parent)
212212
t->statusMessage.emojiReactionBackgroundHovered = t->primaryColor3;
213213
t->statusMessage.emojiReactionBorderHovered = t->primaryColor2;
214214

215-
// Privacy mode colors
216-
t->privacyModeColors.navBarColor = QColor(0x5A, 0x33, 0xCA);
217-
t->privacyModeColors.navButtonColor = alpha(StatusColors::white, 0.4);
218-
t->privacyModeColors.navButtonHighlightedColor = StatusColors::white;
215+
// Privacy colors
216+
t->privacyColors.primary = QColor(0x34, 0x1D, 0x65);
217+
t->privacyColors.secondary = QColor(0x5B, 0x43, 0x8E);
218+
t->privacyColors.tertiary = StatusColors::white;
219+
t->privacyColors.tertiaryOpaque = alpha(StatusColors::white, 0.3);
220+
t->privacyColors.iconColor = alpha(StatusColors::white, 0.5);
219221

220222
// Customisation colors
221223
t->customisationColors.blue = QColor(0x22, 0x3B, 0xC4);
@@ -406,10 +408,12 @@ std::unique_ptr<ThemePalette> createLightThemePalette(QObject* parent)
406408
t->statusMessage.emojiReactionBackgroundHovered = t->primaryColor2;
407409
t->statusMessage.emojiReactionBorderHovered = t->primaryColor3;
408410

409-
// Privacy mode colors
410-
t->privacyModeColors.navBarColor = QColor(0x5A, 0x33, 0xCA);
411-
t->privacyModeColors.navButtonColor = alpha(StatusColors::white, 0.4);
412-
t->privacyModeColors.navButtonHighlightedColor = StatusColors::white;
411+
// Privacy colors
412+
t->privacyColors.primary = QColor(0xBE, 0xBB, 0xF9);
413+
t->privacyColors.secondary = QColor(0xD6, 0xD7, 0xF7);
414+
t->privacyColors.tertiary = QColor(0x20, 0x1C, 0x76);
415+
t->privacyColors.tertiaryOpaque = alpha(QColor(0x20, 0x1C, 0x76), 0.3);
416+
t->privacyColors.iconColor = QColor(0x64, 0x70, 0x84);
413417

414418
// Customisation colors
415419
t->customisationColors.blue = QColor(0x2A, 0x4A, 0xF5);
@@ -461,7 +465,7 @@ void registerThemePaletteType()
461465
qmlRegisterUncreatableType<StatusSelect>("StatusQ.Core.Theme", 1, 0, "StatusSelect", "");
462466
qmlRegisterUncreatableType<StatusMessage>("StatusQ.Core.Theme", 1, 0, "StatusMessage", "");
463467
qmlRegisterUncreatableType<CustomisationColors>("StatusQ.Core.Theme", 1, 0, "CustomisationColors", "");
464-
qmlRegisterUncreatableType<PrivacyModeColors>("StatusQ.Core.Theme", 1, 0, "PrivacyModeColors", "");
468+
qmlRegisterUncreatableType<PrivacyColors>("StatusQ.Core.Theme", 1, 0, "PrivacyColors", "");
465469

466470
qmlRegisterUncreatableType<ThemePalette>("StatusQ.Core.Theme", 1, 0, "ThemePalette", "");
467471
}

ui/imports/shared/panels/PrivacyWallCarousel.qml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Control {
3131
function getImagePath(currentIndex) {
3232
const imageName = root.model.get(currentIndex).image
3333
const platformPostfix = isSmallPortraitScreen ? "-small": ""
34-
const imagePath = "%1-%2%3".arg(imageName).arg(Theme.palette.name).arg(platformPostfix)
34+
const imagePath = "%1-%2%3".arg(imageName).arg(root.Theme.palette.name).arg(platformPostfix)
3535
return Assets.png(imagePath)
3636
}
3737
}
@@ -103,6 +103,7 @@ Control {
103103

104104
fillMode: Image.PreserveAspectFit
105105
asynchronous: true
106+
source: d.getImagePath(pageIndicator.currentIndex)
106107

107108
// cross-fade sequence
108109
SequentialAnimation {
@@ -124,8 +125,12 @@ Control {
124125
}
125126

126127
Component.onCompleted: {
127-
placeholderImage.source = d.getImagePath(pageIndicator.currentIndex)
128-
initialized = true
128+
/* In case there is only one image in the list no animation
129+
handling needed and default boinding will do the job */
130+
if(pageIndicator.count > 1) {
131+
placeholderImage.source = d.getImagePath(pageIndicator.currentIndex)
132+
initialized = true
133+
}
129134
}
130135
}
131136

@@ -153,8 +158,8 @@ Control {
153158
Layout.alignment: Qt.AlignHCenter
154159

155160
type: StatusBaseButton.Type.Primary
156-
normalColor: Theme.palette.privacyModeColors.navBarColor
157-
textColor: StatusColors.white
161+
normalColor: Theme.palette.privacyColors.primary
162+
textColor: Theme.palette.privacyColors.tertiary
158163

159164
text: qsTr("Enable third-party services")
160165

ui/imports/shared/popups/ThirdpartyServicesPopup.qml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ StatusDialog {
6767
model: ListModel {
6868
ListElement { text: qsTr("Wallet (Swap, Send, Token data, etc.)") }
6969
ListElement { text: qsTr("Market (Token data, prices, and news, etc.)") }
70+
ListElement { text: qsTr("Browser (browse web-pages, connect dApps)") }
7071
ListElement { text: qsTr("Token-gated communities and admin tools") }
7172
ListElement { text: qsTr("Status news, etc.") }
73+
ListElement { text: qsTr("Sync with NTP (Network Time Protocol) servers") }
7274
}
7375
}
7476

@@ -83,6 +85,7 @@ StatusDialog {
8385
model: ListModel {
8486
ListElement { text: qsTr("Missing or invalid data") }
8587
ListElement { text: qsTr("Errors and unexpected behavior") }
88+
ListElement { text: qsTr("Missed messages if your device time isn’t synced to network time") }
8689
}
8790
}
8891
}
@@ -124,8 +127,8 @@ StatusDialog {
124127
rightButtons: ObjectModel {
125128
StatusButton {
126129
type: StatusBaseButton.Type.Primary
127-
normalColor: Theme.palette.privacyModeColors.navBarColor
128-
textColor: StatusColors.white
130+
normalColor: Theme.palette.privacyColors.primary
131+
textColor: Theme.palette.privacyColors.tertiary
129132
text: {
130133
if(root.thirdPartyServicesEnabled) {
131134
if(root.isOnboardingFlow) {

0 commit comments

Comments
 (0)