v1.0.1 #2

Merged
Lisoveliy merged 5 commits from dev into main 2025-02-25 22:35:27 +01:00
5 changed files with 4 additions and 15 deletions
Showing only changes of commit cebe95acf5 - Show all commits

View File

@ -6,16 +6,12 @@ AppSideService(
onInit(){
},
onRequest(req, res){
if(req.method === 'totps'){
console.log(req)
console.log(`sending response: ${settings.settingsStorage.getItem('TOTPs')}`)
res(null, settings.settingsStorage.getItem('TOTPs'))
onRequest(request, response){
if(request.method === 'totps'){
response(null, settings.settingsStorage.getItem('TOTPs'))
}
},
onSettingsChange(set){
console.log(set)
}
onSettingsChange(){ }
}
)
)

View File

@ -16,7 +16,6 @@ export function getHOTP(counter, secret, digits = 6, hashType = 'SHA-1'){
rawDataCounter.setUint32(4, counter)
const bCounter = new Uint8Array(rawDataCounter.buffer)
console.log(bCounter)
const bSecret = new Uint8Array(decode(secret).match(/.{1,2}/g).map(chunk => parseInt(chunk, 16))); //confirmed
//Stage 2: Hash data

View File

@ -8,12 +8,10 @@ Page(
BasePage({
onInit() {
this.getTOTPData().then((x) => {
console.log(x)
app._options.globalData.TOTPS = JSON.parse(x) ?? []
this.initPage()
})
.catch((x) => {
console.log(x)
app._options.globalData.TOTPS = []
this.initPage()
})

View File

@ -21,7 +21,6 @@ const renderData = []
function renderTOTPs(buffer) {
for (let i = 0; i < buffer.length; i++) {
let otpData = TOTP.copy(buffer[i]).getOTP()
console.log(otpData.otp)
renderData[i] = {
OTP: RenderOTPValue(i, otpData.otp),
expireBar: RenderExpireBar(i, otpData.createdTime, buffer[i].fetchTime)

View File

@ -6,7 +6,6 @@ AppSettingsPage({
build(props) {
_props = props;
console.log(props.settingsStorage.getItem("TOTPs"))
const storage = JSON.parse(props.settingsStorage.getItem("TOTPs") ?? "[]")
const totpEntrys = GetTOTPList(storage)
const createButton = TextInput({
@ -159,7 +158,5 @@ function GetTOTPList(storage){
}
function updateStorage(storage){
console.log("new storage is:")
console.log(storage)
_props.settingsStorage.setItem('TOTPs', JSON.stringify(storage))
}