config.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. import type { Preferences } from './types';
  2. const defaultPreferences: Preferences = {
  3. app: {
  4. accessMode: 'frontend',
  5. authPageLayout: 'panel-right',
  6. checkUpdatesInterval: 1,
  7. colorGrayMode: false,
  8. colorWeakMode: false,
  9. compact: false,
  10. contentCompact: 'wide',
  11. contentCompactWidth: 1200,
  12. contentPadding: 0,
  13. contentPaddingBottom: 0,
  14. contentPaddingLeft: 0,
  15. contentPaddingRight: 0,
  16. contentPaddingTop: 0,
  17. defaultAvatar:
  18. 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/avatar-v1.webp',
  19. defaultHomePath: '/analytics',
  20. dynamicTitle: true,
  21. enableCheckUpdates: true,
  22. enableCopyPreferences: true,
  23. enablePreferences: true,
  24. enableRefreshToken: false,
  25. enableStickyPreferencesNavigationBar: true,
  26. isMobile: false,
  27. layout: 'sidebar-nav',
  28. locale: 'zh-CN',
  29. loginExpiredMode: 'page',
  30. name: 'Vben Admin',
  31. preferencesButtonPosition: 'auto',
  32. timezone: 'Asia/Shanghai',
  33. watermark: false,
  34. watermarkContent: '',
  35. zIndex: 200,
  36. },
  37. breadcrumb: {
  38. enable: true,
  39. hideOnlyOne: false,
  40. showHome: false,
  41. showIcon: true,
  42. styleType: 'normal',
  43. },
  44. copyright: {
  45. companyName: 'Vben',
  46. companySiteLink: 'https://www.vben.pro',
  47. date: '2024',
  48. enable: true,
  49. icp: '',
  50. icpLink: '',
  51. settingShow: true,
  52. },
  53. footer: {
  54. enable: false,
  55. fixed: false,
  56. height: 32,
  57. },
  58. header: {
  59. enable: true,
  60. height: 50,
  61. hidden: false,
  62. menuAlign: 'start',
  63. mode: 'fixed',
  64. },
  65. logo: {
  66. enable: true,
  67. fit: 'contain',
  68. source: 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-v1.webp',
  69. },
  70. navigation: {
  71. accordion: true,
  72. split: true,
  73. styleType: 'rounded',
  74. },
  75. shortcutKeys: {
  76. enable: true,
  77. globalLockScreen: true,
  78. globalLogout: true,
  79. globalPreferences: true,
  80. globalSearch: true,
  81. },
  82. sidebar: {
  83. autoActivateChild: false,
  84. collapsed: false,
  85. collapsedButton: true,
  86. collapsedShowTitle: false,
  87. collapseWidth: 60,
  88. draggable: true,
  89. enable: true,
  90. expandOnHover: true,
  91. extraCollapse: false,
  92. extraCollapsedWidth: 60,
  93. fixedButton: true,
  94. hidden: false,
  95. mixedWidth: 80,
  96. width: 224,
  97. },
  98. tabbar: {
  99. draggable: true,
  100. enable: true,
  101. height: 38,
  102. keepAlive: true,
  103. maxCount: 0,
  104. middleClickToClose: false,
  105. persist: true,
  106. showIcon: true,
  107. showMaximize: true,
  108. showMore: true,
  109. showRefresh: true,
  110. styleType: 'chrome',
  111. visitHistory: true,
  112. wheelable: true,
  113. },
  114. theme: {
  115. builtinType: 'default',
  116. colorDestructive: 'hsl(348 100% 61%)',
  117. colorPrimary: 'hsl(212 100% 45%)',
  118. colorSuccess: 'hsl(144 57% 58%)',
  119. colorWarning: 'hsl(42 84% 61%)',
  120. mode: 'dark',
  121. radius: '0.5',
  122. fontSize: 16,
  123. semiDarkHeader: false,
  124. semiDarkSidebar: false,
  125. semiDarkSidebarSub: false,
  126. },
  127. transition: {
  128. enable: true,
  129. loading: true,
  130. name: 'fade-slide',
  131. progress: true,
  132. },
  133. widget: {
  134. fullscreen: true,
  135. globalSearch: true,
  136. languageToggle: true,
  137. lockScreen: true,
  138. notification: true,
  139. refresh: true,
  140. sidebarToggle: true,
  141. themeToggle: true,
  142. timezone: true,
  143. },
  144. };
  145. export { defaultPreferences };