Merge branch 'dev' into hugo-shipping-notice
This commit is contained in:
commit
705971ad03
9 files changed
+41
-15
No files matched your search
@@ -2,7 +2,8 @@
|
||||
* features/chat/components/ChatSidebar.vue
|
||||
* 用途:桌面端聊天侧栏,承载 Agent 信息、会话历史、Agent 切换面板与底部用户菜单。
|
||||
* 依赖:lucide-vue-next、LocaleToggleButton、AgentCategoryList、chat.types。
|
||||
* 逻辑:由聊天页面传入当前 Agent、历史记录与用户可用 Agent;通过事件把新会话、切换 Agent、反馈等操作回传给页面。
|
||||
* 逻辑:由聊天页面传入当前 Agent、历史记录与用户可用 Agent;通过事件把新会话、切换 Agent、反馈、进入管理控制台等操作回传给页面。
|
||||
* 管理员通过底部右侧工具图标进入管理控制台;用户下拉菜单仅保留退出登录。
|
||||
*/
|
||||
<script setup lang="ts">
|
||||
import { computed, onBeforeUnmount, onMounted, ref } from 'vue';
|
||||
@@ -290,18 +291,8 @@ const userInitial = (fallback: string) => {
|
||||
</div>
|
||||
|
||||
<button
|
||||
v-if="currentUser?.role === 'admin'"
|
||||
type="button"
|
||||
class="flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-secondary transition-colors hover:bg-surface-soft"
|
||||
@click="onGoAdmin"
|
||||
>
|
||||
<Settings class="h-4 w-4" />
|
||||
{{ $t('workspace.nav.admin') }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
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"
|
||||
class="flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-red-600 transition-colors hover:bg-red-50"
|
||||
@click="onLogout"
|
||||
>
|
||||
<LogOut class="h-4 w-4" />
|
||||
@@ -326,6 +317,15 @@ const userInitial = (fallback: string) => {
|
||||
<button type="button" class="transition-colors hover:text-secondary" :title="$t('workspace.title')" @click="emit('go-workspace')">
|
||||
<Briefcase class="h-4 w-4" />
|
||||
</button>
|
||||
<button
|
||||
v-if="currentUser?.role === 'admin'"
|
||||
type="button"
|
||||
class="transition-colors hover:text-secondary"
|
||||
:title="$t('admin.title')"
|
||||
@click="onGoAdmin"
|
||||
>
|
||||
<Settings class="h-4 w-4" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user