diff --git a/frontend/src/assets/img/organization-green.svg b/frontend/src/assets/img/organization-green.svg index f821b10a..8a4b7d3f 100644 --- a/frontend/src/assets/img/organization-green.svg +++ b/frontend/src/assets/img/organization-green.svg @@ -1,17 +1,3 @@ -
- - - {{ letter }} + +
@@ -22,9 +26,23 @@ import { computed } from 'vue'; const props = withDefaults(defineProps<{ name: string; + /** Optional: "emoji:🚀" for emoji avatar; otherwise name-based */ + avatar?: string; size?: 'small' | 'medium' | 'large'; }>(), { - size: 'medium' + size: 'medium', + avatar: '' +}); + +const isEmoji = computed(() => { + const v = (props.avatar || '').trim(); + return v.startsWith('emoji:') && v.length > 6; +}); + +const emojiChar = computed(() => { + const v = (props.avatar || '').trim(); + if (!v.startsWith('emoji:')) return ''; + return v.slice(6).trim() || ''; }); // 预定义渐变色(与项目绿色主色协调,偏空间/协作感) @@ -67,6 +85,9 @@ const gradient = computed(() => { }); const avatarStyle = computed(() => { + if (isEmoji.value) { + return { background: 'linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%)' }; + } const g = gradient.value; return { background: `linear-gradient(135deg, ${g.from} 0%, ${g.to} 100%)` @@ -117,6 +138,28 @@ const letterStyle = computed(() => { .space-avatar-letter { font-size: 20px; } + + .space-avatar-emoji-char { + font-size: 28px; + } + } + + &.space-avatar-emoji { + .space-avatar-emoji-char { + position: relative; + z-index: 1; + line-height: 1; + user-select: none; + } + } +} + +.space-avatar-emoji-char { + font-size: 18px; + line-height: 1; + + .space-avatar-small & { + font-size: 14px; } } diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index 074cd363..eaf23195 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -2343,6 +2343,8 @@ export default { namePlaceholder: 'Enter space name', nameRequired: 'Please enter space name', avatar: 'Space Avatar', + avatarClear: 'Clear', + avatarPickerHint: 'Choose an emoji as space avatar', description: 'Description', descriptionPlaceholder: 'Enter space description (optional)', noDescription: 'No description', @@ -2379,6 +2381,7 @@ export default { noSearchableSpaces: 'No discoverable spaces yet, or try a search', membersWithLimit: '{current}/{limit} members', memberLimitReached: 'Full', + backToSearch: 'Back to search', }, invite: { loading: 'Loading...', @@ -2436,6 +2439,8 @@ export default { all: 'All', createdByMe: 'Created by me', joinedByMe: 'Joined', + createdTag: 'Created', + joinedTag: 'Joined', joinedLabel: 'Joined', emptyCreated: 'You have not created any space yet', emptyCreatedDesc: 'Click "Create Space" to create one', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index 5e2bcf9f..dd5b697e 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -2348,6 +2348,8 @@ export default { namePlaceholder: "请输入空间名称", nameRequired: "请输入空间名称", avatar: "空间头像", + avatarClear: "清除", + avatarPickerHint: "选择 Emoji 作为空间头像", description: "空间描述", descriptionPlaceholder: "请输入空间描述(选填)", noDescription: "暂无描述", @@ -2384,6 +2386,7 @@ export default { noSearchableSpaces: "暂无开放可被搜索的空间,或输入关键词搜索", membersWithLimit: "{current}/{limit} 成员", memberLimitReached: "成员已满", + backToSearch: "返回搜索", }, invite: { loading: "加载中...", @@ -2441,6 +2444,8 @@ export default { all: "全部", createdByMe: "我创建的", joinedByMe: "我加入的", + createdTag: "创建", + joinedTag: "加入", joinedLabel: "已加入", emptyCreated: "您还没有创建任何共享空间", emptyCreatedDesc: "点击「创建空间」创建一个新空间", diff --git a/frontend/src/views/organization/OrganizationList.vue b/frontend/src/views/organization/OrganizationList.vue index 8d132810..cf60be23 100644 --- a/frontend/src/views/organization/OrganizationList.vue +++ b/frontend/src/views/organization/OrganizationList.vue @@ -66,12 +66,15 @@
-
- +
{{ org.name }} + + + {{ org.is_owner ? $t('organization.createdByMe') : $t('organization.joinedByMe') }} +
-
- -
- -
-
+
-
- - {{ org.member_count || 0 }} -
+ + + {{ org.member_count || 0 }} +
- + + + {{ org.share_count ?? 0 }} + - - {{ org.pending_join_request_count }} {{ $t('organization.settings.pendingReview') }} - - - {{ $t('organization.owner') }} - - - {{ $t(`organization.role.${org.my_role}`) }} -
+ + {{ org.pending_join_request_count }} {{ $t('organization.settings.pendingReview') }} + + + {{ $t('organization.owner') }} + + + {{ $t(`organization.role.${org.my_role}`) }} +
{{ formatDate(org.created_at) }}
@@ -220,6 +218,15 @@
+ +

{{ invitePreviewData ? $t('organization.invite.previewTitle') : $t('organization.joinOrg') }}

- -
+ +