Compare commits
2 Commits
dd32a6eac7
...
v1.2.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 640ebb0600 | |||
|
|
90be9c4606 |
2
app.json
2
app.json
@@ -6,7 +6,7 @@
|
|||||||
"appType": "app",
|
"appType": "app",
|
||||||
"version": {
|
"version": {
|
||||||
"code": 1,
|
"code": 1,
|
||||||
"name": "1.1.3"
|
"name": "1.2.1"
|
||||||
},
|
},
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"vender": "zepp",
|
"vender": "zepp",
|
||||||
|
|||||||
BIN
docs/screenshots/scr1.png
Normal file
BIN
docs/screenshots/scr1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
docs/screenshots/scr2.png
Normal file
BIN
docs/screenshots/scr2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
BIN
docs/screenshots/scr3.png
Normal file
BIN
docs/screenshots/scr3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
BIN
icon_for_appstore.png
Normal file
BIN
icon_for_appstore.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "totpfit",
|
"name": "totpfit",
|
||||||
"version": "1.1.3",
|
"version": "1.2.1",
|
||||||
"description": "Another 2FAuthenticator based on TOTP for Zepp Amazfit GTS 4",
|
"description": "Another 2FAuthenticator based on TOTP for Zepp Amazfit GTS 4",
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"author": "Lisoveliy",
|
"author": "Lisoveliy",
|
||||||
|
|||||||
@@ -23,10 +23,15 @@ Page(
|
|||||||
})
|
})
|
||||||
.catch((x) => {
|
.catch((x) => {
|
||||||
console.log(`Init failed: ${x}`);
|
console.log(`Init failed: ${x}`);
|
||||||
|
try{
|
||||||
let localStorage = new LocalStorage();
|
let localStorage = new LocalStorage();
|
||||||
app._options.globalData.TOTPS = JSON.parse(
|
app._options.globalData.TOTPS = JSON.parse(
|
||||||
localStorage.getItem("TOTPs", null) ?? []
|
localStorage.getItem("TOTPs", [])
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
catch{
|
||||||
|
app._options.globalData.TOTPS = [];
|
||||||
|
}
|
||||||
this.initPage();
|
this.initPage();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ function getByOtpauthScheme(link){
|
|||||||
let period = args[3].split("period=")[1]?.split("&")[0]; //Returns period
|
let period = args[3].split("period=")[1]?.split("&")[0]; //Returns period
|
||||||
let digits = args[3].split("digits=")[1]?.split("&")[0]; //Returns digits
|
let digits = args[3].split("digits=")[1]?.split("&")[0]; //Returns digits
|
||||||
let algorithm = args[3].split("algorithm=")[1]?.split("&")[0]; //Returns algorithm
|
let algorithm = args[3].split("algorithm=")[1]?.split("&")[0]; //Returns algorithm
|
||||||
|
let offset = args[3].split("offset=")[1]?.split("&")[0] ?? 0; //Returns offset
|
||||||
|
|
||||||
if (type.toLowerCase() != "totp")
|
if (type.toLowerCase() != "totp")
|
||||||
throw new Error("Type is not valid, requires 'TOTP'");
|
throw new Error("Type is not valid, requires 'TOTP'");
|
||||||
@@ -52,7 +53,7 @@ function getByOtpauthScheme(link){
|
|||||||
client,
|
client,
|
||||||
digits,
|
digits,
|
||||||
period,
|
period,
|
||||||
0,
|
Number(offset),
|
||||||
getHashType(algorithm)
|
getHashType(algorithm)
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user