vue-layout-gitcode 1.9.45 → 1.9.47

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-BZmAaJ1c.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-BxBd15zi.js";
5
5
  import "lodash/debounce";
6
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-DzmAgcHc.js";
7
- import "./transWebUrl-BTvjwuMw.js";
6
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-BLjT9vV4.js";
7
+ import "./transWebUrl-Cen6nQhl.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 { a as i18n, y as useLayoutConfig, z as ThemeType, A as currentTheme, L as LANG_ZH, B as LANG_EN, x as getLocaleLang, G as GIcon, C as emitEvent, D as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-BZmAaJ1c.js";
2
+ import { a as i18n, y as useLayoutConfig, z as ThemeType, A as currentTheme, L as LANG_ZH, B as LANG_EN, x as getLocaleLang, G as GIcon, C as emitEvent, D as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-BxBd15zi.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, y as useLayoutConfig, G as GIcon, t as transformUrl, F as _sfc_main$1, H as loadAsideData, C as emitEvent, s as setLoginTriggerSource, f as useRequestReport, I as asideRequest, _ as _export_sfc } from "./index-BZmAaJ1c.js";
2
+ import { a as i18n, y as useLayoutConfig, G as GIcon, t as transformUrl, F as _sfc_main$1, H as loadAsideData, C as emitEvent, s as setLoginTriggerSource, f as useRequestReport, I as asideRequest, _ as _export_sfc } from "./index-BxBd15zi.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-BTvjwuMw.js";
4
+ import { t as transWebUrl } from "./transWebUrl-Cen6nQhl.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, y as useLayoutConfig, G as GIcon, C as emitEvent, s as setLoginTriggerSource, f as useRequestReport, t as transformUrl, _ as _export_sfc } from "./index-BZmAaJ1c.js";
2
+ import { a as i18n, y as useLayoutConfig, G as GIcon, C as emitEvent, s as setLoginTriggerSource, f as useRequestReport, t as transformUrl, _ as _export_sfc } from "./index-BxBd15zi.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-BTvjwuMw.js";
4
+ import { t as transWebUrl } from "./transWebUrl-Cen6nQhl.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-BZmAaJ1c.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-BxBd15zi.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-BZmAaJ1c.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-BxBd15zi.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-BZmAaJ1c.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-BxBd15zi.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-DzmAgcHc.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-BZmAaJ1c.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-BLjT9vV4.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-BxBd15zi.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-BZmAaJ1c.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-BxBd15zi.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-BZmAaJ1c.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-BxBd15zi.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]" };
@@ -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, j as useCookie, k as usePageResize, L as LANG_ZH, 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, w as LANG_KEY } from "./index-BZmAaJ1c.js";
4
- import { t as transWebUrl } from "./transWebUrl-BTvjwuMw.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, j as useCookie, k as usePageResize, L as LANG_ZH, 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, w as LANG_KEY } from "./index-BxBd15zi.js";
4
+ import { t as transWebUrl } from "./transWebUrl-Cen6nQhl.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";
@@ -8255,11 +8255,12 @@ const LANGUAGE = [
8255
8255
  ];
8256
8256
  const LANG_KEY = "gitcode_lang";
8257
8257
  const COOKIE_DOMAIN = () => {
8258
- if (window.location.hostname.includes("atomgit.com")) {
8258
+ if (typeof window !== "undefined" && window.location.hostname.includes("atomgit.com")) {
8259
8259
  return ".atomgit.com";
8260
- } else {
8260
+ } else if (typeof window !== "undefined" && window.location.hostname.includes("gitcode.com")) {
8261
8261
  return ".gitcode.com";
8262
8262
  }
8263
+ return ".gitcode.com";
8263
8264
  };
8264
8265
  const COOKIE_OPTIONS = {
8265
8266
  expires: 365,
@@ -11927,7 +11928,7 @@ const collectRegisterLoginEvent = ({ isRegister, registerLoginMethod, success, e
11927
11928
  article_id: searchParams["from_id"] || "",
11928
11929
  userid_fast_application: searchParams["uuid_tt_dd"] || "",
11929
11930
  gitcode_utm_source: searchParams["utm_source"] || "",
11930
- page_url: location.href || "",
11931
+ page_url: (location == null ? void 0 : location.href) || "",
11931
11932
  env: layoutConfig$3.VITE_ENV,
11932
11933
  namespace: extraData.namespace || "",
11933
11934
  ...extraData,
@@ -13920,13 +13921,14 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
13920
13921
  };
13921
13922
  });
13922
13923
  function goPage() {
13924
+ var _a, _b, _c;
13923
13925
  let url = "";
13924
13926
  if (!tianqiButtonConfig.value.url) {
13925
- url = transformUrlWithSpecialPrefix({ url: layoutConfig2.VITE_HOST_TIANQI, host: window.location.host }) + "?utm_source=toolbar";
13927
+ url = transformUrlWithSpecialPrefix({ url: layoutConfig2.VITE_HOST_TIANQI, host: (_a = window == null ? void 0 : window.location) == null ? void 0 : _a.host }) + "?utm_source=toolbar";
13926
13928
  } else {
13927
13929
  url = transformUrl(tianqiButtonConfig.value.url) + "?utm_source=toolbar";
13928
13930
  }
13929
- const isGitcodeHost = window.location.host.includes("gitcode");
13931
+ const isGitcodeHost = (_c = (_b = window == null ? void 0 : window.location) == null ? void 0 : _b.host) == null ? void 0 : _c.includes("gitcode");
13930
13932
  if (url.includes("tianqi.pre.")) {
13931
13933
  url = isGitcodeHost ? "https://pre-tianqi.gitcode.com" : "https://pre-tianqi.atomgit.com";
13932
13934
  } else if (url.includes("tianqi.test.")) {
@@ -16660,7 +16662,14 @@ const _hoisted_3$i = ["title"];
16660
16662
  const _hoisted_4$d = ["title"];
16661
16663
  const _sfc_main$r = /* @__PURE__ */ defineComponent({
16662
16664
  __name: "UserAvatarMenu",
16663
- props: ["isChatBot", "accountInfo", "loginOutFinish", "inAIHub", "independence", "userMenus"],
16665
+ props: {
16666
+ isChatBot: { type: Boolean },
16667
+ accountInfo: {},
16668
+ loginOutFinish: { type: Function },
16669
+ inAIHub: { type: Boolean },
16670
+ independence: { type: Boolean },
16671
+ userMenus: {}
16672
+ },
16664
16673
  emits: ["link-click"],
16665
16674
  setup(__props, { emit: __emit }) {
16666
16675
  const layoutConfig2 = useLayoutConfig();
@@ -16682,7 +16691,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
16682
16691
  }
16683
16692
  localStorage$2.removeItem(HARMONY_SURVEY_DELAY);
16684
16693
  };
16685
- const logout = async () => {
16694
+ const handleLogout = async () => {
16686
16695
  var _a, _b;
16687
16696
  const res = await API.toLogout();
16688
16697
  clearSurveyDelayStatus();
@@ -16720,13 +16729,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
16720
16729
  ...params
16721
16730
  };
16722
16731
  };
16723
- const blockList = computed(() => {
16724
- if (props.independence) {
16725
- return hrefList.value;
16726
- }
16727
- return routerHref.value;
16728
- });
16729
- const menueDataFormat = (data) => {
16732
+ const menuDataFormat = (data) => {
16730
16733
  data.forEach((item) => {
16731
16734
  if (Array.isArray(item)) {
16732
16735
  item.forEach((item2) => {
@@ -16738,13 +16741,13 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
16738
16741
  });
16739
16742
  return data;
16740
16743
  };
16741
- const userMenusFormat = computed(() => {
16744
+ const userCustomMenus = computed(() => {
16742
16745
  if (props.userMenus) {
16743
- return menueDataFormat(props.userMenus);
16746
+ return menuDataFormat(props.userMenus);
16744
16747
  }
16745
16748
  return [];
16746
16749
  });
16747
- const baseRouterMeus = [
16750
+ const baseRouterMenus = [
16748
16751
  [
16749
16752
  { id: "dashboard", label: t2("gitCodeLayout.header.workbench"), icon: "gt-plane-user", to: getRouterLink("dashboard") },
16750
16753
  { id: "myOrg", label: t2("gitCodeLayout.header.myOrg"), icon: "gt-plane-organization", to: getRouterLink({ name: "settingOrganization" }) },
@@ -16759,16 +16762,16 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
16759
16762
  { id: "help", label: t2("gitCodeLayout.header.helpDocument"), icon: "gt-plane-project-opened", href: currentHelpDocsUrl() }
16760
16763
  ]
16761
16764
  ];
16762
- const routerHref = computed(() => {
16765
+ const routerMenuList = computed(() => {
16763
16766
  var _a;
16764
16767
  return [
16765
- ...((_a = userMenusFormat.value) == null ? void 0 : _a.length) ? userMenusFormat.value : baseRouterMeus,
16768
+ ...((_a = userCustomMenus.value) == null ? void 0 : _a.length) ? userCustomMenus.value : baseRouterMenus,
16766
16769
  [
16767
- { id: "logout", label: t2("gitCodeLayout.header.logout"), icon: "gt-default", action: logout }
16770
+ { id: "logout", label: t2("gitCodeLayout.header.logout"), icon: "gt-default", action: handleLogout }
16768
16771
  ]
16769
16772
  ];
16770
16773
  });
16771
- const baseHrefMeus = [
16774
+ const baseHrefMenus = [
16772
16775
  [
16773
16776
  { id: "dashboard", label: t2("gitCodeLayout.header.workbench"), icon: "gt-plane-user", link: "/dashboard" },
16774
16777
  { id: "myOrg", label: t2("gitCodeLayout.header.myOrg"), icon: "gt-plane-organization", link: "/setting/organization" },
@@ -16786,25 +16789,28 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
16786
16789
  const hrefList = computed(() => {
16787
16790
  var _a;
16788
16791
  return [
16789
- ...((_a = userMenusFormat.value) == null ? void 0 : _a.length) ? userMenusFormat.value : baseHrefMeus,
16792
+ ...((_a = userCustomMenus.value) == null ? void 0 : _a.length) ? userCustomMenus.value : baseHrefMenus,
16790
16793
  [
16791
- { id: "logout", label: t2("gitCodeLayout.header.logout"), icon: "gt-default", action: logout }
16794
+ { id: "logout", label: t2("gitCodeLayout.header.logout"), icon: "gt-default", action: handleLogout }
16792
16795
  ]
16793
16796
  ];
16794
16797
  });
16798
+ const userMenuList = computed(() => {
16799
+ if (props.independence) {
16800
+ return hrefList.value;
16801
+ }
16802
+ return routerMenuList.value;
16803
+ });
16795
16804
  function handleClick(item) {
16796
16805
  if (item == null ? void 0 : item.action) {
16797
16806
  item.action();
16798
16807
  }
16799
16808
  if (item == null ? void 0 : item.link) {
16800
- let link = "";
16801
- if (item == null ? void 0 : item.link.startsWith("/setting")) {
16802
- link = `${layoutConfig2.VITE_HOST}${item.link}`;
16803
- } else {
16804
- link = `${transformUrl(layoutConfig2.VITE_HOST)}${item.link}`;
16805
- }
16809
+ const link = `${layoutConfig2.VITE_HOST}${item.link}`;
16806
16810
  emit("link-click");
16807
- window.open(link, "_self");
16811
+ setTimeout(() => {
16812
+ window.open(link, "_self");
16813
+ }, 100);
16808
16814
  }
16809
16815
  }
16810
16816
  const handleLinkClick = (e) => {
@@ -16847,14 +16853,14 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
16847
16853
  }, [
16848
16854
  createVNode(GLink, {
16849
16855
  class: "g-user-drawer-info pl-[32px] pr-[16px] cursor-pointer",
16850
- href: `${unref(transformUrl)(unref(layoutConfig2).VITE_HOST)}/${__props.accountInfo.username}`,
16856
+ href: `${unref(layoutConfig2).VITE_HOST}/${_ctx.accountInfo.username}`,
16851
16857
  key: "myPage",
16852
- target: __props.isChatBot ? "_blank" : ""
16858
+ target: _ctx.isChatBot ? "_blank" : ""
16853
16859
  }, {
16854
16860
  default: withCtx(() => [
16855
16861
  createVNode(_sfc_main$B, {
16856
- name: __props.accountInfo.nickname,
16857
- src: __props.accountInfo.avatar,
16862
+ name: _ctx.accountInfo.nickname,
16863
+ src: _ctx.accountInfo.avatar,
16858
16864
  width: 52,
16859
16865
  height: 52
16860
16866
  }, null, 8, ["name", "src"]),
@@ -16862,12 +16868,12 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
16862
16868
  createElementVNode("div", _hoisted_2$j, [
16863
16869
  createElementVNode("p", {
16864
16870
  class: "g-user-drawer-info-list-name ellipsis",
16865
- title: __props.accountInfo.nickname
16866
- }, toDisplayString$1(__props.accountInfo.nickname), 9, _hoisted_3$i),
16871
+ title: _ctx.accountInfo.nickname
16872
+ }, toDisplayString$1(_ctx.accountInfo.nickname), 9, _hoisted_3$i),
16867
16873
  createElementVNode("p", {
16868
16874
  class: "g-user-drawer-info-list-id ellipsis",
16869
- title: __props.accountInfo.username
16870
- }, "@" + toDisplayString$1(__props.accountInfo.username), 9, _hoisted_4$d)
16875
+ title: _ctx.accountInfo.username
16876
+ }, "@" + toDisplayString$1(_ctx.accountInfo.username), 9, _hoisted_4$d)
16871
16877
  ]),
16872
16878
  createVNode(GIcon, {
16873
16879
  name: "gt-line-right",
@@ -16877,13 +16883,13 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
16877
16883
  ]),
16878
16884
  _: 1
16879
16885
  }, 8, ["href", "target"]),
16880
- !__props.inAIHub ? (openBlock(), createBlock(UserLevel, {
16886
+ !_ctx.inAIHub ? (openBlock(), createBlock(UserLevel, {
16881
16887
  key: 0,
16882
- accountInfo: __props.accountInfo
16888
+ accountInfo: _ctx.accountInfo
16883
16889
  }, null, 8, ["accountInfo"])) : createCommentVNode("", true),
16884
- (openBlock(true), createElementBlock(Fragment, null, renderList(blockList.value, (block, index2) => {
16890
+ (openBlock(true), createElementBlock(Fragment, null, renderList(userMenuList.value, (block, index2) => {
16885
16891
  return openBlock(), createElementBlock("div", {
16886
- class: normalizeClass(["g-user-drawer-block", { "!pt-[0px]": index2 === 0 && __props.inAIHub }]),
16892
+ class: normalizeClass(["g-user-drawer-block", { "!pt-[0px]": index2 === 0 && _ctx.inAIHub }]),
16887
16893
  key: index2
16888
16894
  }, [
16889
16895
  block.component ? (openBlock(), createBlock(resolveDynamicComponent(block.component), {
@@ -16894,7 +16900,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
16894
16900
  ref_for: true
16895
16901
  }, item, {
16896
16902
  onClick: ($event) => handleClick(item),
16897
- target: __props.isChatBot && !item.action ? "_blank" : item.target || ""
16903
+ target: _ctx.isChatBot && !item.action ? "_blank" : item.target || ""
16898
16904
  }), {
16899
16905
  default: withCtx(() => [
16900
16906
  item.icon ? (openBlock(), createBlock(GIcon, {
@@ -17224,13 +17230,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
17224
17230
  var _a;
17225
17231
  const layoutConfig2 = useLayoutConfig();
17226
17232
  const { t: $t } = i18n.global;
17227
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-CP2nYMLo.js"));
17228
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-_-mJXF9G.js"));
17229
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-B6c7pHC9.js"));
17230
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-C_ZzvPUY.js"));
17231
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-DK9SZS_B.js"));
17232
- const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-DZPuf9sI.js"));
17233
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-B5N0pZG7.js"));
17233
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-CPrAtvdj.js"));
17234
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-Cqvdq6Bf.js"));
17235
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-Bn7u2y5G.js"));
17236
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-D6kAI-4I.js"));
17237
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-BPCrZxlr.js"));
17238
+ const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-CQL-BQSX.js"));
17239
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-BpRdV8Kz.js"));
17234
17240
  const props = __props;
17235
17241
  const repoInfo = inject("repoInfo");
17236
17242
  const orgInfo = inject("orgInfo");
@@ -17899,7 +17905,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
17899
17905
  }
17900
17906
  };
17901
17907
  const migrationAnnounceUrl = computed(() => {
17902
- return window.location.hostname.includes("gitcode") ? "https://gitcode.com/gitcode" : "https://atomgit.com/gitcode";
17908
+ var _a, _b;
17909
+ return ((_b = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a.hostname) == null ? void 0 : _b.includes("gitcode")) ? "https://gitcode.com/gitcode" : "https://atomgit.com/gitcode";
17903
17910
  });
17904
17911
  const initShowStatus = () => {
17905
17912
  if (!SITE_STATUS.DISABLE) {
@@ -17962,7 +17969,7 @@ const autoAvokeLogin = ({ isLogin, loginFunc, openHarmonyGuide, loginSuccess, lo
17962
17969
  loginFunc({ type: "login", triggerType: "", loginTriggerSource: "router_login_auth", ...loginFuncOpts }, loginSuccess, openHarmonyGuide);
17963
17970
  }
17964
17971
  };
17965
- const NoticeModal = defineAsyncComponent(() => import("./notice-CH5blAsv.js"));
17972
+ const NoticeModal = defineAsyncComponent(() => import("./notice-xJC_E9Ij.js"));
17966
17973
  function clearNotice() {
17967
17974
  if (localStorage$2.getItem("validator_email")) {
17968
17975
  localStorage$2.removeItem("validator_email");
@@ -18764,9 +18771,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18764
18771
  const layoutConfig2 = useLayoutConfig();
18765
18772
  const { t: t2 } = i18n.global;
18766
18773
  const route = useRoute();
18767
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-DfK2i5Ai.js"));
18768
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-CREgXSNp.js"));
18769
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-C2pV3UtH.js"));
18774
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem-KQ_xei4_.js"));
18775
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-BXS49UYp.js"));
18776
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-CI36z_Eh.js"));
18770
18777
  const props = __props;
18771
18778
  console.log("slotKeys", props.slotKeys);
18772
18779
  console.log("props", props);
@@ -19205,7 +19212,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
19205
19212
  const SubMenuList = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-vue-layout-gitcode"]]);
19206
19213
  const createSetting = () => {
19207
19214
  const { t: t2 } = i18n.global;
19208
- const isGitCodeHost2 = window.location.hostname.includes("gitcode");
19215
+ const isGitCodeHost2 = typeof window !== "undefined" && window.location.hostname.includes("gitcode");
19209
19216
  const settings = {
19210
19217
  slogan: t2("gitCodeLayout.home.slogon"),
19211
19218
  copyright: {
@@ -21783,7 +21790,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
21783
21790
  emits("declares", type);
21784
21791
  };
21785
21792
  const dataShareName = computed(() => {
21786
- if (window.location.host.includes("gitcode")) {
21793
+ var _a, _b;
21794
+ if ((_b = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a.host) == null ? void 0 : _b.includes("gitcode")) {
21787
21795
  return $t("gitCodeLayout.LoginModal.link.dataShare", { name: "AtomGit" });
21788
21796
  } else {
21789
21797
  return $t("gitCodeLayout.LoginModal.link.dataShare", { name: "GitCode" });
@@ -21849,7 +21857,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
21849
21857
  emits("declares", type);
21850
21858
  };
21851
21859
  const dataShareName = computed(() => {
21852
- if (window.location.host.includes("gitcode")) {
21860
+ var _a;
21861
+ if ((_a = window == null ? void 0 : window.location) == null ? void 0 : _a.host.includes("gitcode")) {
21853
21862
  return $t("gitCodeLayout.LoginModal.link.dataShare", { name: "AtomGit" });
21854
21863
  } else {
21855
21864
  return $t("gitCodeLayout.LoginModal.link.dataShare", { name: "GitCode" });
@@ -24276,7 +24285,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
24276
24285
  emits("confirm");
24277
24286
  };
24278
24287
  const dataShareName = computed(() => {
24279
- if (window.location.host.includes("gitcode")) {
24288
+ var _a;
24289
+ if ((_a = window == null ? void 0 : window.location) == null ? void 0 : _a.host.includes("gitcode")) {
24280
24290
  return $t("gitCodeLayout.LoginModal.link.dataShare", { name: "AtomGit" });
24281
24291
  } else {
24282
24292
  return $t("gitCodeLayout.LoginModal.link.dataShare", { name: "GitCode" });
@@ -24611,7 +24621,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
24611
24621
  }
24612
24622
  });
24613
24623
  const MFA = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-vue-layout-gitcode"]]);
24614
- const SlidCaptcha = defineAsyncComponent(() => import("./index-nGGonzQq.js"));
24624
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-rkabbZyH.js"));
24615
24625
  const useSlidCaptcha = () => {
24616
24626
  const { mount, unMount } = usePopup("slid-captcha-popup");
24617
24627
  const open = (config) => {
@@ -24630,7 +24640,7 @@ const useSlidCaptcha = () => {
24630
24640
  close: unMount
24631
24641
  };
24632
24642
  };
24633
- const YunpianCaptcha = defineAsyncComponent(() => import("./index-CFxrGxl3.js"));
24643
+ const YunpianCaptcha = defineAsyncComponent(() => import("./index-DbJgW3o5.js"));
24634
24644
  const useYunpianCaptcha = () => {
24635
24645
  const { mount, unMount } = usePopup("yunpian-captcha-popup");
24636
24646
  const open = (config) => {
@@ -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, x as getLocaleLang, L as LANG_ZH, _ as _export_sfc } from "./index-BZmAaJ1c.js";
11
+ import { a as i18n, k as usePageResize, x as getLocaleLang, L as LANG_ZH, _ as _export_sfc } from "./index-BxBd15zi.js";
12
12
  const _YunpianCaptchaManager = class _YunpianCaptchaManager {
13
13
  constructor() {
14
14
  __publicField(this, "ypRiddlerInstance", null);
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, onMounted, onUnmounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
2
- import { x as getLocaleLang, L as LANG_ZH, y as useLayoutConfig, _ as _export_sfc } from "./index-BZmAaJ1c.js";
2
+ import { x as getLocaleLang, L as LANG_ZH, y as useLayoutConfig, _ as _export_sfc } from "./index-BxBd15zi.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:";
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { M, N, U, K, S, O, J, A, W, Q, V, P } from "./index-BZmAaJ1c.js";
1
+ import { M, N, U, K, S, O, J, A, W, Q, V, P } from "./index-BxBd15zi.js";
2
2
  export {
3
3
  M as GitCodeAside,
4
4
  N as GitCodeHeader,
@@ -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-BZmAaJ1c.js";
2
+ import { i as isPhone, u as useModel } from "./index-BxBd15zi.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.9.45",
3
+ "version": "1.9.47",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
@@ -1,4 +1,4 @@
1
- import { y as useLayoutConfig } from "./index-BZmAaJ1c.js";
1
+ import { y as useLayoutConfig } from "./index-BxBd15zi.js";
2
2
  const layoutConfig = useLayoutConfig();
3
3
  const transWebUrl = (url, params) => {
4
4
  if (!url) return url;