vue-layout-gitcode 1.12.15-beta.14 → 1.12.15-beta.16

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, openBlock, createElementBlock, Fragment, createElementVNode, toDisplayString, unref, createVNode, 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-UBFXyA0O.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-DZyZIqvu.js";
5
5
  import "lodash/debounce";
6
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-CAmbj2_k.js";
7
- import "./transWebUrl-BfNTOSZ4.js";
6
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-D7rVJoTw.js";
7
+ import "./transWebUrl-CtOYQG2D.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, computed, ref, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, createElementBlock, createCommentVNode, createTextVNode, toDisplayString, renderSlot } from "vue";
2
- import { a as i18n, y as useLayoutConfig, A as ThemeType, B as currentTheme, L as LANG_ZH, C as LANG_EN, D as getLocaleLang, G as GIcon, F as emitEvent, H as isHttps, I as navigateWithMigrationGuard, b as REPO_EVENT, _ as _export_sfc } from "./index-UBFXyA0O.js";
2
+ import { a as i18n, y as useLayoutConfig, A as ThemeType, B as currentTheme, L as LANG_ZH, C as LANG_EN, D as getLocaleLang, G as GIcon, F as emitEvent, b as REPO_EVENT, H as ASIDE_MENU_REPO, I as isHttps, J as navigateWithMigrationGuard, _ as _export_sfc } from "./index-DZyZIqvu.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";
@@ -107,6 +107,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
107
107
  return;
108
108
  }
109
109
  if (props.item.left_menu_url === "/dashboard/downloads?tab=view") {
110
+ useReport(REPO_EVENT.CLICK, { module_name: ASIDE_MENU_REPO.BROWSEHISTORYCLICK });
110
111
  window.open(props.item.left_menu_url, "_blank");
111
112
  return;
112
113
  }
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, inject, ref, reactive, watch, computed, openBlock, createElementBlock, Fragment, createElementVNode, toDisplayString, unref, createVNode, withModifiers, normalizeClass, withCtx, renderList, createBlock, createCommentVNode, createTextVNode, withDirectives, vShow } from "vue";
2
- import { a as i18n, y as useLayoutConfig, G as GIcon, t as transformUrl, K as _sfc_main$1, M as loadAsideData, I as navigateWithMigrationGuard, F as emitEvent, s as setLoginTriggerSource, f as useRequestReport, J as asideRequest, _ as _export_sfc } from "./index-UBFXyA0O.js";
2
+ import { a as i18n, y as useLayoutConfig, G as GIcon, t as transformUrl, M as _sfc_main$1, N as loadAsideData, J as navigateWithMigrationGuard, F as emitEvent, s as setLoginTriggerSource, f as useRequestReport, K as asideRequest, _ as _export_sfc } from "./index-DZyZIqvu.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-BfNTOSZ4.js";
4
+ import { t as transWebUrl } from "./transWebUrl-CtOYQG2D.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, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, withModifiers, normalizeClass, withCtx, createBlock, createCommentVNode, Fragment, renderList, createTextVNode, withDirectives, vShow } from "vue";
2
- import { a as i18n, y as useLayoutConfig, t as transformUrl, G as GIcon, J as asideRequest, I as navigateWithMigrationGuard, F as emitEvent, s as setLoginTriggerSource, f as useRequestReport, _ as _export_sfc } from "./index-UBFXyA0O.js";
2
+ import { a as i18n, y as useLayoutConfig, t as transformUrl, G as GIcon, K as asideRequest, J as navigateWithMigrationGuard, F as emitEvent, s as setLoginTriggerSource, f as useRequestReport, _ as _export_sfc } from "./index-DZyZIqvu.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-BfNTOSZ4.js";
4
+ import { t as transWebUrl } from "./transWebUrl-CtOYQG2D.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, openBlock, createElementBlock, 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-UBFXyA0O.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-DZyZIqvu.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, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, createVNode, toDisplayString, withModifiers, createCommentVNode } from "vue";
2
- import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-UBFXyA0O.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-DZyZIqvu.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,6 +1,6 @@
1
1
  import { defineComponent, inject, ref, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, renderSlot, createBlock, createVNode, withCtx } from "vue";
2
- import { u as useReportRepo, S as SearchRepoCard } from "./index-CAmbj2_k.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-UBFXyA0O.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-D7rVJoTw.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-DZyZIqvu.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, openBlock, createElementBlock, Fragment, renderList, createElementVNode, createVNode, toDisplayString, createCommentVNode, unref } from "vue";
2
- import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-UBFXyA0O.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-DZyZIqvu.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, openBlock, createElementBlock, 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-UBFXyA0O.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-DZyZIqvu.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-project history-list-project--padded" };
@@ -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-UBFXyA0O.js";
11
+ import { a as i18n, k as usePageResize, z as isZh, _ as _export_sfc } from "./index-DZyZIqvu.js";
12
12
  const _YunpianCaptchaManager = class _YunpianCaptchaManager {
13
13
  // eslint-disable-next-line no-useless-constructor
14
14
  constructor() {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, onMounted, nextTick, onUnmounted, openBlock, createBlock, unref, withCtx, createElementVNode } from "vue";
2
- import { x as slidCaptchaManager, y as useLayoutConfig, z as isZh, _ as _export_sfc } from "./index-UBFXyA0O.js";
2
+ import { x as slidCaptchaManager, y as useLayoutConfig, z as isZh, _ as _export_sfc } from "./index-DZyZIqvu.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:";
@@ -1,7 +1,7 @@
1
1
  import { ref, watchEffect, defineComponent, toDisplayString, unref, useModel, watch, openBlock, createElementBlock, createVNode, normalizeClass, withDirectives, createElementVNode, vShow, mergeModels, inject, withModifiers, createBlock, Fragment, computed, normalizeStyle, createCommentVNode, 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, r as reqCatch, f as useRequestReport, 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-UBFXyA0O.js";
4
- import { t as transWebUrl } from "./transWebUrl-BfNTOSZ4.js";
3
+ import { d as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, r as reqCatch, f as useRequestReport, 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-DZyZIqvu.js";
4
+ import { t as transWebUrl } from "./transWebUrl-CtOYQG2D.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";
@@ -127,12 +127,12 @@ const defaultConfig = {
127
127
  VITE_SECRET_KEY: "SA!nUNPZ5o!OSV&B",
128
128
  VITE_SECRET_IV: "SA!nwwwZ5o!OSV&B"
129
129
  };
130
- const layoutConfig$6 = reactive({ ...defaultConfig });
130
+ const layoutConfig$7 = reactive({ ...defaultConfig });
131
131
  function setLayoutConfig(customConfig) {
132
- Object.assign(layoutConfig$6, customConfig);
132
+ Object.assign(layoutConfig$7, customConfig);
133
133
  }
134
134
  function useLayoutConfig() {
135
- return readonly(layoutConfig$6);
135
+ return readonly(layoutConfig$7);
136
136
  }
137
137
  async function reqCatch(req, params) {
138
138
  try {
@@ -8530,6 +8530,8 @@ const LANG_KEY = "gitcode_lang";
8530
8530
  const COOKIE_DOMAIN = () => {
8531
8531
  if (typeof window !== "undefined" && window.location.hostname.includes("atomgit.com")) {
8532
8532
  return ".atomgit.com";
8533
+ } else if (typeof window !== "undefined" && window.location.hostname.includes("gitcode.net")) {
8534
+ return ".gitcode.net";
8533
8535
  } else if (typeof window !== "undefined" && window.location.hostname.includes("gitcode.com")) {
8534
8536
  return ".gitcode.com";
8535
8537
  }
@@ -8596,7 +8598,7 @@ const $i18n = setupI18n({
8596
8598
  });
8597
8599
  const i18n = $i18n;
8598
8600
  const isZh = local === LANG_ZH;
8599
- const layoutConfig$5 = useLayoutConfig();
8601
+ const layoutConfig$6 = useLayoutConfig();
8600
8602
  function scrollToTop() {
8601
8603
  if (typeof window !== "undefined" && window.pageYOffset) {
8602
8604
  const c = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
@@ -8625,7 +8627,7 @@ function extractRepoInfoWithURL(repoUrl) {
8625
8627
  return parts.join("/");
8626
8628
  }
8627
8629
  const isGstarRepo = (topics) => {
8628
- const gstarTopicIds = layoutConfig$5.VITE_GSTAR_TOPIC.split(",");
8630
+ const gstarTopicIds = layoutConfig$6.VITE_GSTAR_TOPIC.split(",");
8629
8631
  let isGstar = false;
8630
8632
  topics && topics.forEach((item) => {
8631
8633
  if (gstarTopicIds.includes(item.topic_id || item.id)) {
@@ -8635,7 +8637,7 @@ const isGstarRepo = (topics) => {
8635
8637
  return isGstar;
8636
8638
  };
8637
8639
  const isTrustedRepo = (topics) => {
8638
- const trustedTopicIds = layoutConfig$5.VITE_TRUSTED_TOPIC.split(",");
8640
+ const trustedTopicIds = layoutConfig$6.VITE_TRUSTED_TOPIC.split(",");
8639
8641
  let isTrusted = false;
8640
8642
  topics && topics.forEach((item) => {
8641
8643
  if (trustedTopicIds.includes(item.topic_id || item.id)) {
@@ -8644,7 +8646,7 @@ const isTrustedRepo = (topics) => {
8644
8646
  });
8645
8647
  return isTrusted;
8646
8648
  };
8647
- const INCUBATION_TOPICS = layoutConfig$5.VITE_INCUBATION_TOPIC || "";
8649
+ const INCUBATION_TOPICS = layoutConfig$6.VITE_INCUBATION_TOPIC || "";
8648
8650
  const isIncubationRepo = (topics = []) => {
8649
8651
  if (!topics) return false;
8650
8652
  const incubationIds = INCUBATION_TOPICS.split(",");
@@ -8687,7 +8689,7 @@ const getLastTimeRepoId = () => {
8687
8689
  };
8688
8690
  const setUtmSourceSign = (utm_source) => {
8689
8691
  const time = new Date((/* @__PURE__ */ new Date()).getTime() + 60 * 60 * 1e3);
8690
- return api.set("utm_source_sign", utm_source, { expires: time, domain: layoutConfig$5.VITE_COOKIE_DOMAIN });
8692
+ return api.set("utm_source_sign", utm_source, { expires: time, domain: layoutConfig$6.VITE_COOKIE_DOMAIN });
8691
8693
  };
8692
8694
  const getUtmSourceSign = () => {
8693
8695
  return api.get("utm_source_sign") || "";
@@ -8876,7 +8878,7 @@ const getCommonHeadInfo = (isAiHub) => {
8876
8878
  "X-Device-ID": "unknown"
8877
8879
  };
8878
8880
  };
8879
- const layoutConfig$4 = useLayoutConfig();
8881
+ const layoutConfig$5 = useLayoutConfig();
8880
8882
  const setPassportPrefix = (url, method) => {
8881
8883
  const prefix = "/uc";
8882
8884
  {
@@ -8900,7 +8902,7 @@ const setPassportPrefix = (url, method) => {
8900
8902
  };
8901
8903
  const proxyService = (params, customConfigs) => {
8902
8904
  const service = axios.create({
8903
- baseURL: layoutConfig$4.VITE_API_HOST,
8905
+ baseURL: layoutConfig$5.VITE_API_HOST,
8904
8906
  timeout: (customConfigs == null ? void 0 : customConfigs.customTimeout) || 3e4,
8905
8907
  withCredentials: true
8906
8908
  });
@@ -9796,6 +9798,7 @@ var ASIDE_MENU_REPO = /* @__PURE__ */ ((ASIDE_MENU_REPO2) => {
9796
9798
  ASIDE_MENU_REPO2["ASIDEEXPO"] = "侧边栏_曝光";
9797
9799
  ASIDE_MENU_REPO2["CHATBOTEXPO"] = "头部天启入口_曝光";
9798
9800
  ASIDE_MENU_REPO2["CHATBOTCLICK"] = "头部天启入口_点击";
9801
+ ASIDE_MENU_REPO2["BROWSEHISTORYCLICK"] = "侧边栏_浏览历史";
9799
9802
  ASIDE_MENU_REPO2["TOOLBAR"] = "toolbar_点击";
9800
9803
  ASIDE_MENU_REPO2["TOOLBAREXPO"] = "toolbar_曝光";
9801
9804
  ASIDE_MENU_REPO2["ASIDEBTNCLICK"] = "侧边栏按钮_点击";
@@ -9814,7 +9817,7 @@ var REPO_TYPE = /* @__PURE__ */ ((REPO_TYPE2) => {
9814
9817
  REPO_TYPE2[REPO_TYPE2["HUGGINGFACE_MIRRORS"] = 2] = "HUGGINGFACE_MIRRORS";
9815
9818
  return REPO_TYPE2;
9816
9819
  })(REPO_TYPE || {});
9817
- const layoutConfig$3 = useLayoutConfig();
9820
+ const layoutConfig$4 = useLayoutConfig();
9818
9821
  const registerLoginMethodMap = {
9819
9822
  [LoginMethodEnum.PHONE]: "短信",
9820
9823
  [LoginMethodEnum.PASSWORD]: "密码",
@@ -9848,7 +9851,7 @@ const collectRegisterLoginEvent = ({ isRegister, registerLoginMethod, success, e
9848
9851
  userid_fast_application: searchParams["uuid_tt_dd"] || "",
9849
9852
  gitcode_utm_source: searchParams["utm_source"] || "",
9850
9853
  page_url: (location == null ? void 0 : location.href) || "",
9851
- env: layoutConfig$3.VITE_ENV,
9854
+ env: layoutConfig$4.VITE_ENV,
9852
9855
  namespace: extraData.namespace || "",
9853
9856
  ...extraData,
9854
9857
  ...searchParams
@@ -13968,7 +13971,7 @@ var encUtf8 = { exports: {} };
13968
13971
  })(encUtf8);
13969
13972
  var encUtf8Exports = encUtf8.exports;
13970
13973
  const Utf8 = /* @__PURE__ */ getDefaultExportFromCjs(encUtf8Exports);
13971
- const layoutConfig$2 = useLayoutConfig();
13974
+ const layoutConfig$3 = useLayoutConfig();
13972
13975
  function headRequest(request) {
13973
13976
  return {
13974
13977
  getSearchHot() {
@@ -14254,8 +14257,8 @@ function headRequest(request) {
14254
14257
  },
14255
14258
  // 密码登录
14256
14259
  toLogin(data) {
14257
- const key = Utf8.parse(layoutConfig$2.VITE_SECRET_KEY);
14258
- const iv = Utf8.parse(layoutConfig$2.VITE_SECRET_IV);
14260
+ const key = Utf8.parse(layoutConfig$3.VITE_SECRET_KEY);
14261
+ const iv = Utf8.parse(layoutConfig$3.VITE_SECRET_IV);
14259
14262
  const cryptoCode = AES.encrypt(data.password, key, {
14260
14263
  iv,
14261
14264
  padding: Pkcs7
@@ -15300,9 +15303,10 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
15300
15303
  const router2 = useRouter();
15301
15304
  const { t: t2 } = i18n.global;
15302
15305
  const handleClick = (linkItem) => {
15306
+ var _a, _b;
15303
15307
  if (lang.value === linkItem.value) return;
15304
15308
  lang.value = linkItem.value;
15305
- const isHomePage = router2.currentRoute.value.name === "home";
15309
+ const isHomePage = ((_b = (_a = router2 == null ? void 0 : router2.currentRoute) == null ? void 0 : _a.value) == null ? void 0 : _b.name) === "home";
15306
15310
  if (isHomePage) {
15307
15311
  sessionStorage$1.setItem("page_reload", "changedLang");
15308
15312
  }
@@ -16391,12 +16395,12 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16391
16395
  setup(__props) {
16392
16396
  const layoutConfig2 = useLayoutConfig();
16393
16397
  const { t: $t } = i18n.global;
16394
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-BfmSEsd8.js"));
16395
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-BUxyHQcg.js"));
16396
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-QZVXPTt0.js"));
16397
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-iU48QCNM.js"));
16398
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-4urZBWuT.js"));
16399
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-DV4JVi_W.js"));
16398
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-sRELCn6C.js"));
16399
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-E4s6K2L8.js"));
16400
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-BfKmJi_q.js"));
16401
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-CtdFVEod.js"));
16402
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-DiGyzPIl.js"));
16403
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-B5ORMeCc.js"));
16400
16404
  const props = __props;
16401
16405
  const repoInfo = inject("repoInfo");
16402
16406
  const orgInfo = inject("orgInfo");
@@ -16483,11 +16487,14 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16483
16487
  return hasSearchQuery ? buildStrFromParams(query) : "";
16484
16488
  };
16485
16489
  const searchStr = ref(initSearchStrFromQuery());
16490
+ const isContextScopePrefill = ref(false);
16486
16491
  const parsedResult = computed(() => parseSearchInput(searchStr.value));
16487
16492
  const keyword = computed(() => parsedResult.value.params.q);
16493
+ const hasOnlyOrgOrRepoScope = (params) => {
16494
+ return (params.scope === "group" || params.scope === "repo") && !params.q && !params.l && !params.path && !params.symbol;
16495
+ };
16488
16496
  const isScopeOnly = computed(() => {
16489
- const p = parsedResult.value.params;
16490
- return (p.scope === "group" || p.scope === "repo") && !p.q && !p.l && !p.path && !p.symbol;
16497
+ return isContextScopePrefill.value && hasOnlyOrgOrRepoScope(parsedResult.value.params);
16491
16498
  });
16492
16499
  const SCOPE_KEYS = ["repo", "user", "group"];
16493
16500
  const keywordRest = computed(() => {
@@ -16584,9 +16591,13 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16584
16591
  const applyContextPrefill = () => {
16585
16592
  const prefix = buildQualifierPrefix(searchInfo.value);
16586
16593
  if (prefix) {
16594
+ isContextScopePrefill.value = true;
16587
16595
  searchStr.value = prefix;
16588
16596
  }
16589
16597
  };
16598
+ const onManualSearchInput = () => {
16599
+ isContextScopePrefill.value = false;
16600
+ };
16590
16601
  if ((route == null ? void 0 : route.name) === "search") {
16591
16602
  isSearchPage.value = true;
16592
16603
  }
@@ -16653,6 +16664,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16653
16664
  searchDropDownVisible.value = false;
16654
16665
  };
16655
16666
  const onScopeSearch = (data = {}) => {
16667
+ isContextScopePrefill.value = false;
16656
16668
  if ((data == null ? void 0 : data.enLabel) && (data == null ? void 0 : data.value)) {
16657
16669
  const keyMap = { repo: "repo", user: "user", group: "org" };
16658
16670
  const prefixKey = keyMap[data.enLabel];
@@ -16683,6 +16695,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16683
16695
  const isSearchHistory = ref(false);
16684
16696
  const searchHistory = (data) => {
16685
16697
  isSearchHistory.value = true;
16698
+ isContextScopePrefill.value = false;
16686
16699
  if (typeof data === "string") {
16687
16700
  searchStr.value = data;
16688
16701
  } else {
@@ -16715,7 +16728,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16715
16728
  (_a = inputRef.value) == null ? void 0 : _a.blur();
16716
16729
  searchDropDownVisible.value = false;
16717
16730
  const { params } = parseSearchInput(searchStr.value);
16718
- const scopeOnly = (params.scope === "group" || params.scope === "repo") && !params.q && !params.l && !params.path && !params.symbol;
16731
+ const scopeOnly = isContextScopePrefill.value && hasOnlyOrgOrRepoScope(params);
16719
16732
  const targetHotWord = searchHotWords.value[activeSearchKey.value];
16720
16733
  if ((!searchStr.value || scopeOnly) && (targetHotWord == null ? void 0 : targetHotWord.url) && !isSearchHistory.value) {
16721
16734
  let hotUrl = targetHotWord.url;
@@ -16731,7 +16744,10 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16731
16744
  }
16732
16745
  isSearchHistory.value = false;
16733
16746
  const queryKey = params.q || (searchStr.value ? "" : targetHotWord == null ? void 0 : targetHotWord.content) || "";
16734
- const hasSearchable = Boolean(queryKey || params.l || params.path || params.symbol || params.scope === "group");
16747
+ const hasManualScope = !scopeOnly && (params.scope === "group" || params.scope === "repo");
16748
+ const hasSearchable = Boolean(
16749
+ queryKey || params.l || params.path || params.symbol || hasManualScope
16750
+ );
16735
16751
  if (!hasSearchable && typeof document !== "undefined" && document.querySelector) {
16736
16752
  (_b = document.querySelector("#golbalSearch")) == null ? void 0 : _b.blur();
16737
16753
  pendingType.value = "";
@@ -16822,6 +16838,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16822
16838
  };
16823
16839
  const onClearSearch = () => {
16824
16840
  inputRef.value.focus();
16841
+ isContextScopePrefill.value = false;
16825
16842
  searchStr.value = "";
16826
16843
  isFocus.value = true;
16827
16844
  searchDropDownVisible.value = true;
@@ -16995,6 +17012,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16995
17012
  class: "g-header-search custom-h-searchinput",
16996
17013
  modelValue: searchStr.value,
16997
17014
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchStr.value = $event),
17015
+ onInput: onManualSearchInput,
16998
17016
  onKeydown: [
16999
17017
  withKeys(onSearchBefore, ["enter"]),
17000
17018
  _cache[1] || (_cache[1] = withKeys(($event) => changeHoverIndex("del"), ["up"])),
@@ -17217,7 +17235,7 @@ const autoAvokeLogin = ({ isLogin, loginFunc, openHarmonyGuide, loginSuccess, lo
17217
17235
  loginFunc({ type: "login", triggerType: "", loginTriggerSource: "router_login_auth", ...loginFuncOpts }, loginSuccess, openHarmonyGuide);
17218
17236
  }
17219
17237
  };
17220
- const NoticeModal = defineAsyncComponent(() => import("./notice-B1QpIrya.js"));
17238
+ const NoticeModal = defineAsyncComponent(() => import("./notice-XD-m4ZVb.js"));
17221
17239
  function clearNotice() {
17222
17240
  if (localStorage$2.getItem("validator_email")) {
17223
17241
  localStorage$2.removeItem("validator_email");
@@ -18208,7 +18226,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18208
18226
  }
18209
18227
  });
18210
18228
  const EnterpriseHeader = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-vue-layout-gitcode"]]);
18211
- const layoutConfig$1 = useLayoutConfig();
18229
+ const layoutConfig$2 = useLayoutConfig();
18212
18230
  const useConfigSide = (request, sceneValue) => {
18213
18231
  const API = asideRequest(request);
18214
18232
  const route = useRoute();
@@ -18271,10 +18289,10 @@ const useConfigSide = (request, sceneValue) => {
18271
18289
  let asideList = (((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || []).map((item) => {
18272
18290
  let processedUrl = item.left_menu_url;
18273
18291
  if (processedUrl == null ? void 0 : processedUrl.startsWith("https://competition.")) {
18274
- const competitionUrl = replaceHost({ url: processedUrl, customHost: transformUrl(layoutConfig$1.VITE_COMPETITION_HOST) });
18292
+ const competitionUrl = replaceHost({ url: processedUrl, customHost: transformUrl(layoutConfig$2.VITE_COMPETITION_HOST) });
18275
18293
  processedUrl = competitionUrl.includes("atomgit") ? competitionUrl.replace("competition.", "competitions.") : competitionUrl;
18276
18294
  } else if (processedUrl == null ? void 0 : processedUrl.startsWith("https://ai.")) {
18277
- processedUrl = replaceHost({ url: processedUrl, customHost: transformUrl(layoutConfig$1.VITE_AI_HOST) });
18295
+ processedUrl = replaceHost({ url: processedUrl, customHost: transformUrl(layoutConfig$2.VITE_AI_HOST) });
18278
18296
  } else {
18279
18297
  processedUrl = transformUrl(processedUrl);
18280
18298
  }
@@ -18305,6 +18323,7 @@ const useConfigSide = (request, sceneValue) => {
18305
18323
  sideLoading
18306
18324
  };
18307
18325
  };
18326
+ const layoutConfig$1 = useLayoutConfig();
18308
18327
  const loadAsideData = async (requestFn, params = {}, dataType = "project") => {
18309
18328
  var _a;
18310
18329
  try {
@@ -18322,7 +18341,7 @@ const loadAsideData = async (requestFn, params = {}, dataType = "project") => {
18322
18341
  if (!code2) return null;
18323
18342
  return {
18324
18343
  key: code2,
18325
- web_url: `/enterprises/${code2}`,
18344
+ web_url: `${layoutConfig$1.VITE_HOST}/enterprises/${code2}`,
18326
18345
  avatar: item.avatar,
18327
18346
  id: item.id,
18328
18347
  label: item.name,
@@ -18427,9 +18446,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18427
18446
  const layoutConfig2 = useLayoutConfig();
18428
18447
  const { t: t2 } = i18n.global;
18429
18448
  const route = useRoute();
18430
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-ZrzVAEE3.js"));
18431
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-BoxRrHSY.js"));
18432
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-3G72lk_8.js"));
18449
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem-Bhz2xGuE.js"));
18450
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-B0g2gpwj.js"));
18451
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-Ci-m9quY.js"));
18433
18452
  const props = __props;
18434
18453
  const useReport2 = inject("useReport");
18435
18454
  const userInfo = inject("userInfo");
@@ -24912,7 +24931,7 @@ const _SlidCaptchaManager = class _SlidCaptchaManager {
24912
24931
  __publicField(_SlidCaptchaManager, "instance");
24913
24932
  let SlidCaptchaManager = _SlidCaptchaManager;
24914
24933
  const slidCaptchaManager = SlidCaptchaManager.getInstance();
24915
- const SlidCaptcha = defineAsyncComponent(() => import("./index-CbZphfDv.js"));
24934
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-CtHLYUVh.js"));
24916
24935
  const useSlidCaptcha = () => {
24917
24936
  const { mount, unMount, isMounted } = usePopup("slid-captcha-popup");
24918
24937
  const open = (config) => {
@@ -24942,7 +24961,7 @@ const useSlidCaptcha = () => {
24942
24961
  close
24943
24962
  };
24944
24963
  };
24945
- const YunpianCaptcha = defineAsyncComponent(() => import("./index-D_wUrtUT.js"));
24964
+ const YunpianCaptcha = defineAsyncComponent(() => import("./index-5jNX3P01.js"));
24946
24965
  const useYunpianCaptcha = () => {
24947
24966
  const { mount, unMount } = usePopup("yunpian-captcha-popup");
24948
24967
  const open = (config) => {
@@ -27876,7 +27895,7 @@ const index = {
27876
27895
  }
27877
27896
  };
27878
27897
  export {
27879
- setTheme as $,
27898
+ setLayoutConfig as $,
27880
27899
  ThemeType as A,
27881
27900
  currentTheme as B,
27882
27901
  LANG_EN as C,
@@ -27884,28 +27903,29 @@ export {
27884
27903
  EVENT_NAME as E,
27885
27904
  emitEvent as F,
27886
27905
  GIcon as G,
27887
- isHttps as H,
27888
- navigateWithMigrationGuard as I,
27889
- asideRequest as J,
27890
- _sfc_main$H as K,
27906
+ ASIDE_MENU_REPO as H,
27907
+ isHttps as I,
27908
+ navigateWithMigrationGuard as J,
27909
+ asideRequest as K,
27891
27910
  LANG_ZH as L,
27892
- loadAsideData as M,
27893
- AsideFooterTools as N,
27894
- EnterpriseHeader as O,
27895
- GitCodeAside as P,
27896
- GitCodeHeader as Q,
27911
+ _sfc_main$H as M,
27912
+ loadAsideData as N,
27913
+ AsideFooterTools as O,
27914
+ EnterpriseHeader as P,
27915
+ GitCodeAside as Q,
27897
27916
  REPO_MODULE as R,
27898
- GitCodeLayoutEmitter as S,
27917
+ GitCodeHeader as S,
27899
27918
  TOPIC_TYPE as T,
27900
- _sfc_main$1 as U,
27901
- SceneValue as V,
27902
- SiteAnnouncement as W,
27903
- ToolsFloat as X,
27904
- index as Y,
27905
- setLayoutConfig as Z,
27919
+ GitCodeLayoutEmitter as U,
27920
+ _sfc_main$1 as V,
27921
+ SceneValue as W,
27922
+ SiteAnnouncement as X,
27923
+ ToolsFloat as Y,
27924
+ index as Z,
27906
27925
  _export_sfc as _,
27907
27926
  i18n as a,
27908
- useLogin as a0,
27927
+ setTheme as a0,
27928
+ useLogin as a1,
27909
27929
  REPO_EVENT as b,
27910
27930
  REPO_TYPE as c,
27911
27931
  transferNumber as d,
package/index.js CHANGED
@@ -1,17 +1,17 @@
1
- import { N, O, P, Q, S, U, V, W, X, B, Y, Z, $, a0 } from "./index-UBFXyA0O.js";
1
+ import { O, P, Q, S, U, V, W, X, Y, B, Z, $, a0, a1 } from "./index-DZyZIqvu.js";
2
2
  export {
3
- N as AsideFooterTools,
4
- O as EnterpriseHeader,
5
- P as GitCodeAside,
6
- Q as GitCodeHeader,
7
- S as GitCodeLayoutEmitter,
8
- U as Login,
9
- V as SceneValue,
10
- W as SiteAnnouncement,
11
- X as ToolsFloat,
3
+ O as AsideFooterTools,
4
+ P as EnterpriseHeader,
5
+ Q as GitCodeAside,
6
+ S as GitCodeHeader,
7
+ U as GitCodeLayoutEmitter,
8
+ V as Login,
9
+ W as SceneValue,
10
+ X as SiteAnnouncement,
11
+ Y as ToolsFloat,
12
12
  B as currentTheme,
13
- Y as default,
14
- Z as setLayoutConfig,
15
- $ as setTheme,
16
- a0 as useLogin
13
+ Z as default,
14
+ $ as setLayoutConfig,
15
+ a0 as setTheme,
16
+ a1 as useLogin
17
17
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, openBlock, createBlock, unref, isRef, withCtx, createElementVNode, normalizeClass, createVNode, createTextVNode } from "vue";
2
- import { i as isPhone, u as useModel, _ as _export_sfc } from "./index-UBFXyA0O.js";
2
+ import { i as isPhone, u as useModel, _ as _export_sfc } from "./index-DZyZIqvu.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.12.15-beta.14",
3
+ "version": "1.12.15-beta.16",
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-UBFXyA0O.js";
1
+ import { y as useLayoutConfig } from "./index-DZyZIqvu.js";
2
2
  const layoutConfig = useLayoutConfig();
3
3
  const transWebUrl = (url, params) => {
4
4
  if (!url) return url;