Changed loginPage to Dialog
This commit is contained in:
parent
2a47f51366
commit
0989216d90
5 changed files with 75 additions and 10 deletions
|
@ -2,14 +2,20 @@ import QtQuick 2.2
|
||||||
import Sailfish.Silica 1.0
|
import Sailfish.Silica 1.0
|
||||||
import Nemo.Configuration 1.0
|
import Nemo.Configuration 1.0
|
||||||
|
|
||||||
Page {
|
Dialog {
|
||||||
id: loginPage
|
id: loginDialog
|
||||||
|
|
||||||
property string accountId
|
property string accountId
|
||||||
|
|
||||||
property bool legacyLoginPossible: false
|
property bool legacyLoginPossible: false
|
||||||
property bool flowLoginV2Possible: false
|
property bool flowLoginV2Possible: false
|
||||||
|
|
||||||
|
onRejected: {
|
||||||
|
appSettings.removeAccount(accountId)
|
||||||
|
}
|
||||||
|
onAccepted: {
|
||||||
|
}
|
||||||
|
|
||||||
ConfigurationGroup {
|
ConfigurationGroup {
|
||||||
id: account
|
id: account
|
||||||
path: "/apps/harbour-nextcloudnotes/accounts/" + accountId
|
path: "/apps/harbour-nextcloudnotes/accounts/" + accountId
|
||||||
|
@ -23,7 +29,7 @@ Page {
|
||||||
property bool allowUnecrypted: account.value("allowUnecrypted", false, Boolean)
|
property bool allowUnecrypted: account.value("allowUnecrypted", false, Boolean)
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
pageHeader.title = name
|
dialogHeader.title = name
|
||||||
serverField.text = server ? server : allowUnecrypted ? "http://" : "https://"
|
serverField.text = server ? server : allowUnecrypted ? "http://" : "https://"
|
||||||
usernameField.text = username
|
usernameField.text = username
|
||||||
passwordField.text = password
|
passwordField.text = password
|
||||||
|
@ -52,7 +58,7 @@ Page {
|
||||||
if (notesApi.statusInstalled)
|
if (notesApi.statusInstalled)
|
||||||
serverField.focus = false
|
serverField.focus = false
|
||||||
else {
|
else {
|
||||||
pageHeader.title
|
dialogHeader.title
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onStatusVersionChanged: {
|
onStatusVersionChanged: {
|
||||||
|
@ -75,11 +81,11 @@ Page {
|
||||||
}
|
}
|
||||||
onStatusVersionStringChanged: {
|
onStatusVersionStringChanged: {
|
||||||
if (notesApi.statusVersionString)
|
if (notesApi.statusVersionString)
|
||||||
pageHeader.description = "Nextcloud " + notesApi.statusVersionString
|
dialogHeader.description = "Nextcloud " + notesApi.statusVersionString
|
||||||
}
|
}
|
||||||
onStatusProductNameChanged: {
|
onStatusProductNameChanged: {
|
||||||
if (notesApi.statusProductName) {
|
if (notesApi.statusProductName) {
|
||||||
pageHeader.title = notesApi.statusProductName
|
dialogHeader.title = notesApi.statusProductName
|
||||||
account.name = notesApi.statusProductName
|
account.name = notesApi.statusProductName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -139,8 +145,8 @@ Page {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: Theme.paddingLarge
|
spacing: Theme.paddingLarge
|
||||||
|
|
||||||
PageHeader {
|
DialogHeader {
|
||||||
id: pageHeader
|
id: dialogHeader
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
@ -148,7 +154,7 @@ Page {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
height: Theme.itemSizeHuge
|
height: Theme.itemSizeHuge
|
||||||
fillMode: Image.PreserveAspectFit
|
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 {
|
ProgressBar {
|
||||||
|
@ -204,7 +210,7 @@ Page {
|
||||||
|
|
||||||
TextSwitch {
|
TextSwitch {
|
||||||
id: forceLegacyButton
|
id: forceLegacyButton
|
||||||
visible: debug
|
visible: debug || !notesApi.statusInstalled
|
||||||
text: qsTr("Enforce legacy login")
|
text: qsTr("Enforce legacy login")
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
checked != checked
|
checked != checked
|
||||||
|
|
|
@ -208,6 +208,26 @@ Page {
|
||||||
checked: appSettings.useCapitalX
|
checked: appSettings.useCapitalX
|
||||||
onCheckedChanged: appSettings.useCapitalX = checked
|
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 {}
|
VerticalScrollDecorator {}
|
||||||
|
|
|
@ -516,6 +516,18 @@
|
||||||
<source>No sorting</source>
|
<source>No sorting</source>
|
||||||
<translation>Keine Sortierung</translation>
|
<translation>Keine Sortierung</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reset</source>
|
||||||
|
<translation type="unfinished">Zurücksetzen</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reset app settings</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Resetting the app wipes all application data from the device! This includes offline synced notes, app settings and accounts.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SyntaxPage</name>
|
<name>SyntaxPage</name>
|
||||||
|
|
|
@ -516,6 +516,18 @@
|
||||||
<source>No sorting</source>
|
<source>No sorting</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reset</source>
|
||||||
|
<translation type="unfinished">Återställ</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reset app settings</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Resetting the app wipes all application data from the device! This includes offline synced notes, app settings and accounts.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SyntaxPage</name>
|
<name>SyntaxPage</name>
|
||||||
|
|
|
@ -567,6 +567,21 @@
|
||||||
<source>Show notes marked as favorite above the others</source>
|
<source>Show notes marked as favorite above the others</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../qml/pages/SettingsPage.qml" line="213"/>
|
||||||
|
<source>Reset</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../qml/pages/SettingsPage.qml" line="216"/>
|
||||||
|
<source>Reset app settings</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../qml/pages/SettingsPage.qml" line="226"/>
|
||||||
|
<source>Resetting the app wipes all application data from the device! This includes offline synced notes, app settings and accounts.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/pages/SettingsPage.qml" line="147"/>
|
<location filename="../qml/pages/SettingsPage.qml" line="147"/>
|
||||||
<source>Last edited</source>
|
<source>Last edited</source>
|
||||||
|
|
Loading…
Reference in a new issue