aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/CloudCredentials.qml
AgeCommit message (Collapse)Author
2020-02-03mobile-widgets/qml: add TemplateButtonGravatar jan Iversen
Do "git mv SsrfButton TemplateButton", and search/replace all uses. The general idea of the templates are to secure common layout, but also to isolate the Kirigami parts (slowly) in the templates. Signed-off-by: Jan Iversen <jani@apache.org>
2020-01-18mobile-widgets/qml: use strongly typed CloudStatusGravatar jan Iversen
Replace CloudStatus.<value> with backend.<value> as part of making enum sharing between C/C++ and QML more robust. Replace PrefCloudStorage.verification_status with backend.verification_status to use the strongly typed function. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-02mobile-widgets/qml: reintroduce showPinGravatar jan Iversen
but the proper way, as a direct check on PrefCloudStorage. This secures PrefCloudStorage is only tested once and not n times. As a sideeffect it saves typing and control. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-29mobile-widgets: use oldStatus in qmlmanagerGravatar jan Iversen
Switch oldStatus from qmlprefs to qmlmanager This is the last use of QMLPrefs, which can later be safely removed. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets/qml: remove prefs.showPinGravatar jan Iversen
prefs.showpin is the same as PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY but is actually implemented as a separate variable. Removing showPin in order to limit use of QMLPrefs, which is the overall goal. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: credentialStatus() -> cloud_verification_status()Gravatar jan Iversen
Replace all credentialStatus() with cloud_verification_status() Where both prefs.credentialStatus and PrefCloudStorage.cloud_verification_status are being set, remove prefs.credentialStatus. These replacements are valid since credentialStatus() is a simple envelope over cloud_verification_status(). Also remove qmlPrefs::credentialStatus() from qmlPrefs (mostly to ensure no replacements was forgotten). Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: correct missing parm in saveCredentials() callGravatar jan Iversen
Add missing empty pin ("") in saveCredentials() call. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: make saveCredentials() an atomGravatar jan Iversen
Add pin parameter to saveCredentials() thereby having all info about credentials in one function call. Add "" as pin in saveCredentials() - main.qml, when verifying credentials. replace verifyCredentials() with saveCredentials() in the register button on the pin page. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: don't call cancelCredentialsPinSetup()Gravatar jan Iversen
Copy functionality from cancelCredentialsPinSetup() into Cancel in CloudCredentials.qml, this is part of the general qmlprefs cleanup. Remove rootItem.returnTopPage() since the user stays on this page (sees credentials again). Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets/qml: add "forgot password" buttonGravatar jan Iversen
The user is most likely to find out, that he does not remember the password, when asked for it. Add "forgot password" button in the signin dialog (both credentials and pin dialog). Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26mobile-widgets: remove envelope of saveCredentialsGravatar jan Iversen
Remove QML saveCredentials since it only calls manager.saveCredentials Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26mobile-widgets/qml: correct Pin pageGravatar jan Iversen
Did not switch to divelog page. call verifyCredentials() not saveCredentials when checking pin Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26mobile-widgets: correct switch to no-cloud mode.Gravatar jan Iversen
saveCredentials() missed parameters Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24mobile UI/login: fix PIN entry pageGravatar Dirk Hohndel
In commit a4d299e01e ("mobile-widgets/qml: use showPin/oldStatus consistently") one instance of rootItem.showPin wasn't replaced with prefs.showPin and as a result we had a very strange password entry line in the middle of the PIN entry screen. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24mobile UI/login: replace use of cloudPasswordGravatar jan Iversen
Replace prefs.cloudPassword with PrefCloudStorage.cloud_storage_password in QML Replace QMLPrefs.....cloudPassword with PrefCloudStorage::cloud_storage_password in C++ Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24mobile UI/login: replace use of cloudUserNameGravatar jan Iversen
Replace prefs.cloudUserName with PrefCloudStorage.cloud_storage_email in QML Replace QMLPrefs.....cloudUserName with PrefCloudStorage::cloud_storage_email in C++ Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-25mobile-widgets: make saveCredentials() an atomGravatar jan Iversen
Call saveCredentials with username/password to avoid first setting the two and then calling. Change saveCredentials() to use newUser, newPassword. Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24mobile-widgets/qml: use showPin/oldStatus consistentlyGravatar jan Iversen
Remove aliases for showPin/oldStatus and reference prefs.showPin/oldStatus directly. showPin/oldStatus are "temporary" variables, that are not saved in settings, so they easily be replaced Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24new mobile login: remove non existing function from CloudCredentialsGravatar jan Iversen
the function manager.accessingCloud is not defined in QMLManager.h Remove manager.accessingCloud. Signed-off-by: Jan Iversen <jani@apache.org>
2018-10-09Mobile: factor out syncToCloud [3/3]Gravatar Jan Mulder
After the previous commits, we now have a preference that nicely preserves the state of the UI, and we have the well known git_local_only global, that is used to denote whether we want to use to local repo only, or we want to interact with the online cloud as well. This commit gets rid of the now superfluous syncToCloud logic. Instead we simply set the git_local_only directly. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-09Mobile: preserve auto download status [2/3]Gravatar Jan Mulder
Hook up the new preference to the UI. So now, an earlier choice if automatic or manual download to the cloud is preserved in between sessions. Strictly speaking this fixes issue 1725. Notice that there is also a higly related syncToCloud thing present. As factoring out that seemingly duplicate piece of code is non-trivial, this will be done in a seperate commit. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-01Mobile QML UI: bump Kirigami imports to 2.4Gravatar Jan Mulder
Primarily for reasens of keeping up with upstream. And hopefully bugfixes and added functionality. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-11core,tests: change qml register functionGravatar jan Iversen
In order to address the C++ object directy in qml, a different registration is needed. qmlRegisterType, registers the C++ class, allowing qml code to inherit from it and make qml objects. This is needed for graphical elemnets like profile and map setContentProperty, registers the C++ object, thus allowing signals to be catched. Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-10core: make qPref::cloud_status the only version of the enumGravatar jan Iversen
add enum to qPref and remove elsewhere update source core to reference qPref. the enum cannot be in pref.h because it is to be used in qml and Q_ENUM need the enum to be defined as part of the class Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-26QML UI: don't use anchors within LayoutsGravatar Dirk Hohndel
Qt 5.11 adds useful warnings when code attempts to use anchors within Layouts and even tells you how to fix things. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-20QML UIL: fix more problems with members moving from manager to prefsGravatar Dirk Hohndel
That change clearly would have benefited from better code review. This is a superset of a change proposed by Jan Iversen. Closes #1406 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-16mobile: fix reference to credentialStatus propertyGravatar Murillo Bernardes
Commit b8eb348f moved credentialStatus but missed one spot. When starting from a fresh install, clicking "No cloud mode” fails because of this. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-06-15mobile: move settings from qmlmanager to qmlprefsGravatar jan Iversen
add settings variables/functions to qmlprefs remove settings variables/functions from qmlmanager change manager. to prefs. in qml files for setting variables/functions Signed-off-by: Jan Iversen <jani@apache.org>
2017-11-19QML UI: QtQuick.Layouts to 1.2Gravatar Jan Mulder
And again, no visual changes. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-19QML UI: QtQuick.Controls to version 2.2Gravatar Jan Mulder
Tested fine without visual changes. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-19QML UI: QtQuick to 2.6Gravatar Jan Mulder
Upgrade QtQuick to 2.6. Seeing a small artifact in the application header, lets see what happens when upgrading more includes. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-11-19QML UI: Kirigami to 2.2Gravatar Jan Mulder
When first tested this commit, especially the dive list was looking terrible. However, after including newer SHA's from libkirigami, and correcting lots of spacing/margin issue, a retest of this commit shows no strange artifact any more, and the amount of warnings in the log output is reduced significantly. So now, it appears save to upgrade. Notice that main.qml still uses Kirigami 2.0. and is not updated in this commit. With version 2.2, there is a new way of theming, that is not (yet) compatible with our current code. Blindly upgrading to 2.2 leads to a almost black dive list, wrong button colors, and runtime errors in the log, due to the fact the direct setting from QML Kirigami's Theme colors is not allowed any more. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-17mobile: silence deprecated messages in logging about Kirigami.LabelGravatar Jan Mulder
Commit 8f6827ab122 brought a new SHA for Kirigami, but that introduces a very noisy logging of "Kirigami.Label is deprecated. Use QtQuickControls2.Label instead". So, thats what done here. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-17mobile: No cloud repo creation more explicitGravatar Jan Mulder
Before this change, there was only one way to create the local no cloud repo on the device. The user needed to add at least one dive to the no cloud account (so that there is something to save). While this worked in some scenarios, it could also get things in an inconsistent state: credential status = CS_NOCLOUD but no local repo. This was a dead end. In this commit, the creation of the no cloud repo is made more explicit. When asking for no cloud mode, just create an (empty) repo for it when it does not yet exist, and otherwise, just open the existing (possibly empty) repo. Now, a user can have no cloud repo, next to (any number of) cloud accounts. This leaves one functional aspect left: how does a user abandon the no cloud repo, by merging his data into a true cloud account. This is code for this, that tries to do this merge in a smart way. This seems to be broken (too). To be clear: this is no part of this commit. Fixes: #667 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29QML UI: cleanup some whitespace and string formattingGravatar Jan Mulder
This addresses some review comment on whitespace and translated string formatting. In the string formatting, a tiny additional change is made. I wanted the email address in the explanation text in a bold font. Using the HTML <b> for this, removed the /n newline characters in the output. Apparantly, mixing these two formatting styles does not work. No problem, replaced the /n to HTML style too. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29QML UI: rework single credential page to two pagesGravatar Jan Mulder
This commit tries to implement most of issue #515. It reworks the one credential page, which its dynamic PIN part, into two pages. Main driver of selecting one of the two pages is the showPin boolean. Page 1 contains the email/passwd field (and the option to use a no cloud setup). Page 2 only contains the PIN part (and the option to cancel the process). The Kirigami central button does not seem very handy here. We need, for example, a cancel, sign-in and register, only register, etc. buttons, which are not easy to handle in specific icons. Therefore, normal pushbuttons are chosen to deal with user interaction, and the Kirigami button is removed from these pages. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-08-03QML UI: Settings: remove more marginsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-08-03QML UI: CloudCredentials: better use of spaceGravatar Dirk Hohndel
No idea why this was restricted to be so narrow. Also, making the font of the label smaller and lighter seems visually more pleasing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-08-03QML UI: remove unused codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-26QML UI: remove obsolete debugging codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-26QML UI: remove "show password" switch and only show pw on first entryGravatar Jan Mulder
Like the subject says. We do not want the password to be made visible, so a switch to show it, is useless and is therefore removed. Futher, the entry mode is set to PasswordEchoOnEdit, which causes the passwd to be visible (for easy entry), but can't be made visible again after save/end edit. Fixes: #512 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-26QML UI: replace all switches with our ownGravatar Joakim Bygdell
As per title, helps simplify theme modifications. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-22QML UI: save credentials as they are bein enteredGravatar Dirk Hohndel
We removed the action button for saving on the Settings page, so credentials never got saved. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-22QML UI: don't disclose the current passwordGravatar Dirk Hohndel
This isn't perfect, but at least it doesn't disclose a password that isn't currently being edited. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-23QML UI: fix typoGravatar Joakim Bygdell
Simple typo fix. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-23Mobile settings: stylize switchesGravatar Rick Walsh
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
2017-07-23Mobile Settings formattingGravatar Rick Walsh
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
2017-07-23Mobile: consolidate settings to one page and menu entryGravatar Joakim Bygdell
Addresses: #492 Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Had a bit of rebase issue with this one. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-04-29Add SPDX header to mobile widgets and QML filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-01QML UI: Fully port dive edit to Kirigami2Gravatar Marco Martin
Completely adapt to the api changes of OverlaySheet in Kirigami2 in order to achieve the same look and behavior for the dive edits that had with kirigami1 Port most components to QtQuickContrls2, except comboboxes in the dive edit sheet that will need a new control type Signed-off-by: Marco Martin <notmart@gmail.com>