chore: prettier cleanup

This commit is contained in:
2025-07-24 14:39:02 +03:00
parent 3e037da6da
commit 69dddcebb5
20 changed files with 488 additions and 484 deletions

View File

@@ -13,23 +13,22 @@ Page(
this.getTOTPData()
.then((x) => {
app._options.globalData.TOTPS = JSON.parse(x) ?? [];
let localStorage = new LocalStorage();
localStorage.setItem(
"TOTPs",
JSON.stringify(app._options.globalData.TOTPS)
JSON.stringify(app._options.globalData.TOTPS),
);
this.initPage();
})
.catch((x) => {
console.log(`Init failed: ${x}`);
try{
try {
let localStorage = new LocalStorage();
app._options.globalData.TOTPS = JSON.parse(
localStorage.getItem("TOTPs", [])
localStorage.getItem("TOTPs", []),
);
}
catch{
} catch {
app._options.globalData.TOTPS = [];
}
this.initPage();
@@ -56,5 +55,5 @@ Page(
method: "totps",
});
},
})
}),
);

View File

@@ -30,7 +30,7 @@ function renderTOTPs(buffer) {
expireBar: RenderExpireBar(
i,
otpData.createdTime,
buffer[i].fetchTime
buffer[i].fetchTime,
),
};
setInterval(() => {
@@ -38,7 +38,7 @@ function renderTOTPs(buffer) {
(Date.now() - otpData.createdTime) /
1000 /
buffer[i].fetchTime -
1
1,
);
renderData[i].expireBar.setProperty(prop.MORE, {

View File

@@ -77,7 +77,7 @@ export function RenderOTPValue(position, otpValue) {
export function RenderExpireBar(position, createdTime, fetchTime) {
const yPos = getYPos(position);
const expireDif = Math.abs(
(Date.now() - createdTime) / 1000 / fetchTime - 1
(Date.now() - createdTime) / 1000 / fetchTime - 1,
);
return createWidget(widget.ARC, {
x: buttonWidth - 50,

View File

@@ -27,5 +27,5 @@ Page(
text: "To add TOTP record open\n settings on Zepp app",
});
},
})
}),
);