[feat] hide realm
This commit is contained in:
@@ -397,4 +397,5 @@ export const languageEnglish = {
|
|||||||
isNull: "is not set",
|
isNull: "is not set",
|
||||||
ifChatIndex: "If chat index",
|
ifChatIndex: "If chat index",
|
||||||
ifRandom: "If random",
|
ifRandom: "If random",
|
||||||
|
hideRealm: "Hide RisuRealm",
|
||||||
}
|
}
|
||||||
@@ -84,6 +84,10 @@
|
|||||||
<Check bind:check={$DataBase.showMemoryLimit} name={language.showMemoryLimit}/>
|
<Check bind:check={$DataBase.showMemoryLimit} name={language.showMemoryLimit}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center mt-2">
|
||||||
|
<Check bind:check={$DataBase.hideRealm} name={language.hideRealm}/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex items-center mt-2">
|
<div class="flex items-center mt-2">
|
||||||
<Check check={$DataBase.customBackground !== ''} onChange={async (check) => {
|
<Check check={$DataBase.customBackground !== ''} onChange={async (check) => {
|
||||||
if(check){
|
if(check){
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { appVer, webAppSubVer } from "src/ts/storage/database";
|
import { DataBase, appVer, webAppSubVer } from "src/ts/storage/database";
|
||||||
import GithubStars from "../Others/GithubStars.svelte";
|
import GithubStars from "../Others/GithubStars.svelte";
|
||||||
import Hub from "./Realm/RealmMain.svelte";
|
import Hub from "./Realm/RealmMain.svelte";
|
||||||
import { sideBarStore } from "src/ts/stores";
|
import { sideBarStore } from "src/ts/stores";
|
||||||
@@ -34,16 +34,17 @@
|
|||||||
<span class="mt-2 text-gray-400 text-start">{language.officialDiscordDesc}</span>
|
<span class="mt-2 text-gray-400 text-start">{language.officialDiscordDesc}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mt-4 mb-4 w-full border-t border-t-selected"></div>
|
||||||
|
<h1 class="text-2xl font-bold">Recent Characters from {language.hub} <button class="text-base font-medium float-right p-1 bg-darkbg rounded-md hover:ring" on:click={() => {
|
||||||
|
openHub = true
|
||||||
|
}}>Get More</button></h1>
|
||||||
|
{#if !$DataBase.hideRealm}
|
||||||
{#await getRisuHub({
|
{#await getRisuHub({
|
||||||
search: '',
|
search: '',
|
||||||
page: -10,
|
page: -10,
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
sort: ''
|
sort: ''
|
||||||
}) then charas}
|
}) then charas}
|
||||||
<div class="mt-4 mb-4 w-full border-t border-t-selected"></div>
|
|
||||||
<h1 class="text-2xl font-bold">Recent Characters from {language.hub} <button class="text-base font-medium float-right p-1 bg-darkbg rounded-md hover:ring" on:click={() => {
|
|
||||||
openHub = true
|
|
||||||
}}>Get More</button></h1>
|
|
||||||
{#if charas.length > 0}
|
{#if charas.length > 0}
|
||||||
<div class="w-full flex gap-4 p-2 flex-wrap justify-center">
|
<div class="w-full flex gap-4 p-2 flex-wrap justify-center">
|
||||||
{#each charas as chara}
|
{#each charas as chara}
|
||||||
@@ -54,6 +55,9 @@
|
|||||||
<div class="text-gray-500">Failed to load {language.hub}...</div>
|
<div class="text-gray-500">Failed to load {language.hub}...</div>
|
||||||
{/if}
|
{/if}
|
||||||
{/await}
|
{/await}
|
||||||
|
{:else}
|
||||||
|
<div class="text-gray-500">{language.hideRealm}</div>
|
||||||
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex items-center mt-4">
|
<div class="flex items-center mt-4">
|
||||||
<button class="mr-2 text-gray-400 hover:text-green-500" on:click={() => (openHub = false)}>
|
<button class="mr-2 text-gray-400 hover:text-green-500" on:click={() => (openHub = false)}>
|
||||||
|
|||||||
@@ -591,6 +591,7 @@ export interface Database{
|
|||||||
animationSpeed:number
|
animationSpeed:number
|
||||||
botSettingAtStart:false
|
botSettingAtStart:false
|
||||||
NAIsettings:NAISettings
|
NAIsettings:NAISettings
|
||||||
|
hideRealm:boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface hordeConfig{
|
interface hordeConfig{
|
||||||
|
|||||||
Reference in New Issue
Block a user