feat: Add export without login
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
import TextAreaInput from "../UI/GUI/TextAreaInput.svelte";
|
||||
let btn
|
||||
let input = ''
|
||||
let cardExportType = ''
|
||||
let cardExportType = 'realm'
|
||||
let cardExportPassword = ''
|
||||
let cardLicense = ''
|
||||
let generationInfoMenuIndex = 0
|
||||
@@ -32,7 +32,7 @@
|
||||
input = ''
|
||||
}
|
||||
if($alertStore.type !== 'cardexport'){
|
||||
cardExportType = ''
|
||||
cardExportType = 'realm'
|
||||
cardExportPassword = ''
|
||||
cardLicense = ''
|
||||
}
|
||||
@@ -418,6 +418,7 @@
|
||||
{:else}
|
||||
<button class="bg-bgcolor px-2 py-4 rounded-lg flex-1" class:ring-1={cardExportType === ''} on:click={() => {cardExportType = ''}}>Character Card V3</button>
|
||||
<button class="bg-bgcolor px-2 py-4 rounded-lg flex-1 ml-2" class:ring-1={cardExportType === 'ccv2'} on:click={() => {cardExportType = 'ccv2'}}>Character Card V2</button>
|
||||
<button class="bg-bgcolor px-2 py-4 rounded-lg ml-2 flex-1" class:ring-1={cardExportType === 'realm'} on:click={() => {cardExportType = 'realm'}}>RisuRealm</button>
|
||||
{/if}
|
||||
</div>
|
||||
<Button className="mt-4" on:click={() => {
|
||||
|
||||
@@ -78,10 +78,6 @@
|
||||
exportModule(rmodule)
|
||||
}
|
||||
if(data.type === 'realm'){
|
||||
if(!$DataBase.account){
|
||||
alertError(language.notLoggedIn)
|
||||
return
|
||||
}
|
||||
const index = $DataBase.modules.findIndex((v) => v.id === rmodule.id)
|
||||
$ShowRealmFrameStore = `module:${index}`
|
||||
}
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
downloadPreset(i, 'json')
|
||||
}
|
||||
if(data.type === 'realm'){
|
||||
if(!$DataBase.account){
|
||||
alertError(language.notLoggedIn)
|
||||
return
|
||||
}
|
||||
$ShowRealmFrameStore = `preset:${i}`
|
||||
}
|
||||
}}>
|
||||
|
||||
@@ -933,10 +933,6 @@
|
||||
&& currentChar.data.license !== 'CC BY-SA 4.0'
|
||||
}
|
||||
<Button size="lg" on:click={async () => {
|
||||
if(!$DataBase.account){
|
||||
alertNormal(language.notLoggedIn)
|
||||
return
|
||||
}
|
||||
if(await alertTOS()){
|
||||
$ShowRealmFrameStore = 'character'
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
})
|
||||
|
||||
const getUrl = () => {
|
||||
let url = `https://realm.risuai.net/upload?token=${tk}&token_id=${id}`
|
||||
let url = tk ? `https://realm.risuai.net/upload?token=${tk}&token_id=${id}` : 'https://realm.risuai.net/upload'
|
||||
if($ShowRealmFrameStore.startsWith('preset') || $ShowRealmFrameStore.startsWith('module')){
|
||||
//TODO, add preset edit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user