TOTPFit/page/tip.js

32 lines
937 B
JavaScript
Raw Normal View History

import { createWidget, widget, align } from "@zos/ui";
import { getDeviceInfo } from "@zos/device";
2025-02-26 00:33:40 +03:00
import { onGesture, GESTURE_LEFT } from "@zos/interaction";
import { back } from "@zos/router";
import { BasePage } from "@zeppos/zml/base-page";
Page(
BasePage({
onInit() {
onGesture({
callback(event) {
if (event === GESTURE_LEFT) {
2025-02-26 00:33:40 +03:00
back();
}
2025-02-26 00:33:40 +03:00
},
});
},
build() {
2025-02-26 00:33:40 +03:00
const { width, height } = getDeviceInfo();
createWidget(widget.TEXT, {
x: 0,
w: width,
h: height,
color: 0xffffff,
text_size: 30,
align_h: align.CENTER_H,
align_v: align.CENTER_V,
2025-02-26 00:33:40 +03:00
text: "To add TOTP record open\n settings on Zepp app",
});
},
})
2025-02-26 00:33:40 +03:00
);