summaryrefslogtreecommitdiff
path: root/source/app
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-10-20 11:24:58 +0200
committercirakg <cirakg@cirakg.xyz>2026-10-20 11:24:58 +0200
commitd94eb32c80d2dbf00a45d7e69804f8247240a769 (patch)
treed839d7ce999c2f3b73bcfcd3dd5a44f9364ccda7 /source/app
parentcc2fa8917b65eeda8d222dcbd69e9342884bb545 (diff)
feat(ui): show Data Matrix and PDF417 codes; fit 2D codes inside round screens
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'source/app')
-rw-r--r--source/app/Fixtures.mc13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/app/Fixtures.mc b/source/app/Fixtures.mc
index 0aa6ea9..0d6b683 100644
--- a/source/app/Fixtures.mc
+++ b/source/app/Fixtures.mc
@@ -61,6 +61,8 @@ module Fixtures {
qr.payload = Bytes.fromUtf8("https://example.com/member/fake-0042?name=Alice%20Example&card=0000111122223333&valid=2027-12-31&level=gold");
qr.options = Codes.DEFAULT_OPTIONS;
vault.add(qr);
+ vault.add(code("Parcel", Codes.DATAMATRIX, "PARCEL-FAKE-0042-7731"));
+ vault.add(code("Ticket", Codes.PDF417, "Boarding pass FAKE 0042 seat 12A"));
vault.lock();
if (TestMode.ON) {
startImport();
@@ -99,6 +101,17 @@ module Fixtures {
+ "\", \"info\": {\"secret\": \"" + secret + "\", \"algo\": \"SHA1\", \"digits\": " + digits + ", \"period\": 30}}";
}
+ function code(name as String, symbology as Number, payload as String) as Entry {
+ var e = new Entry();
+ e.kind = Entry.KIND_CODE;
+ e.type = symbology;
+ e.name = name;
+ e.group = "Personal";
+ e.payload = Bytes.fromUtf8(payload);
+ e.options = Codes.DEFAULT_OPTIONS;
+ return e;
+ }
+
function otp(name as String, account as String, group as String, type as Number, algorithm as Number,
digits as Number, period as Number, secret as String, locked as Boolean) as Entry {
var e = new Entry();