Small fixes on NotesPage and EditPage

This commit is contained in:
Scharel Clemens 2019-11-14 23:15:33 +01:00
parent 5f246cce20
commit 5fc566749f
4 changed files with 27 additions and 31 deletions

View file

@ -14,7 +14,6 @@ Dialog {
property string etag property string etag
property bool error property bool error
property string errorMessage property string errorMessage
property string date
onAccepted: { onAccepted: {
notesApi.updateNote(id, { 'category': categoryField.text, 'content': contentArea.text, 'favorite': favoriteButton.selected } ) notesApi.updateNote(id, { 'category': categoryField.text, 'content': contentArea.text, 'favorite': favoriteButton.selected } )
@ -51,7 +50,7 @@ Dialog {
DialogHeader { DialogHeader {
id: dialogHeader id: dialogHeader
title: title title: editDialog.title
} }
Column { Column {

View file

@ -17,7 +17,6 @@ Dialog {
property string etag property string etag
property bool error property bool error
property string errorMessage property string errorMessage
property string date
property var showdown: ShowDown.showdown property var showdown: ShowDown.showdown
property var converter: new showdown.Converter( property var converter: new showdown.Converter(
@ -42,8 +41,8 @@ Dialog {
favorite: favorite, favorite: favorite,
etag: etag, etag: etag,
error: error, error: error,
errorMessage: errorMessage, errorMessage: errorMessage
date: date } ) } )
onAccepted: { onAccepted: {
//acceptDestinationInstance.note = note //acceptDestinationInstance.note = note
acceptDestinationInstance.reloadContent() acceptDestinationInstance.reloadContent()
@ -131,7 +130,7 @@ Dialog {
DialogHeader { DialogHeader {
id: dialogHeader id: dialogHeader
title: title title: noteDialog.title
acceptText: qsTr("Edit") acceptText: qsTr("Edit")
cancelText: qsTr("Notes") cancelText: qsTr("Notes")
} }
@ -270,8 +269,7 @@ Dialog {
DetailItem { DetailItem {
id: modifiedDetail id: modifiedDetail
label: qsTr("Modified") label: qsTr("Modified")
property int modified: modified value: new Date(noteDialog.modified * 1000).toLocaleString(Qt.locale(), Locale.ShortFormat)
value: new Date(modified * 1000).toLocaleString(Qt.locale(), Locale.ShortFormat)
} }
} }

View file

@ -129,7 +129,6 @@ Page {
etag: etag, etag: etag,
error: error, error: error,
errorMessage: errorMessage errorMessage: errorMessage
//date: date
}) })
onPressAndHold: menu.open(note) onPressAndHold: menu.open(note)

View file

@ -209,52 +209,52 @@
<context> <context>
<name>NotePage</name> <name>NotePage</name>
<message> <message>
<location filename="../qml/pages/NotePage.qml" line="115"/> <location filename="../qml/pages/NotePage.qml" line="114"/>
<source>Delete</source> <source>Delete</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotePage.qml" line="119"/> <location filename="../qml/pages/NotePage.qml" line="118"/>
<source>Reload</source> <source>Reload</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotePage.qml" line="119"/> <location filename="../qml/pages/NotePage.qml" line="118"/>
<source>Updating...</source> <source>Updating...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotePage.qml" line="125"/> <location filename="../qml/pages/NotePage.qml" line="124"/>
<source>Last update</source> <source>Last update</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotePage.qml" line="128"/> <location filename="../qml/pages/NotePage.qml" line="127"/>
<source>never</source> <source>never</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotePage.qml" line="135"/> <location filename="../qml/pages/NotePage.qml" line="134"/>
<source>Edit</source> <source>Edit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotePage.qml" line="136"/> <location filename="../qml/pages/NotePage.qml" line="135"/>
<source>Notes</source> <source>Notes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotePage.qml" line="256"/> <location filename="../qml/pages/NotePage.qml" line="255"/>
<source>No category</source> <source>No category</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotePage.qml" line="257"/> <location filename="../qml/pages/NotePage.qml" line="256"/>
<source>Category</source> <source>Category</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotePage.qml" line="272"/> <location filename="../qml/pages/NotePage.qml" line="271"/>
<source>Modified</source> <source>Modified</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -297,62 +297,62 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="214"/> <location filename="../qml/pages/NotesPage.qml" line="213"/>
<source>Modified</source> <source>Modified</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="217"/> <location filename="../qml/pages/NotesPage.qml" line="216"/>
<source>Delete</source> <source>Delete</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="219"/> <location filename="../qml/pages/NotesPage.qml" line="218"/>
<source>Deleting note</source> <source>Deleting note</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="249"/> <location filename="../qml/pages/NotesPage.qml" line="248"/>
<source>Loading notes...</source> <source>Loading notes...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="255"/> <location filename="../qml/pages/NotesPage.qml" line="254"/>
<source>No account yet</source> <source>No account yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="256"/> <location filename="../qml/pages/NotesPage.qml" line="255"/>
<source>Got to the settings to add an account</source> <source>Got to the settings to add an account</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="262"/> <location filename="../qml/pages/NotesPage.qml" line="261"/>
<source>No notes yet</source> <source>No notes yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="263"/> <location filename="../qml/pages/NotesPage.qml" line="262"/>
<source>Pull down to add a note</source> <source>Pull down to add a note</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="269"/> <location filename="../qml/pages/NotesPage.qml" line="268"/>
<source>No result</source> <source>No result</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="270"/> <location filename="../qml/pages/NotesPage.qml" line="269"/>
<source>Try another query</source> <source>Try another query</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="276"/> <location filename="../qml/pages/NotesPage.qml" line="275"/>
<source>An error occurred</source> <source>An error occurred</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../qml/pages/NotesPage.qml" line="287"/> <location filename="../qml/pages/NotesPage.qml" line="286"/>
<source>Open the settings to configure your Nextcloud accounts</source> <source>Open the settings to configure your Nextcloud accounts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>