Merge branch 'main' of https://github.com/kwaroran/RisuAI
This commit is contained in:
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
<svelte:window onmessage={async (e) => {
|
<svelte:window onmessage={async (e) => {
|
||||||
if(e.origin.startsWith("https://sv.risuai.xyz") || e.origin.startsWith("http://127.0.0.1") || e.origin === window.location.origin){
|
if(e.origin.startsWith("https://sv.risuai.xyz") || e.origin.startsWith("http://127.0.0.1") || e.origin === window.location.origin){
|
||||||
if(e.data.msg.data.vaild && $alertStore.type === 'login'){
|
if(e.data.msg?.data?.vaild && $alertStore.type === 'login'){
|
||||||
$alertStore = {
|
$alertStore = {
|
||||||
type: 'none',
|
type: 'none',
|
||||||
msg: JSON.stringify(e.data.msg)
|
msg: JSON.stringify(e.data.msg)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<svelte:window onmessage={async (e) => {
|
<svelte:window onmessage={async (e) => {
|
||||||
if(e.origin.startsWith("https://sv.risuai.xyz") || e.origin.startsWith("http://127.0.0.1") || e.origin === window.location.origin){
|
if(e.origin.startsWith("https://sv.risuai.xyz") || e.origin.startsWith("http://127.0.0.1") || e.origin === window.location.origin){
|
||||||
if(e.data.msg.type === 'drive'){
|
if(e.data.msg?.type === 'drive'){
|
||||||
await loadRisuAccountData()
|
await loadRisuAccountData()
|
||||||
DBState.db.account.data.refresh_token = e.data.msg.data.refresh_token
|
DBState.db.account.data.refresh_token = e.data.msg.data.refresh_token
|
||||||
DBState.db.account.data.access_token = e.data.msg.data.access_token
|
DBState.db.account.data.access_token = e.data.msg.data.access_token
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
await saveRisuAccountData()
|
await saveRisuAccountData()
|
||||||
popup.close()
|
popup.close()
|
||||||
}
|
}
|
||||||
else if(e.data.msg.data.vaild){
|
else if(e.data.msg?.data.vaild){
|
||||||
openIframe = false
|
openIframe = false
|
||||||
DBState.db.account = {
|
DBState.db.account = {
|
||||||
id: e.data.msg.id,
|
id: e.data.msg.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user