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

View file

@ -51,15 +51,18 @@ Page {
highlighted: accountTextSwitch.down
ConfigurationGroup {
id: account
id: settingsAccount
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 {
id: accountTextSwitch
automaticCheck: false
text: account.username
description: account.url
checked: modelData === appSettings.currentAccount
onClicked: {
appSettings.currentAccount = modelData

View file

@ -215,17 +215,6 @@
<translation type="unfinished"></translation>
</message>
</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>
<name>MITLicense</name>
<message>
@ -548,7 +537,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset app</source>
<source>Cleared app data</source>
<translation type="unfinished"></translation>
</message>
</context>

View file

@ -215,17 +215,6 @@
<translation type="unfinished"></translation>
</message>
</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>
<name>MITLicense</name>
<message>
@ -548,7 +537,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<source>Reset app</source>
<source>Cleared app data</source>
<translation type="unfinished"></translation>
</message>
</context>

View file

@ -264,19 +264,6 @@
<translation></translation>
</message>
</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>
<name>MITLicense</name>
<message>
@ -595,17 +582,17 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/SettingsPage.qml" line="217"/>
<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="219"/>
<source>Reset app</source>
<location filename="../qml/pages/SettingsPage.qml" line="218"/>
<source>Cleared app data</source>
<translation type="unfinished"></translation>
</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>
<translation type="unfinished"></translation>
</message>
@ -887,27 +874,27 @@ You can also use other markdown syntax inside them.</source>
<context>
<name>harbour-nextcloudnotes</name>
<message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="93"/>
<location filename="../qml/harbour-nextcloudnotes.qml" line="100"/>
<source>Notes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="94"/>
<location filename="../qml/harbour-nextcloudnotes.qml" line="101"/>
<source>Offline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="95"/>
<location filename="../qml/harbour-nextcloudnotes.qml" line="102"/>
<source>Synced</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="109"/>
<location filename="../qml/harbour-nextcloudnotes.qml" line="116"/>
<source>API error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="102"/>
<location filename="../qml/harbour-nextcloudnotes.qml" line="109"/>
<source>File error</source>
<translation type="unfinished"></translation>
</message>