diff --git a/frontend/src/assets/icon-font/iconfont.css b/frontend/src/assets/icon-font/iconfont.css index c7c7464d9b..d546520989 100644 --- a/frontend/src/assets/icon-font/iconfont.css +++ b/frontend/src/assets/icon-font/iconfont.css @@ -1,7 +1,7 @@ @font-face { font-family: iconfont; /* Project id 3462279 */ - src: url('iconfont.woff2?t=1714372635707') format('woff2'), url('iconfont.woff?t=1714372635707') format('woff'), - url('iconfont.ttf?t=1714372635707') format('truetype'), url('iconfont.svg?t=1714372635707#iconfont') format('svg'); + src: url('iconfont.woff2?t=1715686154177') format('woff2'), url('iconfont.woff?t=1715686154177') format('woff'), + url('iconfont.ttf?t=1715686154177') format('truetype'), url('iconfont.svg?t=1715686154177#iconfont') format('svg'); } .iconfont { font-size: 16px; @@ -10,6 +10,33 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +.icon-a-icon_test-tracking_filled1::before { + content: '\e7b3'; +} +.icon-icon_functional_testing1::before { + content: '\e7b2'; +} +.icon-icon_bug::before { + content: '\e7b1'; +} +.icon-icon_threshold::before { + content: '\e7b0'; +} +.icon-icon_filter::before { + content: '\e7af'; +} +.icon-icon_chevron-down::before { + content: '\e7ad'; +} +.icon-icon_chevron-up::before { + content: '\e7ae'; +} +.icon-icon_audit::before { + content: '\e7ac'; +} +.icon-icon_api-test-filled1::before { + content: '\e7ab'; +} .icon-icon_menu_unfold::before { content: '\e7a9'; } diff --git a/frontend/src/assets/icon-font/iconfont.js b/frontend/src/assets/icon-font/iconfont.js index 7622800d00..4fba6e2dcd 100644 --- a/frontend/src/assets/icon-font/iconfont.js +++ b/frontend/src/assets/icon-font/iconfont.js @@ -1,5 +1,5 @@ (window._iconfont_svg_string_3462279 = - ''), + ''), (function (h) { var a = (a = document.getElementsByTagName('script'))[a.length - 1], l = a.getAttribute('data-injectcss'), @@ -10,7 +10,7 @@ c, v, t, - m = function (a, l) { + z = function (a, l) { l.parentNode.insertBefore(a, l); }; if (l && !h.__iconfont__svg__cssinject__) { @@ -34,7 +34,7 @@ (l.style.height = 0), (l.style.overflow = 'hidden'), (l = l), - (a = document.body).firstChild ? m(l, a.firstChild) : a.appendChild(l)); + (a = document.body).firstChild ? z(l, a.firstChild) : a.appendChild(l)); }), document.addEventListener ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState) @@ -49,10 +49,10 @@ (t = !1), d(), (v.onreadystatechange = function () { - 'complete' == v.readyState && ((v.onreadystatechange = null), z()); + 'complete' == v.readyState && ((v.onreadystatechange = null), m()); })); } - function z() { + function m() { t || ((t = !0), c()); } function d() { @@ -61,6 +61,6 @@ } catch (a) { return void setTimeout(d, 50); } - z(); + m(); } })(window); diff --git a/frontend/src/assets/icon-font/iconfont.json b/frontend/src/assets/icon-font/iconfont.json index f9c9e2723b..09bd894734 100644 --- a/frontend/src/assets/icon-font/iconfont.json +++ b/frontend/src/assets/icon-font/iconfont.json @@ -5,6 +5,69 @@ "css_prefix_text": "icon-", "description": "DE、MS项目icon管理", "glyphs": [ + { + "icon_id": "40334819", + "name": "icon_test-tracking_filled", + "font_class": "a-icon_test-tracking_filled1", + "unicode": "e7b3", + "unicode_decimal": 59315 + }, + { + "icon_id": "40334248", + "name": "icon_functional_testing", + "font_class": "icon_functional_testing1", + "unicode": "e7b2", + "unicode_decimal": 59314 + }, + { + "icon_id": "40282308", + "name": "icon_bug", + "font_class": "icon_bug", + "unicode": "e7b1", + "unicode_decimal": 59313 + }, + { + "icon_id": "40273551", + "name": "icon_threshold", + "font_class": "icon_threshold", + "unicode": "e7b0", + "unicode_decimal": 59312 + }, + { + "icon_id": "40270604", + "name": "icon_filter", + "font_class": "icon_filter", + "unicode": "e7af", + "unicode_decimal": 59311 + }, + { + "icon_id": "40270615", + "name": "icon_chevron-down", + "font_class": "icon_chevron-down", + "unicode": "e7ad", + "unicode_decimal": 59309 + }, + { + "icon_id": "40270614", + "name": "icon_chevron-up", + "font_class": "icon_chevron-up", + "unicode": "e7ae", + "unicode_decimal": 59310 + }, + { + "icon_id": "40177791", + "name": "icon_audit", + "font_class": "icon_audit", + "unicode": "e7ac", + "unicode_decimal": 59308 + }, + { + "icon_id": "40164987", + "name": "icon_api-test-filled", + "font_class": "icon_api-test-filled1", + "unicode": "e7ab", + "unicode_decimal": 59307 + }, { "icon_id": "39725024", "name": "icon_menu_unfold", diff --git a/frontend/src/assets/icon-font/iconfont.svg b/frontend/src/assets/icon-font/iconfont.svg index 54e5e744ae..b6aedf5067 100644 --- a/frontend/src/assets/icon-font/iconfont.svg +++ b/frontend/src/assets/icon-font/iconfont.svg @@ -14,6 +14,24 @@ /> + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/assets/icon-font/iconfont.ttf b/frontend/src/assets/icon-font/iconfont.ttf index 2b6306f480..5c8e31d455 100644 Binary files a/frontend/src/assets/icon-font/iconfont.ttf and b/frontend/src/assets/icon-font/iconfont.ttf differ diff --git a/frontend/src/assets/icon-font/iconfont.woff b/frontend/src/assets/icon-font/iconfont.woff index 8f5d867605..358160d630 100644 Binary files a/frontend/src/assets/icon-font/iconfont.woff and b/frontend/src/assets/icon-font/iconfont.woff differ diff --git a/frontend/src/assets/icon-font/iconfont.woff2 b/frontend/src/assets/icon-font/iconfont.woff2 index 8cbdd60762..ff843facd8 100644 Binary files a/frontend/src/assets/icon-font/iconfont.woff2 and b/frontend/src/assets/icon-font/iconfont.woff2 differ diff --git a/frontend/src/components/business/ms-menu/index.vue b/frontend/src/components/business/ms-menu/index.vue index 53e97ad4c6..82453116ee 100644 --- a/frontend/src/components/business/ms-menu/index.vue +++ b/frontend/src/components/business/ms-menu/index.vue @@ -20,7 +20,7 @@ import { getFirstRouterNameByCurrentRoute } from '@/utils/permission'; import { listenerRouteChange } from '@/utils/route-listener'; - import { ProjectManagementRouteEnum, RouteEnum, SettingRouteEnum } from '@/enums/routeEnum'; + import { ProjectManagementRouteEnum, SettingRouteEnum } from '@/enums/routeEnum'; import useMenuTree from './use-menu-tree'; import type { RouteMeta } from 'vue-router'; @@ -123,11 +123,6 @@ selectedKey.value = [activeMenu || menuOpenKeys[menuOpenKeys.length - 1]]; } - if (newRoute.fullPath.includes(RouteEnum.SETTING)) { - appStore.updateSettings({ menuCollapse: false }); - } else { - appStore.updateSettings({ menuCollapse: true }); - } }, true); const setCollapse = (val: boolean) => { if (appStore.device === 'desktop') appStore.updateSettings({ menuCollapse: val }); @@ -395,12 +390,22 @@ ), }} > - -
- - {userStore.name} -
- + + {collapsed.value ? ( +
+ +
+ ) : ( +
+ + {userStore.name} +
+ )} + + {collapsed.value ? null : }
); @@ -423,7 +428,11 @@ element?.name === SettingRouteEnum.SETTING_ORGANIZATION ? ( goto(element)}>
- {t(element?.meta?.locale || '')} + {t( + collapsed.value + ? element?.meta?.collapsedLocale || element?.meta?.locale || '' + : element?.meta?.locale || '' + )} {xPack.value ? orgTrigger(element, menuSwitchOrgVisible, () => (
) : ( goto(element)}> - {t(element?.meta?.locale || '')} + {t( + collapsed.value + ? element?.meta?.collapsedLocale || element?.meta?.locale || '' + : element?.meta?.locale || '' + )} ); @@ -461,7 +474,11 @@ key={element?.name} v-slots={{ icon, - title: () => h('div', t(element?.meta?.locale || '')), + title: () => + h( + 'div', + t(collapsed.value ? element?.meta?.collapsedLocale || '' : element?.meta?.locale || '') + ), }} class={BOTTOM_MENU_LIST.includes(element?.name as string) ? 'arco-menu-inline--bottom' : ''} > @@ -496,11 +513,11 @@ 'popup-offset': -4, }} v-slots={{ - 'collapse-icon': () => (appStore.menuCollapse ? : ), + 'collapse-icon': () => (collapsed.value ? : ), }} > -
{renderSubMenu()}
-
{personalInfoMenu()}
+
{renderSubMenu()}
+
{personalInfoMenu()}
{personalInfoDrawer()} @@ -551,7 +568,7 @@ margin-right: 8px; .arco-icon { &:not(.arco-icon-down) { - font-size: 18px; + font-size: 16px; } color: var(--color-text-4); @@ -590,11 +607,26 @@ .arco-menu-overflow-sub-menu { min-width: 60px; } - .arco-menu-collapsed { - width: 72px; - .arco-avatar, - .arco-icon { - margin-right: 2px !important; + .arco-menu-vertical.arco-menu-collapsed { + width: 56px; + .arco-menu-inner { + @apply !p-0; + + padding-bottom: 32px !important; + .arco-menu-item, + .arco-menu-inline--bottom { + @apply flex-col p-0; + + gap: 4px; + line-height: normal; + padding: 8px 14px; + .arco-menu-icon { + @apply mr-0; + } + .arco-menu-title { + @apply opacity-100; + } + } } } .arco-menu { diff --git a/frontend/src/locale/en-US/index.ts b/frontend/src/locale/en-US/index.ts index c0cfa6d2a2..5edc70a880 100644 --- a/frontend/src/locale/en-US/index.ts +++ b/frontend/src/locale/en-US/index.ts @@ -21,11 +21,14 @@ export default { message: { 'menu.workbench': 'Workbench', 'menu.testPlan': 'Test Plan', + 'menu.testPlanShort': 'Plan', 'menu.bugManagement': 'Bug', + 'menu.bugManagementShort': 'Bug', 'menu.bugManagement.bugDetail': 'Bug', 'menu.bugManagement.bugRecycle': 'Recycle', 'menu.caseManagement': 'Functional', 'menu.apiTest': 'API Test', + 'menu.apiTestShort': 'API', 'menu.apiTest.debug': 'Debug', 'menu.apiTest.debug.debug': 'Debug', 'menu.apiTest.management': 'API', @@ -36,6 +39,7 @@ export default { 'menu.uiTest': 'UI Test', 'menu.performanceTest': 'Performance Test', 'menu.projectManagement': 'Project', + 'menu.projectManagementShort': 'Project', 'menu.projectManagement.fileManagement': 'File', 'menu.projectManagement.messageManagement': 'Message', 'menu.projectManagement.commonScript': 'Common Script', @@ -60,7 +64,9 @@ export default { 'menu.projectManagement.taskCenter': 'Task center', 'menu.projectManagement.environmentManagement': 'Environment', 'menu.settings': 'Settings', + 'menu.settingsShort': 'System', 'menu.settings.system': 'System', + 'menu.settings.systemManagement': 'System Management', 'menu.settings.system.usergroup': 'User Group', 'menu.settings.system.authorizedManagement': 'Authorized', 'menu.settings.system.pluginManager': 'Plugin', @@ -72,6 +78,7 @@ export default { 'menu.settings.system.parameter': 'System Parameter', 'menu.settings.system.log': 'Log', 'menu.settings.organization': 'Organization', + 'menu.settings.organizationManagement': 'Organization Management', 'menu.settings.organization.member': 'Member', 'menu.settings.organization.userGroup': 'User Group', 'menu.settings.organization.project': 'Project', diff --git a/frontend/src/locale/zh-CN/index.ts b/frontend/src/locale/zh-CN/index.ts index cd7686482e..a7f725e50a 100644 --- a/frontend/src/locale/zh-CN/index.ts +++ b/frontend/src/locale/zh-CN/index.ts @@ -20,12 +20,16 @@ export default { message: { 'menu.workbench': '工作台', 'menu.testPlan': '测试计划', + 'menu.testPlanShort': '计划', 'menu.testPlan.testPlanDetail': '测试计划详情', 'menu.bugManagement': '缺陷管理', + 'menu.bugManagementShort': '缺陷', 'menu.bugManagement.bugDetail': '缺陷', 'menu.bugManagement.bugRecycle': '回收站', - 'menu.caseManagement': '用例管理', + 'menu.caseManagement': '测试用例', + 'menu.caseManagementShort': '用例', 'menu.apiTest': '接口测试', + 'menu.apiTestShort': '接口', 'menu.apiTest.debug': '调试', 'menu.apiTest.debug.debug': '调试', 'menu.apiTest.management': '定义', @@ -40,6 +44,7 @@ export default { 'menu.loadTest': '性能测试', 'menu.performanceTest': '性能测试', 'menu.projectManagement': '项目管理', + 'menu.projectManagementShort': '项目', 'menu.projectManagement.templateManager': '模板管理', 'menu.projectManagement.log': '日志', 'menu.projectManagement.taskCenter': '任务中心', @@ -63,7 +68,9 @@ export default { 'menu.caseManagement.caseManagementCaseDetail': '用例详情', 'menu.projectManagement.projectPermission': '项目与权限', 'menu.settings': '系统设置', + 'menu.settingsShort': '系统', 'menu.settings.system': '系统', + 'menu.settings.systemManagement': '系统管理', 'menu.settings.system.user': '用户', 'menu.settings.system.usergroup': '用户组', 'menu.settings.system.authorizedManagement': '授权', @@ -75,6 +82,7 @@ export default { 'menu.settings.system.parameter': '系统参数', 'menu.settings.system.log': '日志', 'menu.settings.organization': '组织', + 'menu.settings.organizationManagement': '组织管理', 'menu.settings.organization.member': '成员', 'menu.settings.organization.userGroup': '用户组', 'menu.settings.organization.project': '项目', diff --git a/frontend/src/router/routes/modules/apiTest.ts b/frontend/src/router/routes/modules/apiTest.ts index 821161faa6..368778c901 100644 --- a/frontend/src/router/routes/modules/apiTest.ts +++ b/frontend/src/router/routes/modules/apiTest.ts @@ -10,7 +10,8 @@ const ApiTest: AppRouteRecordRaw = { component: DEFAULT_LAYOUT, meta: { locale: 'menu.apiTest', - icon: 'icon-icon_api-test-filled', + collapsedLocale: 'menu.apiTestShort', + icon: 'icon-icon_api-test-filled1', order: 4, hideChildrenInMenu: true, roles: [ diff --git a/frontend/src/router/routes/modules/bugManagement.ts b/frontend/src/router/routes/modules/bugManagement.ts index 4a1adb7c69..70926885a8 100644 --- a/frontend/src/router/routes/modules/bugManagement.ts +++ b/frontend/src/router/routes/modules/bugManagement.ts @@ -10,6 +10,7 @@ const BugManagement: AppRouteRecordRaw = { component: DEFAULT_LAYOUT, meta: { locale: 'menu.bugManagement', + collapsedLocale: 'menu.bugManagementShort', icon: 'icon-icon_defect', order: 7, roles: ['PROJECT_BUG:READ'], diff --git a/frontend/src/router/routes/modules/caseManagement.ts b/frontend/src/router/routes/modules/caseManagement.ts index 0277419a4a..78ee9de92e 100644 --- a/frontend/src/router/routes/modules/caseManagement.ts +++ b/frontend/src/router/routes/modules/caseManagement.ts @@ -10,7 +10,8 @@ const CaseManagement: AppRouteRecordRaw = { component: DEFAULT_LAYOUT, meta: { locale: 'menu.caseManagement', - icon: 'icon-icon_functional_testing', + collapsedLocale: 'menu.caseManagementShort', + icon: 'icon-icon_functional_testing1', order: 3, hideChildrenInMenu: true, roles: ['FUNCTIONAL_CASE:READ', 'CASE_REVIEW:READ'], diff --git a/frontend/src/router/routes/modules/projectManagement.ts b/frontend/src/router/routes/modules/projectManagement.ts index 66f309ae79..e75d04cb6b 100644 --- a/frontend/src/router/routes/modules/projectManagement.ts +++ b/frontend/src/router/routes/modules/projectManagement.ts @@ -10,8 +10,9 @@ const ProjectManagement: AppRouteRecordRaw = { component: DEFAULT_LAYOUT, meta: { locale: 'menu.projectManagement', + collapsedLocale: 'menu.projectManagementShort', icon: 'icon-icon_project-settings-filled', - order: 2, + order: 1, hideChildrenInMenu: true, roles: [ 'PROJECT_BASE_INFO:READ', diff --git a/frontend/src/router/routes/modules/setting.ts b/frontend/src/router/routes/modules/setting.ts index dadbea0f75..2982fc907a 100644 --- a/frontend/src/router/routes/modules/setting.ts +++ b/frontend/src/router/routes/modules/setting.ts @@ -9,6 +9,7 @@ const Setting: AppRouteRecordRaw = { component: DEFAULT_LAYOUT, meta: { locale: 'menu.settings', + collapsedLocale: 'menu.settingsShort', icon: 'icon-a-icon_system_settings', order: 8, roles: [ @@ -39,6 +40,7 @@ const Setting: AppRouteRecordRaw = { component: null, meta: { locale: 'menu.settings.system', + collapsedLocale: 'menu.settings.systemManagement', roles: [ 'SYSTEM_USER:READ', 'SYSTEM_USER_ROLE:READ', @@ -182,6 +184,7 @@ const Setting: AppRouteRecordRaw = { component: null, meta: { locale: 'menu.settings.organization', + collapsedLocale: 'menu.settings.organizationManagement', roles: [ 'ORGANIZATION_MEMBER:READ', 'ORGANIZATION_USER_ROLE:READ', diff --git a/frontend/src/router/routes/modules/testPlan.ts b/frontend/src/router/routes/modules/testPlan.ts index 9fe4431d32..6099b05783 100644 --- a/frontend/src/router/routes/modules/testPlan.ts +++ b/frontend/src/router/routes/modules/testPlan.ts @@ -10,8 +10,9 @@ const TestPlan: AppRouteRecordRaw = { component: DEFAULT_LAYOUT, meta: { locale: 'menu.testPlan', - icon: 'icon-icon_test-tracking_filled', - order: 1, + collapsedLocale: 'menu.testPlanShort', + icon: 'icon-a-icon_test-tracking_filled1', + order: 2, hideChildrenInMenu: true, roles: ['*'], }, diff --git a/frontend/src/router/routes/types.ts b/frontend/src/router/routes/types.ts index 850736e264..ff57f3336b 100644 --- a/frontend/src/router/routes/types.ts +++ b/frontend/src/router/routes/types.ts @@ -14,6 +14,7 @@ export interface RouteMeta { requiresAuth?: boolean; // 是否需要权限,默认需要 icon?: string; // 菜单icon locale?: string; // 国际化语言单词 + collapsedLocale?: string; // 收起时的国际化语言单词 hideInMenu?: boolean; // 此路由不在菜单展示 hideChildrenInMenu?: boolean; // 子路由不展示在菜单 activeMenu?: string; // 激活状态 diff --git a/frontend/src/router/typings.d.ts b/frontend/src/router/typings.d.ts index 405643517e..c8fd819fda 100644 --- a/frontend/src/router/typings.d.ts +++ b/frontend/src/router/typings.d.ts @@ -6,6 +6,7 @@ declare module 'vue-router' { requiresAuth?: boolean; // 是否需要权限,默认需要 icon?: string; // 菜单icon locale?: string; // 国际化语言单词 + collapsedLocale?: string; // 收起时的国际化语言单词 hideInMenu?: boolean; // 此路由不在菜单展示 hideChildrenInMenu?: boolean; // 子路由不展示在菜单 activeMenu?: string; // 激活状态 diff --git a/frontend/src/store/modules/app/index.ts b/frontend/src/store/modules/app/index.ts index 600ebc204d..9b71f59f7b 100644 --- a/frontend/src/store/modules/app/index.ts +++ b/frontend/src/store/modules/app/index.ts @@ -383,7 +383,7 @@ const useAppStore = defineStore('app', { }, }, persist: { - paths: ['currentOrgId', 'currentProjectId', 'pageConfig'], + paths: ['currentOrgId', 'currentProjectId', 'pageConfig', 'menuCollapse'], }, }); diff --git a/frontend/src/store/modules/app/types.ts b/frontend/src/store/modules/app/types.ts index 1251fc6980..da712a2985 100644 --- a/frontend/src/store/modules/app/types.ts +++ b/frontend/src/store/modules/app/types.ts @@ -4,7 +4,6 @@ import type { BreadcrumbItem } from '@/components/business/ms-breadcrumb/types'; import { EnvConfig, EnvironmentItem } from '@/models/projectManagement/environmental'; import type { LoginConfig, PageConfig, PlatformConfig, ThemeConfig } from '@/models/setting/config'; import { ProjectListItem } from '@/models/setting/project'; -import type { TaskCenterEnum } from '@/enums/taskCenter'; import type { RouteRecordNormalized, RouteRecordRaw } from 'vue-router'; diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseTable.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseTable.vue index 68306d9c2d..1543409bcf 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseTable.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseTable.vue @@ -95,7 +95,7 @@ {{ statusIconMap[record.reviewStatus]?.statusText || '' }}