diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-04-21 05:21:56 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-22 11:59:15 -0700 |
commit | 34628f8e6d2156d7eae9bfbb64d5b43ca58e1a34 (patch) | |
tree | 0993f7d0f4e4fb4aa5ebe6558bd6e2803432b6d1 /mobile-widgets | |
parent | be30724ba0eeaba214c099921579f2023d2a9a7a (diff) | |
download | subsurface-34628f8e6d2156d7eae9bfbb64d5b43ca58e1a34.tar.gz |
QML UI: add option to disable cloud to start screen
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qml/DiveList.qml | 8 | ||||
-rw-r--r-- | mobile-widgets/qml/icons/nocloud.svg | 71 | ||||
-rw-r--r-- | mobile-widgets/qml/mobile-resources.qrc | 1 |
3 files changed, 80 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index e5ce929d2..355e0ba34 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -217,6 +217,7 @@ Kirigami.ScrollablePage { onVisibleChanged: { if (visible) { page.actions.main = page.saveAction + page.actions.right = page.offlineAction title = "Cloud credentials" } else if(manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL) { page.actions.main = page.addDiveAction @@ -276,6 +277,13 @@ Kirigami.ScrollablePage { } } + property QtObject offlineAction: Action { + iconName: "qrc:/qml/nocloud.svg" + onTriggered: { + manager.syncToCloud = false + } + } + onBackRequested: { if (startPageWrapper.visible && diveListView.count > 0 && manager.credentialStatus != QMLManager.INVALID) { manager.credentialStatus = oldStatus diff --git a/mobile-widgets/qml/icons/nocloud.svg b/mobile-widgets/qml/icons/nocloud.svg new file mode 100644 index 000000000..0661d32e6 --- /dev/null +++ b/mobile-widgets/qml/icons/nocloud.svg @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + viewBox="0 0 22 22" + id="svg2" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="nocloud.svg"> + <metadata + id="metadata10"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1022" + inkscape:window-height="740" + id="namedview8" + showgrid="false" + inkscape:zoom="10.727273" + inkscape:cx="-2.8898305" + inkscape:cy="11" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="svg2" /> + <defs + id="defs3051"> + <style + type="text/css" + id="current-color-scheme"> + .ColorScheme-Text { + color:#4d4d4d; + } + </style> + </defs> + <path + style="fill:currentColor;fill-opacity:1;stroke:none" + d="M 11 4 A 6 6 0 0 0 5 10 A 6 6 0 0 0 5.0039062 10.128906 A 4 4 0 0 0 2 14 A 4 4 0 0 0 6 18 L 15 18 A 5 5 0 0 0 20 13 A 5 5 0 0 0 16.757812 8.3242188 A 6 6 0 0 0 11 4 z M 11 5 A 5 5 0 0 1 15.919922 9.1113281 A 4.0000019 4.0000019 0 0 1 19 13 A 4.0000019 4.0000019 0 0 1 15 17 L 6 17 A 2.9999979 2.9999979 0 0 1 3 14 A 2.9999979 2.9999979 0 0 1 6 11 A 2.9999979 2.9999979 0 0 1 6.1074219 11.005859 A 5 5 0 0 1 6 10 A 5 5 0 0 1 11 5 z " + class="ColorScheme-Text" + id="path6" /> + <path + style="opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 4.0550844,20.042373 18.877119,4.0084751" + id="path3338-1" + inkscape:connector-curvature="0" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:1" + d="M 3.8220339,19.855932 18.644068,3.8220339" + id="path3338" + inkscape:connector-curvature="0" /> +</svg> diff --git a/mobile-widgets/qml/mobile-resources.qrc b/mobile-widgets/qml/mobile-resources.qrc index a02896c59..4fe82a66a 100644 --- a/mobile-widgets/qml/mobile-resources.qrc +++ b/mobile-widgets/qml/mobile-resources.qrc @@ -21,6 +21,7 @@ <file alias="context-menu.png">icons/context-menu.png</file> <file alias="menu-edit.png">icons/menu-edit.png</file> <file alias="menu-back.png">icons/menu-back.png</file> + <file alias="nocloud.svg">icons/nocloud.svg</file> </qresource> <qresource prefix="/imports"> <file alias="org/kde/kirigami/qmldir">kirigami/qmldir</file> |