vue-layout-gitcode 1.12.1 → 1.12.3

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,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-BRzNHTp7.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-d-HOTCVi.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-BRzNHTp7.js";
4
- import { t as transWebUrl } from "./transWebUrl-QZzke_Ax.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-d-HOTCVi.js";
4
+ import { t as transWebUrl } from "./transWebUrl-Bul3pIEs.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, nextTick, onUnmounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
2
- import { x as slidCaptchaManager, y as useLayoutConfig, z as isZh, _ as _export_sfc } from "./index-BRzNHTp7.js";
2
+ import { x as slidCaptchaManager, y as useLayoutConfig, z as isZh, _ as _export_sfc } from "./index-d-HOTCVi.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:";
@@ -10498,10 +10498,13 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
10498
10498
  const FIRST_NAMESPACE_KEY = "parent_org_path";
10499
10499
  const useBreadcrumb = () => {
10500
10500
  const router2 = useRouter();
10501
+ if (!router2) {
10502
+ return [];
10503
+ }
10501
10504
  const repoInfo = inject("repoInfo");
10502
10505
  const breadcrumb = computed(() => {
10503
10506
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
10504
- const isSubOrg = !!((_b = (_a = router2.currentRoute) == null ? void 0 : _a.value) == null ? void 0 : _b.params[FIRST_NAMESPACE_KEY]);
10507
+ const isSubOrg = !!((_b = (_a = router2 == null ? void 0 : router2.currentRoute) == null ? void 0 : _a.value) == null ? void 0 : _b.params[FIRST_NAMESPACE_KEY]);
10505
10508
  const full_name = ((_d = (_c = repoInfo.value) == null ? void 0 : _c.namespace) == null ? void 0 : _d.full_name) || "";
10506
10509
  const name = ((_f = (_e = repoInfo.value) == null ? void 0 : _e.namespace) == null ? void 0 : _f.name) || "";
10507
10510
  const orgName = isSubOrg ? full_name : name;
@@ -15368,7 +15371,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
15368
15371
  const baseRouterMenus = [
15369
15372
  [
15370
15373
  { id: "dashboard", label: t2("gitCodeLayout.header.workbench"), icon: "gt-plane-user", to: getRouterLink("dashboard") },
15371
- { id: "myEnterprise", label: t2("gitCodeLayout.header.myEnterprise"), icon: "gt-plane-home", to: getRouterLink({ path: "/setting/enterprise" }) },
15374
+ { id: "myEnterprise", label: t2("gitCodeLayout.header.myEnterprise"), icon: "gt-a-plane-enterprise", to: getRouterLink({ path: "/setting/enterprise" }) },
15372
15375
  { id: "myOrg", label: t2("gitCodeLayout.header.myOrg"), icon: "gt-plane-organization", to: getRouterLink({ name: "settingOrganization" }) },
15373
15376
  { id: "myRepo", label: t2("gitCodeLayout.header.myRepo"), icon: "gt-plane-projectHome1", to: getRouterLink("settingRepo") },
15374
15377
  { id: "myNotebook", label: t2("gitCodeLayout.header.myNotebook"), icon: "gt-plane-Notebook", to: getRouterLink("myNotebook") },
@@ -15394,7 +15397,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
15394
15397
  const baseHrefMenus = [
15395
15398
  [
15396
15399
  { id: "dashboard", label: t2("gitCodeLayout.header.workbench"), icon: "gt-plane-user", link: "/dashboard" },
15397
- { id: "myEnterprise", label: t2("gitCodeLayout.header.myEnterprise"), icon: "gt-plane-home", link: "/setting/enterprise" },
15400
+ { id: "myEnterprise", label: t2("gitCodeLayout.header.myEnterprise"), icon: "gt-a-plane-enterprise", link: "/setting/enterprise" },
15398
15401
  { id: "myOrg", label: t2("gitCodeLayout.header.myOrg"), icon: "gt-plane-organization", link: "/setting/organization" },
15399
15402
  { id: "myRepo", label: t2("gitCodeLayout.header.myRepo"), icon: "gt-plane-projectHome1", link: "/setting/repo" },
15400
15403
  { id: "myNotebook", label: t2("gitCodeLayout.header.myNotebook"), icon: "gt-plane-Notebook", show: props.inAIHub, link: `/user/${userInfo.value.username}/notebook` },
@@ -15902,13 +15905,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
15902
15905
  var _a;
15903
15906
  const layoutConfig2 = useLayoutConfig();
15904
15907
  const { t: $t } = i18n.global;
15905
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-Diui-91X.js"));
15906
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-CyKwfLTG.js"));
15907
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-DqrjYdlG.js"));
15908
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-D5oCUL8b.js"));
15909
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-CZ4Ccaa5.js"));
15910
- const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-CexUln9-.js"));
15911
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-BwukBjib.js"));
15908
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-C3VRHqn1.js"));
15909
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-Ct2p6Gsf.js"));
15910
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-C0oef2sK.js"));
15911
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-CMZZEVwY.js"));
15912
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-TqCg7-QS.js"));
15913
+ const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-t6Wt7l9P.js"));
15914
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed--qvPLBSI.js"));
15912
15915
  const props = __props;
15913
15916
  const repoInfo = inject("repoInfo");
15914
15917
  const orgInfo = inject("orgInfo");
@@ -16682,7 +16685,7 @@ const autoAvokeLogin = ({ isLogin, loginFunc, openHarmonyGuide, loginSuccess, lo
16682
16685
  loginFunc({ type: "login", triggerType: "", loginTriggerSource: "router_login_auth", ...loginFuncOpts }, loginSuccess, openHarmonyGuide);
16683
16686
  }
16684
16687
  };
16685
- const NoticeModal = defineAsyncComponent(() => import("./notice-CAgKcC_z.js"));
16688
+ const NoticeModal = defineAsyncComponent(() => import("./notice-CW8DSMlC.js"));
16686
16689
  function clearNotice() {
16687
16690
  if (localStorage$2.getItem("validator_email")) {
16688
16691
  localStorage$2.removeItem("validator_email");
@@ -17612,11 +17615,6 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17612
17615
  _: 1
17613
17616
  })) : createCommentVNode("", true),
17614
17617
  isModuleVisible(unref(HeaderDisplayItem).MESSAGE_CENTER) ? (openBlock(), createBlock(Notice, { key: 1 })) : createCommentVNode("", true),
17615
- createVNode(GIcon, {
17616
- name: "gt-line-help",
17617
- size: "16px",
17618
- class: "cursor-pointer"
17619
- }),
17620
17618
  createVNode(GIcon, {
17621
17619
  name: unref(isWhiteTheme)() ? "gt-line-light" : "gt-line-dark",
17622
17620
  size: "16px",
@@ -17875,9 +17873,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
17875
17873
  const layoutConfig2 = useLayoutConfig();
17876
17874
  const { t: t2 } = i18n.global;
17877
17875
  const route = useRoute();
17878
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-Dpvb3h9q.js"));
17879
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-CVT12nBP.js"));
17880
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-BpIxQn_l.js"));
17876
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem--pyrkebp.js"));
17877
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-CFTcLZq4.js"));
17878
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-Cy6zBzW5.js"));
17881
17879
  const props = __props;
17882
17880
  const useReport2 = inject("useReport");
17883
17881
  const userInfo = inject("userInfo");
@@ -17931,7 +17929,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
17931
17929
  };
17932
17930
  });
17933
17931
  const getMenuItemProps = (item) => {
17934
- const currentPath = route.path;
17932
+ const currentPath = route ? route.path : "";
17935
17933
  const isActive = isHttps(item.left_menu_url) || item.is_open_new_tab ? item.left_menu_url === window.location.href : item.left_menu_url === currentPath;
17936
17934
  return {
17937
17935
  active: isActive
@@ -18461,6 +18459,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
18461
18459
  setup(__props) {
18462
18460
  const layoutConfig2 = useLayoutConfig();
18463
18461
  const userInfo = inject("userInfo");
18462
+ const globalStore = inject("globalStore");
18464
18463
  const route = useRoute();
18465
18464
  const serverList = ref([]);
18466
18465
  const request = inject("request");
@@ -18531,6 +18530,11 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
18531
18530
  };
18532
18531
  const getAreaItem = (item) => {
18533
18532
  return item.filter((item2) => {
18533
+ if (item2.left_menu_url === "/download-history") {
18534
+ if (!globalStore.value.downloadHistoryVisible) {
18535
+ return false;
18536
+ }
18537
+ }
18534
18538
  if (item2.select_scene && item2.select_scene.length && !item2.select_scene.includes(props.sceneValue)) {
18535
18539
  return false;
18536
18540
  }
@@ -24315,7 +24319,7 @@ const _SlidCaptchaManager = class _SlidCaptchaManager {
24315
24319
  __publicField(_SlidCaptchaManager, "instance");
24316
24320
  let SlidCaptchaManager = _SlidCaptchaManager;
24317
24321
  const slidCaptchaManager = SlidCaptchaManager.getInstance();
24318
- const SlidCaptcha = defineAsyncComponent(() => import("./index-BZqT0rn_.js"));
24322
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-CIV5vXgN.js"));
24319
24323
  const useSlidCaptcha = () => {
24320
24324
  const { mount, unMount, isMounted } = usePopup("slid-captcha-popup");
24321
24325
  const open = (config) => {
@@ -24345,7 +24349,7 @@ const useSlidCaptcha = () => {
24345
24349
  close
24346
24350
  };
24347
24351
  };
24348
- const YunpianCaptcha = defineAsyncComponent(() => import("./index-CHCqIZqF.js"));
24352
+ const YunpianCaptcha = defineAsyncComponent(() => import("./index-ltqVr-ed.js"));
24349
24353
  const useYunpianCaptcha = () => {
24350
24354
  const { mount, unMount } = usePopup("yunpian-captcha-popup");
24351
24355
  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, z as isZh, _ as _export_sfc } from "./index-BRzNHTp7.js";
11
+ import { a as i18n, k as usePageResize, z as isZh, _ as _export_sfc } from "./index-d-HOTCVi.js";
12
12
  const _YunpianCaptchaManager = class _YunpianCaptchaManager {
13
13
  // eslint-disable-next-line no-useless-constructor
14
14
  constructor() {
@@ -1,4 +1,4 @@
1
- import { Q, O, P, X, N, S, U, M, B, Z, W, Y, V } from "./index-BRzNHTp7.js";
1
+ import { Q, O, P, X, N, S, U, M, B, Z, W, Y, V } from "./index-d-HOTCVi.js";
2
2
  export {
3
3
  Q as EnterpriseHeader,
4
4
  O as GitCodeAside,
@@ -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-BRzNHTp7.js";
2
+ import { i as isPhone, u as useModel } from "./index-d-HOTCVi.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";
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "vue-layout-gitcode",
3
+ "version": "1.12.3",
4
+ "description": "用于 gitcode 站点生产环境使用",
5
+ "main": "index.js",
6
+ "types": "./index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "站内导航侧边栏"
10
+ },
11
+ "author": "lal,nevins",
12
+ "license": "ISC"
13
+ }