diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index eb261c1f..f9a3b499 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "RisuAI", - "version": "1.17.2" + "version": "1.18.0" }, "tauri": { "allowlist": { diff --git a/src/lang/en.ts b/src/lang/en.ts index c1588aa0..e597ed3c 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -51,13 +51,19 @@ export const languageEnglish = { + "\n- if the key starts with **$**, the key's value will more likely to change." + "\n\nwhen the image is first generated, you can only change it by modifying 'Current Image Generation Data' in below.", - regexScript: "Regex Script is a custom script that replaces string that matches IN to OUT.\n\nThere are three type options." - + "- **Modify Input** modifys user's input" - + "- **Modify Output** modifys character's output" - + "- **Modify Request Data** modifys current chat data when sent.\n\nIN must be a regex without flags and without slashes in start and end.\n\nOUT is a normal string." - + "\n\n If OUT has {{data}} in string, it replaces to matched string." - + "\n\n If OUT starts with **@@**, it doesn't replaces the string, but instead does a special effect if matching string founds." - + "\n\n- @@emo (emotion name)\n\n if character is Emotion Images mode, sets (emotion name) as emotion and prevents default.", + regexScript: "Regex Script is a custom script that replaces string that matches IN to OUT.\n\nThere four type options." + + "\n\n- **Modify Input** modifys user's input" + + "\n\n- **Modify Output** modifys character's output" + + "\n\n- **Modify Request Data** modifys current chat data when sent." + + "\n\n- **Modify Display** just modifies the text when shown without modifying chat data." + + "\n\nIN must be a regex without flags and without slashes in start and end.\n\nOUT is a string which can include replacement patterns. these are the patterns:" + + "\n\n- $$\n\n - inserts $" + + "\n\n- $&\n\n - inserts the matched substring." + + "\n\n- $`\n\n - inserts the portion of the string that precedes the matched substring." + + "\n\n- $1\n\n - inserts the first matching group. works with other number like 2, 3..." + + "\n\n- $(name)\n\n - inserts the named group" + + "\n\nIf OUT starts with **@@**, it doesn't replaces the string, but instead does a special effect if matching string founds." + + "\n\n- @@emo (emotion name)\n\n - if character is Emotion Images mode, sets (emotion name) as emotion and prevents default.", experimental: "This is a experimental setting. it might be unstable.", oogaboogaURL: "If your WebUI supports older version of api, your url should look *like https:.../run/textgen*\n\n" + "If your WebUI supports newVersion of api, your url should look like *https://.../api/v1/generate* and use the api server as host, and add --api to arguments.", @@ -224,9 +230,9 @@ export const languageEnglish = { sayNothing:"Input 'say nothing' when no string inputed", regexScript: "Regex Script", type: "Type", - editInput: "Modfiy Input", - editOutput: "Modfiy Output", - editProcess: "Modfiy Request Data", + editInput: "Modify Input", + editOutput: "Modify Output", + editProcess: "Modify Request Data", loadLatest: "Load Latest Backup", loadOthers: "Load Other Backups", exampleMessage: "Example Message", @@ -271,6 +277,8 @@ export const languageEnglish = { replaceGlobalNote: "Global Note Replacement", charLoreBook: 'Character Lorebook', globalLoreBook: 'Global Lorebook', - globalRegexScript: "Regex Script", - + globalRegexScript: "Global Regex", + accessibility: "Accessibility", + sendWithEnter: "Send with Enter Key", + clickToEdit: "Click Text to Edit" } \ No newline at end of file diff --git a/src/lang/ko.ts b/src/lang/ko.ts index 1822faef..a579e31c 100644 --- a/src/lang/ko.ts +++ b/src/lang/ko.ts @@ -180,13 +180,19 @@ export const languageKorean = { + "\n- 키의 이름이 **$** 로 시작할 시, 값은 더 자주 변합니다." + "\n\n이미지가 처음 생성된 이후부터는 '현재 이미지 생성 데이터'를 수정하여 변경할 수 있습니다.", experimental: "실험적 기능입니다. 불안정할 수 있습니다.", - regexScript: "정규식 스크립트는 IN의 조건에 맞는 문자열을 OUT으로 변경합니다.\n\n타입은 세가지가 있습니다." - + "- **입력문 수정** 유저의 입력문을 수정합니다" - + "- **출력문 수정** 캐릭터의 출력문을 수정합니다" - + "- **리퀘스트 데이터 수정** 리퀘스트를 보낼 때 채팅 데이터를 수정합니다.\n\nIN은 flag가 없고, 양끝에 슬레시가 없는 Regex여야 합니다.\n\nOUT은 일반 문자열입니다." - + "\n\n 만약 OUT 문자열에 {{data}}가 있으면, 매칭된 문자열로 바뀝니다." - + "\n\n 만약 OUT이 @@로 시작된다면, 특수한 효과를 냅니다" - + "\n\n- @@emo (emotion name)\n\n 감정 이미지 모드일 시 (emotion name)을 감정으로 정하고 감정 처리를 하지 않습니다.", + regexScript: "정규식 스크립트는 IN에 매칭되는 텍스트를 OUT으로 변경하는 스크립트입니다.\n\n네가지 옵션이 있습니다." + + "\n\n- **입력문 수정** 유저의 입력을 수정합니다" + + "\n\n- **출력문 수정** 캐릭터의 출력을 수정합니다" + + "\n\n- **리퀘스트 데이터 수정** 리퀘스트 시 데이터를 수정합니다" + + "\n\n- **디스플레이 수정** 실제 데이터를 건들지 않고, 표시되는 것만 수정합니다." + + "\n\nIN은 슬래시와 플레그가 없는 정규식이여야 합니다.\n\nOUT은 특수한 패턴이 포함될수 있는 문자열입니다. 패턴은 다음과 같습니다:" + + "\n\n- $$\n\n - inserts $" + + "\n\n- $&\n\n - inserts the matched substring." + + "\n\n- $`\n\n - inserts the portion of the string that precedes the matched substring." + + "\n\n- $1\n\n - inserts the first matching group. works with other number like 2, 3..." + + "\n\n- $(name)\n\n - inserts the named group" + + "\n\nOUT이 **@@**로 시작 시, 문자열을 교체하지 않고, 특수한 효과를 냅니다. 효과는 다음과 같습니다:" + + "\n\n- @@emo (emotion name)\n\n - 캐릭터가 감정 이미지 모드일시, 감정을 (emotion name)으로 정하고 감정을 더이상 교체하지 않습니다.", }, setup: { chooseProvider: "AI 제공자를 선택해 주세요", @@ -250,5 +256,8 @@ export const languageKorean = { replaceGlobalNote: "글로벌 노트 덮어쓰기", charLoreBook: '캐릭터 로어북', globalLoreBook: '글로벌 로어북', - globalRegexScript: "글로별 정규식 스크립트", + globalRegexScript: "글로별 정규식", + accessibility: "접근성", + sendWithEnter: "엔터키로 메세지 보내기", + clickToEdit: "클릭해서 수정하기" } \ No newline at end of file diff --git a/src/lib/ChatScreens/Chat.svelte b/src/lib/ChatScreens/Chat.svelte index 76f2cc67..39eea91d 100644 --- a/src/lib/ChatScreens/Chat.svelte +++ b/src/lib/ChatScreens/Chat.svelte @@ -129,7 +129,12 @@ {:else} {#await ParseMarkdown(msgDisplay, character) then md} - + { + if($DataBase.clickToEdit){ + editMode = true + } + }} style:font-size="{0.875 * ($DataBase.zoomsize / 100)}rem" style:line-height="{1.25 * ($DataBase.zoomsize / 100)}rem" >{@html md} diff --git a/src/lib/ChatScreens/DefaultChatScreen.svelte b/src/lib/ChatScreens/DefaultChatScreen.svelte index 0801af79..16744bbb 100644 --- a/src/lib/ChatScreens/DefaultChatScreen.svelte +++ b/src/lib/ChatScreens/DefaultChatScreen.svelte @@ -205,8 +205,10 @@ bind:this={inputEle} on:keydown={(e) => { if(e.key.toLocaleLowerCase() === "enter" && (!e.shiftKey)){ - send() - e.preventDefault() + if($DataBase.sendWithEnter){ + send() + e.preventDefault() + } } if(e.key.toLocaleLowerCase() === "m" && (e.ctrlKey)){ reroll() diff --git a/src/lib/Setting/Pages/AccessibilitySettings.svelte b/src/lib/Setting/Pages/AccessibilitySettings.svelte new file mode 100644 index 00000000..393a0798 --- /dev/null +++ b/src/lib/Setting/Pages/AccessibilitySettings.svelte @@ -0,0 +1,32 @@ + +

{language.accessibility}

+ +
+ + {language.askRemoval} +
+ +
+ + {language.SwipeRegenerate} +
+ +
+ + {language.instantRemove} +
+ +
+ + {language.sendWithEnter} +
+ +
+ + {language.clickToEdit} +
\ No newline at end of file diff --git a/src/lib/Setting/Pages/DisplaySettings.svelte b/src/lib/Setting/Pages/DisplaySettings.svelte index 707b8403..3d24eff6 100644 --- a/src/lib/Setting/Pages/DisplaySettings.svelte +++ b/src/lib/Setting/Pages/DisplaySettings.svelte @@ -1,5 +1,5 @@

{language.display}

-{language.UiLanguage} - {language.theme} @@ -62,12 +53,6 @@ {/if} - -{language.translator} - {language.UISize} {($DataBase.zoomsize)}% @@ -76,10 +61,6 @@ {($DataBase.iconsize)}% -
- - {language.autoTranslation} -
{language.fullscreen} @@ -114,27 +95,11 @@ {language.playMessage}
-
- - {language.SwipeRegenerate} -
- -
- - {language.askRemoval} -
-
{language.roundIcons}
-
- - {language.instantRemove} -
- - {#if $DataBase.textScreenColor}
{ diff --git a/src/lib/Setting/Pages/LanguageSettings.svelte b/src/lib/Setting/Pages/LanguageSettings.svelte new file mode 100644 index 00000000..dfbf135c --- /dev/null +++ b/src/lib/Setting/Pages/LanguageSettings.svelte @@ -0,0 +1,38 @@ + +

{language.language}

+ +{language.UiLanguage} + +{#if langChanged} + Close the settings to take effect +{/if} +{language.translator} + + +{#if $DataBase.translator} +
+ + {language.autoTranslation} +
+{/if} \ No newline at end of file diff --git a/src/lib/Setting/Settings.svelte b/src/lib/Setting/Settings.svelte index d8787813..f3f11252 100644 --- a/src/lib/Setting/Settings.svelte +++ b/src/lib/Setting/Settings.svelte @@ -1,5 +1,5 @@