2024-11-13 18:12:34 +03:00
|
|
|
import { TOTP } from "./lib/totp-quickjs"
|
|
|
|
import { LocalStorage } from "@zos/storage"
|
|
|
|
|
|
|
|
const localStorage = new LocalStorage()
|
2024-11-09 16:37:03 +03:00
|
|
|
App({
|
2024-11-13 18:12:34 +03:00
|
|
|
globalData: {
|
2024-11-19 20:01:36 +03:00
|
|
|
TOTPS: localStorage.getItem('TOTPs') || []
|
2024-11-09 16:37:03 +03:00
|
|
|
},
|
2024-11-13 18:12:34 +03:00
|
|
|
onCreate(options) {
|
2024-11-19 20:36:05 +03:00
|
|
|
// localStorage.setItem('TOTPs', [
|
2024-11-19 20:56:36 +03:00
|
|
|
// new TOTP('JBSWY3DPEHPK3PXP', 'totp.danhersam.com', 'I1122222222', 6, 30, 0, 'SHA-1'),
|
2024-11-19 20:36:05 +03:00
|
|
|
// new TOTP('JBSWY3DPEHPK3PXP', 'totp.danhersam.com', 'I2', 6, 30, 5, 'SHA-1'),
|
|
|
|
// new TOTP('JBSWY3DPEHPK3PXP', 'totp.danhersam.com', 'I3', 6, 30, -5, 'SHA-1'),
|
|
|
|
// new TOTP('JBSWY3DPEHPK3PXP', 'totp.danhersam.com', 'I4', 6, 30, 0, 'SHA-1'),
|
|
|
|
// new TOTP('JBSWY3DPEHPK3PXP', 'totp.danhersam.com', 'I5', 6, 30, 0, 'SHA-1'),
|
|
|
|
// new TOTP('JBSWY3DPEHPK3PXP', 'totp.danhersam.com', 'I6', 6, 30, 0, 'SHA-1'),
|
|
|
|
// new TOTP('JBSWY3DPEHPK3PXP', 'totp.danhersam.com', 'I7', 6, 30, 0, 'SHA-1'),
|
|
|
|
// new TOTP('JBSWY3DPEHPK3PXP', 'totp.danhersam.com', 'I8', 6, 30, 0, 'SHA-1')
|
|
|
|
// ])
|
2024-11-19 20:01:36 +03:00
|
|
|
},
|
2024-11-09 16:37:03 +03:00
|
|
|
|
|
|
|
onDestroy(options) {
|
|
|
|
console.log('app on destroy invoke')
|
|
|
|
}
|
|
|
|
})
|