Small fixes on accessing the account settings

This commit is contained in:
Scharel Clemens 2021-01-08 13:26:28 +01:00
parent 3e4d2de07b
commit d6682b7b69
5 changed files with 19 additions and 51 deletions

View file

@ -71,7 +71,7 @@ ApplicationWindow
id: account id: account
Connections { Connections {
target: appSettings target: appSettings
onCurrentAccountChanged: path = appSettings.path + "/accounts/" + currentAccount onCurrentAccountChanged: account.path = appSettings.path + "/accounts/" + appSettings.currentAccount
} }
property url url: value("url", "", String) property url url: value("url", "", String)
@ -143,7 +143,7 @@ ApplicationWindow
console.log("Device is " + (accessible ? "online" : "offline")) console.log("Device is " + (accessible ? "online" : "offline"))
if (accessible) { if (accessible) {
offlineNotification.close(Notification.Closed) offlineNotification.close(Notification.Closed)
getAllNotes() notesApi.getAllNotes()
} }
else { else {
offlineNotification.publish() offlineNotification.publish()

View file

@ -51,15 +51,18 @@ Page {
highlighted: accountTextSwitch.down highlighted: accountTextSwitch.down
ConfigurationGroup { ConfigurationGroup {
id: account id: settingsAccount
path: appSettings.path + "/accounts/" + modelData path: appSettings.path + "/accounts/" + modelData
onPathChanged: console.log(path)
Component.onCompleted: {
accountTextSwitch.text = value("name", qsTr("Account %1").arg(index+1))
accountTextSwitch.description = value("username") + "@" + value("url")
}
} }
TextSwitch { TextSwitch {
id: accountTextSwitch id: accountTextSwitch
automaticCheck: false automaticCheck: false
text: account.username
description: account.url
checked: modelData === appSettings.currentAccount checked: modelData === appSettings.currentAccount
onClicked: { onClicked: {
appSettings.currentAccount = modelData appSettings.currentAccount = modelData

View file

@ -215,17 +215,6 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>LoginWebView</name>
<message>
<source>%1 Login</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Nextcloud Login</source>
<translation type="unfinished">Nextcloud Login</translation>
</message>
</context>
<context> <context>
<name>MITLicense</name> <name>MITLicense</name>
<message> <message>
@ -548,7 +537,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Reset app</source> <source>Cleared app data</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -215,17 +215,6 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>LoginWebView</name>
<message>
<source>%1 Login</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Nextcloud Login</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>MITLicense</name> <name>MITLicense</name>
<message> <message>
@ -548,7 +537,7 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Reset app</source> <source>Cleared app data</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>

View file

@ -264,19 +264,6 @@
<translation></translation> <translation></translation>
</message> </message>
</context> </context>
<context>
<name>LoginWebView</name>
<message>
<location filename="../qml/pages/LoginWebView.qml" line="8"/>
<source>%1 Login</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginWebView.qml" line="8"/>
<source>Nextcloud Login</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>MITLicense</name> <name>MITLicense</name>
<message> <message>
@ -595,17 +582,17 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/SettingsPage.qml" line="217"/> <location filename="../qml/pages/SettingsPage.qml" line="216"/>
<source>Reset app settings</source> <source>Reset app settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/SettingsPage.qml" line="219"/> <location filename="../qml/pages/SettingsPage.qml" line="218"/>
<source>Reset app</source> <source>Cleared app data</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/SettingsPage.qml" line="222"/> <location filename="../qml/pages/SettingsPage.qml" line="221"/>
<source>Resetting the app wipes all application data from the device! This includes offline synced notes, app settings and accounts.</source> <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> <translation type="unfinished"></translation>
</message> </message>
@ -887,27 +874,27 @@ You can also use other markdown syntax inside them.</source>
<context> <context>
<name>harbour-nextcloudnotes</name> <name>harbour-nextcloudnotes</name>
<message> <message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="93"/> <location filename="../qml/harbour-nextcloudnotes.qml" line="100"/>
<source>Notes</source> <source>Notes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="94"/> <location filename="../qml/harbour-nextcloudnotes.qml" line="101"/>
<source>Offline</source> <source>Offline</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="95"/> <location filename="../qml/harbour-nextcloudnotes.qml" line="102"/>
<source>Synced</source> <source>Synced</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="109"/> <location filename="../qml/harbour-nextcloudnotes.qml" line="116"/>
<source>API error</source> <source>API error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="102"/> <location filename="../qml/harbour-nextcloudnotes.qml" line="109"/>
<source>File error</source> <source>File error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>