summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-10-20 01:51:05 +0200
committercirakg <cirakg@cirakg.xyz>2026-10-20 01:51:05 +0200
commitd537f4e154a40075405b0ab2fed14fbe2eeaac81 (patch)
treef1fb9b148871901dda96fca11401d6f4d0ee1d59 /resources
parent40d9a1d5c3e85486aea964c1446402a3be6ec05a (diff)
feat(settings): apply the Import form from the phone and show results
Import group in the app settings; the processor runs after the first frame and on settings changes, clears the fields, writes the status, remembers form hashes and opens the results screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/settings/properties.xml26
-rw-r--r--resources/settings/settings.xml48
-rw-r--r--resources/strings/strings.xml19
3 files changed, 87 insertions, 6 deletions
diff --git a/resources/settings/properties.xml b/resources/settings/properties.xml
index 9e2da95..e6b75a4 100644
--- a/resources/settings/properties.xml
+++ b/resources/settings/properties.xml
@@ -1,15 +1,29 @@
<!--
Author: cirakg & claude ai
- Summary: App properties for the Options group (README 10.2) with their defaults; the phone form follows in M7.
+ Summary: App properties (README 10.2): the Import form (M5) and the Options group with their defaults.
-->
<!--
- Values the watch reads through source/app/Options.mc. M4 defines only the
- Options group, so the app can read them (reading an undefined property
- stops the app with a system error that can't be caught). M7 adds the
- settings.xml form that edits them on the phone, and the other groups.
- List values are indexes; see Options.mc for their meaning.
+ Every property the watch reads must be defined here: reading an undefined
+ one stops the app with a system error that can't be caught.
+ * Import (M5): read by source/settings/SettingsProcessor.mc. impText1-8
+ are joined in order; the watch clears them and turns impApply off after
+ processing, and writes the result to impStatus.
+ * Options: read by source/app/Options.mc; list values are indexes. Their
+ phone form follows in M7 with the other groups.
-->
<properties>
+ <property id="impText1" type="string"></property>
+ <property id="impText2" type="string"></property>
+ <property id="impText3" type="string"></property>
+ <property id="impText4" type="string"></property>
+ <property id="impText5" type="string"></property>
+ <property id="impText6" type="string"></property>
+ <property id="impText7" type="string"></property>
+ <property id="impText8" type="string"></property>
+ <property id="impMode" type="number">0</property>
+ <property id="impLocked" type="boolean">false</property>
+ <property id="impApply" type="boolean">false</property>
+ <property id="impStatus" type="string"></property>
<property id="optAutoLock" type="number">3</property>
<property id="optWipe" type="boolean">false</property>
<property id="optTimeOffset" type="number">0</property>
diff --git a/resources/settings/settings.xml b/resources/settings/settings.xml
new file mode 100644
index 0000000..a8c3b66
--- /dev/null
+++ b/resources/settings/settings.xml
@@ -0,0 +1,48 @@
+<!--
+ Author: cirakg & claude ai
+ Summary: The app settings form in Garmin Connect: the Import group (M5); the other groups follow in M7.
+-->
+<settings>
+ <group id="import" title="@Strings.GroupImport" description="@Strings.GroupImportHelp">
+ <setting propertyKey="@Properties.impText1" title="@Strings.ImpText1" prompt="@Strings.ImpTextPrompt">
+ <settingConfig type="alphaNumeric" />
+ </setting>
+ <setting propertyKey="@Properties.impText2" title="@Strings.ImpText2" prompt="@Strings.ImpTextPrompt">
+ <settingConfig type="alphaNumeric" />
+ </setting>
+ <setting propertyKey="@Properties.impText3" title="@Strings.ImpText3" prompt="@Strings.ImpTextPrompt">
+ <settingConfig type="alphaNumeric" />
+ </setting>
+ <setting propertyKey="@Properties.impText4" title="@Strings.ImpText4" prompt="@Strings.ImpTextPrompt">
+ <settingConfig type="alphaNumeric" />
+ </setting>
+ <setting propertyKey="@Properties.impText5" title="@Strings.ImpText5" prompt="@Strings.ImpTextPrompt">
+ <settingConfig type="alphaNumeric" />
+ </setting>
+ <setting propertyKey="@Properties.impText6" title="@Strings.ImpText6" prompt="@Strings.ImpTextPrompt">
+ <settingConfig type="alphaNumeric" />
+ </setting>
+ <setting propertyKey="@Properties.impText7" title="@Strings.ImpText7" prompt="@Strings.ImpTextPrompt">
+ <settingConfig type="alphaNumeric" />
+ </setting>
+ <setting propertyKey="@Properties.impText8" title="@Strings.ImpText8" prompt="@Strings.ImpTextPrompt">
+ <settingConfig type="alphaNumeric" />
+ </setting>
+ <setting propertyKey="@Properties.impMode" title="@Strings.ImpMode">
+ <settingConfig type="list">
+ <listEntry value="0">@Strings.ImpModeAppend</listEntry>
+ <listEntry value="1">@Strings.ImpModeReplace</listEntry>
+ <listEntry value="2">@Strings.ImpModeCancel</listEntry>
+ </settingConfig>
+ </setting>
+ <setting propertyKey="@Properties.impLocked" title="@Strings.ImpLocked">
+ <settingConfig type="boolean" />
+ </setting>
+ <setting propertyKey="@Properties.impApply" title="@Strings.ImpApply">
+ <settingConfig type="boolean" />
+ </setting>
+ <setting propertyKey="@Properties.impStatus" title="@Strings.Status">
+ <settingConfig type="alphaNumeric" readonly="true" />
+ </setting>
+ </group>
+</settings>
diff --git a/resources/strings/strings.xml b/resources/strings/strings.xml
index 7aab88a..d571554 100644
--- a/resources/strings/strings.xml
+++ b/resources/strings/strings.xml
@@ -5,4 +5,23 @@
<!-- User-visible strings. English only for now (README section 14). -->
<strings>
<string id="AppName">OTP Wallet</string>
+ <!-- Settings: Import group (README 10.2, 11) -->
+ <string id="GroupImport">Import</string>
+ <string id="GroupImportHelp">Paste otpauth:// links or an unencrypted Aegis JSON export. Long text continues in the next field. Turn on Import now and save; the result appears below and on the watch.</string>
+ <string id="ImpTextPrompt">Paste here</string>
+ <string id="ImpText1">Text, part 1</string>
+ <string id="ImpText2">Text, part 2</string>
+ <string id="ImpText3">Text, part 3</string>
+ <string id="ImpText4">Text, part 4</string>
+ <string id="ImpText5">Text, part 5</string>
+ <string id="ImpText6">Text, part 6</string>
+ <string id="ImpText7">Text, part 7</string>
+ <string id="ImpText8">Text, part 8</string>
+ <string id="ImpMode">Mode</string>
+ <string id="ImpModeAppend">Add to my entries</string>
+ <string id="ImpModeReplace">Replace imported entries</string>
+ <string id="ImpModeCancel">Cancel waiting import</string>
+ <string id="ImpLocked">Require PIN for these entries</string>
+ <string id="ImpApply">Import now</string>
+ <string id="Status">Result</string>
</strings>