mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-13 01:02:25 -06:00
refac
This commit is contained in:
@@ -1096,6 +1096,7 @@
|
||||
<button
|
||||
class="hidden sm:flex self-center w-fit text-sm p-1.5 dark:text-gray-300 dark:hover:text-white hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
|
||||
type="button"
|
||||
aria-label={$i18n.t('Edit')}
|
||||
on:click={() => {
|
||||
selectedModelId = model.id;
|
||||
}}
|
||||
|
||||
@@ -625,6 +625,7 @@
|
||||
<Tooltip content="Update All Models" placement="top">
|
||||
<button
|
||||
class="flex gap-2 items-center bg-transparent rounded-lg transition"
|
||||
aria-label={$i18n.t('Update All Models')}
|
||||
on:click={() => {
|
||||
updateModelsHandler();
|
||||
}}
|
||||
@@ -729,6 +730,7 @@
|
||||
<Tooltip content={$i18n.t('Cancel')}>
|
||||
<button
|
||||
class="text-gray-800 dark:text-gray-100"
|
||||
aria-label={$i18n.t('Cancel')}
|
||||
on:click={() => {
|
||||
cancelUpdateModelHandler(updateModelId);
|
||||
}}
|
||||
@@ -777,6 +779,7 @@
|
||||
<Tooltip content={$i18n.t('Cancel')}>
|
||||
<button
|
||||
class="text-gray-800 dark:text-gray-100"
|
||||
aria-label={$i18n.t('Cancel')}
|
||||
on:click={() => {
|
||||
cancelModelPullHandler(model);
|
||||
}}
|
||||
@@ -834,6 +837,7 @@
|
||||
<Tooltip content={$i18n.t('Delete Model')} placement="top">
|
||||
<button
|
||||
class={iconButtonClass}
|
||||
aria-label={$i18n.t('Delete Model')}
|
||||
on:click={() => {
|
||||
showModelDeleteConfirm = true;
|
||||
}}
|
||||
@@ -882,6 +886,7 @@
|
||||
<Tooltip content={$i18n.t('Create Model')} placement="top">
|
||||
<button
|
||||
class={iconButtonClass}
|
||||
aria-label={$i18n.t('Create Model')}
|
||||
on:click={() => {
|
||||
createModelHandler();
|
||||
}}
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
<div class="flex items-center gap-0.5">
|
||||
<button
|
||||
class="p-0.5 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition"
|
||||
aria-label={$i18n.t('Previous month')}
|
||||
on:click={() => navigateMini(-1)}
|
||||
>
|
||||
<svg
|
||||
@@ -128,6 +129,7 @@
|
||||
</button>
|
||||
<button
|
||||
class="p-0.5 rounded hover:bg-gray-100 dark:hover:bg-gray-800 transition"
|
||||
aria-label={$i18n.t('Next month')}
|
||||
on:click={() => navigateMini(1)}
|
||||
>
|
||||
<svg
|
||||
|
||||
@@ -722,6 +722,7 @@
|
||||
class=" absolute -top-12 left-0 right-0 flex justify-center z-30 pointer-events-none"
|
||||
>
|
||||
<button
|
||||
aria-label={$i18n.t('Scroll to bottom')}
|
||||
class=" bg-white border border-gray-100 dark:border-none dark:bg-white/20 p-1.5 rounded-full pointer-events-auto"
|
||||
on:click={() => {
|
||||
scrollEnd = true;
|
||||
@@ -851,6 +852,7 @@
|
||||
<button
|
||||
class=" bg-white text-black border border-white rounded-full group-hover:visible invisible transition"
|
||||
type="button"
|
||||
aria-label={$i18n.t('Remove file')}
|
||||
on:click={() => {
|
||||
files.splice(fileIdx, 1);
|
||||
files = files;
|
||||
@@ -1067,6 +1069,7 @@
|
||||
<div class=" flex items-center">
|
||||
<Tooltip content={$i18n.t('Stop')}>
|
||||
<button
|
||||
aria-label={$i18n.t('Stop')}
|
||||
class="bg-white hover:bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-800 transition rounded-full p-[5px]"
|
||||
on:click={() => {
|
||||
onStop();
|
||||
@@ -1092,6 +1095,7 @@
|
||||
<Tooltip content={$i18n.t('Send message')}>
|
||||
<button
|
||||
id="send-message-button"
|
||||
aria-label={$i18n.t('Send message')}
|
||||
class="{content !== '' || files.length !== 0
|
||||
? 'bg-black text-white hover:bg-gray-900 dark:bg-white dark:text-black dark:hover:bg-gray-100 '
|
||||
: 'text-white bg-gray-200 dark:text-gray-900 dark:bg-gray-700 disabled'} transition rounded-full p-[5px] self-center"
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
<div class="flex items-center space-x-2">
|
||||
<div class="flex items-center gap-0.5 self-center min-w-fit" dir="ltr">
|
||||
<button
|
||||
aria-label={$i18n.t('Previous version')}
|
||||
class="self-center p-1 hover:bg-black/5 dark:hover:bg-white/5 dark:hover:text-white hover:text-black rounded-md transition disabled:cursor-not-allowed"
|
||||
on:click={() => navigateContent('prev')}
|
||||
disabled={contents.length <= 1}
|
||||
@@ -162,6 +163,7 @@
|
||||
</div>
|
||||
|
||||
<button
|
||||
aria-label={$i18n.t('Next version')}
|
||||
class="self-center p-1 hover:bg-black/5 dark:hover:bg-white/5 dark:hover:text-white hover:text-black rounded-md transition disabled:cursor-not-allowed"
|
||||
on:click={() => navigateContent('next')}
|
||||
disabled={contents.length <= 1}
|
||||
|
||||
@@ -348,6 +348,7 @@
|
||||
class="flex items-center justify-center gap-3 py-2 px-3 border-t border-gray-100 dark:border-gray-800 text-xs text-gray-500"
|
||||
>
|
||||
<button
|
||||
aria-label={$i18n.t('Previous slide')}
|
||||
class="p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-30"
|
||||
disabled={currentSlide === 0}
|
||||
on:click={() => {
|
||||
@@ -370,6 +371,7 @@
|
||||
</button>
|
||||
<span>{currentSlide + 1} / {fileOfficeSlides.length}</span>
|
||||
<button
|
||||
aria-label={$i18n.t('Next slide')}
|
||||
class="p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-30"
|
||||
disabled={currentSlide === fileOfficeSlides.length - 1}
|
||||
on:click={() => {
|
||||
|
||||
@@ -254,6 +254,7 @@
|
||||
class="flex items-center justify-center gap-3 py-1.5 px-3 border-t border-gray-100 dark:border-gray-800 text-xs text-gray-500 shrink-0"
|
||||
>
|
||||
<button
|
||||
aria-label={$i18n.t('Previous page')}
|
||||
class="p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-30"
|
||||
disabled={page === 0}
|
||||
on:click={() => {
|
||||
@@ -276,6 +277,7 @@
|
||||
</button>
|
||||
<span>{page + 1} / {totalPages} ({totalRows.toLocaleString()} rows)</span>
|
||||
<button
|
||||
aria-label={$i18n.t('Next page')}
|
||||
class="p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 disabled:opacity-30"
|
||||
disabled={page >= totalPages - 1}
|
||||
on:click={() => {
|
||||
|
||||
@@ -1389,6 +1389,7 @@
|
||||
class=" absolute -top-12 left-0 right-0 flex justify-center z-30 pointer-events-none"
|
||||
>
|
||||
<button
|
||||
aria-label={$i18n.t('Scroll to bottom')}
|
||||
class=" bg-white border border-gray-100 dark:border-none dark:bg-white/20 p-1.5 rounded-full pointer-events-auto"
|
||||
on:click={() => {
|
||||
autoScroll = true;
|
||||
@@ -1473,6 +1474,7 @@
|
||||
>
|
||||
<button
|
||||
id="generate-message-pair-button"
|
||||
aria-label={$i18n.t('Generate message pair')}
|
||||
class="hidden"
|
||||
on:click={() => createMessagePair(prompt)}
|
||||
/>
|
||||
@@ -2264,6 +2266,7 @@
|
||||
<div class=" flex items-center">
|
||||
<Tooltip content={$i18n.t('Stop')}>
|
||||
<button
|
||||
aria-label={$i18n.t('Stop')}
|
||||
class="bg-white hover:bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-800 transition rounded-full p-[5px]"
|
||||
on:click={() => {
|
||||
stopResponse();
|
||||
|
||||
@@ -928,6 +928,7 @@
|
||||
<div class=" absolute top-4 md:top-8 left-4">
|
||||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Stop camera')}
|
||||
class="p-1.5 text-white cursor-pointer backdrop-blur-xl bg-black/10 rounded-full"
|
||||
on:click={() => {
|
||||
stopCamera();
|
||||
@@ -984,7 +985,11 @@
|
||||
await startVideoStream();
|
||||
}}
|
||||
>
|
||||
<button class="p-3 rounded-full bg-gray-50 dark:bg-gray-900" type="button">
|
||||
<button
|
||||
aria-label={$i18n.t('Switch camera')}
|
||||
class="p-3 rounded-full bg-gray-50 dark:bg-gray-900"
|
||||
type="button"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 20 20"
|
||||
@@ -1002,6 +1007,7 @@
|
||||
{:else}
|
||||
<Tooltip content={$i18n.t('Camera')}>
|
||||
<button
|
||||
aria-label={$i18n.t('Camera')}
|
||||
class="p-3 rounded-full bg-gray-50 dark:bg-gray-900"
|
||||
type="button"
|
||||
on:click={async () => {
|
||||
@@ -1087,6 +1093,7 @@
|
||||
</Tooltip>
|
||||
|
||||
<button
|
||||
aria-label={$i18n.t('End call')}
|
||||
class="p-3 rounded-full bg-gray-50 dark:bg-gray-900"
|
||||
on:click={async () => {
|
||||
await stopAudioStream();
|
||||
|
||||
@@ -122,6 +122,7 @@
|
||||
<Tooltip content={$i18n.t('Add Terminal')} placement="top">
|
||||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Add Terminal')}
|
||||
class="p-0.5 rounded-md text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 transition"
|
||||
on:click|stopPropagation={() => {
|
||||
show = false;
|
||||
@@ -189,6 +190,7 @@
|
||||
<Tooltip content={$i18n.t('Add Terminal')} placement="top">
|
||||
<button
|
||||
type="button"
|
||||
aria-label={$i18n.t('Add Terminal')}
|
||||
class="p-0.5 rounded-md text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 transition"
|
||||
on:click|stopPropagation={() => {
|
||||
show = false;
|
||||
|
||||
@@ -620,6 +620,7 @@
|
||||
<button
|
||||
id="confirm-recording-button"
|
||||
type="button"
|
||||
aria-label={$i18n.t('Confirm recording')}
|
||||
class="p-1.5 bg-indigo-500 text-white dark:bg-indigo-500 dark:text-blue-950 rounded-full"
|
||||
on:click={async () => {
|
||||
await confirmRecording();
|
||||
|
||||
Reference in New Issue
Block a user