config.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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. watermark: false,
  33. watermarkContent: '',
  34. zIndex: 200,
  35. },
  36. breadcrumb: {
  37. enable: true,
  38. hideOnlyOne: false,
  39. showHome: false,
  40. showIcon: true,
  41. styleType: 'normal',
  42. },
  43. copyright: {
  44. companyName: 'Vben',
  45. companySiteLink: 'https://www.vben.pro',
  46. date: '2024',
  47. enable: true,
  48. icp: '',
  49. icpLink: '',
  50. settingShow: true,
  51. },
  52. footer: {
  53. enable: false,
  54. fixed: false,
  55. height: 32,
  56. },
  57. header: {
  58. enable: true,
  59. height: 50,
  60. hidden: false,
  61. menuAlign: 'start',
  62. mode: 'fixed',
  63. },
  64. logo: {
  65. enable: true,
  66. fit: 'contain',
  67. source: 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-v1.webp',
  68. },
  69. navigation: {
  70. accordion: true,
  71. split: true,
  72. styleType: 'rounded',
  73. },
  74. shortcutKeys: {
  75. enable: true,
  76. globalLockScreen: true,
  77. globalLogout: true,
  78. globalPreferences: true,
  79. globalSearch: true,
  80. },
  81. sidebar: {
  82. autoActivateChild: false,
  83. collapsed: false,
  84. collapsedButton: true,
  85. collapsedShowTitle: false,
  86. collapseWidth: 60,
  87. draggable: true,
  88. enable: true,
  89. expandOnHover: true,
  90. extraCollapse: false,
  91. extraCollapsedWidth: 60,
  92. fixedButton: true,
  93. hidden: false,
  94. mixedWidth: 80,
  95. width: 224,
  96. },
  97. tabbar: {
  98. draggable: true,
  99. enable: true,
  100. height: 38,
  101. keepAlive: true,
  102. maxCount: 0,
  103. middleClickToClose: false,
  104. persist: true,
  105. showIcon: true,
  106. showMaximize: true,
  107. showMore: true,
  108. showRefresh: true,
  109. styleType: 'chrome',
  110. visitHistory: true,
  111. wheelable: true,
  112. },
  113. theme: {
  114. builtinType: 'default',
  115. colorDestructive: 'hsl(348 100% 61%)',
  116. colorPrimary: 'hsl(212 100% 45%)',
  117. colorSuccess: 'hsl(144 57% 58%)',
  118. colorWarning: 'hsl(42 84% 61%)',
  119. mode: 'dark',
  120. radius: '0.5',
  121. fontSize: 16,
  122. semiDarkHeader: false,
  123. semiDarkSidebar: false,
  124. semiDarkSidebarSub: false,
  125. },
  126. transition: {
  127. enable: true,
  128. loading: true,
  129. name: 'fade-slide',
  130. progress: true,
  131. },
  132. widget: {
  133. fullscreen: true,
  134. globalSearch: true,
  135. languageToggle: true,
  136. lockScreen: true,
  137. notification: true,
  138. refresh: true,
  139. sidebarToggle: true,
  140. themeToggle: true,
  141. timezone: true,
  142. },
  143. };
  144. export { defaultPreferences };