feat(knowledge): enhance UI components with improved icons and metadata
- Replaced static organization icons with the SpaceAvatar component for better visual representation in organization selection and sharing settings. - Updated organization metadata display to include user and knowledge base share counts with new icons for clarity. - Enhanced access information in knowledge base and FAQ entry views with improved iconography and tooltips for better user guidance. - Adjusted styles for consistency and improved readability across various components. This update enhances the user experience by providing clearer visuals and more informative displays related to organizations and knowledge sharing.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
>
|
||||
<div class="org-option-content">
|
||||
<div class="org-option-icon-wrap">
|
||||
<img src="@/assets/img/organization.svg" class="org-option-icon" alt="" aria-hidden="true" />
|
||||
<SpaceAvatar :name="org.name" :avatar="org.avatar" size="small" />
|
||||
</div>
|
||||
<div class="org-option-body">
|
||||
<div class="org-option-header">
|
||||
@@ -39,11 +39,11 @@
|
||||
</div>
|
||||
<div class="org-option-meta">
|
||||
<span class="org-meta-item">
|
||||
<t-icon name="usergroup" size="12px" />
|
||||
<t-icon name="user" class="org-meta-icon org-meta-icon-user" />
|
||||
{{ org.member_count || 0 }} {{ $t('organization.members') }}
|
||||
</span>
|
||||
<span v-if="org.share_count !== undefined" class="org-meta-item">
|
||||
<t-icon name="share" size="12px" />
|
||||
<img src="@/assets/img/zhishiku.svg" class="org-meta-icon org-meta-icon-kb" alt="" aria-hidden="true" />
|
||||
{{ org.share_count }} {{ $t('organization.share.sharedKBs') }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -92,7 +92,11 @@
|
||||
<div v-for="share in shares" :key="share.id" class="share-item">
|
||||
<div class="share-info">
|
||||
<div class="share-org">
|
||||
<img src="@/assets/img/organization-green.svg" class="org-icon" alt="" aria-hidden="true" />
|
||||
<SpaceAvatar
|
||||
:name="share.organization_name || ''"
|
||||
:avatar="orgStore.organizations.find(o => o.id === share.organization_id)?.avatar"
|
||||
size="small"
|
||||
/>
|
||||
<span class="org-name">{{ share.organization_name }}</span>
|
||||
</div>
|
||||
<t-tag
|
||||
@@ -151,6 +155,7 @@ import { useRouter } from 'vue-router'
|
||||
import { useOrganizationStore } from '@/stores/organization'
|
||||
import { shareKnowledgeBase, listKBShares, removeShare, updateSharePermission } from '@/api/organization'
|
||||
import type { KnowledgeBaseShare } from '@/api/organization'
|
||||
import SpaceAvatar from '@/components/SpaceAvatar.vue'
|
||||
|
||||
const { t } = useI18n()
|
||||
const router = useRouter()
|
||||
@@ -444,13 +449,6 @@ onMounted(async () => {
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
|
||||
.org-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
flex-shrink: 0;
|
||||
color: #0052d9;
|
||||
}
|
||||
|
||||
.org-name {
|
||||
font-family: "PingFang SC";
|
||||
font-size: 14px;
|
||||
@@ -530,20 +528,11 @@ onMounted(async () => {
|
||||
|
||||
.org-option-icon-wrap {
|
||||
flex-shrink: 0;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 6px;
|
||||
background: rgba(0, 82, 217, 0.06);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.org-option-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.org-option-body {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
@@ -571,7 +560,7 @@ onMounted(async () => {
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
color: #00000099;
|
||||
|
||||
.org-meta-item {
|
||||
@@ -579,6 +568,24 @@ onMounted(async () => {
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.org-meta-icon {
|
||||
flex-shrink: 0;
|
||||
vertical-align: middle;
|
||||
color: #00000099;
|
||||
}
|
||||
|
||||
.org-meta-icon-user {
|
||||
font-size: 14px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.org-meta-icon-kb {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin-right: 2px;
|
||||
opacity: 0.75;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user