smart-admin-web 10.13.1 → 10.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/README.md +5 -5
  2. package/dist/api/index.d.ts +37 -0
  3. package/dist/api/index.js +35 -14
  4. package/dist/api/index.js.map +1 -1
  5. package/dist/api/schema.d.ts +381 -3
  6. package/dist/assets/icons/ph-subset.json.js +3 -3
  7. package/dist/assets/smart-logo.svg.js +5 -0
  8. package/dist/assets/smart-logo.svg.js.map +1 -0
  9. package/dist/components/SmartLogo.vue.d.ts +3 -0
  10. package/dist/components/SmartLogo.vue.js +1 -1
  11. package/dist/components/SmartLogo2.vue.js +22 -64
  12. package/dist/components/SmartLogo2.vue.js.map +1 -1
  13. package/dist/composables/useLoginHero.d.ts +2 -0
  14. package/dist/composables/useLoginHero.js +22 -0
  15. package/dist/composables/useLoginHero.js.map +1 -0
  16. package/dist/composables/usePageTitle.js +16 -14
  17. package/dist/composables/usePageTitle.js.map +1 -1
  18. package/dist/composables/useSite.d.ts +5 -0
  19. package/dist/composables/useSite.js +16 -13
  20. package/dist/composables/useSite.js.map +1 -1
  21. package/dist/index.js +92 -91
  22. package/dist/lib/favicon.d.ts +1 -0
  23. package/dist/lib/favicon.js +12 -0
  24. package/dist/lib/favicon.js.map +1 -0
  25. package/dist/lib/loginHero.d.ts +16 -0
  26. package/dist/lib/loginHero.js +33 -0
  27. package/dist/lib/loginHero.js.map +1 -0
  28. package/dist/lib/logoCrop.d.ts +25 -0
  29. package/dist/lib/logoCrop.js +22 -0
  30. package/dist/lib/logoCrop.js.map +1 -0
  31. package/dist/lib/runtime.d.ts +2 -0
  32. package/dist/lib/runtime.js +1 -1
  33. package/dist/lib/runtime.js.map +1 -1
  34. package/dist/lib/securityRules.d.ts +26 -0
  35. package/dist/lib/securityRules.js +86 -0
  36. package/dist/lib/securityRules.js.map +1 -0
  37. package/dist/locales/en-US.d.ts +250 -28
  38. package/dist/locales/en-US.js +271 -58
  39. package/dist/locales/en-US.js.map +1 -1
  40. package/dist/locales/zh-CN.d.ts +250 -28
  41. package/dist/locales/zh-CN.js +266 -58
  42. package/dist/locales/zh-CN.js.map +1 -1
  43. package/dist/router/viewRegistry.js +10 -10
  44. package/dist/router/viewRegistry.js.map +1 -1
  45. package/dist/style.css +1 -1
  46. package/dist/utils/oauthBrand.d.ts +34 -9
  47. package/dist/utils/oauthBrand.js +70 -74
  48. package/dist/utils/oauthBrand.js.map +1 -1
  49. package/dist/views/login/components/LoginHeroPanel.vue.d.ts +18 -0
  50. package/dist/views/login/components/LoginHeroPanel.vue.js +8 -0
  51. package/dist/views/login/components/LoginHeroPanel.vue.js.map +1 -0
  52. package/dist/views/login/components/LoginHeroPanel2.vue.js +66 -0
  53. package/dist/views/login/components/LoginHeroPanel2.vue.js.map +1 -0
  54. package/dist/views/login/skins/SplitPanel.vue.js +1 -1
  55. package/dist/views/login/skins/SplitPanel2.vue.js +39 -59
  56. package/dist/views/login/skins/SplitPanel2.vue.js.map +1 -1
  57. package/dist/views/system/api-docs/index.vue.js +5 -0
  58. package/dist/views/system/api-docs/index.vue.js.map +1 -0
  59. package/dist/views/system/api-docs/index2.vue.js +64 -0
  60. package/dist/views/system/api-docs/index2.vue.js.map +1 -0
  61. package/dist/views/system/config/components/AdminMock.vue.js +8 -0
  62. package/dist/views/system/config/components/AdminMock.vue.js.map +1 -0
  63. package/dist/views/system/config/components/AdminMock2.vue.js +76 -0
  64. package/dist/views/system/config/components/AdminMock2.vue.js.map +1 -0
  65. package/dist/views/system/config/components/AdvancedSection.vue.js +5 -0
  66. package/dist/views/system/config/components/AdvancedSection.vue.js.map +1 -0
  67. package/dist/views/system/config/components/AdvancedSection2.vue.js +135 -0
  68. package/dist/views/system/config/components/AdvancedSection2.vue.js.map +1 -0
  69. package/dist/views/system/config/components/BrandSection.vue.d.ts +7 -0
  70. package/dist/views/system/config/components/BrandSection.vue.js +8 -0
  71. package/dist/views/system/config/components/BrandSection.vue.js.map +1 -0
  72. package/dist/views/system/config/components/BrandSection2.vue.js +264 -0
  73. package/dist/views/system/config/components/BrandSection2.vue.js.map +1 -0
  74. package/dist/views/system/config/components/CfgGroup.vue.d.ts +18 -0
  75. package/dist/views/system/config/components/CfgGroup.vue.js +8 -0
  76. package/dist/views/system/config/components/CfgGroup.vue.js.map +1 -0
  77. package/dist/views/system/config/components/CfgGroup2.vue.js +22 -0
  78. package/dist/views/system/config/components/CfgGroup2.vue.js.map +1 -0
  79. package/dist/views/system/config/components/CfgRow.vue.d.ts +26 -0
  80. package/dist/views/system/config/components/CfgRow.vue.js +9 -0
  81. package/dist/views/system/config/components/CfgRow.vue.js.map +1 -0
  82. package/dist/views/system/config/components/CfgRow2.vue.js +53 -0
  83. package/dist/views/system/config/components/CfgRow2.vue.js.map +1 -0
  84. package/dist/views/system/config/components/CfgSegment.vue.d.ts +28 -0
  85. package/dist/views/system/config/components/CfgSegment.vue.js +8 -0
  86. package/dist/views/system/config/components/CfgSegment.vue.js.map +1 -0
  87. package/dist/views/system/config/components/CfgSegment2.vue.js +44 -0
  88. package/dist/views/system/config/components/CfgSegment2.vue.js.map +1 -0
  89. package/dist/views/system/config/components/ConfigFormModal.vue.js +5 -2
  90. package/dist/views/system/config/components/ConfigFormModal.vue.js.map +1 -1
  91. package/dist/views/system/config/components/ConfigFormModal2.vue.js +66 -56
  92. package/dist/views/system/config/components/ConfigFormModal2.vue.js.map +1 -1
  93. package/dist/views/system/config/components/JobSection.vue.js +8 -0
  94. package/dist/views/system/config/components/JobSection.vue.js.map +1 -0
  95. package/dist/views/system/config/components/JobSection2.vue.js +138 -0
  96. package/dist/views/system/config/components/JobSection2.vue.js.map +1 -0
  97. package/dist/views/system/config/components/{GroupExtraConfig.vue.d.ts → LoginMock.vue.d.ts} +3 -4
  98. package/dist/views/system/config/components/LoginMock.vue.js +8 -0
  99. package/dist/views/system/config/components/LoginMock.vue.js.map +1 -0
  100. package/dist/views/system/config/components/LoginMock2.vue.js +121 -0
  101. package/dist/views/system/config/components/LoginMock2.vue.js.map +1 -0
  102. package/dist/views/system/config/components/LogoCropper.vue.d.ts +10 -0
  103. package/dist/views/system/config/components/LogoCropper.vue.js +8 -0
  104. package/dist/views/system/config/components/LogoCropper.vue.js.map +1 -0
  105. package/dist/views/system/config/components/LogoCropper2.vue.js +122 -0
  106. package/dist/views/system/config/components/LogoCropper2.vue.js.map +1 -0
  107. package/dist/views/system/config/components/LogoEditor.vue.js +8 -0
  108. package/dist/views/system/config/components/LogoEditor.vue.js.map +1 -0
  109. package/dist/views/system/config/components/LogoEditor2.vue.js +163 -0
  110. package/dist/views/system/config/components/LogoEditor2.vue.js.map +1 -0
  111. package/dist/views/system/config/components/ProviderSheet.vue.d.ts +17 -0
  112. package/dist/views/system/config/components/ProviderSheet.vue.js +8 -0
  113. package/dist/views/system/config/components/ProviderSheet.vue.js.map +1 -0
  114. package/dist/views/system/config/components/ProviderSheet2.vue.js +343 -0
  115. package/dist/views/system/config/components/ProviderSheet2.vue.js.map +1 -0
  116. package/dist/views/system/config/components/ScaleToFit.vue.d.ts +17 -0
  117. package/dist/views/system/config/components/ScaleToFit.vue.js +8 -0
  118. package/dist/views/system/config/components/ScaleToFit.vue.js.map +1 -0
  119. package/dist/views/system/config/components/ScaleToFit2.vue.js +41 -0
  120. package/dist/views/system/config/components/ScaleToFit2.vue.js.map +1 -0
  121. package/dist/views/system/config/components/SectionLayout.vue.d.ts +28 -0
  122. package/dist/views/system/config/components/SectionLayout.vue.js +8 -0
  123. package/dist/views/system/config/components/SectionLayout.vue.js.map +1 -0
  124. package/dist/views/system/config/components/SectionLayout2.vue.js +45 -0
  125. package/dist/views/system/config/components/SectionLayout2.vue.js.map +1 -0
  126. package/dist/views/system/config/components/SecuritySection.vue.js +8 -0
  127. package/dist/views/system/config/components/SecuritySection.vue.js.map +1 -0
  128. package/dist/views/system/config/components/SecuritySection2.vue.js +416 -0
  129. package/dist/views/system/config/components/SecuritySection2.vue.js.map +1 -0
  130. package/dist/views/system/config/components/SensitiveSection.vue.js +8 -0
  131. package/dist/views/system/config/components/SensitiveSection.vue.js.map +1 -0
  132. package/dist/views/system/config/components/SensitiveSection2.vue.js +209 -0
  133. package/dist/views/system/config/components/SensitiveSection2.vue.js.map +1 -0
  134. package/dist/views/system/config/components/SigninSection.vue.d.ts +3 -0
  135. package/dist/views/system/config/components/SigninSection.vue.js +8 -0
  136. package/dist/views/system/config/components/SigninSection.vue.js.map +1 -0
  137. package/dist/views/system/config/components/SigninSection2.vue.js +201 -0
  138. package/dist/views/system/config/components/SigninSection2.vue.js.map +1 -0
  139. package/dist/views/system/config/components/UploadSection.vue.d.ts +3 -0
  140. package/dist/views/system/config/components/UploadSection.vue.js +8 -0
  141. package/dist/views/system/config/components/UploadSection.vue.js.map +1 -0
  142. package/dist/views/system/config/components/UploadSection2.vue.js +167 -0
  143. package/dist/views/system/config/components/UploadSection2.vue.js.map +1 -0
  144. package/dist/views/system/config/draft.d.ts +148 -0
  145. package/dist/views/system/config/draft.js +170 -0
  146. package/dist/views/system/config/draft.js.map +1 -0
  147. package/dist/views/system/config/flash.d.ts +2 -0
  148. package/dist/views/system/config/flash.js +9 -0
  149. package/dist/views/system/config/flash.js.map +1 -0
  150. package/dist/views/system/config/groups.d.ts +35 -7
  151. package/dist/views/system/config/groups.js +99 -14
  152. package/dist/views/system/config/groups.js.map +1 -1
  153. package/dist/views/system/config/index.vue.js +4 -1
  154. package/dist/views/system/config/index.vue.js.map +1 -1
  155. package/dist/views/system/config/index2.vue.js +180 -115
  156. package/dist/views/system/config/index2.vue.js.map +1 -1
  157. package/dist/views/system/config/providerForm.d.ts +33 -0
  158. package/dist/views/system/config/providerForm.js +63 -0
  159. package/dist/views/system/config/providerForm.js.map +1 -0
  160. package/package.json +4 -4
  161. package/dist/views/system/config/components/ExternalAuthConfig.vue.js +0 -8
  162. package/dist/views/system/config/components/ExternalAuthConfig.vue.js.map +0 -1
  163. package/dist/views/system/config/components/ExternalAuthConfig2.vue.js +0 -218
  164. package/dist/views/system/config/components/ExternalAuthConfig2.vue.js.map +0 -1
  165. package/dist/views/system/config/components/GroupExtraConfig.vue.js +0 -8
  166. package/dist/views/system/config/components/GroupExtraConfig.vue.js.map +0 -1
  167. package/dist/views/system/config/components/GroupExtraConfig2.vue.js +0 -108
  168. package/dist/views/system/config/components/GroupExtraConfig2.vue.js.map +0 -1
  169. package/dist/views/system/config/components/HighSensConfig.vue.js +0 -5
  170. package/dist/views/system/config/components/HighSensConfig.vue.js.map +0 -1
  171. package/dist/views/system/config/components/HighSensConfig2.vue.js +0 -134
  172. package/dist/views/system/config/components/HighSensConfig2.vue.js.map +0 -1
  173. package/dist/views/system/config/components/JobConfig.vue.js +0 -5
  174. package/dist/views/system/config/components/JobConfig.vue.js.map +0 -1
  175. package/dist/views/system/config/components/JobConfig2.vue.js +0 -116
  176. package/dist/views/system/config/components/JobConfig2.vue.js.map +0 -1
  177. package/dist/views/system/config/components/OtherConfig.vue.js +0 -5
  178. package/dist/views/system/config/components/OtherConfig.vue.js.map +0 -1
  179. package/dist/views/system/config/components/OtherConfig2.vue.js +0 -121
  180. package/dist/views/system/config/components/OtherConfig2.vue.js.map +0 -1
  181. package/dist/views/system/config/components/SecurityConfig.vue.js +0 -8
  182. package/dist/views/system/config/components/SecurityConfig.vue.js.map +0 -1
  183. package/dist/views/system/config/components/SecurityConfig2.vue.js +0 -456
  184. package/dist/views/system/config/components/SecurityConfig2.vue.js.map +0 -1
  185. package/dist/views/system/config/components/SysBaseConfig.vue.js +0 -5
  186. package/dist/views/system/config/components/SysBaseConfig.vue.js.map +0 -1
  187. package/dist/views/system/config/components/SysBaseConfig2.vue.js +0 -107
  188. package/dist/views/system/config/components/SysBaseConfig2.vue.js.map +0 -1
  189. package/dist/views/system/config/components/UploadConfig.vue.js +0 -5
  190. package/dist/views/system/config/components/UploadConfig.vue.js.map +0 -1
  191. package/dist/views/system/config/components/UploadConfig2.vue.js +0 -135
  192. package/dist/views/system/config/components/UploadConfig2.vue.js.map +0 -1
  193. /package/dist/views/system/{config/components/ExternalAuthConfig.vue.d.ts → api-docs/index.vue.d.ts} +0 -0
  194. /package/dist/views/system/config/components/{HighSensConfig.vue.d.ts → AdminMock.vue.d.ts} +0 -0
  195. /package/dist/views/system/config/components/{JobConfig.vue.d.ts → AdvancedSection.vue.d.ts} +0 -0
  196. /package/dist/views/system/config/components/{OtherConfig.vue.d.ts → JobSection.vue.d.ts} +0 -0
  197. /package/dist/views/system/config/components/{SecurityConfig.vue.d.ts → LogoEditor.vue.d.ts} +0 -0
  198. /package/dist/views/system/config/components/{SysBaseConfig.vue.d.ts → SecuritySection.vue.d.ts} +0 -0
  199. /package/dist/views/system/config/components/{UploadConfig.vue.d.ts → SensitiveSection.vue.d.ts} +0 -0
@@ -1,20 +1,22 @@
1
- import { watchEffect as n } from "vue";
1
+ import { watchEffect as i } from "vue";
2
2
  import { useRoute as c } from "vue-router";
3
3
  import { useAppStore as l } from "../stores/app.js";
4
- import { useTabsStore as p } from "../stores/tabs.js";
5
- import { useSite as u } from "./useSite.js";
6
- import { translateMenuTitle as f } from "../locales/menuTitle.js";
7
- function w() {
8
- const e = c(), o = l(), s = p(), { site: i } = u();
9
- n(() => {
10
- o.locale;
11
- const t = s.tabs.find((a) => a.path === e.path), r = (t == null ? void 0 : t.titleFixed) && t.title || e.meta.title || "", m = r ? f(r, e.path) : "";
12
- document.title = m ? `${m} · ${i.title}` : i.title;
13
- }), n(() => {
14
- document.documentElement.lang = o.locale;
15
- });
4
+ import { useTabsStore as s } from "../stores/tabs.js";
5
+ import { useSite as f } from "./useSite.js";
6
+ import { translateMenuTitle as u } from "../locales/menuTitle.js";
7
+ import { applyFavicon as d } from "../lib/favicon.js";
8
+ import { runtime as g } from "../lib/runtime.js";
9
+ function E() {
10
+ const o = c(), r = l(), a = s(), { site: e } = f();
11
+ i(() => {
12
+ r.locale;
13
+ const t = a.tabs.find((p) => p.path === o.path), m = (t == null ? void 0 : t.titleFixed) && t.title || o.meta.title || "", n = m ? u(m, o.path) : "";
14
+ document.title = n ? `${n} · ${e.title}` : e.title;
15
+ }), i(() => {
16
+ document.documentElement.lang = r.locale;
17
+ }), g.brand.faviconFromLogo !== !1 && i(() => d(document, e.logo));
16
18
  }
17
19
  export {
18
- w as usePageTitle
20
+ E as usePageTitle
19
21
  };
20
22
  //# sourceMappingURL=usePageTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePageTitle.js","sources":["../../src/composables/usePageTitle.ts"],"sourcesContent":["// 浏览器标题与文档语言。App.vue 调一次即可。\n//\n// 不这样动态维护的话,document.title 只会在启动时被站点名设一次,收藏夹/多窗口/历史记录里所有页面会长得一模一样;\n// <html lang> 也会硬编成 zh-CN,读屏器与浏览器翻译在英文界面下判错语言。\nimport { watchEffect } from 'vue'\nimport { useRoute } from 'vue-router'\nimport { useAppStore } from '#/stores/app'\nimport { useTabsStore } from '#/stores/tabs'\nimport { useSite } from '#/composables/useSite'\nimport { translateMenuTitle } from '#/locales/menuTitle'\n\nexport function usePageTitle(): void {\n const route = useRoute()\n const app = useAppStore()\n const tabs = useTabsStore()\n const { site } = useSite()\n\n watchEffect(() => {\n void app.locale // 依赖:切语言后 i18n key 标题要重算\n // 详情页用 useTabTitle 设过动态标题(记录名)时以它为准 —— 静态 meta.title 是「详情」这种通名。\n const tab = tabs.tabs.find(x => x.path === route.path)\n const raw = (tab?.titleFixed && tab.title) || (route.meta.title as string | undefined) || ''\n const page = raw ? translateMenuTitle(raw, route.path) : ''\n document.title = page ? `${page} · ${site.title}` : site.title\n })\n\n watchEffect(() => {\n document.documentElement.lang = app.locale\n })\n}\n"],"names":["usePageTitle","route","useRoute","app","useAppStore","tabs","useTabsStore","site","useSite","watchEffect","tab","x","raw","page","translateMenuTitle"],"mappings":";;;;;;AAWO,SAASA,IAAqB;AACnC,QAAMC,IAAQC,EAAA,GACRC,IAAMC,EAAA,GACNC,IAAOC,EAAA,GACP,EAAE,MAAAC,EAAA,IAASC,EAAA;AAEjB,EAAAC,EAAY,MAAM;AAChB,IAAKN,EAAI;AAET,UAAMO,IAAML,EAAK,KAAK,KAAK,OAAKM,EAAE,SAASV,EAAM,IAAI,GAC/CW,KAAOF,KAAA,gBAAAA,EAAK,eAAcA,EAAI,SAAWT,EAAM,KAAK,SAAgC,IACpFY,IAAOD,IAAME,EAAmBF,GAAKX,EAAM,IAAI,IAAI;AACzD,aAAS,QAAQY,IAAO,GAAGA,CAAI,MAAMN,EAAK,KAAK,KAAKA,EAAK;AAAA,EAC3D,CAAC,GAEDE,EAAY,MAAM;AAChB,aAAS,gBAAgB,OAAON,EAAI;AAAA,EACtC,CAAC;AACH;"}
1
+ {"version":3,"file":"usePageTitle.js","sources":["../../src/composables/usePageTitle.ts"],"sourcesContent":["// 浏览器标题、标签页图标与文档语言。App.vue 调一次即可。\n//\n// 不这样动态维护的话,document.title 只会在启动时被站点名设一次,收藏夹/多窗口/历史记录里所有页面会长得一模一样;\n// <html lang> 也会硬编成 zh-CN,读屏器与浏览器翻译在英文界面下判错语言。\nimport { watchEffect } from 'vue'\nimport { useRoute } from 'vue-router'\nimport { useAppStore } from '#/stores/app'\nimport { useTabsStore } from '#/stores/tabs'\nimport { useSite } from '#/composables/useSite'\nimport { translateMenuTitle } from '#/locales/menuTitle'\nimport { applyFavicon } from '#/lib/favicon'\nimport { runtime } from '#/lib/runtime'\n\nexport function usePageTitle(): void {\n const route = useRoute()\n const app = useAppStore()\n const tabs = useTabsStore()\n const { site } = useSite()\n\n watchEffect(() => {\n void app.locale // 依赖:切语言后 i18n key 标题要重算\n // 详情页用 useTabTitle 设过动态标题(记录名)时以它为准 —— 静态 meta.title 是「详情」这种通名。\n const tab = tabs.tabs.find(x => x.path === route.path)\n const raw = (tab?.titleFixed && tab.title) || (route.meta.title as string | undefined) || ''\n const page = raw ? translateMenuTitle(raw, route.path) : ''\n document.title = page ? `${page} · ${site.title}` : site.title\n })\n\n watchEffect(() => {\n document.documentElement.lang = app.locale\n })\n\n // 标签页图标跟随站点 Logo(配置中心换 Logo 保存后 loadSite(true) 即时换掉);消费方可经 brand.faviconFromLogo 关掉\n if (runtime.brand.faviconFromLogo !== false) watchEffect(() => applyFavicon(document, site.logo))\n}\n"],"names":["usePageTitle","route","useRoute","app","useAppStore","tabs","useTabsStore","site","useSite","watchEffect","tab","x","raw","page","translateMenuTitle","runtime","applyFavicon"],"mappings":";;;;;;;;AAaO,SAASA,IAAqB;AACnC,QAAMC,IAAQC,EAAA,GACRC,IAAMC,EAAA,GACNC,IAAOC,EAAA,GACP,EAAE,MAAAC,EAAA,IAASC,EAAA;AAEjB,EAAAC,EAAY,MAAM;AAChB,IAAKN,EAAI;AAET,UAAMO,IAAML,EAAK,KAAK,KAAK,OAAKM,EAAE,SAASV,EAAM,IAAI,GAC/CW,KAAOF,KAAA,gBAAAA,EAAK,eAAcA,EAAI,SAAWT,EAAM,KAAK,SAAgC,IACpFY,IAAOD,IAAME,EAAmBF,GAAKX,EAAM,IAAI,IAAI;AACzD,aAAS,QAAQY,IAAO,GAAGA,CAAI,MAAMN,EAAK,KAAK,KAAKA,EAAK;AAAA,EAC3D,CAAC,GAEDE,EAAY,MAAM;AAChB,aAAS,gBAAgB,OAAON,EAAI;AAAA,EACtC,CAAC,GAGGY,EAAQ,MAAM,oBAAoB,MAAON,EAAY,MAAMO,EAAa,UAAUT,EAAK,IAAI,CAAC;AAClG;"}
@@ -1,9 +1,12 @@
1
+ import { LoginHeroCopy } from '../lib/loginHero';
1
2
  export interface SiteInfo {
2
3
  title: string;
3
4
  subtitle: string;
4
5
  copyright: string;
5
6
  copyrightUrl: string;
6
7
  logo: string;
8
+ loginHero: Record<string, LoginHeroCopy>;
9
+ showFeatures: boolean;
7
10
  captchaEnabled: boolean;
8
11
  smsLoginEnabled: boolean;
9
12
  }
@@ -16,6 +19,8 @@ export declare function useSite(): {
16
19
  copyright: string;
17
20
  copyrightUrl: string;
18
21
  logo: string;
22
+ loginHero: Record<string, LoginHeroCopy>;
23
+ showFeatures: boolean;
19
24
  captchaEnabled: boolean;
20
25
  smsLoginEnabled: boolean;
21
26
  };
@@ -1,27 +1,30 @@
1
- import { reactive as l } from "vue";
2
- import { configApi as r } from "../api/index.js";
3
- import { runtime as n } from "../lib/runtime.js";
4
- const i = l({
1
+ import { reactive as r } from "vue";
2
+ import { configApi as l } from "../api/index.js";
3
+ import { normalizeLoginHero as n } from "../lib/loginHero.js";
4
+ import { runtime as a } from "../lib/runtime.js";
5
+ const e = r({
5
6
  title: "SmartAdmin",
6
7
  subtitle: "",
7
8
  copyright: "",
8
9
  copyrightUrl: "",
9
10
  logo: "",
11
+ loginHero: {},
12
+ showFeatures: !0,
10
13
  captchaEnabled: !1,
11
14
  smsLoginEnabled: !1
12
15
  });
13
- let e = null;
14
- function a(o = !1) {
15
- return e && !o || (e = r.siteInfo().then((t) => {
16
- t.title && (i.title = t.title), i.subtitle = t.subtitle ?? "", i.copyright = t.copyright ?? "", i.copyrightUrl = t.copyrightUrl ?? "", i.logo = t.logo ?? "", i.captchaEnabled = !!t.captchaEnabled, i.smsLoginEnabled = !!t.smsLoginEnabled;
16
+ let o = null;
17
+ function c(i = !1) {
18
+ return o && !i || (o = l.siteInfo().then((t) => {
19
+ t.title && (e.title = t.title), e.subtitle = t.subtitle ?? "", e.copyright = t.copyright ?? "", e.copyrightUrl = t.copyrightUrl ?? "", e.logo = t.logo ?? "", e.loginHero = n(t.loginHero), e.showFeatures = t.showFeatures !== !1, e.captchaEnabled = !!t.captchaEnabled, e.smsLoginEnabled = !!t.smsLoginEnabled;
17
20
  }).catch(() => {
18
- })), e;
21
+ })), o;
19
22
  }
20
- function f() {
21
- return { site: i, appVersion: n.version, loadSite: a };
23
+ function h() {
24
+ return { site: e, appVersion: a.version, loadSite: c };
22
25
  }
23
26
  export {
24
- a as loadSite,
25
- f as useSite
27
+ c as loadSite,
28
+ h as useSite
26
29
  };
27
30
  //# sourceMappingURL=useSite.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSite.js","sources":["../../src/composables/useSite.ts"],"sourcesContent":["import { reactive } from 'vue'\nimport { configApi } from '#/api'\nimport { runtime } from '#/lib/runtime'\n\n// 站点品牌信息(匿名 GET /sys/config/site 下发)。App.vue 启动、登录页各皮肤、登录后框架(侧栏/顶栏/水印)\n// 共用同一份响应式数据,只拉一次(模块级缓存);改配置保存后 loadSite(true) 强制重取即时生效。\nexport interface SiteInfo {\n title: string\n subtitle: string\n copyright: string\n copyrightUrl: string\n logo: string\n captchaEnabled: boolean\n smsLoginEnabled: boolean\n}\n\n// title 初值给内置名,防 siteInfo 到达前品牌词首帧空白;createSmartAdmin({ brand.title }) 会在挂载前改写它。\nconst site = reactive<SiteInfo>({\n title: 'SmartAdmin',\n subtitle: '',\n copyright: '',\n copyrightUrl: '',\n logo: '',\n captchaEnabled: false,\n smsLoginEnabled: false,\n})\n\nlet inflight: Promise<void> | null = null\n\nexport function loadSite(force = false): Promise<void> {\n if (inflight && !force) return inflight\n inflight = configApi\n .siteInfo()\n .then(s => {\n if (s.title) site.title = s.title\n site.subtitle = s.subtitle ?? ''\n site.copyright = s.copyright ?? ''\n site.copyrightUrl = s.copyrightUrl ?? ''\n site.logo = s.logo ?? ''\n site.captchaEnabled = !!s.captchaEnabled\n site.smsLoginEnabled = !!s.smsLoginEnabled\n })\n .catch(() => {\n // 拉取失败保留内置默认(title=SmartAdmin),不阻塞登录/渲染\n })\n return inflight\n}\n\n/** 版本号不走后端配置:默认是内核版本(库构建期常量),消费方经 createSmartAdmin({ version }) 换成应用版本。 */\nexport function useSite() {\n return { site, appVersion: runtime.version, loadSite }\n}\n"],"names":["site","reactive","inflight","loadSite","force","configApi","s","useSite","runtime"],"mappings":";;;AAiBA,MAAMA,IAAOC,EAAmB;AAAA,EAC9B,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,iBAAiB;AACnB,CAAC;AAED,IAAIC,IAAiC;AAE9B,SAASC,EAASC,IAAQ,IAAsB;AACrD,SAAIF,KAAY,CAACE,MACjBF,IAAWG,EACR,SAAA,EACA,KAAK,CAAAC,MAAK;AACT,IAAIA,EAAE,UAAON,EAAK,QAAQM,EAAE,QAC5BN,EAAK,WAAWM,EAAE,YAAY,IAC9BN,EAAK,YAAYM,EAAE,aAAa,IAChCN,EAAK,eAAeM,EAAE,gBAAgB,IACtCN,EAAK,OAAOM,EAAE,QAAQ,IACtBN,EAAK,iBAAiB,CAAC,CAACM,EAAE,gBAC1BN,EAAK,kBAAkB,CAAC,CAACM,EAAE;AAAA,EAC7B,CAAC,EACA,MAAM,MAAM;AAAA,EAEb,CAAC,IACIJ;AACT;AAGO,SAASK,IAAU;AACxB,SAAO,EAAE,MAAAP,GAAM,YAAYQ,EAAQ,SAAS,UAAAL,EAAA;AAC9C;"}
1
+ {"version":3,"file":"useSite.js","sources":["../../src/composables/useSite.ts"],"sourcesContent":["import { reactive } from 'vue'\nimport { configApi } from '#/api'\nimport { normalizeLoginHero, type LoginHeroCopy } from '#/lib/loginHero'\nimport { runtime } from '#/lib/runtime'\n\n// 站点品牌信息(匿名 GET /sys/config/site 下发)。App.vue 启动、登录页各皮肤、登录后框架(侧栏/顶栏/水印)\n// 共用同一份响应式数据,只拉一次(模块级缓存);改配置保存后 loadSite(true) 强制重取即时生效。\nexport interface SiteInfo {\n title: string\n subtitle: string\n copyright: string\n copyrightUrl: string\n logo: string\n loginHero: Record<string, LoginHeroCopy>\n showFeatures: boolean\n captchaEnabled: boolean\n smsLoginEnabled: boolean\n}\n\n// title 初值给内置名,防 siteInfo 到达前品牌词首帧空白;createSmartAdmin({ brand.title }) 会在挂载前改写它。\nconst site = reactive<SiteInfo>({\n title: 'SmartAdmin',\n subtitle: '',\n copyright: '',\n copyrightUrl: '',\n logo: '',\n loginHero: {},\n showFeatures: true,\n captchaEnabled: false,\n smsLoginEnabled: false,\n})\n\nlet inflight: Promise<void> | null = null\n\nexport function loadSite(force = false): Promise<void> {\n if (inflight && !force) return inflight\n inflight = configApi\n .siteInfo()\n .then(s => {\n if (s.title) site.title = s.title\n site.subtitle = s.subtitle ?? ''\n site.copyright = s.copyright ?? ''\n site.copyrightUrl = s.copyrightUrl ?? ''\n site.logo = s.logo ?? ''\n site.loginHero = normalizeLoginHero(s.loginHero)\n site.showFeatures = s.showFeatures !== false\n site.captchaEnabled = !!s.captchaEnabled\n site.smsLoginEnabled = !!s.smsLoginEnabled\n })\n .catch(() => {\n // 拉取失败保留内置默认(title=SmartAdmin),不阻塞登录/渲染\n })\n return inflight\n}\n\n/** 版本号不走后端配置:默认是内核版本(库构建期常量),消费方经 createSmartAdmin({ version }) 换成应用版本。 */\nexport function useSite() {\n return { site, appVersion: runtime.version, loadSite }\n}\n"],"names":["site","reactive","inflight","loadSite","force","configApi","s","normalizeLoginHero","useSite","runtime"],"mappings":";;;;AAoBA,MAAMA,IAAOC,EAAmB;AAAA,EAC9B,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,MAAM;AAAA,EACN,WAAW,CAAA;AAAA,EACX,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,iBAAiB;AACnB,CAAC;AAED,IAAIC,IAAiC;AAE9B,SAASC,EAASC,IAAQ,IAAsB;AACrD,SAAIF,KAAY,CAACE,MACjBF,IAAWG,EACR,SAAA,EACA,KAAK,CAAAC,MAAK;AACT,IAAIA,EAAE,UAAON,EAAK,QAAQM,EAAE,QAC5BN,EAAK,WAAWM,EAAE,YAAY,IAC9BN,EAAK,YAAYM,EAAE,aAAa,IAChCN,EAAK,eAAeM,EAAE,gBAAgB,IACtCN,EAAK,OAAOM,EAAE,QAAQ,IACtBN,EAAK,YAAYO,EAAmBD,EAAE,SAAS,GAC/CN,EAAK,eAAeM,EAAE,iBAAiB,IACvCN,EAAK,iBAAiB,CAAC,CAACM,EAAE,gBAC1BN,EAAK,kBAAkB,CAAC,CAACM,EAAE;AAAA,EAC7B,CAAC,EACA,MAAM,MAAM;AAAA,EAEb,CAAC,IACIJ;AACT;AAGO,SAASM,IAAU;AACxB,SAAO,EAAE,MAAAR,GAAM,YAAYS,EAAQ,SAAS,UAAAN,EAAA;AAC9C;"}
package/dist/index.js CHANGED
@@ -3,21 +3,21 @@ import { createSmartAdmin as s } from "./createSmartAdmin.js";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
- import { ApiError as f, aiProviderApi as l, aiUsageApi as u, authApi as n, cacheApi as d, callApi as x, configApi as c, dashboardApi as A, dayRange as S, dictAdminApi as g, dictApi as T, externalAuthApi as C, fileApi as E, highSensApi as P, jobApi as h, listQuery as _, logApi as b, menuApi as M, mfaApi as D, moduleApi as R, monitorApi as I, normalizeCommit as B, normalizePreview as y, noticeApi as w, orgApi as O, pageParams as L, personalApi as U, positionApi as N, recycleApi as v, roleApi as k, sessionApi as H, toPage as F, toWireRows as J, unwrap as G, unwrapDownload as V, userApi as W } from "./api/index.js";
7
- import { DEFAULT_TIMEOUT_MS as z, LONG_TIMEOUT_MS as K, client as j, createApiClient as Y, ensureAccessToken as Z, readCookie as Q, refreshOnce as q } from "./api/client.js";
6
+ import { ApiError as f, aiProviderApi as l, aiUsageApi as u, authApi as n, cacheApi as d, callApi as x, configApi as c, dashboardApi as A, dayRange as S, dictAdminApi as g, dictApi as T, externalAuthApi as C, fileApi as E, highSensApi as P, jobApi as _, listQuery as h, logApi as b, menuApi as M, mfaApi as I, moduleApi as D, monitorApi as R, normalizeCommit as B, normalizePreview as y, noticeApi as w, orgApi as O, pageParams as L, personalApi as U, positionApi as N, recycleApi as v, roleApi as F, sessionApi as k, toPage as H, toWireRows as J, unwrap as G, unwrapDownload as V, userApi as W } from "./api/index.js";
7
+ import { DEFAULT_TIMEOUT_MS as z, LONG_TIMEOUT_MS as K, client as Y, createApiClient as j, ensureAccessToken as Z, readCookie as Q, refreshOnce as q } from "./api/client.js";
8
8
  import { AI_USAGE_GROUP_BY as ee, AI_USAGE_SOURCE as re, DataScopeType as oe, DuplicateStrategy as te, JobConcurrencyMode as ae, JobFireMode as ie, JobHandlerKind as pe, JobMisfireStrategy as se, JobRunStatus as me, JobStatus as fe, JobTriggerKind as le, NoticeType as ue, ReceiverType as ne } from "./types/api.js";
9
9
  import { MenuType as xe, PERMISSION_SEPARATOR as ce, joinPermission as Ae, splitPermission as Se, toMenuInput as ge } from "./types/menu.js";
10
10
  import { useAppStore as Ce } from "./stores/app.js";
11
11
  import { useAuthStore as Pe } from "./stores/auth.js";
12
- import { useDictOptions as _e, useDictStore as be } from "./stores/dict.js";
13
- import { useTabsStore as De } from "./stores/tabs.js";
14
- import { useUserStore as Ie } from "./stores/user.js";
12
+ import { useDictOptions as he, useDictStore as be } from "./stores/dict.js";
13
+ import { useTabsStore as Ie } from "./stores/tabs.js";
14
+ import { useUserStore as Re } from "./stores/user.js";
15
15
  import { registerDynamic as ye, resetRouter as we, router as Oe } from "./router/index.js";
16
16
  import { namedPage as Ue } from "./router/namedPage.js";
17
- import { i18n as ve, registerLocales as ke, t as He, withExt as Fe } from "./locales/index.js";
17
+ import { i18n as ve, registerLocales as Fe, t as ke, withExt as He } from "./locales/index.js";
18
18
  import { menuTitleKey as Ge, registerMenuTitles as Ve, translateMenuTitle as We } from "./locales/menuTitle.js";
19
19
  import { vAuth as ze } from "./directives/auth.js";
20
- import { describeMenuRoute as je } from "./composables/authMenuRoute.js";
20
+ import { describeMenuRoute as Ye } from "./composables/authMenuRoute.js";
21
21
  import { clearClientCache as Ze } from "./composables/clearClientCache.js";
22
22
  import { buildRoutesForModule as qe } from "./composables/useAuthMenu.js";
23
23
  import { useBatchDelete as er } from "./composables/useBatchDelete.js";
@@ -29,17 +29,17 @@ import { useLayoutMenu as xr } from "./composables/useLayoutMenu.js";
29
29
  import { menuBadge as Ar, registerMenuBadge as Sr } from "./composables/useMenuBadge.js";
30
30
  import { useMenuFlat as Tr } from "./composables/useMenuFlat.js";
31
31
  import { useModule as Er } from "./composables/useModule.js";
32
- import { noticeActionButtonType as hr, useNoticeAction as _r } from "./composables/useNoticeAction.js";
32
+ import { noticeActionButtonType as _r, useNoticeAction as hr } from "./composables/useNoticeAction.js";
33
33
  import { usePageTitle as Mr } from "./composables/usePageTitle.js";
34
- import { beginVoluntaryLogout as Rr, noticeBus as Ir, onRealtime as Br, useRealtime as yr } from "./composables/useRealtime.js";
34
+ import { beginVoluntaryLogout as Dr, noticeBus as Rr, onRealtime as Br, useRealtime as yr } from "./composables/useRealtime.js";
35
35
  import { loadSite as Or, useSite as Lr } from "./composables/useSite.js";
36
36
  import { DRAG_HANDLE_CLASS as Nr, useTableRowSort as vr } from "./composables/useTableRowSort.js";
37
- import { useTableZoom as Hr } from "./composables/useTableZoom.js";
37
+ import { useTableZoom as kr } from "./composables/useTableZoom.js";
38
38
  import { useTabTitle as Jr } from "./composables/useTabTitle.js";
39
39
  import { useTheme as Vr } from "./composables/useTheme.js";
40
40
  import { useVisualViewportHeight as Xr } from "./composables/useVisualViewportHeight.js";
41
41
  import { default as Kr } from "./components/ApiSelect/index.vue.js";
42
- import { default as Yr } from "./components/Chart/index.vue.js";
42
+ import { default as jr } from "./components/Chart/index.vue.js";
43
43
  import { default as Qr } from "./components/Chart/LineChart.vue.js";
44
44
  import { default as $r } from "./components/Chart/BarChart.vue.js";
45
45
  import { default as ro } from "./components/Chart/PieChart.vue.js";
@@ -53,20 +53,20 @@ import { default as Ao } from "./components/DictTag/index.vue.js";
53
53
  import { default as go } from "./components/ErrorBoundary/index.vue.js";
54
54
  import { default as Co } from "./components/ExportColumnsModal/index.vue.js";
55
55
  import { default as Po } from "./components/FileUpload/index.vue.js";
56
- import { default as _o } from "./components/FormContainer/index.vue.js";
56
+ import { default as ho } from "./components/FormContainer/index.vue.js";
57
57
  /* empty css */
58
58
  import { default as Mo } from "./components/IconPicker/index.vue.js";
59
- import { default as Ro } from "./components/ImportWizard/index.vue.js";
59
+ import { default as Do } from "./components/ImportWizard/index.vue.js";
60
60
  import { default as Bo } from "./components/JsonEditor/index.vue.js";
61
61
  import { default as wo } from "./components/MarkdownEditor/index.vue.js";
62
62
  import { default as Lo } from "./components/MarkdownEditor/MarkdownView.vue.js";
63
63
  import { default as No } from "./components/OrgTreeSelect/index.vue.js";
64
- import { default as ko } from "./components/PasswordStrength/index.vue.js";
65
- import { default as Fo } from "./components/RoleSelect/index.vue.js";
64
+ import { default as Fo } from "./components/PasswordStrength/index.vue.js";
65
+ import { default as Ho } from "./components/RoleSelect/index.vue.js";
66
66
  import { default as Go } from "./components/SelectTable/index.vue.js";
67
67
  import { default as Wo } from "./components/StatusSwitch/index.vue.js";
68
68
  import { default as zo } from "./components/TableZoomButton/index.vue.js";
69
- import { default as jo } from "./components/UserPicker/index.vue.js";
69
+ import { default as Yo } from "./components/UserPicker/index.vue.js";
70
70
  import { default as Zo } from "./components/UserSelect/index.vue.js";
71
71
  import { default as qo } from "./components/AppIcon.vue.js";
72
72
  import { default as et } from "./components/MenuSearch.vue.js";
@@ -77,20 +77,20 @@ import { triggerBlobDownload as mt } from "./utils/download.js";
77
77
  import { translateError as lt, translateErrorDetail as ut } from "./utils/error.js";
78
78
  import { fmtBytes as dt, fmtDateTime as xt, operatorText as ct } from "./utils/format.js";
79
79
  import { IMPORT_DUPLICATE_IN_DB as St, hardErrorsOf as gt, isDuplicateOnly as Tt, isHardError as Ct } from "./utils/importDup.js";
80
- import { BRAND_CODES as Pt, LINK_BY_ACCOUNT_CODES as ht, PREVIEW_ALL_SSO_BRANDS as _t, SSO_VISIBLE_MAX as bt, brandDisplayName as Mt, buildConfigProviderRows as Dt, claimWeComAutoLogin as Rt, isBrandCode as It, isIconifyName as Bt, mergeBindingRows as yt, previewAllBrandProviders as wt, resolveProviderIcon as Ot, splitLoginProviders as Lt } from "./utils/oauthBrand.js";
81
- import { buildTree as Nt, collectSubtreeIds as vt, expandableIds as kt, filterTree as Ht } from "./utils/tree.js";
82
- import { parseUserAgent as Jt, uaSummary as Gt } from "./utils/ua.js";
83
- import { FULLSCREEN_PATH_PREFIX as Wt, isFullscreenPath as Xt, isHttpUrl as zt, trimTrailingSlashes as Kt } from "./utils/url.js";
84
- import { default as Yt } from "./assets/icons/ph-subset.json.js";
85
- import { ACCENTS as Qt } from "./theme/accents.js";
86
- import { btnGrad as $t, derivePrimary as ea, glowSh as ra, mix as oa, rgba as ta } from "./theme/mix.js";
87
- import { buildThemeOverrides as ia } from "./theme/naive-theme.js";
88
- import { setupMarkdown as sa, withXssPlugin as ma } from "./lib/markdown.js";
89
- import { LoadingBarBridge as la, loadingBar as ua } from "./lib/loadingBar.js";
90
- import { classifyNoticeAction as da, isSiteRelativeUrl as xa, noticeActionLabel as ca } from "./lib/noticeActions.js";
91
- import { registerViews as Sa, viewComponentPaths as ga } from "./router/viewRegistry.js";
80
+ import { BRAND_CODES as Pt, LINK_BY_ACCOUNT_CODES as _t, OFFICIAL_TYPES as ht, PREVIEW_ALL_SSO_BRANDS as bt, SSO_VISIBLE_MAX as Mt, brandDisplayName as It, buildConfigProviderRows as Dt, claimWeComAutoLogin as Rt, isBrandCode as Bt, isIconifyName as yt, mergeBindingRows as wt, previewAllBrandProviders as Ot, resolveProviderIcon as Lt, splitLoginProviders as Ut } from "./utils/oauthBrand.js";
81
+ import { buildTree as vt, collectSubtreeIds as Ft, expandableIds as kt, filterTree as Ht } from "./utils/tree.js";
82
+ import { parseUserAgent as Gt, uaSummary as Vt } from "./utils/ua.js";
83
+ import { FULLSCREEN_PATH_PREFIX as Xt, isFullscreenPath as zt, isHttpUrl as Kt, trimTrailingSlashes as Yt } from "./utils/url.js";
84
+ import { default as Zt } from "./assets/icons/ph-subset.json.js";
85
+ import { ACCENTS as qt } from "./theme/accents.js";
86
+ import { btnGrad as ea, derivePrimary as ra, glowSh as oa, mix as ta, rgba as aa } from "./theme/mix.js";
87
+ import { buildThemeOverrides as pa } from "./theme/naive-theme.js";
88
+ import { setupMarkdown as ma, withXssPlugin as fa } from "./lib/markdown.js";
89
+ import { LoadingBarBridge as ua, loadingBar as na } from "./lib/loadingBar.js";
90
+ import { classifyNoticeAction as xa, isSiteRelativeUrl as ca, noticeActionLabel as Aa } from "./lib/noticeActions.js";
91
+ import { registerViews as ga, viewComponentPaths as Ta } from "./router/viewRegistry.js";
92
92
  export {
93
- Qt as ACCENTS,
93
+ qt as ACCENTS,
94
94
  ee as AI_USAGE_GROUP_BY,
95
95
  re as AI_USAGE_SOURCE,
96
96
  f as ApiError,
@@ -101,7 +101,7 @@ export {
101
101
  at as BrandIcon,
102
102
  or as COMPACT_MAX_HEIGHT,
103
103
  tr as COMPACT_MAX_WIDTH,
104
- Yr as Chart,
104
+ jr as Chart,
105
105
  to as CodeBlock,
106
106
  io as CronEditor,
107
107
  z as DEFAULT_TIMEOUT_MS,
@@ -115,12 +115,12 @@ export {
115
115
  te as DuplicateStrategy,
116
116
  go as ErrorBoundary,
117
117
  Co as ExportColumnsModal,
118
- Wt as FULLSCREEN_PATH_PREFIX,
118
+ Xt as FULLSCREEN_PATH_PREFIX,
119
119
  Po as FileUpload,
120
- _o as FormContainer,
120
+ ho as FormContainer,
121
121
  St as IMPORT_DUPLICATE_IN_DB,
122
122
  Mo as IconPicker,
123
- Ro as ImportWizard,
123
+ Do as ImportWizard,
124
124
  ae as JobConcurrencyMode,
125
125
  ie as JobFireMode,
126
126
  pe as JobHandlerKind,
@@ -129,53 +129,54 @@ export {
129
129
  fe as JobStatus,
130
130
  le as JobTriggerKind,
131
131
  Bo as JsonEditor,
132
- ht as LINK_BY_ACCOUNT_CODES,
132
+ _t as LINK_BY_ACCOUNT_CODES,
133
133
  K as LONG_TIMEOUT_MS,
134
134
  Qr as LineChart,
135
- la as LoadingBarBridge,
135
+ ua as LoadingBarBridge,
136
136
  wo as MarkdownEditor,
137
137
  Lo as MarkdownView,
138
138
  et as MenuSearch,
139
139
  xe as MenuType,
140
140
  ue as NoticeType,
141
+ ht as OFFICIAL_TYPES,
141
142
  No as OrgTreeSelect,
142
143
  ce as PERMISSION_SEPARATOR,
143
- _t as PREVIEW_ALL_SSO_BRANDS,
144
- ko as PasswordStrength,
144
+ bt as PREVIEW_ALL_SSO_BRANDS,
145
+ Fo as PasswordStrength,
145
146
  ro as PieChart,
146
147
  ne as ReceiverType,
147
- Fo as RoleSelect,
148
- bt as SSO_VISIBLE_MAX,
148
+ Ho as RoleSelect,
149
+ Mt as SSO_VISIBLE_MAX,
149
150
  Go as SelectTable,
150
151
  ot as SmartLogo,
151
152
  Wo as StatusSwitch,
152
153
  zo as TableZoomButton,
153
- jo as UserPicker,
154
+ Yo as UserPicker,
154
155
  Zo as UserSelect,
155
156
  l as aiProviderApi,
156
157
  u as aiUsageApi,
157
158
  n as authApi,
158
- Rr as beginVoluntaryLogout,
159
- Mt as brandDisplayName,
160
- $t as btnGrad,
159
+ Dr as beginVoluntaryLogout,
160
+ It as brandDisplayName,
161
+ ea as btnGrad,
161
162
  Dt as buildConfigProviderRows,
162
163
  qe as buildRoutesForModule,
163
- ia as buildThemeOverrides,
164
- Nt as buildTree,
164
+ pa as buildThemeOverrides,
165
+ vt as buildTree,
165
166
  d as cacheApi,
166
167
  x as callApi,
167
168
  Rt as claimWeComAutoLogin,
168
- da as classifyNoticeAction,
169
+ xa as classifyNoticeAction,
169
170
  Ze as clearClientCache,
170
- j as client,
171
- vt as collectSubtreeIds,
171
+ Y as client,
172
+ Ft as collectSubtreeIds,
172
173
  c as configApi,
173
- Y as createApiClient,
174
+ j as createApiClient,
174
175
  s as createSmartAdmin,
175
176
  A as dashboardApi,
176
177
  S as dayRange,
177
- ea as derivePrimary,
178
- je as describeMenuRoute,
178
+ ra as derivePrimary,
179
+ Ye as describeMenuRoute,
179
180
  g as dictAdminApi,
180
181
  T as dictApi,
181
182
  Z as ensureAccessToken,
@@ -185,76 +186,76 @@ export {
185
186
  Ht as filterTree,
186
187
  dt as fmtBytes,
187
188
  xt as fmtDateTime,
188
- ra as glowSh,
189
+ oa as glowSh,
189
190
  gt as hardErrorsOf,
190
191
  P as highSensApi,
191
192
  ve as i18n,
192
- It as isBrandCode,
193
+ Bt as isBrandCode,
193
194
  ar as isCompactSize,
194
195
  Tt as isDuplicateOnly,
195
- Xt as isFullscreenPath,
196
+ zt as isFullscreenPath,
196
197
  Ct as isHardError,
197
- zt as isHttpUrl,
198
- Bt as isIconifyName,
199
- xa as isSiteRelativeUrl,
200
- h as jobApi,
198
+ Kt as isHttpUrl,
199
+ yt as isIconifyName,
200
+ ca as isSiteRelativeUrl,
201
+ _ as jobApi,
201
202
  Ae as joinPermission,
202
- Yt as kernelIconSet,
203
- _ as listQuery,
203
+ Zt as kernelIconSet,
204
+ h as listQuery,
204
205
  Or as loadSite,
205
- ua as loadingBar,
206
+ na as loadingBar,
206
207
  b as logApi,
207
208
  M as menuApi,
208
209
  Ar as menuBadge,
209
210
  Ge as menuTitleKey,
210
- yt as mergeBindingRows,
211
- D as mfaApi,
212
- oa as mix,
213
- R as moduleApi,
214
- I as monitorApi,
211
+ wt as mergeBindingRows,
212
+ I as mfaApi,
213
+ ta as mix,
214
+ D as moduleApi,
215
+ R as monitorApi,
215
216
  Ue as namedPage,
216
217
  B as normalizeCommit,
217
218
  y as normalizePreview,
218
- hr as noticeActionButtonType,
219
- ca as noticeActionLabel,
219
+ _r as noticeActionButtonType,
220
+ Aa as noticeActionLabel,
220
221
  w as noticeApi,
221
- Ir as noticeBus,
222
+ Rr as noticeBus,
222
223
  Br as onRealtime,
223
224
  ct as operatorText,
224
225
  O as orgApi,
225
226
  L as pageParams,
226
- Jt as parseUserAgent,
227
+ Gt as parseUserAgent,
227
228
  U as personalApi,
228
229
  N as positionApi,
229
- wt as previewAllBrandProviders,
230
+ Ot as previewAllBrandProviders,
230
231
  Q as readCookie,
231
232
  v as recycleApi,
232
233
  q as refreshOnce,
233
234
  ye as registerDynamic,
234
235
  ur as registerHeaderTool,
235
- ke as registerLocales,
236
+ Fe as registerLocales,
236
237
  Sr as registerMenuBadge,
237
238
  Ve as registerMenuTitles,
238
- Sa as registerViews,
239
+ ga as registerViews,
239
240
  we as resetRouter,
240
- Ot as resolveProviderIcon,
241
- ta as rgba,
242
- k as roleApi,
241
+ Lt as resolveProviderIcon,
242
+ aa as rgba,
243
+ F as roleApi,
243
244
  Oe as router,
244
- H as sessionApi,
245
- sa as setupMarkdown,
246
- Lt as splitLoginProviders,
245
+ k as sessionApi,
246
+ ma as setupMarkdown,
247
+ Ut as splitLoginProviders,
247
248
  Se as splitPermission,
248
- He as t,
249
+ ke as t,
249
250
  ge as toMenuInput,
250
- F as toPage,
251
+ H as toPage,
251
252
  J as toWireRows,
252
253
  lt as translateError,
253
254
  ut as translateErrorDetail,
254
255
  We as translateMenuTitle,
255
256
  mt as triggerBlobDownload,
256
- Kt as trimTrailingSlashes,
257
- Gt as uaSummary,
257
+ Yt as trimTrailingSlashes,
258
+ Vt as uaSummary,
258
259
  G as unwrap,
259
260
  V as unwrapDownload,
260
261
  pt as uploadChunked,
@@ -263,28 +264,28 @@ export {
263
264
  er as useBatchDelete,
264
265
  ir as useCompactScreen,
265
266
  sr as useConfirm,
266
- _e as useDictOptions,
267
+ he as useDictOptions,
267
268
  be as useDictStore,
268
269
  fr as useFullscreenToggle,
269
270
  nr as useHeaderTools,
270
271
  xr as useLayoutMenu,
271
272
  Tr as useMenuFlat,
272
273
  Er as useModule,
273
- _r as useNoticeAction,
274
+ hr as useNoticeAction,
274
275
  Mr as usePageTitle,
275
276
  yr as useRealtime,
276
277
  Lr as useSite,
277
278
  Jr as useTabTitle,
278
279
  vr as useTableRowSort,
279
- Hr as useTableZoom,
280
- De as useTabsStore,
280
+ kr as useTableZoom,
281
+ Ie as useTabsStore,
281
282
  Vr as useTheme,
282
- Ie as useUserStore,
283
+ Re as useUserStore,
283
284
  Xr as useVisualViewportHeight,
284
285
  W as userApi,
285
286
  ze as vAuth,
286
- ga as viewComponentPaths,
287
- Fe as withExt,
288
- ma as withXssPlugin
287
+ Ta as viewComponentPaths,
288
+ He as withExt,
289
+ fa as withXssPlugin
289
290
  };
290
291
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ export declare function applyFavicon(doc: Document, logo: string | null | undefined): void;
@@ -0,0 +1,12 @@
1
+ const i = /* @__PURE__ */ new WeakMap();
2
+ function l(f, r) {
3
+ const n = f.querySelectorAll('link[rel~="icon"]');
4
+ for (const e of n) {
5
+ let t = i.get(e);
6
+ t || (t = { href: e.getAttribute("href") ?? "", type: e.getAttribute("type") }, i.set(e, t)), r ? (e.href = r, e.removeAttribute("type")) : (e.setAttribute("href", t.href), t.type && e.setAttribute("type", t.type));
7
+ }
8
+ }
9
+ export {
10
+ l as applyFavicon
11
+ };
12
+ //# sourceMappingURL=favicon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"favicon.js","sources":["../../src/lib/favicon.ts"],"sourcesContent":["// 浏览器标签页图标跟随站点 Logo。改写页面里所有 rel=icon 的 href,而不是再追加一个:\n// 多个候选时各浏览器挑哪个并不一致,追加的那个未必生效。原 href/type 记在 WeakMap 里,Logo 清空时还原。\n// 不记在 DOM 属性上:从 DOM 读出再写回 href,会被静态分析当成\"DOM 文本重新解释为 HTML\"。\n// apple-touch-icon 不动:iOS 主屏图标要 180×180 不透明底,和 Logo 的要求不同。\n\ninterface IconDefaults {\n href: string\n type: string | null\n}\n\nconst defaults = new WeakMap<HTMLLinkElement, IconDefaults>()\n\nexport function applyFavicon(doc: Document, logo: string | null | undefined): void {\n const links = doc.querySelectorAll<HTMLLinkElement>('link[rel~=\"icon\"]')\n for (const link of links) {\n let original = defaults.get(link)\n if (!original) {\n original = { href: link.getAttribute('href') ?? '', type: link.getAttribute('type') }\n defaults.set(link, original)\n }\n if (logo) {\n link.href = logo\n link.removeAttribute('type') // 原 type 可能是 image/svg+xml,留着会让浏览器按错的类型解析 Logo\n } else {\n link.setAttribute('href', original.href)\n if (original.type) link.setAttribute('type', original.type)\n }\n }\n}\n"],"names":["defaults","applyFavicon","doc","logo","links","link","original"],"mappings":"AAUA,MAAMA,wBAAe,QAAA;AAEd,SAASC,EAAaC,GAAeC,GAAuC;AACjF,QAAMC,IAAQF,EAAI,iBAAkC,mBAAmB;AACvE,aAAWG,KAAQD,GAAO;AACxB,QAAIE,IAAWN,EAAS,IAAIK,CAAI;AAChC,IAAKC,MACHA,IAAW,EAAE,MAAMD,EAAK,aAAa,MAAM,KAAK,IAAI,MAAMA,EAAK,aAAa,MAAM,EAAA,GAClFL,EAAS,IAAIK,GAAMC,CAAQ,IAEzBH,KACFE,EAAK,OAAOF,GACZE,EAAK,gBAAgB,MAAM,MAE3BA,EAAK,aAAa,QAAQC,EAAS,IAAI,GACnCA,EAAS,QAAMD,EAAK,aAAa,QAAQC,EAAS,IAAI;AAAA,EAE9D;AACF;"}
@@ -0,0 +1,16 @@
1
+ export interface LoginHeroCopy {
2
+ headline: string;
3
+ highlight: string;
4
+ features: string[];
5
+ }
6
+ export interface LoginHeroFallbacks {
7
+ headline: string;
8
+ highlight: string;
9
+ features: string[];
10
+ }
11
+ /** 卖点按行输入;空行忽略,最多保留 5 条。 */
12
+ export declare function splitLoginHeroFeatures(value: string | null | undefined, max?: number): string[];
13
+ /** 归一化站点接口下发的 Hero 文案,非法形状按缺失处理。 */
14
+ export declare function normalizeLoginHero(value: unknown): Record<string, LoginHeroCopy>;
15
+ /** 空配置逐字段回退内置文案;卖点开关关闭时返回空清单。 */
16
+ export declare function resolveLoginHero(copy: Partial<LoginHeroCopy> | undefined, fallback: LoginHeroFallbacks, showFeatures?: boolean): LoginHeroCopy;
@@ -0,0 +1,33 @@
1
+ function s(r, t = 5) {
2
+ return r != null && r.trim() ? r.replace(/\r\n/g, `
3
+ `).split(`
4
+ `).map((n) => n.trim()).filter(Boolean).slice(0, t) : [];
5
+ }
6
+ function f(r) {
7
+ if (!r || typeof r != "object" || Array.isArray(r)) return {};
8
+ const t = {};
9
+ for (const [n, i] of Object.entries(r)) {
10
+ if (!i || typeof i != "object" || Array.isArray(i)) continue;
11
+ const e = i;
12
+ t[n] = {
13
+ headline: typeof e.headline == "string" ? e.headline : "",
14
+ highlight: typeof e.highlight == "string" ? e.highlight : "",
15
+ features: Array.isArray(e.features) ? e.features.filter((h) => typeof h == "string" && !!h.trim()) : []
16
+ };
17
+ }
18
+ return t;
19
+ }
20
+ function g(r, t, n = !0) {
21
+ var i, e, h;
22
+ return {
23
+ headline: ((i = r == null ? void 0 : r.headline) == null ? void 0 : i.trim()) || t.headline,
24
+ highlight: ((e = r == null ? void 0 : r.highlight) == null ? void 0 : e.trim()) || t.highlight,
25
+ features: n ? (h = r == null ? void 0 : r.features) != null && h.length ? r.features : t.features : []
26
+ };
27
+ }
28
+ export {
29
+ f as normalizeLoginHero,
30
+ g as resolveLoginHero,
31
+ s as splitLoginHeroFeatures
32
+ };
33
+ //# sourceMappingURL=loginHero.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loginHero.js","sources":["../../src/lib/loginHero.ts"],"sourcesContent":["export interface LoginHeroCopy {\n headline: string\n highlight: string\n features: string[]\n}\n\nexport interface LoginHeroFallbacks {\n headline: string\n highlight: string\n features: string[]\n}\n\n/** 卖点按行输入;空行忽略,最多保留 5 条。 */\nexport function splitLoginHeroFeatures(value: string | null | undefined, max = 5): string[] {\n if (!value?.trim()) return []\n return value\n .replace(/\\r\\n/g, '\\n')\n .split('\\n')\n .map(line => line.trim())\n .filter(Boolean)\n .slice(0, max)\n}\n\n/** 归一化站点接口下发的 Hero 文案,非法形状按缺失处理。 */\nexport function normalizeLoginHero(value: unknown): Record<string, LoginHeroCopy> {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return {}\n\n const result: Record<string, LoginHeroCopy> = {}\n for (const [locale, raw] of Object.entries(value)) {\n if (!raw || typeof raw !== 'object' || Array.isArray(raw)) continue\n const copy = raw as Record<string, unknown>\n result[locale] = {\n headline: typeof copy.headline === 'string' ? copy.headline : '',\n highlight: typeof copy.highlight === 'string' ? copy.highlight : '',\n features: Array.isArray(copy.features)\n ? copy.features.filter((item): item is string => typeof item === 'string' && !!item.trim())\n : [],\n }\n }\n return result\n}\n\n/** 空配置逐字段回退内置文案;卖点开关关闭时返回空清单。 */\nexport function resolveLoginHero(\n copy: Partial<LoginHeroCopy> | undefined,\n fallback: LoginHeroFallbacks,\n showFeatures = true,\n): LoginHeroCopy {\n return {\n headline: copy?.headline?.trim() || fallback.headline,\n highlight: copy?.highlight?.trim() || fallback.highlight,\n features: showFeatures ? (copy?.features?.length ? copy.features : fallback.features) : [],\n }\n}\n"],"names":["splitLoginHeroFeatures","value","max","line","normalizeLoginHero","result","locale","raw","copy","item","resolveLoginHero","fallback","showFeatures","_a","_b","_c"],"mappings":"AAaO,SAASA,EAAuBC,GAAkCC,IAAM,GAAa;AAC1F,SAAKD,KAAA,QAAAA,EAAO,SACLA,EACJ,QAAQ,SAAS;AAAA,CAAI,EACrB,MAAM;AAAA,CAAI,EACV,IAAI,OAAQE,EAAK,KAAA,CAAM,EACvB,OAAO,OAAO,EACd,MAAM,GAAGD,CAAG,IANY,CAAA;AAO7B;AAGO,SAASE,EAAmBH,GAA+C;AAChF,MAAI,CAACA,KAAS,OAAOA,KAAU,YAAY,MAAM,QAAQA,CAAK,EAAG,QAAO,CAAA;AAExE,QAAMI,IAAwC,CAAA;AAC9C,aAAW,CAACC,GAAQC,CAAG,KAAK,OAAO,QAAQN,CAAK,GAAG;AACjD,QAAI,CAACM,KAAO,OAAOA,KAAQ,YAAY,MAAM,QAAQA,CAAG,EAAG;AAC3D,UAAMC,IAAOD;AACb,IAAAF,EAAOC,CAAM,IAAI;AAAA,MACf,UAAU,OAAOE,EAAK,YAAa,WAAWA,EAAK,WAAW;AAAA,MAC9D,WAAW,OAAOA,EAAK,aAAc,WAAWA,EAAK,YAAY;AAAA,MACjE,UAAU,MAAM,QAAQA,EAAK,QAAQ,IACjCA,EAAK,SAAS,OAAO,CAACC,MAAyB,OAAOA,KAAS,YAAY,CAAC,CAACA,EAAK,KAAA,CAAM,IACxF,CAAA;AAAA,IAAC;AAAA,EAET;AACA,SAAOJ;AACT;AAGO,SAASK,EACdF,GACAG,GACAC,IAAe,IACA;AAlCV,MAAAC,GAAAC,GAAAC;AAmCL,SAAO;AAAA,IACL,YAAUF,IAAAL,KAAA,gBAAAA,EAAM,aAAN,gBAAAK,EAAgB,WAAUF,EAAS;AAAA,IAC7C,aAAWG,IAAAN,KAAA,gBAAAA,EAAM,cAAN,gBAAAM,EAAiB,WAAUH,EAAS;AAAA,IAC/C,UAAUC,KAAgBG,IAAAP,KAAA,gBAAAA,EAAM,aAAN,QAAAO,EAAgB,SAASP,EAAK,WAAWG,EAAS,WAAY,CAAA;AAAA,EAAC;AAE7F;"}
@@ -0,0 +1,25 @@
1
+ export interface CropState {
2
+ /** 图片原始宽高 */
3
+ width: number;
4
+ height: number;
5
+ /** 取景框边长(px,视口坐标) */
6
+ frame: number;
7
+ /** 当前缩放(图片像素 → 视口像素) */
8
+ scale: number;
9
+ /** 图片中心相对取景框中心的偏移(视口像素) */
10
+ x: number;
11
+ y: number;
12
+ }
13
+ /** 刚好铺满取景框的最小缩放:短边等于框边,不留空白。 */
14
+ export declare function coverScale(width: number, height: number, frame: number): number;
15
+ /** 把偏移收在"图片始终盖满取景框"的范围内。 */
16
+ export declare function clampOffset(s: CropState): {
17
+ x: number;
18
+ y: number;
19
+ };
20
+ /** 取景框在原图上的区域(原图像素),供 drawImage 取源矩形。 */
21
+ export declare function sourceRect(s: CropState): {
22
+ sx: number;
23
+ sy: number;
24
+ size: number;
25
+ };
@@ -0,0 +1,22 @@
1
+ function n(t, e, a) {
2
+ return a / Math.min(t, e);
3
+ }
4
+ const c = (t, e) => e === 0 ? 0 : Math.min(e, Math.max(-e, t));
5
+ function r(t) {
6
+ const e = Math.max(0, (t.width * t.scale - t.frame) / 2), a = Math.max(0, (t.height * t.scale - t.frame) / 2);
7
+ return { x: c(t.x, e), y: c(t.y, a) };
8
+ }
9
+ function h(t) {
10
+ const e = t.frame / t.scale;
11
+ return {
12
+ sx: t.width / 2 - t.x / t.scale - e / 2,
13
+ sy: t.height / 2 - t.y / t.scale - e / 2,
14
+ size: e
15
+ };
16
+ }
17
+ export {
18
+ r as clampOffset,
19
+ n as coverScale,
20
+ h as sourceRect
21
+ };
22
+ //# sourceMappingURL=logoCrop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logoCrop.js","sources":["../../src/lib/logoCrop.ts"],"sourcesContent":["// Logo 裁剪的几何计算:图片以视口中心 + 偏移量摆放、按 scale 缩放,正方形取景框居中。\n// 与 DOM 无关,裁剪组件只负责把指针/滚轮事件换成 offset/scale,再用这里的结果画 canvas。\n\nexport interface CropState {\n /** 图片原始宽高 */\n width: number\n height: number\n /** 取景框边长(px,视口坐标) */\n frame: number\n /** 当前缩放(图片像素 → 视口像素) */\n scale: number\n /** 图片中心相对取景框中心的偏移(视口像素) */\n x: number\n y: number\n}\n\n/** 刚好铺满取景框的最小缩放:短边等于框边,不留空白。 */\nexport function coverScale(width: number, height: number, frame: number): number {\n return frame / Math.min(width, height)\n}\n\n// 可移范围为 0 时直接归零,避免 Math.max(-0, …) 产出 -0\nconst clamp = (v: number, max: number) => (max === 0 ? 0 : Math.min(max, Math.max(-max, v)))\n\n/** 把偏移收在\"图片始终盖满取景框\"的范围内。 */\nexport function clampOffset(s: CropState): { x: number; y: number } {\n const maxX = Math.max(0, (s.width * s.scale - s.frame) / 2)\n const maxY = Math.max(0, (s.height * s.scale - s.frame) / 2)\n return { x: clamp(s.x, maxX), y: clamp(s.y, maxY) }\n}\n\n/** 取景框在原图上的区域(原图像素),供 drawImage 取源矩形。 */\nexport function sourceRect(s: CropState): { sx: number; sy: number; size: number } {\n const size = s.frame / s.scale\n return {\n sx: s.width / 2 - s.x / s.scale - size / 2,\n sy: s.height / 2 - s.y / s.scale - size / 2,\n size,\n }\n}\n"],"names":["coverScale","width","height","frame","clamp","v","max","clampOffset","s","maxX","maxY","sourceRect","size"],"mappings":"AAiBO,SAASA,EAAWC,GAAeC,GAAgBC,GAAuB;AAC/E,SAAOA,IAAQ,KAAK,IAAIF,GAAOC,CAAM;AACvC;AAGA,MAAME,IAAQ,CAACC,GAAWC,MAAiBA,MAAQ,IAAI,IAAI,KAAK,IAAIA,GAAK,KAAK,IAAI,CAACA,GAAKD,CAAC,CAAC;AAGnF,SAASE,EAAYC,GAAwC;AAClE,QAAMC,IAAO,KAAK,IAAI,IAAID,EAAE,QAAQA,EAAE,QAAQA,EAAE,SAAS,CAAC,GACpDE,IAAO,KAAK,IAAI,IAAIF,EAAE,SAASA,EAAE,QAAQA,EAAE,SAAS,CAAC;AAC3D,SAAO,EAAE,GAAGJ,EAAMI,EAAE,GAAGC,CAAI,GAAG,GAAGL,EAAMI,EAAE,GAAGE,CAAI,EAAA;AAClD;AAGO,SAASC,EAAWH,GAAwD;AACjF,QAAMI,IAAOJ,EAAE,QAAQA,EAAE;AACzB,SAAO;AAAA,IACL,IAAIA,EAAE,QAAQ,IAAIA,EAAE,IAAIA,EAAE,QAAQI,IAAO;AAAA,IACzC,IAAIJ,EAAE,SAAS,IAAIA,EAAE,IAAIA,EAAE,QAAQI,IAAO;AAAA,IAC1C,MAAAA;AAAA,EAAA;AAEJ;"}