A somehow working version again

This commit is contained in:
Scharel Clemens 2020-03-29 18:03:05 +02:00
parent 9616dfc6be
commit ffffd306d6
15 changed files with 275 additions and 190 deletions

View file

@ -16,8 +16,7 @@ CONFIG += sailfishapp
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
HEADERS += \
src/note.h \
HEADERS += src/note.h \
src/notesapi.h \
src/notesmodel.h
@ -27,7 +26,6 @@ SOURCES += src/harbour-nextcloudnotes.cpp \
src/notesmodel.cpp
DISTFILES += qml/harbour-nextcloudnotes.qml \
LoginWebview.qml \
qml/cover/CoverPage.qml \
qml/pages/LoginPage.qml \
rpm/harbour-nextcloudnotes.changes.run.in \

View file

@ -9,24 +9,14 @@ ApplicationWindow
{
id: appWindow
//property NotesApi notesApi
Component.onCompleted: {
notesApi.scheme = account.allowUnecrypted ? "http" : "https"
notesApi.host = account.server
notesApi.username = account.username
notesApi.password = account.password
notesApi.sslVerify = !account.doNotVerifySsl
notesApi.dataFile = appSettings.currentAccount !== "" ? StandardPaths.data + "/" + appSettings.currentAccount + ".json" : ""
}
// All configured accounts
ConfigurationValue {
id: accounts
key: appSettings.path + "/accountIDs"
defaultValue: [ ]
}
// Current account in use
ConfigurationGroup {
id: account
path: "/apps/harbour-nextcloudnotes/accounts/" + appSettings.currentAccount
@ -39,32 +29,27 @@ ApplicationWindow
property bool doNotVerifySsl: account.value("doNotVerifySsl", false, Boolean)
property bool allowUnecrypted: account.value("allowUnecrypted", false, Boolean)
property date update: value("update", "", Date)
onValuesChanged: console.log("A property of the current account has changed")
onNameChanged: console.log("Account: " + name)
onServerChanged: notesApi.server = server
onUsernameChanged: notesApi.username = username
onPasswordChanged: notesApi.password = password
onDoNotVerifySslChanged: notesApi.sslVerify = !doNotVerifySsl
onPathChanged: notesApi.dataFile = appSettings.currentAccount !== "" ? StandardPaths.data + "/" + appSettings.currentAccount + ".json" : ""
}
// General settings of the app
ConfigurationGroup {
id: appSettings
path: "/apps/harbour-nextcloudnotes/settings"
property bool initialized: false
property string currentAccount: value("currentAccount", "", String)
property var accountIDs: value("accountIDs", [ ], Array)
property int autoSyncInterval: value("autoSyncInterval", 0, Number)
property int previewLineCount: value("previewLineCount", 4, Number)
property bool favoritesOnTop: value("favoritesOnTop", true, Boolean)
property string sortBy: value("sortBy", "prettyDate", String)
property string sortBy: value("sortBy", "modifiedString", String)
property bool showSeparator: value("showSeparator", false, Boolean)
property bool useMonoFont: value("useMonoFont", false, Boolean)
property bool useCapitalX: value("useCapitalX", false, Boolean)
onCurrentAccountChanged: {
account.path = "/apps/harbour-nextcloudnotes/accounts/" + currentAccount
account.sync()
if (initialized)
notesApi.getAllNotes();
autoSyncTimer.restart()
}
Component.onCompleted: initialized = true
function addAccount() {
var uuid = uuidv4()
@ -74,25 +59,36 @@ ApplicationWindow
accounts.sync()
return uuid
}
ConfigurationGroup {
id: removeHelperConfGroup
}
function removeAccount(uuid) {
autoSyncTimer.stop()
var confGroup = ConfigurationGroup
confGroup.path = "/apps/harbour-nextcloudnotes/accounts/" + uuid
for (var i = accountIDs.length-1; i >= 0; i--) {
if (accountIDs[i] !== uuid && appSettings.currentAccount === uuid) {
appSettings.currentAccount = accountIDs[i]
}
else if (accountIDs[i] === uuid) {
accountIDs.splice(i, 1)
var tmpIDs = accounts.value
removeHelperConfGroup.path = "/apps/harbour-nextcloudnotes/accounts/" + uuid
for (var i = tmpIDs.length-1; i >= 0; i--) {
console.log(tmpIDs)
console.log("Checking:" + tmpIDs[i])
if (tmpIDs[i] === uuid) {
console.log("Found! Removing ...")
tmpIDs.splice(i, 1)
}
console.log(tmpIDs)
}
if (appSettings.currentAccount === uuid) {
appSettings.currentAccount = ""
for (var i = tmpIDs.length-1; i >= 0 && appSettings.currentAccount === ""; i--) {
if (tmpIDs[i] !== uuid) {
appSettings.currentAccount = tmpIDs[i]
}
}
}
confGroup.clear()
removeHelperConfGroup.clear()
if (autoSyncInterval > 0 && appWindow.visible) {
autoSyncTimer.start()
}
accounts.value = tmpIDs
accounts.sync()
}
function uuidv4() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
@ -108,14 +104,14 @@ ApplicationWindow
appName: "Nextcloud " + qsTr("Notes")
summary: qsTr("Offline")
body: qsTr("Synced") + ": " + new Date(account.update).toLocaleString(Qt.locale())
Component.onDestruction: close(Notification.Expired)
Component.onDestruction: close()
}
Notification {
id: errorNotification
appName: offlineNotification.appName
summary: qsTr("Error")
Component.onDestruction: close(Notification.Expired)
Component.onDestruction: close()
}
Timer {
@ -123,7 +119,7 @@ ApplicationWindow
interval: appSettings.autoSyncInterval * 1000
repeat: true
running: interval > 0 && notesApi.networkAccessible && appWindow.visible
triggeredOnStart: false
triggeredOnStart: true
onTriggered: {
if (!notesApi.busy) {
notesApi.getAllNotes();
@ -142,15 +138,6 @@ ApplicationWindow
NotesApi {
id: notesApi
scheme: account.allowUnecrypted ? "http" : "https"
host: account.server
username: account.username
password: account.password
sslVerify: !account.doNotVerifySsl
dataFile: appSettings.currentAccount !== "" ? StandardPaths.data + "/" + appSettings.currentAccount + ".json" : ""
Component.onCompleted: {
getAllNotes()
}
onNetworkAccessibleChanged: {
console.log("Device is " + (networkAccessible ? "online" : "offline"))
networkAccessible ? offlineNotification.close(Notification.Closed) : offlineNotification.publish()
@ -167,7 +154,6 @@ ApplicationWindow
}
initialPage: Component { NotesPage { } }
//initialPage: Component { LoginPage { } } // testing
cover: Qt.resolvedUrl("cover/CoverPage.qml")
allowedOrientations: defaultAllowedOrientations
}

@ -1 +1 @@
Subproject commit 8afa1fff0e1de2481e0545be17a906e2a68bb4e2
Subproject commit 483e51f7a624c94c95787a14cbf577c053f8076f

View file

@ -14,17 +14,35 @@ Page {
ConfigurationGroup {
id: account
path: "/apps/harbour-nextcloudnotes/accounts/" + accountId
property string name: value("name", qsTr("Nextcloud Login"), String)
property url server: value("server", "", String)
property string version: value("version", "v0.2", String)
property string username: value("username", "", String)
property string password: account.value("password", "", String)
property bool doNotVerifySsl: account.value("doNotVerifySsl", false, Boolean)
property bool allowUnecrypted: account.value("allowUnecrypted", false, Boolean)
Component.onCompleted: {
pageHeader.title = value("name", qsTr("Nextcloud Login"), String)
serverField.text = "https://" + value("server", "", String)
usernameField.text = value("username", "", String)
passwordField.text = value("password", "", String)
unsecureConnectionTextSwitch.checked = value("unsecureConnection", false, Boolean)
unencryptedConnectionTextSwitch.checked = value("unencryptedConnection", false, Boolean)
pageHeader.title = name
serverField.text = server ? server : allowUnecrypted ? "http://" : "https://"
usernameField.text = username
passwordField.text = password
unsecureConnectionTextSwitch.checked = doNotVerifySsl
unencryptedConnectionTextSwitch.checked = allowUnecrypted
if (username !== "" && password !== "") {
notesApi.server = server
notesApi.username = username
notesApi.password = password
notesApi.sslVerify = !doNotVerifySsl
notesApi.verifyLogin()
}
}
}
onStatusChanged: {
if (status === PageStatus.Activating)
notesApi.getNcStatus()
if (status === PageStatus.Deactivating)
notesApi.abortFlowV2Login()
}
@ -34,6 +52,9 @@ Page {
onStatusInstalledChanged: {
if (notesApi.statusInstalled)
serverField.focus = false
else {
pageHeader.title
}
}
onStatusVersionChanged: {
if (notesApi.statusVersion) {
@ -55,12 +76,12 @@ Page {
}
onStatusVersionStringChanged: {
if (notesApi.statusVersionString)
console.log("Nextcloud " + notesApi.statusVersionString)
pageHeader.description = "Nextcloud " + notesApi.statusVersionString
}
onStatusProductNameChanged: {
if (notesApi.statusProductName) {
pageHeader.title = notesApi.statusProductName
account.setValue("name", notesApi.statusProductName)
account.name = notesApi.statusProductName
}
}
onLoginStatusChanged: {
@ -81,8 +102,9 @@ Page {
break
case NotesApi.LoginSuccess:
apiProgressBar.label = qsTr("Login successfull!")
account.setValue("username", notesApi.username)
account.setValue("password", notesApi.password)
account.username = notesApi.username
account.password = notesApi.password
appSettings.currentAccount = accountId
break;
case NotesApi.LoginFailed:
apiProgressBar.label = qsTr("Login failed!")
@ -103,7 +125,7 @@ Page {
onServerChanged: {
if (notesApi.server) {
console.log("Login server: " + notesApi.server)
account.setValue("server", notesApi.server)
account.server = notesApi.server
serverField.text = notesApi.server
}
}
@ -188,7 +210,7 @@ Page {
Behavior on opacity { FadeAnimator {} }
Button {
anchors.horizontalCenter: parent.horizontalCenter
text: notesApi.loginStatus === NotesApi.LoginFlowV2Polling ? qsTr("Abort") : qsTr("Login")
text: notesApi.loginStatus === NotesApi.LoginFlowV2Polling ? qsTr("Abort") : notesApi.loginStatus === NotesApi.LoginSuccess ? qsTr("Re-Login") : qsTr("Login")
onClicked: notesApi.loginStatus === NotesApi.LoginFlowV2Polling ? notesApi.abortFlowV2Login() : notesApi.initiateFlowV2Login()
}
}
@ -227,6 +249,18 @@ Page {
}
}
SectionHeader {
text: qsTr("Note")
}
Label {
x: Theme.horizontalPageMargin
width: parent.width - 2*x
wrapMode: Text.Wrap
color: Theme.secondaryColor
linkColor: Theme.secondaryHighlightColor
text: qsTr("The <a href=\"https://apps.nextcloud.com/apps/notes\">Notes</a> app needs to be installed on the Nextcloud server for this app to work.")
}
SectionHeader {
text: qsTr("Security")
}
@ -241,6 +275,10 @@ Page {
id: unsecureConnectionTextSwitch
text: qsTr("Do not check certificates")
description: qsTr("Enable this option to allow selfsigned certificates")
onCheckedChanged: {
account.doNotVerifySsl = checked
notesApi.sslVerify = !account.doNotVerifySsl
}
}
TextSwitch {
id: unencryptedConnectionTextSwitch

View file

@ -242,7 +242,7 @@ Dialog {
icon.source: (selected ? "image://theme/icon-m-favorite-selected?" : "image://theme/icon-m-favorite?") +
(favoriteButton.highlighted ? Theme.secondaryHighlightColor : Theme.secondaryColor)
onClicked: {
notesApi.updateNote(id, {'favorite': !favorite})
notesApi.updateNote(id, {'favorite': !favorite, 'modified': new Date().valueOf() / 1000 })
}
}
TextField {
@ -257,7 +257,7 @@ Dialog {
}
onFocusChanged: {
if (focus === false && text !== category) {
notesApi.updateNote(id, {'content': content, 'category': text}) // This does not seem to work without adding the content
notesApi.updateNote(id, {'content': content, 'category': text, 'modified': new Date().valueOf() / 1000}) // This does not seem to work without adding the content
}
}
}

View file

@ -6,6 +6,7 @@ Page {
id: page
property NotesModel notesModel: notesApi.model()
property string searchString
Connections {
target: appSettings
@ -18,6 +19,13 @@ Page {
onFavoritesOnTopChanged: {
notesModel.favoritesOnTop = appSettings.favoritesOnTop
}
onCurrentAccountChanged: {
notesList.model = 0
notesList.model = notesApi.model()
if (appSettings.currentAccount.length > 0)
notesApi.getAllNotes()
}
}
Component.onCompleted: {
notesModel.favoritesOnTop = appSettings.favoritesOnTop
@ -26,7 +34,7 @@ Page {
onStatusChanged: {
if (status === PageStatus.Active) {
if (appSettings.accountIDs.length <= 0) {
if (accounts.value.length <= 0) {
addAccountHint.restart()
}
else {
@ -49,11 +57,11 @@ Page {
}
MenuItem {
text: qsTr("Add note")
enabled: appSettings.currentAccount.length > 0
enabled: appSettings.currentAccount.length > 0 && notesApi.networkAccessible
onClicked: notesApi.createNote( { 'content': "", 'modified': new Date().valueOf() / 1000 } )
}
MenuItem {
text: enabled ? qsTr("Reload") : qsTr("Updating...")
text: notesApi.networkAccessible && !notesApi.busy ? qsTr("Reload") : qsTr("Updating...")
enabled: appSettings.currentAccount.length > 0 && notesApi.networkAccessible && !notesApi.busy
onClicked: notesApi.getAllNotes()
}
@ -72,10 +80,13 @@ Page {
id: searchField
width: parent.width
enabled: !busyIndicator.running && !noLoginPlaceholder.enabled && !errorPlaceholder.enabled && !noNotesPlaceholder.enabled
placeholderText: account.name.length > 0 ? account.name : qsTr("Nextcloud Notes")
placeholderText: notesApi.statusProductName.length > 0 ? notesApi.statusProductName : account.name.length > 0 ? account.name : qsTr("Nextcloud Notes")
EnterKey.iconSource: "image://theme/icon-m-enter-close"
EnterKey.onClicked: focus = false
onTextChanged: notesModel.setFilterFixedString(text)
onTextChanged: {
searchString = text
notesModel.setFilterFixedString(text)
}
}
Label {
id: description
@ -86,7 +97,7 @@ Page {
anchors.bottomMargin: Theme.paddingMedium
color: Theme.secondaryHighlightColor
font.pixelSize: Theme.fontSizeSmall
text: account.username + "@" + account.server
text: notesApi.username + "@" + notesApi.host
}
BusyIndicator {
anchors.verticalCenter: searchField.verticalCenter
@ -146,7 +157,7 @@ Page {
icon.source: (favorite ? "image://theme/icon-m-favorite-selected?" : "image://theme/icon-m-favorite?") +
(note.highlighted ? Theme.secondaryHighlightColor : Theme.secondaryColor)
onClicked: {
notesApi.updateNote(id, {'favorite': !favorite} )
notesApi.updateNote(id, {'favorite': !favorite, 'modified': new Date().valueOf() / 1000 } )
}
}
@ -250,7 +261,7 @@ Page {
ViewPlaceholder {
id: noLoginPlaceholder
enabled: appSettings.accountIDs.length <= 0
enabled: accounts.value.length <= 0
text: qsTr("No account yet")
hintText: qsTr("Got to the settings to add an account")
}
@ -264,7 +275,7 @@ Page {
ViewPlaceholder {
id: noSearchPlaceholder
enabled: notesList.count === 0 && searchField.text !== "" //notesModel.filterRegExp !== ""
enabled: notesList.count === 0 && searchString !== "" //notesModel.filterRegExp !== ""
text: qsTr("No result")
hintText: qsTr("Try another query")
}

View file

@ -33,7 +33,7 @@ Page {
}
Label {
id: noAccountsLabel
visible: appSettings.accountIDs.length <= 0
visible: accounts.value.length <= 0
text: qsTr("No Nextcloud account yet")
font.pixelSize: Theme.fontSizeLarge
color: Theme.secondaryHighlightColor
@ -41,7 +41,7 @@ Page {
}
Repeater {
id: accountRepeater
model: appSettings.accountIDs
model: accounts.value
delegate: ListItem {
id: accountListItem
@ -52,8 +52,8 @@ Page {
id: account
path: "/apps/harbour-nextcloudnotes/accounts/" + modelData
Component.onCompleted: {
accountTextSwitch.text = value("name", qsTr("Unnamed account"), String)
accountTextSwitch.description = account.value("username", qsTr("unknown"), String) + "@" + account.value("server", qsTr("unknown"), String)
accountTextSwitch.text = account.value("username", qsTr("unknown"), String) + " @ " + value("name", qsTr("Unnamed account"), String)
accountTextSwitch.description =account.value("server", qsTr("unknown"), String)
}
}
@ -70,7 +70,7 @@ Page {
MenuItem {
text: qsTr("Edit")
onClicked: {
var login = pageStack.replace(Qt.resolvedUrl("LoginPage.qml"), { accountId: modelData })
var login = pageStack.push(Qt.resolvedUrl("LoginPage.qml"), { accountId: modelData })
}
}
MenuItem {
@ -90,7 +90,7 @@ Page {
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
var newAccountID = appSettings.addAccount()
var login = pageStack.replace(Qt.resolvedUrl("LoginPage.qml"), { accountId: newAccountID, addingNew: true })
var login = pageStack.push(Qt.resolvedUrl("LoginPage.qml"), { accountId: newAccountID, addingNew: true })
}
}

View file

@ -12,6 +12,9 @@
# * date Author's Name <author's email> version-release
# - Summary of changes
* Sun Mar 29 2020 Scharel Clemens <harbour-nextcloudnotes@scharel.rocks> 0.6-0
- Improved changes of 0.5
* Sun Jan 19 2020 Scharel Clemens <harbour-nextcloudnotes@scharel.rocks> 0.5-0
- Added offline mode
- Added Nextcloud Flow v2 Login

View file

@ -13,7 +13,7 @@ Name: harbour-nextcloudnotes
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Nextcloud Notes
Version: 0.4
Version: 0.6
Release: 0
Group: Applications/Editors
License: MIT

View file

@ -1,6 +1,6 @@
Name: harbour-nextcloudnotes
Summary: Nextcloud Notes
Version: 0.3
Version: 0.6
Release: 0
# The contents of the Group field should be one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS

View file

@ -3,6 +3,7 @@
#include <QAuthenticator>
#include <QJsonDocument>
#include <QJsonObject>
#include <QDir>
NotesApi::NotesApi(const QString statusEndpoint, const QString loginEndpoint, const QString ocsEndpoint, const QString notesEndpoint, QObject *parent)
: QObject(parent), m_statusEndpoint(statusEndpoint), m_loginEndpoint(loginEndpoint), m_ocsEndpoint(ocsEndpoint), m_notesEndpoint(notesEndpoint)
@ -58,6 +59,10 @@ NotesApi::~NotesApi() {
}
void NotesApi::setSslVerify(bool verify) {
if (verify != (m_request.sslConfiguration().peerVerifyMode() == QSslSocket::VerifyPeer)) {
m_request.sslConfiguration().setPeerVerifyMode(verify ? QSslSocket::VerifyPeer : QSslSocket::VerifyNone);
emit sslVerifyChanged(verify);
}
if (verify != (m_authenticatedRequest.sslConfiguration().peerVerifyMode() == QSslSocket::VerifyPeer)) {
m_authenticatedRequest.sslConfiguration().setPeerVerifyMode(verify ? QSslSocket::VerifyPeer : QSslSocket::VerifyNone);
emit sslVerifyChanged(verify);
@ -91,7 +96,7 @@ QString NotesApi::server() const {
void NotesApi::setServer(QString serverUrl) {
QUrl url(serverUrl.trimmed());
if (serverUrl != server()) {
if (url != server()) {
setScheme(url.scheme());
setHost(url.host());
setPort(url.port());
@ -163,6 +168,9 @@ void NotesApi::setDataFile(const QString &dataFile) {
if (dataFile != m_jsonFile.fileName()) {
m_jsonFile.close();
m_jsonFile.setFileName(dataFile);
QFileInfo fileinfo(m_jsonFile);
QDir filepath;
filepath.mkpath(fileinfo.absolutePath());
emit dataFileChanged(m_jsonFile.fileName());
}
}
@ -268,7 +276,7 @@ void NotesApi::getNote(double noteId, QStringList excludeFields) {
void NotesApi::createNote(QVariantMap fields) {
// Update note in the model
Note note(QJsonObject::fromVariantMap(fields));
mp_model->insertNote(note);
//mp_model->insertNote(note);
// Create note via the API
QUrl url = apiEndpointUrl(m_notesEndpoint + "/notes");
@ -412,7 +420,7 @@ void NotesApi::replyFinished(QNetworkReply *reply) {
emit busyChanged(busy());
}
else {
qDebug() << "Unknown reply";
qDebug() << "Unknown or double reply";
}
//qDebug() << data;
}
@ -444,7 +452,8 @@ void NotesApi::replyFinished(QNetworkReply *reply) {
m_notesReplies.removeOne(reply);
emit busyChanged(busy());
}
emit error(CommunicationError);
if (reply != m_statusReply)
emit error(CommunicationError);
}
reply->deleteLater();
}
@ -459,7 +468,7 @@ void NotesApi::sslError(QNetworkReply *reply, const QList<QSslError> &errors) {
void NotesApi::saveToFile(QModelIndex, QModelIndex, QVector<int>) {
if (m_jsonFile.open(QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Text)) {
qDebug() << "Writing data to file" << m_jsonFile.fileName();
//qDebug() << "Writing data to file" << m_jsonFile.fileName();
QByteArray data = mp_model->toJsonDocument().toJson();
if (m_jsonFile.write(data) < data.size())
emit error(LocalFileWriteError);

View file

@ -15,7 +15,7 @@ NotesProxyModel::~NotesProxyModel() {
}
void NotesProxyModel::setFavoritesOnTop(bool favoritesOnTop) {
qDebug() << "Favorites on top:" << favoritesOnTop;
//qDebug() << "Favorites on top:" << favoritesOnTop;
if (favoritesOnTop != m_favoritesOnTop) {
m_favoritesOnTop = favoritesOnTop;
emit favoritesOnTopChanged(m_favoritesOnTop);
@ -54,7 +54,7 @@ bool NotesModel::fromJsonDocument(const QJsonDocument &jdoc) {
qDebug() << "Applying new JSON input"; // << json;
if (!jdoc.isNull() && !jdoc.isEmpty()) {
if (jdoc.isArray()) {
qDebug() << "- It's an array...";
//qDebug() << "- It's an array...";
QVector<double> notesIdsToRemove;
QJsonArray jarr = jdoc.array();
if (!jarr.empty())
@ -80,7 +80,7 @@ bool NotesModel::fromJsonDocument(const QJsonDocument &jdoc) {
return true;
}
else if (jdoc.isObject()) {
qDebug() << "- It's a single object...";
//qDebug() << "- It's a single object...";
insertNote(jdoc.object());
}
else if (jdoc.isEmpty()) {
@ -116,18 +116,18 @@ int NotesModel::insertNote(const Note &note) {
int position = m_notes.indexOf(note);
if (position >= 0) {
if (m_notes.at(position).equal(note)) {
qDebug() << "-- Note already present but unchanged.";
//qDebug() << "-- Note already present but unchanged.";
}
else {
qDebug() << "-- Note already present, updating it.";
//qDebug() << "-- Note already present, updating it.";
m_notes.replace(position, note);
emit dataChanged(index(position), index(position));
}
}
else {
if (note.id() < 0)
qDebug() << "-- Local only note!";
qDebug() << "-- New note, adding it";
//if (note.id() < 0)
// qDebug() << "-- Local only note!";
//qDebug() << "-- New note, adding it";
position = m_notes.size();
beginInsertRows(QModelIndex(), position, position);
m_notes.append(note);

View file

@ -91,7 +91,7 @@
</message>
<message>
<source>No content</source>
<translation type="unfinished"></translation>
<translation>Kein Inhalt</translation>
</message>
</context>
<context>
@ -112,39 +112,39 @@
<name>LoginPage</name>
<message>
<source>Nextcloud Login</source>
<translation type="unfinished"></translation>
<translation>Nextcloud Login</translation>
</message>
<message>
<source>Nextcloud server</source>
<translation type="unfinished"></translation>
<translation>Nextcloud Server</translation>
</message>
<message>
<source>Abort</source>
<translation type="unfinished"></translation>
<translation>Abbrechen</translation>
</message>
<message>
<source>Login</source>
<translation type="unfinished"></translation>
<translation>Einloggen</translation>
</message>
<message>
<source>Security</source>
<translation type="unfinished"></translation>
<translation>Sicherheit</translation>
</message>
<message>
<source>&lt;strong&gt;CAUTION: Your password will be saved without any encryption on the device!&lt;/strong&gt;&lt;br&gt;Please consider creating a dedicated app password! Open your Nextcloud in a browser and go to &lt;i&gt;Settings&lt;/i&gt; &lt;i&gt;Security&lt;/i&gt;.</source>
<translation type="unfinished"></translation>
<translation>&lt;strong&gt;ACHTUNG: Das Password wird unverschlüsselt auf dem Gerät gespeichert!&lt;/strong&gt;&lt;br&gt;Überlege ein eigenes App-Passwort festzulegen! Öffne Nextcloud im Browser und gehe zu &lt;i&gt;Einstellungen&lt;/i&gt; -- &gt; &lt;i&gt;Sicherheit&lt;/i&gt;.</translation>
</message>
<message>
<source>Do not check certificates</source>
<translation type="unfinished"></translation>
<translation>Zertifikate nicht prüfen</translation>
</message>
<message>
<source>Enable this option to allow selfsigned certificates</source>
<translation type="unfinished"></translation>
<translation>Auswählen im selbst signierte Zertifikate zu erlauben</translation>
</message>
<message>
<source>Allow unencrypted connections</source>
<translation type="unfinished"></translation>
<translation>Unverschlüsselte Verbindung erlauben</translation>
</message>
<message>
<source></source>
@ -152,31 +152,43 @@
</message>
<message>
<source>Username</source>
<translation type="unfinished"></translation>
<translation>Benutzername</translation>
</message>
<message>
<source>Password</source>
<translation type="unfinished"></translation>
<translation>Passwort</translation>
</message>
<message>
<source>Follow the instructions in the browser</source>
<translation type="unfinished"></translation>
<translation>Folge den Anweisungen im Browser</translation>
</message>
<message>
<source>Login successfull!</source>
<translation type="unfinished"></translation>
<translation>Login erfolgreich!</translation>
</message>
<message>
<source>Login failed!</source>
<translation type="unfinished"></translation>
<translation>Login fehlgeschlagen!</translation>
</message>
<message>
<source>Enter your credentials</source>
<translation type="unfinished"></translation>
<translation>Zugangsdaten eingeben</translation>
</message>
<message>
<source>Test Login</source>
<translation type="unfinished"></translation>
<translation>Zugang testen</translation>
</message>
<message>
<source>Note</source>
<translation>Achtung</translation>
</message>
<message>
<source>The &lt;a href=&quot;https://apps.nextcloud.com/apps/notes&quot;&gt;Notes&lt;/a&gt; app needs to be installed on the Nextcloud server for this app to work.</source>
<translation>Die &lt;a href=&quot;https://apps.nextcloud.com/apps/notes&quot;&gt;Notes&lt;/a&gt; Applikation muss auf dem Nextcloud-Server installiert sein, damit diese App funktioniert.</translation>
</message>
<message>
<source>Re-Login</source>
<translation>Neu einloggen</translation>
</message>
</context>
<context>
@ -244,110 +256,110 @@
<name>NotesApi</name>
<message>
<source>No network connection available</source>
<translation type="unfinished"></translation>
<translation>Netzwerk Verbindung nicht verfügbar</translation>
</message>
<message>
<source>Failed to communicate with the Nextcloud server</source>
<translation type="unfinished"></translation>
<translation>Fehler bei der Server-Kommunikation</translation>
</message>
<message>
<source>An error happened while reading from the local storage</source>
<translation type="unfinished"></translation>
<translation>Fehler beim Lesen der lokalen Datei</translation>
</message>
<message>
<source>An error happened while writing to the local storage</source>
<translation type="unfinished"></translation>
<translation>Fehler beim Schreiben der lokalen Datei</translation>
</message>
<message>
<source>An error occured while establishing an encrypted connection</source>
<translation type="unfinished"></translation>
<translation>Fehler beim Aufbau einer verschlüsselten Kommunikation</translation>
</message>
<message>
<source>Could not authenticate to the Nextcloud instance</source>
<translation type="unfinished"></translation>
<translation>Fehler bei der Authentifizierung am Server</translation>
</message>
<message>
<source>Unknown error</source>
<translation type="unfinished"></translation>
<translation>Unbekannter Fehler</translation>
</message>
</context>
<context>
<name>NotesPage</name>
<message>
<source>Settings</source>
<translation type="unfinished">Einstellungen</translation>
<translation>Einstellungen</translation>
</message>
<message>
<source>Add note</source>
<translation type="unfinished"></translation>
<translation>Neue Notiz</translation>
</message>
<message>
<source>Reload</source>
<translation type="unfinished">Neu laden</translation>
<translation>Neu laden</translation>
</message>
<message>
<source>Updating...</source>
<translation type="unfinished">Aktualisiere...</translation>
<translation>Aktualisiere...</translation>
</message>
<message>
<source>Last update</source>
<translation type="unfinished">Zuletzt aktualisiert</translation>
<translation>Zuletzt aktualisiert</translation>
</message>
<message>
<source>never</source>
<translation type="unfinished">noch nie</translation>
<translation>noch nie</translation>
</message>
<message>
<source>Nextcloud Notes</source>
<translation type="unfinished">Nextcloud Notizen</translation>
<translation>Nextcloud Notizen</translation>
</message>
<message>
<source>Modified</source>
<translation type="unfinished">Geändert</translation>
<translation>Geändert</translation>
</message>
<message>
<source>Delete</source>
<translation type="unfinished">Löschen</translation>
<translation>Löschen</translation>
</message>
<message>
<source>Deleting note</source>
<translation type="unfinished"></translation>
<translation>Lösche Notiz</translation>
</message>
<message>
<source>Loading notes...</source>
<translation type="unfinished"></translation>
<translation>Lade Notizen...</translation>
</message>
<message>
<source>Open the settings to configure your Nextcloud accounts</source>
<translation type="unfinished"></translation>
<translation>Öffne die EInstellungen um ein Nextcloud Account einzurichten</translation>
</message>
<message>
<source>No account yet</source>
<translation type="unfinished"></translation>
<translation>Noch kein Account vohanden</translation>
</message>
<message>
<source>Got to the settings to add an account</source>
<translation type="unfinished"></translation>
<translation>Richte ein Account in den Einstellungen ein</translation>
</message>
<message>
<source>No notes yet</source>
<translation type="unfinished"></translation>
<translation>Keine Notizen</translation>
</message>
<message>
<source>Pull down to add a note</source>
<translation type="unfinished"></translation>
<translation>Ziehen um eine Notiz anzulegen</translation>
</message>
<message>
<source>No result</source>
<translation type="unfinished"></translation>
<translation>Kein Ergebnis</translation>
</message>
<message>
<source>Try another query</source>
<translation type="unfinished"></translation>
<translation>Probiere eine andere Suche</translation>
</message>
<message>
<source>An error occurred</source>
<translation type="unfinished"></translation>
<translation>Ein Fehler ist aufgetreten</translation>
</message>
</context>
<context>
@ -490,15 +502,15 @@
</message>
<message>
<source>Favorites on top</source>
<translation type="unfinished"></translation>
<translation>Favoriten oben anzeigen</translation>
</message>
<message>
<source>Show notes marked as favorite above the others</source>
<translation type="unfinished"></translation>
<translation>Markierte Notizen vor allen anderen anzeigen</translation>
</message>
<message>
<source>No sorting</source>
<translation type="unfinished"></translation>
<translation>Keine Sortierung</translation>
</message>
</context>
<context>
@ -671,19 +683,19 @@ You can also use other markdown syntax inside them.</source>
<name>harbour-nextcloudnotes</name>
<message>
<source>Notes</source>
<translation type="unfinished">Notizen</translation>
<translation>Notizen</translation>
</message>
<message>
<source>Offline</source>
<translation type="unfinished"></translation>
<translation>Keine Verbindung</translation>
</message>
<message>
<source>Synced</source>
<translation type="unfinished"></translation>
<translation>Synchronisiert</translation>
</message>
<message>
<source>Error</source>
<translation type="unfinished"></translation>
<translation>Fehler</translation>
</message>
</context>
</TS>

View file

@ -178,6 +178,18 @@
<source>Test Login</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Note</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The &lt;a href=&quot;https://apps.nextcloud.com/apps/notes&quot;&gt;Notes&lt;/a&gt; app needs to be installed on the Nextcloud server for this app to work.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Re-Login</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MITLicense</name>

View file

@ -138,78 +138,93 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="146"/>
<location filename="../qml/pages/LoginPage.qml" line="168"/>
<source>Nextcloud server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="205"/>
<location filename="../qml/pages/LoginPage.qml" line="227"/>
<source>Username</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="216"/>
<location filename="../qml/pages/LoginPage.qml" line="238"/>
<source>Password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="191"/>
<location filename="../qml/pages/LoginPage.qml" line="213"/>
<source>Abort</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="74"/>
<location filename="../qml/pages/LoginPage.qml" line="95"/>
<source>Follow the instructions in the browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="83"/>
<location filename="../qml/pages/LoginPage.qml" line="104"/>
<source>Login successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="80"/>
<location filename="../qml/pages/LoginPage.qml" line="88"/>
<location filename="../qml/pages/LoginPage.qml" line="101"/>
<location filename="../qml/pages/LoginPage.qml" line="110"/>
<source>Login failed!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="69"/>
<location filename="../qml/pages/LoginPage.qml" line="90"/>
<source>Enter your credentials</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="191"/>
<location filename="../qml/pages/LoginPage.qml" line="213"/>
<source>Login</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="225"/>
<location filename="../qml/pages/LoginPage.qml" line="213"/>
<source>Re-Login</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="247"/>
<source>Test Login</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="231"/>
<location filename="../qml/pages/LoginPage.qml" line="253"/>
<source>Note</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="261"/>
<source>The &lt;a href=&quot;https://apps.nextcloud.com/apps/notes&quot;&gt;Notes&lt;/a&gt; app needs to be installed on the Nextcloud server for this app to work.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="265"/>
<source>Security</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="238"/>
<location filename="../qml/pages/LoginPage.qml" line="272"/>
<source>&lt;strong&gt;CAUTION: Your password will be saved without any encryption on the device!&lt;/strong&gt;&lt;br&gt;Please consider creating a dedicated app password! Open your Nextcloud in a browser and go to &lt;i&gt;Settings&lt;/i&gt; &lt;i&gt;Security&lt;/i&gt;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="242"/>
<location filename="../qml/pages/LoginPage.qml" line="276"/>
<source>Do not check certificates</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="243"/>
<location filename="../qml/pages/LoginPage.qml" line="277"/>
<source>Enable this option to allow selfsigned certificates</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/LoginPage.qml" line="248"/>
<location filename="../qml/pages/LoginPage.qml" line="286"/>
<source>Allow unencrypted connections</source>
<translation type="unfinished"></translation>
</message>
@ -296,37 +311,37 @@
<context>
<name>NotesApi</name>
<message>
<location filename="../src/notesapi.cpp" line="319"/>
<location filename="../src/notesapi.cpp" line="327"/>
<source>No network connection available</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/notesapi.cpp" line="322"/>
<location filename="../src/notesapi.cpp" line="330"/>
<source>Failed to communicate with the Nextcloud server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/notesapi.cpp" line="325"/>
<location filename="../src/notesapi.cpp" line="333"/>
<source>An error happened while reading from the local storage</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/notesapi.cpp" line="328"/>
<location filename="../src/notesapi.cpp" line="336"/>
<source>An error happened while writing to the local storage</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/notesapi.cpp" line="331"/>
<location filename="../src/notesapi.cpp" line="339"/>
<source>An error occured while establishing an encrypted connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/notesapi.cpp" line="334"/>
<location filename="../src/notesapi.cpp" line="342"/>
<source>Could not authenticate to the Nextcloud instance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/notesapi.cpp" line="337"/>
<location filename="../src/notesapi.cpp" line="345"/>
<source>Unknown error</source>
<translation type="unfinished"></translation>
</message>
@ -334,97 +349,97 @@
<context>
<name>NotesPage</name>
<message>
<location filename="../qml/pages/NotesPage.qml" line="47"/>
<location filename="../qml/pages/NotesPage.qml" line="55"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="51"/>
<location filename="../qml/pages/NotesPage.qml" line="59"/>
<source>Add note</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="56"/>
<location filename="../qml/pages/NotesPage.qml" line="64"/>
<source>Reload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="56"/>
<location filename="../qml/pages/NotesPage.qml" line="64"/>
<source>Updating...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="62"/>
<location filename="../qml/pages/NotesPage.qml" line="70"/>
<source>Last update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="65"/>
<location filename="../qml/pages/NotesPage.qml" line="73"/>
<source>never</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="75"/>
<location filename="../qml/pages/NotesPage.qml" line="83"/>
<source>Nextcloud Notes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="213"/>
<location filename="../qml/pages/NotesPage.qml" line="224"/>
<source>Modified</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="216"/>
<location filename="../qml/pages/NotesPage.qml" line="227"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="218"/>
<location filename="../qml/pages/NotesPage.qml" line="229"/>
<source>Deleting note</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="248"/>
<location filename="../qml/pages/NotesPage.qml" line="259"/>
<source>Loading notes...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="254"/>
<location filename="../qml/pages/NotesPage.qml" line="265"/>
<source>No account yet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="255"/>
<location filename="../qml/pages/NotesPage.qml" line="266"/>
<source>Got to the settings to add an account</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="261"/>
<location filename="../qml/pages/NotesPage.qml" line="272"/>
<source>No notes yet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="262"/>
<location filename="../qml/pages/NotesPage.qml" line="273"/>
<source>Pull down to add a note</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="268"/>
<location filename="../qml/pages/NotesPage.qml" line="279"/>
<source>No result</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="269"/>
<location filename="../qml/pages/NotesPage.qml" line="280"/>
<source>Try another query</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="275"/>
<location filename="../qml/pages/NotesPage.qml" line="286"/>
<source>An error occurred</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/NotesPage.qml" line="286"/>
<location filename="../qml/pages/NotesPage.qml" line="297"/>
<source>Open the settings to configure your Nextcloud accounts</source>
<translation type="unfinished"></translation>
</message>
@ -457,6 +472,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/SettingsPage.qml" line="55"/>
<location filename="../qml/pages/SettingsPage.qml" line="56"/>
<source>unknown</source>
<translation type="unfinished"></translation>
@ -824,22 +840,22 @@ You can also use other markdown syntax inside them.</source>
<context>
<name>harbour-nextcloudnotes</name>
<message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="108"/>
<location filename="../qml/harbour-nextcloudnotes.qml" line="104"/>
<source>Notes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="109"/>
<location filename="../qml/harbour-nextcloudnotes.qml" line="105"/>
<source>Offline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="110"/>
<location filename="../qml/harbour-nextcloudnotes.qml" line="106"/>
<source>Synced</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/harbour-nextcloudnotes.qml" line="117"/>
<location filename="../qml/harbour-nextcloudnotes.qml" line="113"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>