diff --git a/qml/pages/LoginPage.qml b/qml/pages/LoginPage.qml
index 47fe0f8..65ef97b 100644
--- a/qml/pages/LoginPage.qml
+++ b/qml/pages/LoginPage.qml
@@ -2,14 +2,20 @@ import QtQuick 2.2
import Sailfish.Silica 1.0
import Nemo.Configuration 1.0
-Page {
- id: loginPage
+Dialog {
+ id: loginDialog
property string accountId
property bool legacyLoginPossible: false
property bool flowLoginV2Possible: false
+ onRejected: {
+ appSettings.removeAccount(accountId)
+ }
+ onAccepted: {
+ }
+
ConfigurationGroup {
id: account
path: "/apps/harbour-nextcloudnotes/accounts/" + accountId
@@ -23,7 +29,7 @@ Page {
property bool allowUnecrypted: account.value("allowUnecrypted", false, Boolean)
Component.onCompleted: {
- pageHeader.title = name
+ dialogHeader.title = name
serverField.text = server ? server : allowUnecrypted ? "http://" : "https://"
usernameField.text = username
passwordField.text = password
@@ -52,7 +58,7 @@ Page {
if (notesApi.statusInstalled)
serverField.focus = false
else {
- pageHeader.title
+ dialogHeader.title
}
}
onStatusVersionChanged: {
@@ -75,11 +81,11 @@ Page {
}
onStatusVersionStringChanged: {
if (notesApi.statusVersionString)
- pageHeader.description = "Nextcloud " + notesApi.statusVersionString
+ dialogHeader.description = "Nextcloud " + notesApi.statusVersionString
}
onStatusProductNameChanged: {
if (notesApi.statusProductName) {
- pageHeader.title = notesApi.statusProductName
+ dialogHeader.title = notesApi.statusProductName
account.name = notesApi.statusProductName
}
}
@@ -139,8 +145,8 @@ Page {
width: parent.width
spacing: Theme.paddingLarge
- PageHeader {
- id: pageHeader
+ DialogHeader {
+ id: dialogHeader
}
Image {
@@ -148,7 +154,7 @@ Page {
anchors.horizontalCenter: parent.horizontalCenter
height: Theme.itemSizeHuge
fillMode: Image.PreserveAspectFit
- source: "../img/nextcloud-logo-transparent.png"
+ source: Theme.colorScheme === Theme.DarkOnLight ? "../img/nextcloud-logo-dark.png" : "../img/nextcloud-logo-light.png"
}
ProgressBar {
@@ -204,7 +210,7 @@ Page {
TextSwitch {
id: forceLegacyButton
- visible: debug
+ visible: debug || !notesApi.statusInstalled
text: qsTr("Enforce legacy login")
onCheckedChanged: {
checked != checked
diff --git a/qml/pages/SettingsPage.qml b/qml/pages/SettingsPage.qml
index 57b9fd3..ade4463 100644
--- a/qml/pages/SettingsPage.qml
+++ b/qml/pages/SettingsPage.qml
@@ -208,6 +208,26 @@ Page {
checked: appSettings.useCapitalX
onCheckedChanged: appSettings.useCapitalX = checked
}
+
+ SectionHeader {
+ text: qsTr("Reset")
+ }
+ Button {
+ text: qsTr("Reset app settings")
+ anchors.horizontalCenter: parent.horizontalCenter
+ RemorseItem { id: resetRemorse }
+ ConfigurationGroup {
+ id: appConfig
+ path: "/apps/harbour-nextcloudnotes"
+ }
+ onClicked: resetRemorse.execute(this, "Reset app", appConfig.clear())
+ }
+ LinkedLabel {
+ text: qsTr("Resetting the app wipes all application data from the device! This includes offline synced notes, app settings and accounts.")
+ x: Theme.horizontalPageMargin
+ width: parent.width - 2*x
+ }
+
}
VerticalScrollDecorator {}
diff --git a/translations/harbour-nextcloudnotes-de.ts b/translations/harbour-nextcloudnotes-de.ts
index 120c359..4618006 100644
--- a/translations/harbour-nextcloudnotes-de.ts
+++ b/translations/harbour-nextcloudnotes-de.ts
@@ -516,6 +516,18 @@
Keine Sortierung
+
+
+ Zurücksetzen
+
+
+
+
+
+
+
+
+
SyntaxPage
diff --git a/translations/harbour-nextcloudnotes-sv.ts b/translations/harbour-nextcloudnotes-sv.ts
index e23a289..3fdef37 100644
--- a/translations/harbour-nextcloudnotes-sv.ts
+++ b/translations/harbour-nextcloudnotes-sv.ts
@@ -516,6 +516,18 @@
+
+
+ Återställ
+
+
+
+
+
+
+
+
+
SyntaxPage
diff --git a/translations/harbour-nextcloudnotes.ts b/translations/harbour-nextcloudnotes.ts
index bfbc161..3d2e03a 100644
--- a/translations/harbour-nextcloudnotes.ts
+++ b/translations/harbour-nextcloudnotes.ts
@@ -567,6 +567,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+