vue-layout-gitcode 1.8.12 → 1.8.14

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.
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, inject, createElementBlock, openBlock, Fragment, createElementVNode, toDisplayString, createVNode, unref, renderList, withDirectives, createBlock, ref, watch, onMounted, createCommentVNode } from "vue";
2
2
  import "vue-devui-lal/icon";
3
3
  import "vue-devui-lal/icon/style.css";
4
- import { h as headRequest, R as REPO_MODULE, a as i18n, G as GIcon, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-D9tjG0gc.js";
4
+ import { h as headRequest, R as REPO_MODULE, a as i18n, G as GIcon, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-q-9Kzz6q.js";
5
5
  import "lodash/debounce";
6
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-WmRS4ZG3.js";
7
- import "./transWebUrl-CbPDVu1j.js";
6
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-D8Sa-nqE.js";
7
+ import "./transWebUrl-DM2u0vwf.js";
8
8
  import "vue-devui-lal/tooltip";
9
9
  import "vue-devui-lal/tooltip/style.css";
10
10
  import "vue-router";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, inject, useSlots, ref, computed, createBlock, openBlock, unref, withCtx, createElementVNode, normalizeClass, createElementBlock, createTextVNode, createCommentVNode, toDisplayString, renderSlot } from "vue";
2
- import { x as useLayoutConfig, y as ThemeType, z as currentTheme, j as LANG_ZH, A as LANG_EN, w as getLocaleLang, G as GIcon, B as emitEvent, C as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-D9tjG0gc.js";
2
+ import { x as useLayoutConfig, y as ThemeType, z as currentTheme, j as LANG_ZH, A as LANG_EN, w as getLocaleLang, G as GIcon, B as emitEvent, C as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-q-9Kzz6q.js";
3
3
  import { useRouter } from "vue-router";
4
4
  import { Popover } from "vue-devui-lal/popover";
5
5
  import "vue-devui-lal/popover/style.css";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, inject, ref, reactive, watch, computed, createElementBlock, openBlock, createCommentVNode, createBlock, withDirectives, Fragment, createElementVNode, createVNode, toDisplayString, unref, withModifiers, normalizeClass, withCtx, renderList, createTextVNode, vShow } from "vue";
2
- import { a as i18n, x as useLayoutConfig, G as GIcon, D as transformUrl, F as _sfc_main$1, H as loadAsideData, B as emitEvent, s as setLoginTriggerSource, f as useRequestReport, I as asideRequest, _ as _export_sfc } from "./index-D9tjG0gc.js";
2
+ import { a as i18n, x as useLayoutConfig, G as GIcon, t as transformUrl, D as _sfc_main$1, F as loadAsideData, B as emitEvent, s as setLoginTriggerSource, f as useRequestReport, H as asideRequest, _ as _export_sfc } from "./index-q-9Kzz6q.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-CbPDVu1j.js";
4
+ import { t as transWebUrl } from "./transWebUrl-DM2u0vwf.js";
5
5
  import { Select, Option } from "vue-devui-lal/select";
6
6
  import { Input } from "vue-devui-lal/input";
7
7
  import { Skeleton } from "vue-devui-lal/skeleton";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, inject, ref, reactive, computed, watch, createElementBlock, openBlock, createElementVNode, createVNode, createBlock, createCommentVNode, withDirectives, toDisplayString, unref, withModifiers, normalizeClass, withCtx, Fragment, renderList, createTextVNode, vShow } from "vue";
2
- import { a as i18n, x as useLayoutConfig, G as GIcon, B as emitEvent, s as setLoginTriggerSource, f as useRequestReport, _ as _export_sfc } from "./index-D9tjG0gc.js";
2
+ import { a as i18n, x as useLayoutConfig, G as GIcon, B as emitEvent, s as setLoginTriggerSource, f as useRequestReport, _ as _export_sfc } from "./index-q-9Kzz6q.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-CbPDVu1j.js";
4
+ import { t as transWebUrl } from "./transWebUrl-DM2u0vwf.js";
5
5
  import { Input } from "vue-devui-lal/input";
6
6
  import { Skeleton } from "vue-devui-lal/skeleton";
7
7
  import { MenuItem } from "vue-devui-lal/menu";
@@ -1,5 +1,5 @@
1
1
  import { ref, inject, computed, withDirectives, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
2
- import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-D9tjG0gc.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-q-9Kzz6q.js";
3
3
  import { useRoute, useRouter } from "vue-router";
4
4
  import "vue-devui-lal/icon";
5
5
  import "vue-devui-lal/icon/style.css";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock, createCommentVNode, Fragment, renderList, normalizeClass, createElementVNode, createVNode, toDisplayString, withModifiers } from "vue";
2
- import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-D9tjG0gc.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-q-9Kzz6q.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = { class: "history-list" };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, createElementBlock, openBlock, createElementVNode, withDirectives, toDisplayString, withModifiers, createVNode, vShow } from "vue";
2
- import { G as GIcon, _ as _export_sfc } from "./index-D9tjG0gc.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-q-9Kzz6q.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = { class: "ellipsis" };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, ref, onMounted, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, renderSlot, createBlock, createVNode, withCtx } from "vue";
2
- import { u as useReportRepo, S as SearchRepoCard } from "./index-WmRS4ZG3.js";
3
- import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-D9tjG0gc.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-D8Sa-nqE.js";
3
+ import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-q-9Kzz6q.js";
4
4
  import { Row, Col } from "vue-devui-lal/grid";
5
5
  import { SkeletonItem } from "vue-devui-lal/skeleton";
6
6
  import "vue-devui-lal/grid/style.css";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, createElementBlock, openBlock, Fragment, renderList, createElementVNode, createVNode, createCommentVNode, toDisplayString, unref } from "vue";
2
- import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-D9tjG0gc.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-q-9Kzz6q.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = ["onClick"];
@@ -1,5 +1,5 @@
1
1
  import { inject, ref, watch, withDirectives, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
2
- import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-D9tjG0gc.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-q-9Kzz6q.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = { class: "px-[8px] history-list-project pl-[8px]" };
@@ -8,7 +8,7 @@ import { Message } from "vue-devui-lal/message";
8
8
  import "vue-devui-lal/message/style.css";
9
9
  import { FixedOverlay } from "vue-devui-lal/overlay";
10
10
  import "vue-devui-lal/overlay/style.css";
11
- import { a as i18n, k as usePageResize, w as getLocaleLang, j as LANG_ZH, _ as _export_sfc } from "./index-D9tjG0gc.js";
11
+ import { a as i18n, k as usePageResize, w as getLocaleLang, j as LANG_ZH, _ as _export_sfc } from "./index-q-9Kzz6q.js";
12
12
  const _YunpianCaptchaManager = class _YunpianCaptchaManager {
13
13
  constructor() {
14
14
  __publicField(this, "ypRiddlerInstance", null);
@@ -1,7 +1,7 @@
1
1
  import { ref, watchEffect, defineComponent, toDisplayString, unref, mergeModels, useModel, watch, createElementBlock, openBlock, createVNode, withDirectives, normalizeClass, createElementVNode, vShow, inject, withModifiers, createBlock, Fragment, computed, createCommentVNode, normalizeStyle, createTextVNode, onMounted, onUnmounted, renderList, withCtx, reactive } from "vue";
2
2
  import debounce from "lodash/debounce";
3
- import { d as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, a as i18n, T as TOPIC_TYPE, g as useTimeFormat, L as LANG_KEY, j as LANG_ZH, k as usePageResize, m as isGstarRepo, n as _sfc_main$b, o as isIncubationRepo, p as highlightWords, t as transformUrl, q as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-D9tjG0gc.js";
4
- import { t as transWebUrl } from "./transWebUrl-CbPDVu1j.js";
3
+ import { d as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, a as i18n, T as TOPIC_TYPE, g as useTimeFormat, L as LANG_KEY, j as LANG_ZH, k as usePageResize, m as isGstarRepo, n as _sfc_main$b, o as isIncubationRepo, p as highlightWords, t as transformUrl, q as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-q-9Kzz6q.js";
4
+ import { t as transWebUrl } from "./transWebUrl-DM2u0vwf.js";
5
5
  import { useRouter } from "vue-router";
6
6
  import { Row, Col } from "vue-devui-lal/grid";
7
7
  import { Skeleton, SkeletonItem } from "vue-devui-lal/skeleton";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, onMounted, onUnmounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
2
- import { w as getLocaleLang, j as LANG_ZH, x as useLayoutConfig, _ as _export_sfc } from "./index-D9tjG0gc.js";
2
+ import { w as getLocaleLang, j as LANG_ZH, x as useLayoutConfig, _ as _export_sfc } from "./index-q-9Kzz6q.js";
3
3
  import { FixedOverlay } from "vue-devui-lal/overlay";
4
4
  import "vue-devui-lal/overlay/style.css";
5
5
  const TARGET_TEXT = "Click in order:";
@@ -105,7 +105,7 @@ const _export_sfc = (sfc, props) => {
105
105
  return target;
106
106
  };
107
107
  const GIcon = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-vue-layout-gitcode"]]);
108
- const transformUrl$1 = (url) => {
108
+ const transformUrl = (url) => {
109
109
  if (!url || typeof url !== "string") {
110
110
  return url;
111
111
  }
@@ -125,14 +125,17 @@ const transformUrl$1 = (url) => {
125
125
  try {
126
126
  const urlObj = new URL(url);
127
127
  const originalHostname = urlObj.hostname;
128
- const parseHostname = (hostname = "") => {
128
+ const parseHostname = (hostname, isLocationHost = false) => {
129
129
  const parts = hostname.split(".");
130
130
  const baseDomain = parts.length >= 2 ? parts.slice(-2).join(".") : hostname;
131
- const subdomainPrefix = parts.length > 2 ? parts[0] : "";
131
+ let subdomainPrefix = parts.length > 2 ? parts[0] : "";
132
+ if (isLocationHost && subdomainPrefix && subdomainPrefix.includes("-")) {
133
+ subdomainPrefix = subdomainPrefix.split("-")[0];
134
+ }
132
135
  return { baseDomain, subdomainPrefix };
133
136
  };
134
- const { subdomainPrefix: urlSubdomain } = parseHostname(originalHostname);
135
- const { baseDomain: targetBaseDomain, subdomainPrefix: targetEnvPrefix } = parseHostname(targetHost);
137
+ const { subdomainPrefix: urlSubdomain } = parseHostname(originalHostname, false);
138
+ const { baseDomain: targetBaseDomain, subdomainPrefix: targetEnvPrefix } = parseHostname(targetHost, true);
136
139
  let finalHostname = targetBaseDomain;
137
140
  if (targetEnvPrefix) {
138
141
  finalHostname = `${targetEnvPrefix}.${finalHostname}`;
@@ -162,7 +165,7 @@ const defaultConfig = {
162
165
  VITE_SECRET_KEY: "SA!nUNPZ5o!OSV&B",
163
166
  VITE_SECRET_IV: "SA!nwwwZ5o!OSV&B"
164
167
  };
165
- const layoutConfig$5 = reactive({ ...defaultConfig, VITE_HOST_TIANQI: transformUrl$1(defaultConfig.VITE_HOST_TIANQI) });
168
+ const layoutConfig$5 = reactive({ ...defaultConfig, VITE_HOST_TIANQI: transformUrl(defaultConfig.VITE_HOST_TIANQI) });
166
169
  function setLayoutConfig(customConfig) {
167
170
  Object.assign(layoutConfig$5, customConfig);
168
171
  }
@@ -12274,48 +12277,6 @@ if (isBrowser) {
12274
12277
  }
12275
12278
  const sessionStorage$1 = sessionStorage;
12276
12279
  const _imports_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAmsSURBVHgB7VpdbxxnFT7nfccmRam6/gXZXIBy1y3qRe8YR6kUoUpdbhACJNtShFJUSCyBBFd2I1ClAoklVAE32BYXRAJqIwEyUOrNL4h70dtm+wvqNG7deGbe03PO+7Gzlr27/kpzsSeazO5kZvZ95jnnOR8TgLGNbWxjG9vYDjWEp8zyNjUg22lBiS1TuOeNo5YFbBgyTUMAFgz4PXYnDEzf3XimO+h+GTwFls9S43G5O2NLaLtqp2VKaJiSCB0yGEQEJAHFIMkwKXxMjl8AopwvXxl07y8V4EvXdnMo3cye+6xtK3jOVISmYCAlb/KZgTBT4Pd8TD+TfGegiApyiH0pAF+6vpvzOhegoNxUvNiSwZS88II32VcAniVhTIAya6AgeS9/AK0AFXKH2BMFmN+kxqfF4wVXwA0snQdUgQcXtwoFgLJk/T6xqG7Kx2w4xi5Mw37ziQF88fXd/NHe58scZxfYBdGzBQkYFkxVpSBQAXkXZJC8CYMUXTQCxZEU0sATsG/c+PwOL3/TVnhBY0vYqyABk7jjGJSnvc0L72qMeQaxB8gIWGGPgtjw+f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hM+BRAlRm8wdXuOvYZ3/qTK78sZNNy1CWF7uqOU3Z8e6X1DMd90OkkOxD/JmRBkonAigmM0t+yg27r8XxsQVNbjs2Zy/vLV87AKgMZTNrHphepRJryyQq3j1DUpcyLdNOovvjpdNR0KEAxfg3W2mkUJuraCog7Q1moMLNH+buw+t5P1BTYybLVDUpxCKpm6ZeT87V7kEGSieuXo4EkJ/zq71SLPV2aHsvJH1sAl3k5JD33TxUK6FhpSyopWctdQuh7lT3nH/t9mjTslFtaKKX/+Vgomv29pReK8euHczK2x1c7Lv5pNOXzCE1qFJpM5tRck3f97FqUjn/o99Mnpq4jASwnX/cCFVJlxN6B8m9n7lJjo9ShrGbCSgquLn91xumS1XReLc0me/5bOr54GNm+dbrS2YJzsgGAlzvTG2323Txr+v9b3Gu57vgaBJC4bx6EDi9eVZ9pNWo1pYI/eCwU1mc+8nSyevNQXbsfvC13K2xi24fBk5scZYaWUUfcgxOxZqT43Cbg3d+/nenG2uH2Zn/T6e3ZvdarCJrIjA8w181k9nS/NLw93pjG9vYxja2p8G+ADz7MtW/3lU1AAAAAElFTkSuQmCC";
12277
- const transformUrl = (url) => {
12278
- if (!url || typeof url !== "string") {
12279
- return url;
12280
- }
12281
- if (url.startsWith("/") && !url.startsWith("//") || url.startsWith("./") || url.startsWith("../")) {
12282
- return url;
12283
- }
12284
- if (url.startsWith("https://cdn-") || url.startsWith("http://cdn-") || url.startsWith("//cdn-")) {
12285
- return url;
12286
- }
12287
- if (typeof window === "undefined" || typeof location === "undefined") {
12288
- return url;
12289
- }
12290
- const targetHost = location.host;
12291
- if (!targetHost) {
12292
- return url;
12293
- }
12294
- try {
12295
- const urlObj = new URL(url);
12296
- const originalHostname = urlObj.hostname;
12297
- const parseHostname = (hostname = "") => {
12298
- const parts = hostname.split(".");
12299
- const baseDomain = parts.length >= 2 ? parts.slice(-2).join(".") : hostname;
12300
- const subdomainPrefix = parts.length > 2 ? parts[0] : "";
12301
- return { baseDomain, subdomainPrefix };
12302
- };
12303
- const { subdomainPrefix: urlSubdomain } = parseHostname(originalHostname);
12304
- const { baseDomain: targetBaseDomain, subdomainPrefix: targetEnvPrefix } = parseHostname(targetHost);
12305
- let finalHostname = targetBaseDomain;
12306
- if (targetEnvPrefix) {
12307
- finalHostname = `${targetEnvPrefix}.${finalHostname}`;
12308
- }
12309
- if (urlSubdomain && urlSubdomain !== targetEnvPrefix) {
12310
- finalHostname = `${urlSubdomain}.${finalHostname}`;
12311
- }
12312
- const transformed = url.replace(originalHostname, finalHostname);
12313
- return transformed;
12314
- } catch (error) {
12315
- console.warn("URL解析失败:", url, error);
12316
- return url;
12317
- }
12318
- };
12319
12280
  const _sfc_main$z = /* @__PURE__ */ defineComponent({
12320
12281
  ...{
12321
12282
  name: "GAvatar"
@@ -13689,13 +13650,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
13689
13650
  };
13690
13651
  });
13691
13652
  function goPage() {
13692
- let url = transformUrl$1(tianqiButtonConfig.value.url || layoutConfig2.VITE_HOST_TIANQI + "?utm_source=toolbar");
13693
- if (location.host === "test.atomgit.com") {
13694
- url = "https://test-tianqi.atomgit.com";
13695
- }
13696
- if (location.host === "pre.atomgit.com") {
13697
- url = "https://pre-tianqi.atomgit.com";
13698
- }
13653
+ const url = transformUrl(tianqiButtonConfig.value.url || layoutConfig2.VITE_HOST_TIANQI + "?utm_source=toolbar");
13699
13654
  useReport2(REPO_EVENT.CLICK, { module_name: ASIDE_MENU_REPO.CHATBOTCLICK });
13700
13655
  window.open(url);
13701
13656
  }
@@ -16891,13 +16846,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
16891
16846
  var _a;
16892
16847
  const layoutConfig2 = useLayoutConfig();
16893
16848
  const { t: $t } = i18n.global;
16894
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-0h-E2Xyw.js"));
16895
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-CN1FYLG4.js"));
16896
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-Cx9qvOxl.js"));
16897
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-BVFKOsxU.js"));
16898
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-BuDBeSIj.js"));
16899
- const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-B_Ws7leV.js"));
16900
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-CyVy-8P7.js"));
16849
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-B7pxc4qP.js"));
16850
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-D4cQjX3p.js"));
16851
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-BqWjxPvE.js"));
16852
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-CybBEjmV.js"));
16853
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-Bg1x_3XP.js"));
16854
+ const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-BulAtSfT.js"));
16855
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-RE5DrekR.js"));
16901
16856
  const props = __props;
16902
16857
  const repoInfo = inject("repoInfo");
16903
16858
  const orgInfo = inject("orgInfo");
@@ -17135,7 +17090,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
17135
17090
  } else {
17136
17091
  hotUrl = `${hotUrl}?source_module=search_box_hot_word`;
17137
17092
  }
17138
- window.open(transformUrl$1(hotUrl), "_blank");
17093
+ window.open(transformUrl(hotUrl), "_blank");
17139
17094
  return;
17140
17095
  }
17141
17096
  isSearchHistory.value = false;
@@ -17551,7 +17506,7 @@ const autoAvokeLogin = ({ isLogin, loginFunc, openHarmonyGuide, loginSuccess, lo
17551
17506
  loginFunc({ type: "login", triggerType: "", loginTriggerSource: "router_login_auth", ...loginFuncOpts }, loginSuccess, openHarmonyGuide);
17552
17507
  }
17553
17508
  };
17554
- const NoticeModal = defineAsyncComponent(() => import("./notice-ms9rOVkp.js"));
17509
+ const NoticeModal = defineAsyncComponent(() => import("./notice-BXL1Z7zj.js"));
17555
17510
  function clearNotice() {
17556
17511
  if (localStorage$2.getItem("validator_email")) {
17557
17512
  localStorage$2.removeItem("validator_email");
@@ -18179,11 +18134,11 @@ const useConfigSide = (request, sceneValue) => {
18179
18134
  let asideList = (((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || []).map((item) => {
18180
18135
  return {
18181
18136
  ...item,
18182
- left_menu_url: transformUrl$1(item.left_menu_url),
18183
- left_menu_logo: transformUrl$1(item.left_menu_logo),
18184
- left_menu_logo_black: transformUrl$1(item.left_menu_logo_black),
18185
- left_menu_logo_hover: transformUrl$1(item.left_menu_logo_hover),
18186
- left_menu_logo_hover_black: transformUrl$1(item.left_menu_logo_hover_black)
18137
+ left_menu_url: transformUrl(item.left_menu_url),
18138
+ left_menu_logo: transformUrl(item.left_menu_logo),
18139
+ left_menu_logo_black: transformUrl(item.left_menu_logo_black),
18140
+ left_menu_logo_hover: transformUrl(item.left_menu_logo_hover),
18141
+ left_menu_logo_hover_black: transformUrl(item.left_menu_logo_hover_black)
18187
18142
  };
18188
18143
  });
18189
18144
  if (typeof window !== "undefined" && GUI_YANG_GITCODE_HOST && ((_b = window.location) == null ? void 0 : _b.origin.includes(GUI_YANG_GITCODE_HOST))) {
@@ -18258,8 +18213,8 @@ const loadUserProjectsInvolved = async (requestFn, params = {}) => {
18258
18213
  var _a;
18259
18214
  return {
18260
18215
  key: item.name,
18261
- web_url: transformUrl$1(item.web_url),
18262
- avatar: transformUrl$1(item.avatar),
18216
+ web_url: transformUrl(item.web_url),
18217
+ avatar: transformUrl(item.avatar),
18263
18218
  id: item.id,
18264
18219
  label: item.name,
18265
18220
  namespace: (_a = item.namespace_info) == null ? void 0 : _a.name
@@ -18310,9 +18265,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18310
18265
  const layoutConfig2 = useLayoutConfig();
18311
18266
  const { t: t2 } = i18n.global;
18312
18267
  const route = useRoute();
18313
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-DWAedLFZ.js"));
18314
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-CnpuQMHB.js"));
18315
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-CBP3abqc.js"));
18268
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem-DXirKqa1.js"));
18269
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-DiBj1Iy8.js"));
18270
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-DvkoGbdP.js"));
18316
18271
  const props = __props;
18317
18272
  console.log("slotKeys", props.slotKeys);
18318
18273
  console.log("props", props);
@@ -18695,7 +18650,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
18695
18650
  {
18696
18651
  name: t2("gitCodeLayout.home.feedbackCenter"),
18697
18652
  icon: "gt-line-Checks",
18698
- url: transformUrl$1(FEEDBACK_CENTER_URL),
18653
+ url: transformUrl(FEEDBACK_CENTER_URL),
18699
18654
  target: "_self"
18700
18655
  }
18701
18656
  ];
@@ -20322,7 +20277,7 @@ async function successResolve(params, API, isRegister = false) {
20322
20277
  const { path, userInfo, type, loginMethod } = params;
20323
20278
  const transformUserInfo = {
20324
20279
  ...userInfo,
20325
- avatar: transformUrl$1(userInfo == null ? void 0 : userInfo.avatar)
20280
+ avatar: transformUrl(userInfo == null ? void 0 : userInfo.avatar)
20326
20281
  };
20327
20282
  if (userInfo) {
20328
20283
  emitEvent("updateUserInfo", transformUserInfo);
@@ -24024,7 +23979,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
24024
23979
  }
24025
23980
  });
24026
23981
  const MFA = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-vue-layout-gitcode"]]);
24027
- const SlidCaptcha = defineAsyncComponent(() => import("./index-tyjZoIhY.js"));
23982
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-MXMcsrP8.js"));
24028
23983
  const useSlidCaptcha = () => {
24029
23984
  const { mount, unMount } = usePopup("slid-captcha-popup");
24030
23985
  const open = (config) => {
@@ -24043,7 +23998,7 @@ const useSlidCaptcha = () => {
24043
23998
  close: unMount
24044
23999
  };
24045
24000
  };
24046
- const YunpianCaptcha = defineAsyncComponent(() => import("./index-CIxicDlx.js"));
24001
+ const YunpianCaptcha = defineAsyncComponent(() => import("./index-CdUPr9DX.js"));
24047
24002
  const useYunpianCaptcha = () => {
24048
24003
  const { mount, unMount } = usePopup("yunpian-captcha-popup");
24049
24004
  const open = (config) => {
@@ -26058,25 +26013,24 @@ export {
26058
26013
  LANG_EN as A,
26059
26014
  emitEvent as B,
26060
26015
  isHttps as C,
26061
- transformUrl as D,
26016
+ _sfc_main$z as D,
26062
26017
  EVENT_NAME as E,
26063
- _sfc_main$z as F,
26018
+ loadAsideData as F,
26064
26019
  GIcon as G,
26065
- loadAsideData as H,
26066
- asideRequest as I,
26067
- ToolsFloat as J,
26068
- _sfc_main as K,
26020
+ asideRequest as H,
26021
+ ToolsFloat as I,
26022
+ _sfc_main as J,
26023
+ GitCodeAside as K,
26069
26024
  LANG_KEY as L,
26070
- GitCodeAside as M,
26071
- GitCodeHeader as N,
26072
- useLogin as O,
26073
- setLayoutConfig as P,
26074
- GitCodeLayoutEmitter as Q,
26025
+ GitCodeHeader as M,
26026
+ useLogin as N,
26027
+ setLayoutConfig as O,
26028
+ GitCodeLayoutEmitter as P,
26029
+ setTheme as Q,
26075
26030
  REPO_MODULE as R,
26076
26031
  SceneValue as S,
26077
26032
  TOPIC_TYPE as T,
26078
- setTheme as U,
26079
- index as V,
26033
+ index as U,
26080
26034
  _export_sfc as _,
26081
26035
  i18n as a,
26082
26036
  REPO_EVENT as b,
@@ -26097,7 +26051,7 @@ export {
26097
26051
  _frEventTrack as q,
26098
26052
  reqCatch as r,
26099
26053
  setLoginTriggerSource as s,
26100
- transformUrl$1 as t,
26054
+ transformUrl as t,
26101
26055
  useModel as u,
26102
26056
  vElementExposure as v,
26103
26057
  getLocaleLang as w,
package/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { M, N, Q, K, S, J, z, V, P, U, O } from "./index-D9tjG0gc.js";
1
+ import { K, M, P, J, S, I, z, U, O, Q, N } from "./index-q-9Kzz6q.js";
2
2
  export {
3
- M as GitCodeAside,
4
- N as GitCodeHeader,
5
- Q as GitCodeLayoutEmitter,
6
- K as Login,
3
+ K as GitCodeAside,
4
+ M as GitCodeHeader,
5
+ P as GitCodeLayoutEmitter,
6
+ J as Login,
7
7
  S as SceneValue,
8
- J as ToolsFloat,
8
+ I as ToolsFloat,
9
9
  z as currentTheme,
10
- V as default,
11
- P as setLayoutConfig,
12
- U as setTheme,
13
- O as useLogin
10
+ U as default,
11
+ O as setLayoutConfig,
12
+ Q as setTheme,
13
+ N as useLogin
14
14
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, createBlock, openBlock, unref, isRef, withCtx, createElementVNode, normalizeClass, createVNode, createTextVNode } from "vue";
2
- import { i as isPhone, u as useModel } from "./index-D9tjG0gc.js";
2
+ import { i as isPhone, u as useModel } from "./index-q-9Kzz6q.js";
3
3
  import { Notification } from "vue-devui-lal/notification";
4
4
  import { Button } from "vue-devui-lal/button";
5
5
  import "vue-devui-lal/notification/style.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-layout-gitcode",
3
- "version": "1.8.12",
3
+ "version": "1.8.14",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
@@ -1,4 +1,4 @@
1
- import { x as useLayoutConfig } from "./index-D9tjG0gc.js";
1
+ import { x as useLayoutConfig } from "./index-q-9Kzz6q.js";
2
2
  const layoutConfig = useLayoutConfig();
3
3
  const transWebUrl = (url, params) => {
4
4
  if (!url) return url;