diff --git a/i18n/de.ts b/i18n/de.ts
index 6e5f095..2a10e0d 100644
--- a/i18n/de.ts
+++ b/i18n/de.ts
@@ -272,56 +272,61 @@ Lizenz: BSD (3-Klausel)
+
+ Einstellungen
+
+
+
Export / Import
-
+
Token hinzufügen
-
+
Hier ist nichts
-
+
Nach unten ziehen zum hinzufügen
-
+
Lösche
-
+
Token für
-
+
kopiert
-
+
Nach oben
-
+
Nach unten
-
+
Bearbeiten
-
+
Löschen
@@ -371,4 +376,22 @@ Lizenz: BSD (3-Klausel)
Vorschau antippen um den Scan zu starten. Nach unten ziehen um manuell hinzu zu fügen.
+
+ Settings
+
+
+
+ Einstellungen
+
+
+
+
+ Verhalten
+
+
+
+
+ Token bei antippen als QR-Code zeigen
+
+
diff --git a/i18n/en.ts b/i18n/en.ts
index 773c286..b68568e 100644
--- a/i18n/en.ts
+++ b/i18n/en.ts
@@ -254,56 +254,61 @@ License: BSD (3-clause)
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
Move up
-
+
Move down
-
+
-
+
@@ -349,4 +354,22 @@ License: BSD (3-clause)
+
+ Settings
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/i18n/fi.ts b/i18n/fi.ts
index b52e2ad..a601bb6 100644
--- a/i18n/fi.ts
+++ b/i18n/fi.ts
@@ -257,56 +257,62 @@ Lisenssi: BSD (3-clause)
+
+ Translated using Google Translate
+ Asetukset
+
+
+
Eksportoi / Importoi
-
+
Lisää tunnus
-
+
Tyhjä
-
+
Vedä alaspäin lisääksesi OTP:n
-
+
Poistaa
-
+
Tunnus
-
+
kopioitu leikepöydälle
-
+
Siirrä ylös
-
+
Siirrä alas
-
+
Muokkaa
-
+
Poista
@@ -352,4 +358,24 @@ Lisenssi: BSD (3-clause)
Käynnistä / lopeta skannaus painamalla kuvaa. Vedä alaspäin lisääksesi tunnuksen käsin.
+
+ Settings
+
+
+
+ Asetukset
+
+
+
+
+ Translated using Google Translate
+ Käytös
+
+
+
+
+ Translated using Google Translate
+ Kosketa tokenä QR-koodina
+
+
diff --git a/i18n/fr.ts b/i18n/fr.ts
index b6dfe4d..aba2e52 100644
--- a/i18n/fr.ts
+++ b/i18n/fr.ts
@@ -256,56 +256,62 @@ Licence : BSD (3 clauses)
+
+ Translated using Google Translate
+ Paramètres
+
+
+
Exporter / Importer
-
+
Ajouter un OTP
-
+
Aucun mot de passe
-
+
Glissez vers le bas pour ajouter un OTP
-
+
Suppression
-
+
OTP pour
-
+
copié dans le presse-papier
-
+
Déplacer vers le haut
-
+
Déplacer vers le bas
-
+
Modifier
-
+
Supprimer
@@ -351,4 +357,24 @@ Licence : BSD (3 clauses)
Appuyez sur l'image pour démarrer / arréter le balayage. Glissez vers le bas pour entrer les paramètres manuellement.
+
+ Settings
+
+
+
+ Paramètres
+
+
+
+
+ Translated using Google Translate
+ Comportement
+
+
+
+
+ Translated using Google Translate
+ Touchez le jeton comme un code QR
+
+
diff --git a/i18n/ru.ts b/i18n/ru.ts
index 9378c20..18d2088 100644
--- a/i18n/ru.ts
+++ b/i18n/ru.ts
@@ -257,56 +257,62 @@ License: BSD (3-clause)
+
+ Translated using Google Translate
+ настройки
+
+
+
Экспорт / импорт
-
+
Добавить токен
-
+
Ничего нету
-
+
Потяните вниз чтобы добавить OTP
-
+
Удаление
-
+
Токен для
-
+
скопирован в буфер обмена
-
+
Передвинуть вверх
-
+
Передвинуть вниз
-
+
Редактировать
-
+
Удалить
@@ -352,4 +358,24 @@ License: BSD (3-clause)
Нажмите на изображение чтобы начать / остановить сканирование. Потяните вниз чтобы добавить токен вручную.
+
+ Settings
+
+
+
+ настройки
+
+
+
+
+ Translated using Google Translate
+ поведение
+
+
+
+
+ Translated using Google Translate
+ Сенсорный токен как QR-код
+
+
diff --git a/i18n/sv.ts b/i18n/sv.ts
index b2be2f0..1b28481 100644
--- a/i18n/sv.ts
+++ b/i18n/sv.ts
@@ -257,56 +257,62 @@ Licens: BSD (3-clause)
+
+ Translated using Google Translate
+ Inställningar
+
+
+
Export / Import
-
+
Lägg till Token
-
+
Inget här
-
+
Dra neråt för att lägga till en OTP
-
+
Tar bort
-
+
Token för
-
+
kopierad till urklipp
-
+
Flytta upp
-
+
Flytta ner
-
+
Redigera
-
+
Ta bort
@@ -352,4 +358,24 @@ Licens: BSD (3-clause)
Tryck på bilden för att starta / stoppa skanning. Dra neråt för att lägga till Token manuellt.
+
+ Settings
+
+
+
+ Inställningar
+
+
+
+
+ Translated using Google Translate
+ Beteende
+
+
+
+
+ Translated using Google Translate
+ Peka token som en QR-kod
+
+
diff --git a/qml/harbour-sailotp.qml b/qml/harbour-sailotp.qml
index 1d08574..eac8785 100644
--- a/qml/harbour-sailotp.qml
+++ b/qml/harbour-sailotp.qml
@@ -29,6 +29,7 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
+import org.nemomobile.configuration 1.0
import "pages"
import "components"
@@ -52,6 +53,15 @@ ApplicationWindow
// Global Component for showing notification banners
NotifyBanner { id: notify }
+ // Global Settings Storage
+ ConfigurationGroup
+ {
+ id: settings
+ path: "/apps/harbour-sailotp"
+
+ property bool showQrDefaultAction: false
+ }
+
// Add an entry to the list
function appendOTP(title, secret, type, counter, fav, len, diff) {
listModel.append({"secret": secret, "title": title, "fav": fav, "type": type, "counter": counter, "len": len, "diff": diff, "otp": "------"});
diff --git a/qml/pages/MainView.qml b/qml/pages/MainView.qml
index 948b5b9..0eaf176 100644
--- a/qml/pages/MainView.qml
+++ b/qml/pages/MainView.qml
@@ -96,6 +96,10 @@ Page {
text: qsTr("About")
onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
}
+ MenuItem {
+ text: qsTr("Settings")
+ onClicked: pageStack.push(Qt.resolvedUrl("Settings.qml"))
+ }
MenuItem {
text: qsTr("Export / Import")
onClicked: pageStack.push(Qt.resolvedUrl("ExportPage.qml"), {parentPage: mainPage, mode: "export"})
diff --git a/qml/pages/Settings.qml b/qml/pages/Settings.qml
new file mode 100644
index 0000000..52daeec
--- /dev/null
+++ b/qml/pages/Settings.qml
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2014, Stefan Brand
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this
+ * list of conditions and the following disclaimer in the documentation and/or other
+ * materials provided with the distribution.
+ *
+ * 3. The names of the contributors may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+
+
+Page {
+ id: settingsPage
+ allowedOrientations: Orientation.All
+
+ SilicaFlickable {
+ id: flickable
+ anchors.fill: parent
+ width: parent.width
+ contentHeight: column.height
+
+ Column {
+ id: column
+ width: parent.width
+ spacing: Theme.paddingSmall
+
+ PageHeader { title: qsTr("Settings") }
+
+ SectionHeader { text: qsTr("Behaviour") }
+ TextSwitch {
+ id: showQrDefault
+ checked: settings.showQrDefaultAction
+ text: qsTr("Show Token as QRCode on Tap")
+ onClicked: settings.showQrDefaultAction = !settings.showQrDefaultAction
+ }
+
+ }
+ VerticalScrollDecorator { }
+ }
+}