Add update option to realm
This commit is contained in:
@@ -53,6 +53,11 @@
|
||||
<button class="bg-bgcolor p-2 rounded-lg" class:ring-1={!nsfwMode} on:click={() => {nsfwMode = false}}>🎖️ Safe</button>
|
||||
<button class="bg-bgcolor p-2 rounded-lg ml-2" class:ring-1={nsfwMode} on:click={() => {nsfwMode = true}}>🔞 NSFW</button>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="flex items-center flex-wrap mt-2">
|
||||
<button class="bg-bgcolor p-2 rounded-lg" class:ring-1={!update} on:click={() => {nsfwMode = false}}>🚀 Update</button>
|
||||
<button class="bg-bgcolor p-2 rounded-lg ml-2" class:ring-1={update} on:click={() => {nsfwMode = true}}>⭐ Upload Newly</button>
|
||||
</div>
|
||||
{/if}
|
||||
{#if nsfwMode}
|
||||
<span class="text-textcolor2 text-sm">Grotesque Contents and non-adult characters with NSFW would be banned.</span>
|
||||
@@ -71,7 +76,8 @@
|
||||
anon: privateMode,
|
||||
nsfw: nsfwMode,
|
||||
tag: tags,
|
||||
license: license
|
||||
license: license,
|
||||
update
|
||||
})
|
||||
close()
|
||||
}} className="mt-2" size="lg">
|
||||
@@ -107,5 +113,6 @@
|
||||
let nsfwMode = false
|
||||
let license = ""
|
||||
let creatorNotes: {[code:string]:string} = parseMultilangString(char.creatorNotes)
|
||||
let update = false
|
||||
|
||||
</script>
|
||||
@@ -6,7 +6,7 @@ import { language } from "src/lang"
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { characterFormatUpdate } from "./characters"
|
||||
import { AppendableBuffer, checkCharOrder, downloadFile, loadAsset, LocalWriter, readImage, saveAsset, VirtualWriter } from "./storage/globalApi"
|
||||
import { cloneDeep } from "lodash"
|
||||
import { cloneDeep, update } from "lodash"
|
||||
import { CurrentCharacter, selectedCharID } from "./stores"
|
||||
import { convertImage, hasher } from "./parser"
|
||||
|
||||
@@ -728,7 +728,8 @@ export async function shareRisuHub2(char:character, arg:{
|
||||
nsfw: boolean,
|
||||
tag:string
|
||||
license: string
|
||||
anon: boolean
|
||||
anon: boolean,
|
||||
update: boolean
|
||||
}) {
|
||||
try {
|
||||
char = cloneDeep(char)
|
||||
@@ -760,7 +761,7 @@ export async function shareRisuHub2(char:character, arg:{
|
||||
"x-risu-token": get(DataBase)?.account?.token,
|
||||
'x-risu-username': arg.anon ? '' : (get(DataBase)?.account?.id),
|
||||
'x-risu-debug': 'true',
|
||||
'x-risu-update-id': char.realmId ?? 'null'
|
||||
'x-risu-update-id': arg.update ? (char.realmId ?? 'null') : 'null'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user