refactor: removed useless logs
This commit is contained in:
parent
3c8c804fc3
commit
cebe95acf5
@ -6,16 +6,12 @@ AppSideService(
|
|||||||
onInit(){
|
onInit(){
|
||||||
|
|
||||||
},
|
},
|
||||||
onRequest(req, res){
|
onRequest(request, response){
|
||||||
if(req.method === 'totps'){
|
if(request.method === 'totps'){
|
||||||
console.log(req)
|
response(null, settings.settingsStorage.getItem('TOTPs'))
|
||||||
console.log(`sending response: ${settings.settingsStorage.getItem('TOTPs')}`)
|
|
||||||
res(null, settings.settingsStorage.getItem('TOTPs'))
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSettingsChange(set){
|
onSettingsChange(){ }
|
||||||
console.log(set)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
@ -16,7 +16,6 @@ export function getHOTP(counter, secret, digits = 6, hashType = 'SHA-1'){
|
|||||||
rawDataCounter.setUint32(4, counter)
|
rawDataCounter.setUint32(4, counter)
|
||||||
|
|
||||||
const bCounter = new Uint8Array(rawDataCounter.buffer)
|
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
|
const bSecret = new Uint8Array(decode(secret).match(/.{1,2}/g).map(chunk => parseInt(chunk, 16))); //confirmed
|
||||||
|
|
||||||
//Stage 2: Hash data
|
//Stage 2: Hash data
|
||||||
|
@ -8,12 +8,10 @@ Page(
|
|||||||
BasePage({
|
BasePage({
|
||||||
onInit() {
|
onInit() {
|
||||||
this.getTOTPData().then((x) => {
|
this.getTOTPData().then((x) => {
|
||||||
console.log(x)
|
|
||||||
app._options.globalData.TOTPS = JSON.parse(x) ?? []
|
app._options.globalData.TOTPS = JSON.parse(x) ?? []
|
||||||
this.initPage()
|
this.initPage()
|
||||||
})
|
})
|
||||||
.catch((x) => {
|
.catch((x) => {
|
||||||
console.log(x)
|
|
||||||
app._options.globalData.TOTPS = []
|
app._options.globalData.TOTPS = []
|
||||||
this.initPage()
|
this.initPage()
|
||||||
})
|
})
|
||||||
|
@ -21,7 +21,6 @@ const renderData = []
|
|||||||
function renderTOTPs(buffer) {
|
function renderTOTPs(buffer) {
|
||||||
for (let i = 0; i < buffer.length; i++) {
|
for (let i = 0; i < buffer.length; i++) {
|
||||||
let otpData = TOTP.copy(buffer[i]).getOTP()
|
let otpData = TOTP.copy(buffer[i]).getOTP()
|
||||||
console.log(otpData.otp)
|
|
||||||
renderData[i] = {
|
renderData[i] = {
|
||||||
OTP: RenderOTPValue(i, otpData.otp),
|
OTP: RenderOTPValue(i, otpData.otp),
|
||||||
expireBar: RenderExpireBar(i, otpData.createdTime, buffer[i].fetchTime)
|
expireBar: RenderExpireBar(i, otpData.createdTime, buffer[i].fetchTime)
|
||||||
|
@ -6,7 +6,6 @@ AppSettingsPage({
|
|||||||
build(props) {
|
build(props) {
|
||||||
_props = props;
|
_props = props;
|
||||||
|
|
||||||
console.log(props.settingsStorage.getItem("TOTPs"))
|
|
||||||
const storage = JSON.parse(props.settingsStorage.getItem("TOTPs") ?? "[]")
|
const storage = JSON.parse(props.settingsStorage.getItem("TOTPs") ?? "[]")
|
||||||
const totpEntrys = GetTOTPList(storage)
|
const totpEntrys = GetTOTPList(storage)
|
||||||
const createButton = TextInput({
|
const createButton = TextInput({
|
||||||
@ -159,7 +158,5 @@ function GetTOTPList(storage){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateStorage(storage){
|
function updateStorage(storage){
|
||||||
console.log("new storage is:")
|
|
||||||
console.log(storage)
|
|
||||||
_props.settingsStorage.setItem('TOTPs', JSON.stringify(storage))
|
_props.settingsStorage.setItem('TOTPs', JSON.stringify(storage))
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user