Add memory limit border thickness

This commit is contained in:
gdosu
2024-01-24 13:34:19 +09:00
parent f1b7c894a6
commit a550c870f3
6 changed files with 16 additions and 1 deletions

View File

@@ -506,4 +506,5 @@ export const languageEnglish = {
openrouterMiddleOut: "Openrouter Middle Out",
geminiApiKey: "Gemini API Key",
removePunctuationHypa: "Memory Punctuation Removal",
memoryLimitThickness: "Memory Limit Thickness",
}

View File

@@ -428,4 +428,5 @@ export const languageKorean = {
genTimes: "생성 횟수",
template: "템플릿",
editTranslationDisplay: "번역문 수정",
memoryLimitThickness: "기억 한계선 두께",
}

View File

@@ -116,6 +116,11 @@
}
$: displaya(message)
$: {
document.documentElement.style.setProperty('--memory-limit-thickness', $DataBase.memoryLimitThickness + 'px');
console.log($DataBase.memoryLimitThickness)
}
</script>
<div class="flex max-w-full justify-center risu-chat" class:bgc={isLastMemory}>
<div class="text-textcolor mt-1 ml-4 mr-4 mb-1 p-2 bg-transparent flex-grow border-t-gray-900 border-opacity-30 border-transparent flexium items-start max-w-full" >

View File

@@ -88,6 +88,12 @@
<SliderInput min={0} max={1} step={0.05} bind:value={$DataBase.animationSpeed} on:change={updateAnimationSpeed} />
<span class="text-textcolor2 mb-6 text-sm">{(`${($DataBase.animationSpeed).toFixed(2)}s`)}</span>
{#if $DataBase.showMemoryLimit}
<span class="text-textcolor">{language.memoryLimitThickness}</span>
<SliderInput min={1} max={100} step={1} bind:value={$DataBase.memoryLimitThickness} />
<span class="text-textcolor2 mb-6 text-sm">{($DataBase.memoryLimitThickness)}px</span>
{/if}
<div class="flex items-center mt-2">
<Check bind:check={$DataBase.fullScreen} onChange={changeFullscreen} name={language.fullscreen}/>
</div>

View File

@@ -157,7 +157,7 @@ html, body{
}
.bgc{
border-top: 1px solid rgba(98, 114, 164, 0.7);
border-top: var(--memory-limit-thickness) solid rgba(98, 114, 164, 0.7);
}
.text-bordered{

View File

@@ -365,6 +365,7 @@ export function setDatabase(data:Database){
data.openrouterFallback ??= true
data.openrouterMiddleOut ??= false
data.removePunctuationHypa ??= true
data.memoryLimitThickness ??= 1
changeLanguage(data.language)
DataBase.set(data)
@@ -583,6 +584,7 @@ export interface Database{
claudeAws:boolean
lastPatchNoteCheckVersion?:string,
removePunctuationHypa?:boolean
memoryLimitThickness?:number
}
export interface customscript{