update UI
This commit is contained in:
1 parent
0c6f1c0ffc
commit
0c5939ed7a
7 files changed
+218
-61
No files matched your search
@@ -5837,7 +5837,7 @@ const handlePermissionImport = async (event: Event) => {
|
||||
<h4 class="text-base font-bold text-primary shrink-0">{{ $t('admin.schedule.form.dataSourceConfig') }}</h4>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<div
|
||||
class="segment-control segment-control--chips segment-control--sm shrink-0"
|
||||
class="segment-control segment-control--fit segment-control--sm shrink-0"
|
||||
role="radiogroup"
|
||||
:aria-label="$t('admin.schedule.form.dataSourceConfig')"
|
||||
>
|
||||
@@ -6105,7 +6105,7 @@ const handlePermissionImport = async (event: Event) => {
|
||||
<p class="text-sm text-muted">{{ $t('admin.schedule.form.cronHint') }}</p>
|
||||
</div>
|
||||
<div
|
||||
class="segment-control segment-control--chips-equal segment-control--sm w-full"
|
||||
class="segment-control segment-control--cols-4 segment-control--sm"
|
||||
role="radiogroup"
|
||||
:aria-label="$t('admin.schedule.form.cronTitle')"
|
||||
>
|
||||
|
||||
@@ -14,6 +14,7 @@ import { ref, onMounted, onBeforeUnmount, computed, watch, nextTick } from 'vue'
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useChat } from '../composables/useChat';
|
||||
import { Send, Loader2, Plus, Copy, Edit2, RotateCw, Check, X, PanelLeftClose, PanelLeftOpen, ChevronDown, Sparkles, Database, Mic, LogOut, MessageSquareText, Globe, ExternalLink, Search, LayoutGrid, Briefcase, History, Sun, Moon } from 'lucide-vue-next';
|
||||
import LocaleToggleButton from '../components/LocaleToggleButton.vue';
|
||||
import { marked } from 'marked';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { config } from '../config';
|
||||
@@ -2117,6 +2118,7 @@ const showChatRating = ref(false);
|
||||
<div class="flex h-8 w-8 items-center justify-center rounded-full bg-brand-600 text-sm font-bold text-white shadow-sm shadow-brand-500/20">
|
||||
{{ (currentUser?.username || 'I').charAt(0).toUpperCase() }}
|
||||
</div>
|
||||
<LocaleToggleButton variant="sidebar" icon-size="md" />
|
||||
<button @click="showGeneralFeedbackDialog = true" class="transition-colors hover:text-secondary" :title="$t('chat.generalFeedback')"><MessageSquareText class="h-5 w-5" /></button>
|
||||
<button @click="goToWorkspace()" class="transition-colors hover:text-secondary" :title="$t('workspace.title')"><Briefcase class="h-5 w-5" /></button>
|
||||
</div>
|
||||
@@ -2212,17 +2214,7 @@ const showChatRating = ref(false);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2 px-4 py-2">
|
||||
<span class="shrink-0 text-xs font-medium text-muted">{{ $t('chat.language') }}</span>
|
||||
<select v-model="locale" class="min-w-0 flex-1 rounded-lg border border-default bg-surface-soft px-2 py-1 text-xs text-secondary outline-none transition focus:border-brand-400">
|
||||
<option value="zh-CN">简体中文</option>
|
||||
<option value="en">English</option>
|
||||
<option value="zh-TW">繁體中文</option>
|
||||
<option value="th">ไทย</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button @click="handleLogout" class="flex w-full items-center gap-2 border-t border-slate-50 px-4 py-2 text-left text-sm text-red-600 transition-colors hover:bg-red-50">
|
||||
<button @click="handleLogout" class="flex w-full items-center gap-2 border-t border-subtle px-4 py-2 text-left text-sm text-red-600 transition-colors hover:bg-red-50">
|
||||
<LogOut class="w-4 h-4" />
|
||||
{{ $t('chat.logout') }}
|
||||
</button>
|
||||
@@ -2236,6 +2228,7 @@ const showChatRating = ref(false);
|
||||
<Sun v-if="appliedTheme === 'dark'" class="h-4 w-4" />
|
||||
<Moon v-else class="h-4 w-4" />
|
||||
</button>
|
||||
<LocaleToggleButton variant="sidebar" />
|
||||
<button @click="showGeneralFeedbackDialog = true" class="transition-colors hover:text-secondary" :title="$t('chat.generalFeedback')"><MessageSquareText class="h-4 w-4" /></button>
|
||||
<button @click="goToWorkspace()" class="transition-colors hover:text-secondary" :title="$t('workspace.title')"><Briefcase class="h-4 w-4" /></button>
|
||||
</div>
|
||||
|
||||
@@ -11,6 +11,7 @@ import { config } from '../config';
|
||||
import { useTheme } from '../composables/useTheme';
|
||||
import type { ThemePreference } from '../composables/useTheme';
|
||||
import ThemeToggleButton from '../components/ThemeToggleButton.vue';
|
||||
import LocaleToggleButton from '../components/LocaleToggleButton.vue';
|
||||
import MarketingShell from '../layouts/MarketingShell.vue';
|
||||
import DeleteConfirmDialog from '../components/DeleteConfirmDialog.vue';
|
||||
import GeneralFeedbackDialog from '../components/GeneralFeedbackDialog.vue';
|
||||
@@ -1409,12 +1410,7 @@ onBeforeUnmount(() => {
|
||||
<MarketingShell v-if="!isLoggedIn">
|
||||
<template #tools>
|
||||
<ThemeToggleButton />
|
||||
<select v-model="locale" class="select-field-ds cursor-pointer rounded-full text-xs">
|
||||
<option value="en">English</option>
|
||||
<option value="zh-CN">{{ $t('workspace.lang.zhCN') }}</option>
|
||||
<option value="zh-TW">{{ $t('workspace.lang.zhTW') }}</option>
|
||||
<option value="th">ไทย</option>
|
||||
</select>
|
||||
<LocaleToggleButton />
|
||||
</template>
|
||||
|
||||
<div v-if="isLoading" class="animate-pulse space-y-8">
|
||||
@@ -1866,17 +1862,21 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-2 block text-sm font-medium text-muted">{{ $t('profile.theme') }}</label>
|
||||
<div class="grid grid-cols-3 gap-2">
|
||||
<div
|
||||
class="segment-control segment-control--cols-3 segment-control--md"
|
||||
role="radiogroup"
|
||||
:aria-label="$t('profile.theme')"
|
||||
>
|
||||
<button
|
||||
v-for="item in themeOptions"
|
||||
:key="item.value"
|
||||
type="button"
|
||||
role="radio"
|
||||
:aria-checked="profileUser.theme_preference === item.value"
|
||||
:disabled="!isProfileEditing"
|
||||
class="segment-item"
|
||||
:class="profileUser.theme_preference === item.value ? 'segment-item--active' : ''"
|
||||
@click="profileUser.theme_preference = item.value"
|
||||
class="rounded-xl border px-3 py-3 text-sm font-medium transition-colors"
|
||||
:class="profileUser.theme_preference === item.value
|
||||
? 'border-brand-500 bg-brand-50 text-brand-700'
|
||||
: 'border-default bg-surface text-secondary'"
|
||||
>
|
||||
{{ item.label() }}
|
||||
</button>
|
||||
|
||||
Reference in new issue
Block a user