This commit is contained in:
Timothy Jaeryang Baek committed 2026-06-12 11:13:21 +01:00
1 parent d372634ebe
commit 3385bf8a1b
19 files changed
+1148 -171

No files matched your search

@@ -29,7 +29,7 @@
target="_blank"
rel="noopener noreferrer"
class="text-[11px] text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 transition-colors"
>v{$latestVersion} available</a
>{$t('about.updateAvailable', { version: $latestVersion })}</a
>
{/if}
</div>
@@ -44,11 +44,11 @@
href="https://github.com/open-webui/computer/blob/main/LICENSE"
target="_blank"
rel="noopener noreferrer"
class="underline hover:text-gray-700 dark:hover:text-gray-300">Open Use License</a
class="underline hover:text-gray-700 dark:hover:text-gray-300">{$t('about.licenseName')}</a
>
<br />
Copyright © 2026 Open WebUI Inc. All rights reserved.
{$t('about.copyright')}
</p>
</div>
@@ -32,9 +32,9 @@
method: 'PUT',
body: JSON.stringify({ config: { 'notifications.webhook_url': webhookUrl.trim() || null } })
});
toast.success('Webhook URL saved');
toast.success($t('general.webhookUrlSaved'));
} catch {
toast.error('Failed to save webhook URL');
toast.error($t('general.webhookUrlSaveFailed'));
} finally {
webhookLoading = false;
}
@@ -48,7 +48,7 @@
if (permission === 'granted') {
notificationsEnabled.set(true);
} else {
toast.error('Browser notification permission denied');
toast.error($t('general.notificationPermissionDenied'));
}
}
} else {
@@ -88,28 +88,28 @@
</select>
<!-- Notifications -->
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-2 mt-5">Notifications</h3>
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-2 mt-5">{$t('general.notifications')}</h3>
<div class="flex flex-col gap-2.5">
<!-- Browser notifications toggle -->
<label class="flex items-center justify-between cursor-pointer">
<span class="text-xs text-gray-600 dark:text-gray-400">Browser notifications</span>
<span class="text-xs text-gray-600 dark:text-gray-400">{$t('general.browserNotifications')}</span>
<ToggleSwitch value={$notificationsEnabled} onchange={() => toggleNotifications()} />
</label>
<p class="text-[11px] text-gray-400 dark:text-gray-600 -mt-1">
Show OS-level notifications when a task completes and the tab is not focused.
{$t('general.browserNotificationsDesc')}
</p>
<!-- Sound toggle -->
<label class="flex items-center justify-between cursor-pointer">
<span class="text-xs text-gray-600 dark:text-gray-400">Notification sound</span>
<span class="text-xs text-gray-600 dark:text-gray-400">{$t('general.notificationSound')}</span>
<ToggleSwitch value={$notificationSound} onchange={(v) => notificationSound.set(v)} />
</label>
<!-- Webhook URL -->
<div class="mt-1">
<label class="text-xs text-gray-600 dark:text-gray-400" for="webhook-url">
Webhook URL
{$t('general.webhookUrl')}
</label>
<div class="flex gap-1.5 mt-1">
<input
@@ -124,29 +124,29 @@
onclick={saveWebhookUrl}
disabled={webhookLoading}
>
Save
{$t('settings.save')}
</button>
</div>
<p class="text-[11px] text-gray-400 dark:text-gray-600 mt-1">
Supports Slack, Discord, Teams, and generic JSON webhooks.
{$t('general.webhookUrlHint')}
</p>
</div>
</div>
{#if $session?.role === 'admin'}
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-2 mt-5">Updates</h3>
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-2 mt-5">{$t('general.updates')}</h3>
<label class="flex items-center justify-between cursor-pointer">
<span class="text-xs text-gray-600 dark:text-gray-400">Update notifications</span>
<span class="text-xs text-gray-600 dark:text-gray-400">{$t('general.updateNotifications')}</span>
<ToggleSwitch value={$showUpdateToastPref} onchange={(v) => showUpdateToastPref.set(v)} />
</label>
<p class="text-[11px] text-gray-400 dark:text-gray-600 mt-1">
Show a toast when a new version of cptr is available.
{$t('general.updateNotificationsDesc')}
</p>
{/if}
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-2 mt-5">Message queue</h3>
<h3 class="text-xs text-gray-400 dark:text-gray-600 mb-2 mt-5">{$t('general.messageQueue')}</h3>
<div class="flex gap-1">
{#each [{ value: 'queue' as StreamingBehavior, label: 'Queue' }, { value: 'interrupt' as StreamingBehavior, label: 'Interrupt' }] as opt}
{#each [{ value: 'queue' as StreamingBehavior, label: $t('general.queue') }, { value: 'interrupt' as StreamingBehavior, label: $t('general.interrupt') }] as opt}
<button
class="flex items-center gap-1.5 h-7 px-2.5 rounded-lg text-xs transition-colors duration-100
{$streamingBehavior === opt.value
@@ -160,8 +160,8 @@
</div>
<p class="text-[11px] text-gray-400 dark:text-gray-600 mt-1">
{$streamingBehavior === 'queue'
? 'Messages sent during generation are queued and sent after completion.'
: 'Sending a message cancels the current generation.'}
? $t('general.queueDesc')
: $t('general.interruptDesc')}
</p>
<div class="mt-auto pt-6 flex justify-end">
@@ -10,20 +10,21 @@
} from '$lib/stores/keybindings';
import type { ActionId } from '$lib/stores/keybindings';
import KeyPill from '../KeyPill.svelte';
import { t } from '$lib/i18n';
/** Action descriptions for the second line. */
const ACTION_DESCRIPTIONS: Record<ActionId, string> = {
newFile: 'Open a new untitled file',
newTerminal: 'Open a new terminal session',
newChat: 'Start a new AI chat',
closeTab: 'Close the active tab',
nextTab: 'Switch to the next tab',
prevTab: 'Switch to the previous tab',
quickOpen: 'Search and open files quickly',
openSettings: 'Open the settings panel',
toggleSplit: 'Toggle split editor view',
toggleSidebar: 'Show or hide the sidebar'
};
const ACTION_DESCRIPTIONS: Record<ActionId, string> = $derived({
newFile: $t('keyboard.newFile'),
newTerminal: $t('keyboard.newTerminal'),
newChat: $t('keyboard.newChat'),
closeTab: $t('keyboard.closeTab'),
nextTab: $t('keyboard.nextTab'),
prevTab: $t('keyboard.prevTab'),
quickOpen: $t('keyboard.quickOpen'),
openSettings: $t('keyboard.openSettings'),
toggleSplit: $t('keyboard.toggleSplit'),
toggleSidebar: $t('keyboard.toggleSidebar')
});
let recordingAction = $state<ActionId | null>(null);
@@ -77,18 +78,18 @@
<div class="flex flex-col min-h-full">
<div class="flex items-center justify-between mb-3">
<h2 class="text-sm font-medium text-gray-900 dark:text-white">Keyboard Shortcuts</h2>
<h2 class="text-sm font-medium text-gray-900 dark:text-white">{$t('keyboard.title')}</h2>
<button
class="text-[10px] text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-colors duration-100"
onclick={resetKeybindings}>Reset defaults</button
onclick={resetKeybindings}>{$t('keyboard.resetDefaults')}</button
>
</div>
<!-- Column headers -->
<div class="flex items-center gap-2 mb-0.5 px-1">
<span class="flex-1 text-[10px] font-medium text-gray-400 dark:text-gray-600">Command</span>
<span class="flex-1 text-[10px] font-medium text-gray-400 dark:text-gray-600">{$t('keyboard.command')}</span>
<span class="w-[140px] text-[10px] font-medium text-gray-400 dark:text-gray-600 text-right"
>Keybinding</span
>{$t('keyboard.keybinding')}</span
>
</div>
@@ -110,7 +111,7 @@
<div class="w-[140px] flex items-center justify-end shrink-0">
{#if isRecording}
<span class="recording-indicator">Press keys…</span>
<span class="recording-indicator">{$t('keyboard.pressKeys')}</span>
{:else if chord}
<button
class="cursor-pointer"
@@ -122,7 +123,7 @@
{:else}
<button
class="text-[10px] text-gray-500 dark:text-gray-600 cursor-pointer hover:text-gray-400 transition-colors duration-75"
onclick={() => startRecording(actionId)}>Unassigned</button
onclick={() => startRecording(actionId)}>{$t('keyboard.unassigned')}</button
>
{/if}
@@ -138,7 +139,7 @@
</div>
<p class="text-[10px] text-gray-400 dark:text-gray-600 mt-3">
Click a binding to rebind. Press <kbd class="kbd-inline">Esc</kbd> to cancel.
{$t('keyboard.rebindHint')}
</p>
</div>