vue-layout-gitcode 1.5.22 → 1.5.24

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,8 +1,8 @@
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-D34AqPB_.js";
5
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-ByCTlzyt.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-CeOhet2P.js";
5
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-65rJHwHd.js";
6
6
  import "vue-devui-lal/tooltip";
7
7
  import "vue-devui-lal/tooltip/style.css";
8
8
  import "vue-router";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, inject, ref, computed, createElementBlock, openBlock, normalizeClass, createBlock, createElementVNode, toDisplayString } from "vue";
2
- import { y as ThemeType, z as currentTheme, j as LANG_ZH, A as LANG_EN, B as getLocaleLang, G as GIcon, C as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-D34AqPB_.js";
2
+ import { y as currentTheme, z as ThemeType, j as LANG_ZH, A as LANG_EN, B as getLocaleLang, G as GIcon, C as isHttps, D as emitEvent, b as REPO_EVENT, _ as _export_sfc } from "./index-CeOhet2P.js";
3
3
  import { useRouter } from "vue-router";
4
4
  const _hoisted_1 = ["src"];
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -13,6 +13,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  active: {
14
14
  type: Boolean,
15
15
  default: false
16
+ },
17
+ isLogin: {
18
+ type: Boolean,
19
+ default: false
16
20
  }
17
21
  },
18
22
  setup(__props) {
@@ -24,6 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
28
  return props.active || isHover.value;
25
29
  });
26
30
  const currentImg = computed(() => {
31
+ console.log("currentTheme", currentTheme.value, "left_menu_logo_black", props.item.left_menu_logo_black);
27
32
  const imgMap = {
28
33
  [ThemeType.WHITE]: {
29
34
  selected: props.item.left_menu_logo_hover,
@@ -40,6 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
45
  return imgMap[currentTheme.value].unselected;
41
46
  }
42
47
  });
48
+ console.log("currentImg", currentImg.value);
43
49
  const currentName = computed(() => {
44
50
  const nameMap = {
45
51
  [LANG_EN]: props.item.left_menu_name_en,
@@ -72,6 +78,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
72
78
  } else if (isHttps(props.item.left_menu_url)) {
73
79
  window.location.href = props.item.left_menu_url;
74
80
  } else {
81
+ if (props.item.left_menu_url != "/" && !props.isLogin) {
82
+ emitEvent("login", { loginTriggerSource: `aside_${props.item.left_menu_url}` });
83
+ return;
84
+ }
75
85
  router.push({
76
86
  path: props.item.left_menu_url
77
87
  });
@@ -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-D34AqPB_.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-CeOhet2P.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-D34AqPB_.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-CeOhet2P.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-D34AqPB_.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-CeOhet2P.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, createBlock, createVNode, withCtx } from "vue";
2
- import { u as useReportRepo, S as SearchRepoCard } from "./index-ByCTlzyt.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-D34AqPB_.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-65rJHwHd.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-CeOhet2P.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-D34AqPB_.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-CeOhet2P.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 } from "./index-D34AqPB_.js";
2
+ import { a as i18n, h as headRequest, G as GIcon } from "./index-CeOhet2P.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,5 +1,5 @@
1
1
  import { ref, watchEffect, defineComponent, toDisplayString, unref, inject, createElementBlock, openBlock, normalizeClass, createElementVNode, withModifiers, withDirectives, vShow, createVNode, computed, createCommentVNode, normalizeStyle, createTextVNode, onMounted, onUnmounted, Fragment, createBlock, renderList, withCtx, reactive } from "vue";
2
- import { d as debounce, t as transferNumber, G as GIcon, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, _ as _export_sfc, 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$9, o as isIncubationRepo, p as highlightWords, q as transWebUrl, w as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-D34AqPB_.js";
2
+ import { d as debounce, t as transferNumber, G as GIcon, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, _ as _export_sfc, 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$9, o as isIncubationRepo, p as highlightWords, q as transWebUrl, w as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-CeOhet2P.js";
3
3
  import { useRouter } from "vue-router";
4
4
  import { Row, Col } from "vue-devui-lal/grid";
5
5
  import { Skeleton, SkeletonItem } from "vue-devui-lal/skeleton";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, onMounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
2
2
  import { FixedOverlay } from "vue-devui-lal/overlay";
3
- import { x as useLayoutConfig, _ as _export_sfc } from "./index-D34AqPB_.js";
3
+ import { x as useLayoutConfig, _ as _export_sfc } from "./index-CeOhet2P.js";
4
4
  import "vue-devui-lal/overlay/style.css";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "index",
@@ -18215,13 +18215,13 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
18215
18215
  var _a;
18216
18216
  const layoutConfig2 = useLayoutConfig();
18217
18217
  const { t: $t } = i18n.global;
18218
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-cDK0UiDC.js"));
18219
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-CUshyq3c.js"));
18220
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-D3FltEhh.js"));
18221
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-hnUwSPQP.js"));
18222
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-CKBt03zN.js"));
18223
- const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-XlmXFjnV.js"));
18224
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-Bh_esdbP.js"));
18218
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-wPCeYWrv.js"));
18219
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-MGIuH9N0.js"));
18220
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-YyPCy7xR.js"));
18221
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-CB9JGKLa.js"));
18222
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-CmYYGiTd.js"));
18223
+ const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-D-ygbtC5.js"));
18224
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-BprMd3PJ.js"));
18225
18225
  const props = __props;
18226
18226
  const repoInfo = inject("repoInfo");
18227
18227
  const orgInfo = inject("orgInfo");
@@ -18831,7 +18831,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
18831
18831
  }
18832
18832
  });
18833
18833
  const Search = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-gitcode-layout-lib"]]);
18834
- const NoticeModal = defineAsyncComponent(() => import("./notice-DPT07XxY.js"));
18834
+ const NoticeModal = defineAsyncComponent(() => import("./notice-q30oyitY.js"));
18835
18835
  function clearNotice() {
18836
18836
  if (localStorage$2.getItem("validator_email")) {
18837
18837
  localStorage$2.removeItem("validator_email");
@@ -20891,7 +20891,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20891
20891
  const layoutConfig2 = useLayoutConfig();
20892
20892
  const { t: t2 } = i18n.global;
20893
20893
  const route = useRoute();
20894
- const MenuItem2 = defineAsyncComponent(() => import("./MenuItem-D2HskyG5.js"));
20894
+ const MenuItem2 = defineAsyncComponent(() => import("./MenuItem-D1IzMjdK.js"));
20895
20895
  const ProjectMenuListV22 = defineAsyncComponent(() => Promise.resolve().then(() => ProjectMenuListV2$1));
20896
20896
  const ProjectMenuList2 = defineAsyncComponent(() => Promise.resolve().then(() => ProjectMenuList$1));
20897
20897
  const props = __props;
@@ -20913,7 +20913,6 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20913
20913
  const projectProps = computed(() => {
20914
20914
  return {
20915
20915
  subShow: subShow.value.project,
20916
- isLogin: props.isLogin,
20917
20916
  key: "project",
20918
20917
  type: "project",
20919
20918
  defaultData: defaultProject.value,
@@ -20924,7 +20923,6 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20924
20923
  const orgProps = computed(() => {
20925
20924
  return {
20926
20925
  subShow: subShow.value.team,
20927
- isLogin: props.isLogin,
20928
20926
  type: "team",
20929
20927
  defaultData: defaultOrg.value,
20930
20928
  title: t2("gitCodeLayout.common.organize"),
@@ -20935,8 +20933,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
20935
20933
  });
20936
20934
  const getMenuItemProps = (item) => {
20937
20935
  const currentPath = route.path;
20938
- const currentDomain = window.location.hostname;
20939
- const isActive = isHttps(item.left_menu_url) || item.is_open_new_tab ? item.left_menu_url.includes(currentDomain) : item.left_menu_url === currentPath;
20936
+ const isActive = isHttps(item.left_menu_url) || item.is_open_new_tab ? item.left_menu_url === window.location.href : item.left_menu_url === currentPath;
20940
20937
  return {
20941
20938
  active: isActive
20942
20939
  };
@@ -21037,9 +21034,10 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
21037
21034
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item) => {
21038
21035
  return openBlock(), createBlock(resolveDynamicComponent(renderComponent(item)), mergeProps({
21039
21036
  key: item.id,
21037
+ isLogin: _ctx.isLogin,
21040
21038
  item,
21041
21039
  ref_for: true
21042
- }, getProps(item)), null, 16, ["item"]);
21040
+ }, getProps(item)), null, 16, ["isLogin", "item"]);
21043
21041
  }), 128))
21044
21042
  ]),
21045
21043
  _: 1
@@ -26151,7 +26149,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
26151
26149
  }
26152
26150
  });
26153
26151
  const MFA = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-gitcode-layout-lib"]]);
26154
- const SlidCaptcha = defineAsyncComponent(() => import("./index-D81-AAhb.js"));
26152
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-BeGfSEyw.js"));
26155
26153
  const useSlidCaptcha = () => {
26156
26154
  const { mount, unMount } = usePopup("slid-captcha-popup");
26157
26155
  const open = (config) => {
@@ -27860,18 +27858,19 @@ export {
27860
27858
  LANG_EN as A,
27861
27859
  getLocaleLang as B,
27862
27860
  isHttps as C,
27863
- ToolsFloat as D,
27861
+ emitEvent as D,
27864
27862
  EVENT_NAME as E,
27865
- _sfc_main as F,
27863
+ ToolsFloat as F,
27866
27864
  GIcon as G,
27867
- GitCodeAside as H,
27868
- GitCodeHeader as I,
27869
- useLogin as J,
27870
- setLayoutConfig as K,
27865
+ _sfc_main as H,
27866
+ GitCodeAside as I,
27867
+ GitCodeHeader as J,
27868
+ useLogin as K,
27871
27869
  LANG_KEY as L,
27872
- GitCodeLayoutEmitter as M,
27873
- setTheme as N,
27874
- index as O,
27870
+ setLayoutConfig as M,
27871
+ GitCodeLayoutEmitter as N,
27872
+ setTheme as O,
27873
+ index as P,
27875
27874
  REPO_MODULE as R,
27876
27875
  SceneValue as S,
27877
27876
  TOPIC_TYPE as T,
@@ -27900,6 +27899,6 @@ export {
27900
27899
  vElementExposure as v,
27901
27900
  _frEventTrack as w,
27902
27901
  useLayoutConfig as x,
27903
- ThemeType as y,
27904
- currentTheme as z
27902
+ currentTheme as y,
27903
+ ThemeType as z
27905
27904
  };
package/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { H, I, M, F, S, D, z, O, K, N, J } from "./index-D34AqPB_.js";
1
+ import { I, J, N, H, S, F, y, P, M, O, K } from "./index-CeOhet2P.js";
2
2
  export {
3
- H as GitCodeAside,
4
- I as GitCodeHeader,
5
- M as GitCodeLayoutEmitter,
6
- F as Login,
3
+ I as GitCodeAside,
4
+ J as GitCodeHeader,
5
+ N as GitCodeLayoutEmitter,
6
+ H as Login,
7
7
  S as SceneValue,
8
- D as ToolsFloat,
9
- z as currentTheme,
10
- O as default,
11
- K as setLayoutConfig,
12
- N as setTheme,
13
- J as useLogin
8
+ F as ToolsFloat,
9
+ y as currentTheme,
10
+ P as default,
11
+ M as setLayoutConfig,
12
+ O as setTheme,
13
+ K 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-D34AqPB_.js";
2
+ import { i as isPhone, u as useModel } from "./index-CeOhet2P.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.5.22",
3
+ "version": "1.5.24",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",