system.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import type { RouteRecordRaw } from 'vue-router'
  2. import { InfoCircleOutlined } from '@ant-design/icons-vue'
  3. import { useSettingsStore } from '@/pinia'
  4. export const systemRoutes: RouteRecordRaw[] = [
  5. {
  6. path: 'system',
  7. name: 'System',
  8. redirect: 'system/about',
  9. meta: {
  10. name: () => $gettext('System'),
  11. icon: InfoCircleOutlined,
  12. },
  13. children: [{
  14. path: 'self_check',
  15. name: 'Self Check',
  16. component: () => import('@/views/system/SelfCheck.vue'),
  17. meta: {
  18. name: () => $gettext('Self Check'),
  19. },
  20. }, {
  21. path: 'upgrade',
  22. name: 'Upgrade',
  23. component: () => import('@/views/system/Upgrade.vue'),
  24. meta: {
  25. name: () => $gettext('Upgrade'),
  26. hiddenInSidebar: (): boolean => {
  27. const settings = useSettingsStore()
  28. return settings.is_remote
  29. },
  30. },
  31. }, {
  32. path: 'about',
  33. name: 'About',
  34. component: () => import('@/views/system/About.vue'),
  35. meta: {
  36. name: () => $gettext('About'),
  37. },
  38. }],
  39. },
  40. ]