[feat] add click to edit

This commit is contained in:
kwaroran
2023-05-26 05:36:56 +09:00
parent 549cdf3487
commit fe0a40d79d
5 changed files with 17 additions and 3 deletions

View File

@@ -279,5 +279,6 @@ export const languageEnglish = {
globalLoreBook: 'Global Lorebook', globalLoreBook: 'Global Lorebook',
globalRegexScript: "Global Regex", globalRegexScript: "Global Regex",
accessibility: "Accessibility", accessibility: "Accessibility",
sendWithEnter: "Send with Enter Key" sendWithEnter: "Send with Enter Key",
clickToEdit: "Click Text to Edit"
} }

View File

@@ -257,5 +257,7 @@ export const languageKorean = {
charLoreBook: '캐릭터 로어북', charLoreBook: '캐릭터 로어북',
globalLoreBook: '글로벌 로어북', globalLoreBook: '글로벌 로어북',
globalRegexScript: "글로별 정규식", globalRegexScript: "글로별 정규식",
accessibility: "접근성" accessibility: "접근성",
sendWithEnter: "엔터키로 메세지 보내기",
clickToEdit: "클릭해서 수정하기"
} }

View File

@@ -129,7 +129,12 @@
<AutoresizeArea bind:value={message} /> <AutoresizeArea bind:value={message} />
{:else} {:else}
{#await ParseMarkdown(msgDisplay, character) then md} {#await ParseMarkdown(msgDisplay, character) then md}
<span class="text chat chattext prose prose-invert minw-0" <!-- svelte-ignore a11y-click-events-have-key-events -->
<span class="text chat chattext prose prose-invert minw-0" on:click={() => {
if($DataBase.clickToEdit){
editMode = true
}
}}
style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem" style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem"
style:line-height="{1.25 * ($DataBase.zoomsize / 100)}rem" style:line-height="{1.25 * ($DataBase.zoomsize / 100)}rem"
>{@html md}</span> >{@html md}</span>

View File

@@ -25,3 +25,8 @@
<Check bind:check={$DataBase.sendWithEnter}/> <Check bind:check={$DataBase.sendWithEnter}/>
<span>{language.sendWithEnter}</span> <span>{language.sendWithEnter}</span>
</div> </div>
<div class="flex items-center mt-2">
<Check bind:check={$DataBase.clickToEdit}/>
<span>{language.clickToEdit}</span>
</div>

View File

@@ -485,6 +485,7 @@ export interface Database{
} }
globalscript: customscript[] globalscript: customscript[]
sendWithEnter:boolean sendWithEnter:boolean
clickToEdit: boolean
} }