[feat] classic max width

This commit is contained in:
kwaroran
2023-06-15 21:05:06 +09:00
parent 43cf738324
commit ffcffad465
2 changed files with 14 additions and 10 deletions

View File

@@ -27,15 +27,16 @@
})()
</script>
{#if $DataBase.theme === ''}
<div class="flex-grow h-full min-w-0 relative" style={bgImg}>
{#if $selectedCharID >= 0}
{#if $DataBase.characters[$selectedCharID].viewScreen !== 'none'}
<ResizeBox />
{/if}
{/if}
<div class="flex-grow h-full min-w-0 relative justify-center flex">
<BackgroundDom />
<DefaultChatScreen customStyle={bgImg.length > 2 ? `${externalStyles}`: ''} bind:openChatList/>
<div style={bgImg} class="h-full w-full" class:max-w-6xl={$DataBase.classicMaxWidth}>
{#if $selectedCharID >= 0}
{#if $DataBase.characters[$selectedCharID].viewScreen !== 'none'}
<ResizeBox />
{/if}
{/if}
<DefaultChatScreen customStyle={bgImg.length > 2 ? `${externalStyles}`: ''} bind:openChatList/>
</div>
</div>
{:else if $DataBase.theme === 'waifu'}
<div class="flex-grow h-full flex justify-center relative" style="max-width:calc({$sideBarStore ? $SizeStore.w - 400 : $SizeStore.w}px);{bgImg.length < 4 ? wallPaper : bgImg}">

View File

@@ -260,7 +260,9 @@ export function setDatabase(data:Database){
if(checkNullish(data.imageCompression)){
data.imageCompression = true
}
if(checkNullish(data.classicMaxWidth)){
data.classicMaxWidth = false
}
changeLanguage(data.language)
DataBase.set(data)
}
@@ -519,7 +521,8 @@ export interface Database{
access_token?:string
expires_in?: number
}
}
},
classicMaxWidth: boolean
}
interface hordeConfig{