change vite

This commit is contained in:
kwaroran
2024-06-24 01:00:34 +09:00
parent ecadaca546
commit fa322f741a
2 changed files with 11 additions and 2 deletions

View File

@@ -104,7 +104,7 @@
"tailwindcss": "^3.4.1",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^5.2.12",
"vite": "5.2.12",
"vite-plugin-top-level-await": "^1.4.1",
"vite-plugin-wasm": "^3.3.0"
}

View File

@@ -1,4 +1,4 @@
import { get } from "svelte/store"
import { get, writable } from "svelte/store"
import { DataBase } from "./database"
import { hubURL } from "../characterCards"
import localforage from "localforage"
@@ -7,6 +7,8 @@ import { forageStorage, getUnpargeables, replaceDbResources } from "./globalApi"
import { encodeRisuSave } from "./risuSave"
import { v4 } from "uuid"
export const AccountWarning = writable('')
export class AccountStorage{
auth:string
usingSync:boolean
@@ -25,10 +27,17 @@ export class AccountStorage{
'X-Format': 'nocheck'
}
})
if(da.headers.get('x-risu-status') === 'warn'){
AccountWarning.set((await da.json()).warning)
}
if(da.status === 304){
return key
}
if(da.status === 403){
if(da.headers.get('x-risu-status') === 'warn'){
return
}
localStorage.setItem("fallbackRisuToken",await alertLogin())
this.checkAuth()
}