diff --git a/src/lib/SideBars/CharConfig.svelte b/src/lib/SideBars/CharConfig.svelte
index 9054a840..c9bbc6e6 100644
--- a/src/lib/SideBars/CharConfig.svelte
+++ b/src/lib/SideBars/CharConfig.svelte
@@ -104,6 +104,7 @@
let assetFileExtensions:string[] = []
let assetFilePath:string[] = []
+ let licensed = (currentChar.type === 'character') ? currentChar.data.license : ''
$: {
if(database.characters[$selectedCharID].chaId === currentChar.data.chaId){
@@ -133,34 +134,38 @@
onDestroy(unsub);
+
+ $:licensed = (currentChar.type === 'character') ? currentChar.data.license : ''
-
-
-
-
- {#if currentChar.type === 'character'}
-
+{/if}
{#if subMenu === 0}
- {#if currentChar.type !== 'group'}
+ {#if currentChar.type !== 'group' && licensed !== 'private'}
{language.description}
@@ -169,7 +174,7 @@
{tokens.firstMsg} {language.tokens}
- {:else}
+ {:else if licensed !== 'private' && currentChar.type === 'group'}
{language.character}
@@ -237,6 +242,29 @@
{/if}
+ {#if licensed === 'private'}
+
+ {/if}
+{:else if licensed === 'private'}
+ You are not allowed
+ {(() => {
+ subMenu = 0
+ })()}
{:else if subMenu === 1}
{language.characterDisplay}
{currentChar.type !== 'group' ? language.charIcon : language.groupIcon}
diff --git a/src/lib/UI/Realm/RealmLicense.svelte b/src/lib/UI/Realm/RealmLicense.svelte
index f46c3afc..175e557c 100644
--- a/src/lib/UI/Realm/RealmLicense.svelte
+++ b/src/lib/UI/Realm/RealmLicense.svelte
@@ -14,7 +14,7 @@
}}>
- Licensed with {license}
+ Licensed with {CCLicenseData[license][2]}
diff --git a/src/lib/UI/Realm/RealmUpload.svelte b/src/lib/UI/Realm/RealmUpload.svelte
index 7b3aabee..f47b838f 100644
--- a/src/lib/UI/Realm/RealmUpload.svelte
+++ b/src/lib/UI/Realm/RealmUpload.svelte
@@ -36,7 +36,7 @@
None
{#each Object.keys(CCLicenseData) as ccl}
- {ccl} ({CCLicenseData[ccl][1]})
+ {CCLicenseData[ccl][2]} ({CCLicenseData[ccl][1]})
{/each}
diff --git a/src/ts/characterCards.ts b/src/ts/characterCards.ts
index 993eea87..a18bb5a2 100644
--- a/src/ts/characterCards.ts
+++ b/src/ts/characterCards.ts
@@ -184,7 +184,7 @@ function convertOldTavernAndJSON(charaData:OldTavernChar, imgp:string|undefined
scenario:charaData.scenario ?? '',
firstMsgIndex: -1,
replaceGlobalNote: "",
- triggerscript: []
+ triggerscript: [],
}
}
@@ -345,7 +345,8 @@ async function importSpecv2(card:CharacterCardV2, img?:Uint8Array, mode?:'hub'|'
replaceGlobalNote: data.post_history_instructions ?? '',
backgroundHTML: data?.extensions?.risuai?.backgroundHTML,
license: data?.extensions?.risuai?.license,
- triggerscript: data?.extensions?.risuai?.triggerscript ?? []
+ triggerscript: data?.extensions?.risuai?.triggerscript ?? [],
+ private: data?.extensions?.risuai?.private ?? false
}
db.characters.push(char)
@@ -557,7 +558,7 @@ export async function shareRisuHub(char:character, arg:{
img: Buffer.from(img).toString('base64'),
resources: resources,
token: get(DataBase)?.account?.token,
- apiver: 2
+ apiver: 3
})
})
@@ -623,7 +624,7 @@ export async function downloadRisuHub(id:string) {
method: "POST",
body: JSON.stringify({
id: id,
- apiver: 2
+ apiver: 3
})
})
if(res.status !== 200){
@@ -689,6 +690,7 @@ type CharacterCardV2 = {
backgroundHTML?:string,
license?:string,
triggerscript?:triggerscript[]
+ private?:boolean
}
}
}
diff --git a/src/ts/creation/license.ts b/src/ts/creation/license.ts
index 6c7d1b6c..532ae564 100644
--- a/src/ts/creation/license.ts
+++ b/src/ts/creation/license.ts
@@ -1,8 +1,9 @@
export const CCLicenseData = {
- "CC BY 4.0": ["by", "Requires Attribution"],
- "CC BY-NC 4.0": ["by-nc", "Requires Attribution and Non Commercial"],
- "CC BY-NC-SA 4.0": ["by-nc-sa", "Requires Attribution, Non Commercial and Share Alike"],
- "CC BY-SA 4.0": ["by-sa", "Requires Attribution and Share Alike"],
- "CC BY-ND 4.0": ["by-nd", "Requires Attribution and No Derivatives"],
- "CC BY-NC-ND 4.0": ["by-nc-nd", "Requires Attribution, Non Commercial and No Derivatives"],
+ "CC BY 4.0": ["by", "Requires Attribution", "CC BY 4.0"],
+ "CC BY-NC 4.0": ["by-nc", "Requires Attribution and Non Commercial", "CC BY-NC 4.0"],
+ "CC BY-NC-SA 4.0": ["by-nc-sa", "Requires Attribution, Non Commercial and Share Alike", "CC BY-NC-SA 4.0"],
+ "CC BY-SA 4.0": ["by-sa", "Requires Attribution and Share Alike", "CC BY-SA 4.0"],
+ "CC BY-ND 4.0": ["by-nd", "Requires Attribution and No Derivatives", "CC BY-ND 4.0"],
+ "CC BY-NC-ND 4.0": ["by-nc-nd", "Requires Attribution, Non Commercial and No Derivatives", "CC BY-NC-ND 4.0"],
+ "private": ["by-nc-nd", "Requires Attribution, Non Commercial and No Derivatives + Private Prompts", "CC BY-NC-ND 4.0 + Private"],
}
\ No newline at end of file
diff --git a/src/ts/storage/database.ts b/src/ts/storage/database.ts
index 0ddd50cc..b27c7855 100644
--- a/src/ts/storage/database.ts
+++ b/src/ts/storage/database.ts
@@ -375,6 +375,7 @@ export interface character{
reloadKeys?:number
backgroundCSS?:string
license?:string
+ private?:boolean
}