[feat] add unmigration when logout

This commit is contained in:
kwaroran
2023-07-04 05:40:16 +09:00
parent 75271eddab
commit e0a700ce9e
4 changed files with 65 additions and 16 deletions

View File

@@ -83,7 +83,7 @@
bias: {},
currentChar : currentChar as character
}, 'submodel', abortController.signal).then(rq2=>{
if(rq2.type !== 'fail' && rq2.type !== 'streaming' && progress){
if(rq2.type !== 'fail' && rq2.type !== 'streaming' && rq2.type !== 'multiline' && progress){
var suggestMessagesNew = rq2.result.split('\n').filter(msg => msg.startsWith('-')).map(msg => msg.replace('-','').trim())
const db:Database = get(DataBase);
db.characters[$selectedCharID].chats[currentChar.chatPage].suggestMessages = suggestMessagesNew

View File

@@ -7,6 +7,7 @@
import Check from "src/lib/Others/Check.svelte";
import { alertSelect } from "src/ts/alert";
import { isTauri } from "src/ts/storage/globalApi";
import { unMigrationAccount } from "src/ts/storage/accountStorage";
let openIframe = false
let openIframeURL = ''
let popup:Window = null
@@ -54,6 +55,10 @@
<div class="w-full">
<h1 class="text-3xl font-black min-w-0">Risu Account{#if $DataBase.account}
<button class="bg-selected p-1 text-sm font-light rounded-md hover:bg-green-500 transition-colors float-right" on:click={async () => {
if($DataBase.account.useSync){
unMigrationAccount()
}
$DataBase.account = undefined
}}>{language.logout}</button>
{/if}</h1>