mirror of
https://github.com/open-webui/open-webui
synced 2025-06-23 02:16:52 +00:00
Merge pull request #14937 from silentoplayz/situational-keyboard-shortcuts
feat: Add New Keyboard Shortcuts with asterisk and tooltip to imply situational
This commit is contained in:
commit
1f7a93b0fb
@ -2,6 +2,7 @@
|
|||||||
import { getContext } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
import Modal from '../common/Modal.svelte';
|
import Modal from '../common/Modal.svelte';
|
||||||
|
|
||||||
|
import Tooltip from '../common/Tooltip.svelte';
|
||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
export let show = false;
|
export let show = false;
|
||||||
@ -75,6 +76,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full flex justify-between items-center">
|
||||||
|
<div class=" text-sm">
|
||||||
|
<Tooltip
|
||||||
|
content={$i18n.t(
|
||||||
|
'Only active when the chat input is in focus and an LLM is generating a response.'
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{$i18n.t('Stop Generating')}<span class="text-xs"> *</span>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex space-x-1 text-xs">
|
||||||
|
<div
|
||||||
|
class=" h-fit py-1 px-2 flex items-center justify-center rounded-sm border border-black/10 capitalize text-gray-600 dark:border-white/10 dark:text-gray-300"
|
||||||
|
>
|
||||||
|
Esc
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="w-full flex justify-between items-center">
|
<div class="w-full flex justify-between items-center">
|
||||||
<div class=" text-sm">{$i18n.t('Copy last code block')}</div>
|
<div class=" text-sm">{$i18n.t('Copy last code block')}</div>
|
||||||
|
|
||||||
@ -123,6 +144,40 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="w-full flex justify-between items-center">
|
||||||
|
<div class=" text-sm">
|
||||||
|
<Tooltip
|
||||||
|
content={$i18n.t(
|
||||||
|
'Only active when "Paste Large Text as File" setting is toggled on.'
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{$i18n.t('Prevent file creation')}<span class="text-s"> *</span>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex space-x-1 text-xs">
|
||||||
|
<div
|
||||||
|
class=" h-fit py-1 px-2 flex items-center justify-center rounded-sm border border-black/10 capitalize text-gray-600 dark:border-white/10 dark:text-gray-300"
|
||||||
|
>
|
||||||
|
Ctrl/⌘
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class=" h-fit py-1 px-2 flex items-center justify-center rounded-sm border border-black/10 capitalize text-gray-600 dark:border-white/10 dark:text-gray-300"
|
||||||
|
>
|
||||||
|
Shift
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class=" h-fit py-1 px-2 flex items-center justify-center rounded-sm border border-black/10 capitalize text-gray-600 dark:border-white/10 dark:text-gray-300"
|
||||||
|
>
|
||||||
|
V
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-col space-y-3 w-full self-start">
|
||||||
<div class="w-full flex justify-between items-center">
|
<div class="w-full flex justify-between items-center">
|
||||||
<div class=" text-sm">{$i18n.t('Generate prompt pair')}</div>
|
<div class=" text-sm">{$i18n.t('Generate prompt pair')}</div>
|
||||||
|
|
||||||
@ -146,9 +201,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex flex-col space-y-3 w-full self-start">
|
|
||||||
<div class="w-full flex justify-between items-center">
|
<div class="w-full flex justify-between items-center">
|
||||||
<div class=" text-sm">{$i18n.t('Toggle search')}</div>
|
<div class=" text-sm">{$i18n.t('Toggle search')}</div>
|
||||||
|
|
||||||
@ -251,8 +304,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="px-5 pb-4 text-xs text-gray-500 dark:text-gray-400">
|
||||||
|
{$i18n.t(
|
||||||
|
'Shortcuts with an asterisk (*) are situational and only active under specific conditions.'
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<div class=" flex justify-between dark:text-gray-300 px-5">
|
<div class=" flex justify-between dark:text-gray-300 px-5">
|
||||||
<div class=" text-lg font-medium self-center">{$i18n.t('Input commands')}</div>
|
<div class=" text-lg font-medium self-center">{$i18n.t('Chat Input commands')}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col md:flex-row w-full p-5 md:space-x-4 dark:text-gray-200">
|
<div class="flex flex-col md:flex-row w-full p-5 md:space-x-4 dark:text-gray-200">
|
||||||
|
Loading…
Reference in New Issue
Block a user