fix(ui): add resource list title icons and highlight shared filter
parent
640e356e31
commit
5c5d46d9fb
|
|
@ -12,7 +12,9 @@
|
|||
:value="selectedSpace" :options="spaceOptions" :placeholder="$t('listSpaceSidebar.spaces')"
|
||||
:aria-label="$t('listSpaceSidebar.spaces')" filterable clearable
|
||||
@change="(value: unknown) => $emit('update:modelValue', String(value || 'all'))">
|
||||
<template #prefixIcon><ResourceIcon type="organization" :size="16" /></template>
|
||||
<template #prefixIcon>
|
||||
<ResourceIcon type="organization" :size="16" :class="{ 'space-filter-icon-active': !!selectedSpace }" />
|
||||
</template>
|
||||
</t-select>
|
||||
</div>
|
||||
<t-input :model-value="query" class="search-input" :placeholder="$t('menu.search')"
|
||||
|
|
@ -86,6 +88,7 @@ onMounted(() => { if (!props.hideScopes) orgStore.fetchOrganizations() })
|
|||
.category-tabs { .artifact-filter-tabs(); }
|
||||
.scope-count { margin-left: 5px; font-size: var(--app-text-xs); opacity: 0.65; font-variant-numeric: tabular-nums; }
|
||||
.space-filter { width: 180px; }
|
||||
.space-filter-icon-active { color: var(--td-brand-color); }
|
||||
.search-input { width: 260px; max-width: 100%; margin-left: auto; }
|
||||
@media (max-width: 720px) {
|
||||
.search-input { width: 100%; }
|
||||
|
|
|
|||
|
|
@ -6,15 +6,16 @@
|
|||
import { computed } from 'vue'
|
||||
import knowledgeIcon from '@/assets/img/zhishiku.svg'
|
||||
import agentIcon from '@/assets/img/agent.svg'
|
||||
import artifactIcon from '@/assets/img/artifact.svg'
|
||||
import organizationIcon from '@/assets/img/organization.svg'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
type: 'knowledge' | 'agent' | 'organization'
|
||||
type: 'knowledge' | 'agent' | 'artifact' | 'organization'
|
||||
size?: number
|
||||
}>(), { size: 20 })
|
||||
|
||||
// Reuse the navigation assets while inheriting the surrounding theme color.
|
||||
const icons = { knowledge: knowledgeIcon, agent: agentIcon, organization: organizationIcon }
|
||||
const icons = { knowledge: knowledgeIcon, agent: agentIcon, artifact: artifactIcon, organization: organizationIcon }
|
||||
const iconStyle = computed(() => ({
|
||||
width: `${props.size}px`,
|
||||
height: `${props.size}px`,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
<div class="header" style="--wails-draggable: drag">
|
||||
<div class="header-title" style="--wails-draggable: drag">
|
||||
<div class="title-row" style="--wails-draggable: drag">
|
||||
<h2 style="--wails-draggable: drag">{{ $t('agent.title') }}</h2>
|
||||
<h2 style="--wails-draggable: drag">
|
||||
<ResourceIcon type="agent" :size="24" />
|
||||
{{ $t('agent.title') }}
|
||||
</h2>
|
||||
<t-tooltip v-if="authStore.hasRole('contributor')" :content="$t('agent.createAgent')" placement="bottom">
|
||||
<t-button variant="text" theme="default" size="small" class="header-action-btn"
|
||||
data-guide="agent-list-create" style="--wails-draggable: no-drag" @click="handleCreateAgent">
|
||||
|
|
@ -1551,6 +1554,9 @@ watch(keyword, () => { collapsedAgentSections.value = new Set() })
|
|||
}
|
||||
|
||||
h2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin: 0;
|
||||
color: var(--td-text-color-primary);
|
||||
font-family: var(--app-font-family);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@
|
|||
<div class="artifact-library">
|
||||
<div class="header" style="--wails-draggable: drag">
|
||||
<div class="header-title" style="--wails-draggable: drag">
|
||||
<h2 style="--wails-draggable: drag">{{ $t('artifactLibrary.title') }}</h2>
|
||||
<h2 style="--wails-draggable: drag">
|
||||
<ResourceIcon type="artifact" :size="24" />
|
||||
{{ $t('artifactLibrary.title') }}
|
||||
</h2>
|
||||
<p class="header-subtitle" style="--wails-draggable: drag">{{ $t('artifactLibrary.subtitle') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -206,6 +209,7 @@ import {
|
|||
import { formatArtifactDateTime, formatArtifactSize } from '@/utils/sessionArtifacts'
|
||||
import { resolveFilePreviewExt } from '@/utils/filePreview'
|
||||
import EmptyState from '@/components/EmptyState.vue'
|
||||
import ResourceIcon from '@/components/icons/ResourceIcon.vue'
|
||||
import DocumentPreview from '@/components/document-preview.vue'
|
||||
import ArtifactFileIcon from '@/views/chat/components/ArtifactFileIcon.vue'
|
||||
|
||||
|
|
@ -410,6 +414,9 @@ onBeforeUnmount(() => {
|
|||
}
|
||||
|
||||
h2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin: 0;
|
||||
color: var(--td-text-color-primary);
|
||||
font-family: var(--app-font-family);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
<div class="header" style="--wails-draggable: drag">
|
||||
<div class="header-title" style="--wails-draggable: drag">
|
||||
<div class="title-row" style="--wails-draggable: drag">
|
||||
<h2 style="--wails-draggable: drag">{{ $t('knowledgeBase.title') }}</h2>
|
||||
<h2 style="--wails-draggable: drag">
|
||||
<ResourceIcon type="knowledge" :size="24" />
|
||||
{{ $t('knowledgeBase.title') }}
|
||||
</h2>
|
||||
<t-tooltip v-if="authStore.hasRole('contributor')" :content="$t('knowledgeList.create')" placement="bottom">
|
||||
<t-button variant="text" theme="default" size="small" class="header-action-btn"
|
||||
data-guide="kb-list-create" style="--wails-draggable: no-drag" @click="handleCreateKnowledgeBase">
|
||||
|
|
@ -1554,6 +1557,9 @@ watch(keyword, () => { collapsedKbSections.value = new Set() })
|
|||
}
|
||||
|
||||
h2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin: 0;
|
||||
color: var(--td-text-color-primary);
|
||||
font-family: var(--app-font-family);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@
|
|||
<div class="header" style="--wails-draggable: drag">
|
||||
<div class="header-title" style="--wails-draggable: drag">
|
||||
<div class="title-row" style="--wails-draggable: drag">
|
||||
<h2 style="--wails-draggable: drag">{{ $t('organization.title') }}</h2>
|
||||
<h2 style="--wails-draggable: drag">
|
||||
<ResourceIcon type="organization" :size="24" />
|
||||
{{ $t('organization.title') }}
|
||||
</h2>
|
||||
<div class="header-actions" style="--wails-draggable: no-drag">
|
||||
<t-tooltip :content="canManageOrg ? $t('organization.joinOrg') : noPermissionTip" placement="bottom">
|
||||
<t-button variant="text" theme="default" size="small" class="header-action-btn"
|
||||
|
|
@ -1092,6 +1095,9 @@ watch(keyword, () => { collapsedOrgSections.value = new Set() })
|
|||
}
|
||||
|
||||
h2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin: 0;
|
||||
color: var(--td-text-color-primary);
|
||||
font-family: var(--app-font-family);
|
||||
|
|
|
|||
Loading…
Reference in New Issue