|
@@ -23,6 +23,7 @@
|
|
let promptSuggestions = [];
|
|
let promptSuggestions = [];
|
|
let showUsername = false;
|
|
let showUsername = false;
|
|
let chatBubble = true;
|
|
let chatBubble = true;
|
|
|
|
+ let chatDirection: 'LTR' | 'RTL' = 'LTR';
|
|
|
|
|
|
const toggleSplitLargeChunks = async () => {
|
|
const toggleSplitLargeChunks = async () => {
|
|
splitLargeChunks = !splitLargeChunks;
|
|
splitLargeChunks = !splitLargeChunks;
|
|
@@ -76,6 +77,11 @@
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ const toggleChangeChatDirection = async () => {
|
|
|
|
+ chatDirection = chatDirection === 'LTR' ? 'RTL' : 'LTR';
|
|
|
|
+ saveSettings({chatDirection});
|
|
|
|
+ };
|
|
|
|
+
|
|
const updateInterfaceHandler = async () => {
|
|
const updateInterfaceHandler = async () => {
|
|
if ($user.role === 'admin') {
|
|
if ($user.role === 'admin') {
|
|
promptSuggestions = await setDefaultPromptSuggestions(localStorage.token, promptSuggestions);
|
|
promptSuggestions = await setDefaultPromptSuggestions(localStorage.token, promptSuggestions);
|
|
@@ -114,6 +120,7 @@
|
|
chatBubble = settings.chatBubble ?? true;
|
|
chatBubble = settings.chatBubble ?? true;
|
|
fullScreenMode = settings.fullScreenMode ?? false;
|
|
fullScreenMode = settings.fullScreenMode ?? false;
|
|
splitLargeChunks = settings.splitLargeChunks ?? false;
|
|
splitLargeChunks = settings.splitLargeChunks ?? false;
|
|
|
|
+ chatDirection = settings.chatDirection ?? 'LTR';
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -255,6 +262,24 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <div class=" py-0.5 flex w-full justify-between">
|
|
|
|
+ <div class=" self-center text-xs font-medium">{$i18n.t('Chat direction')}</div>
|
|
|
|
+
|
|
|
|
+ <button
|
|
|
|
+ class="p-1 px-3 text-xs flex rounded transition"
|
|
|
|
+ on:click={toggleChangeChatDirection}
|
|
|
|
+ type="button"
|
|
|
|
+ >
|
|
|
|
+ {#if chatDirection === 'LTR'}
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t('LTR')}</span>
|
|
|
|
+ {:else}
|
|
|
|
+ <span class="ml-2 self-center">{$i18n.t('RTL')}</span>
|
|
|
|
+ {/if}
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<hr class=" dark:border-gray-700" />
|
|
<hr class=" dark:border-gray-700" />
|
|
|
|
|
|
<div>
|
|
<div>
|