-
Notifications
You must be signed in to change notification settings - Fork 117
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
VPN-4691: Add location selection help sheet #8873
Changes from all commits
dce95c5
990ae8a
1082691
9c29a43
413e9a5
9da993f
01ff742
af44c78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,24 @@ Item { | |
title: defaultMenuTitle | ||
onActiveFocusChanged: if (focus) forceFocus = true | ||
|
||
rightButtonComponent: Component { | ||
Loader { | ||
active: MZFeatureList.get("helpSheets").isSupported | ||
sourceComponent: MZIconButton { | ||
onClicked: helpSheetLoader.active = true | ||
|
||
accessibleName: MZI18n.GlobalHelp | ||
|
||
Image { | ||
anchors.centerIn: parent | ||
|
||
source: "qrc:/nebula/resources/question.svg" | ||
fillMode: Image.PreserveAspectFit | ||
} | ||
} | ||
} | ||
} | ||
|
||
_menuOnBackClicked: () => { | ||
if (multiHopStackView && multiHopStackView.depth > 1) { | ||
// User clicked back from either the Multi-hop entry or exit server list | ||
|
@@ -131,6 +149,27 @@ Item { | |
} | ||
} | ||
|
||
Loader { | ||
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. A 'HelpSheetLoader' component is starting to sound better and better. 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. yea... or even just a loader as the base for all sheets. will do this for all in a fast follow |
||
id: helpSheetLoader | ||
|
||
active: false | ||
|
||
onActiveChanged: if (active) item.open() | ||
|
||
sourceComponent: MZHelpSheet { | ||
title: MZI18n.HelpSheetsLocationTitle | ||
|
||
model: [ | ||
{type: MZHelpSheet.BlockType.Title, text: MZI18n.HelpSheetsLocationHeader}, | ||
{type: MZHelpSheet.BlockType.Text, text: MZI18n.HelpSheetsLocationBody1, margin: 8}, | ||
{type: MZHelpSheet.BlockType.Text, text:MZI18n.HelpSheetsLocationBody2, margin: 16}, | ||
{type: MZHelpSheet.BlockType.LinkButton, text: MZI18n.GlobalLearnMore, margin: 16, action: () => { MZUrlOpener.openUrlLabel("sumoMultihop") } }, | ||
] | ||
|
||
onClosed: helpSheetLoader.active = false | ||
} | ||
} | ||
|
||
Component.onCompleted: { | ||
if (!MZFeatureList.get("multiHop").isSupported) { | ||
return; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,19 +156,6 @@ FocusScope { | |
right: parent.right | ||
} | ||
|
||
MZCollapsibleCard { | ||
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. 🤩✨🧹👋 ...This is a great way for ServerList.qml to start the new year. |
||
anchors.horizontalCenter: parent.horizontalCenter | ||
|
||
iconSrc: "qrc:/ui/resources/tip.svg" | ||
contentItem: MZTextBlock { | ||
text: MZI18n.ServersViewRecommendedCardBody | ||
textFormat: Text.StyledText | ||
Layout.fillWidth: true | ||
} | ||
title: MZI18n.ServersViewRecommendedCardTitle | ||
width: parent.width - MZTheme.theme.windowMargin * 2 | ||
} | ||
|
||
// Status component | ||
// TODO: Refresh server list and handle states | ||
MZClickableRow { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@flodolo format is incorrect now, but will be resolved once #8864 is merged. These strings will fall under the helpSheets label