vue-layout-gitcode 1.12.78 → 1.12.80

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,6 +1,6 @@
1
1
  import { defineComponent, inject, openBlock, createElementBlock, Fragment, renderList, withDirectives, createBlock, unref, ref, watch, createElementVNode, createVNode, toDisplayString, createCommentVNode } from "vue";
2
- import { h as headRequest, R as REPO_MODULE, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc, a as i18n, c as useLayoutConfig, G as GIcon } from "./index-BvBm0VqE.js";
3
- import { u as useReportRepo, S as SearchRepoCard, m as mergeSearchSuggestions } from "./search-suggestion-KexNvYM9.js";
2
+ import { h as headRequest, R as REPO_MODULE, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc, a as i18n, c as useLayoutConfig, G as GIcon } from "./index-i8jCLCn2.js";
3
+ import { u as useReportRepo, S as SearchRepoCard, m as mergeSearchSuggestions } from "./search-suggestion-DTYhXO6t.js";
4
4
  import "vue-devui-lal/icon";
5
5
  import "vue-devui-lal/icon/style.css";
6
6
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
@@ -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, c as useLayoutConfig, B as ThemeType, C as currentTheme, L as LANG_ZH, D as LANG_EN, F as getLocaleLang, G as GIcon, H as emitEvent, b as REPO_EVENT, I as ASIDE_MENU_REPO, J as isHttps, K as navigateWithMigrationGuard, _ as _export_sfc } from "./index-BvBm0VqE.js";
2
+ import { a as i18n, c as useLayoutConfig, B as ThemeType, C as currentTheme, L as LANG_ZH, D as LANG_EN, F as getLocaleLang, G as GIcon, H as emitEvent, b as REPO_EVENT, I as ASIDE_MENU_REPO, J as isHttps, K as navigateWithMigrationGuard, _ as _export_sfc } from "./index-i8jCLCn2.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, openBlock, createElementBlock, Fragment, createElementVNode, toDisplayString, unref, createVNode, withModifiers, normalizeClass, withCtx, renderList, createBlock, createCommentVNode, createTextVNode, withDirectives, vShow } from "vue";
2
- import { a as i18n, c as useLayoutConfig, G as GIcon, t as transformUrl, N as _sfc_main$1, O as loadAsideData, K as navigateWithMigrationGuard, H as emitEvent, s as setLoginTriggerSource, e as useRequestReport, M as asideRequest, _ as _export_sfc } from "./index-BvBm0VqE.js";
2
+ import { a as i18n, c as useLayoutConfig, G as GIcon, t as transformUrl, N as _sfc_main$1, O as loadAsideData, K as navigateWithMigrationGuard, H as emitEvent, s as setLoginTriggerSource, e as useRequestReport, M as asideRequest, _ as _export_sfc } from "./index-i8jCLCn2.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-DRxMMqi_.js";
4
+ import { t as transWebUrl } from "./transWebUrl-GSTP9sGm.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, c as useLayoutConfig, t as transformUrl, G as GIcon, M as asideRequest, K as navigateWithMigrationGuard, H as emitEvent, s as setLoginTriggerSource, e as useRequestReport, _ as _export_sfc } from "./index-BvBm0VqE.js";
2
+ import { a as i18n, c as useLayoutConfig, t as transformUrl, G as GIcon, M as asideRequest, K as navigateWithMigrationGuard, H as emitEvent, s as setLoginTriggerSource, e as useRequestReport, _ as _export_sfc } from "./index-i8jCLCn2.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-DRxMMqi_.js";
4
+ import { t as transWebUrl } from "./transWebUrl-GSTP9sGm.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 { defineComponent, ref, inject, watch, 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-BvBm0VqE.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-i8jCLCn2.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, n as normalizeSearchHistoryEntry, G as GIcon, _ as _export_sfc } from "./index-BvBm0VqE.js";
2
+ import { a as i18n, n as normalizeSearchHistoryEntry, G as GIcon, _ as _export_sfc } from "./index-i8jCLCn2.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, i as isProjectSuggestionType, n as normalizeProjectUrlForMainSite } from "./search-suggestion-KexNvYM9.js";
3
- import { a as i18n, h as headRequest, c as useLayoutConfig, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-BvBm0VqE.js";
2
+ import { u as useReportRepo, S as SearchRepoCard, i as isProjectSuggestionType, n as normalizeProjectUrlForMainSite } from "./search-suggestion-DTYhXO6t.js";
3
+ import { a as i18n, h as headRequest, c as useLayoutConfig, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-i8jCLCn2.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-BvBm0VqE.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-i8jCLCn2.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 { defineComponent, 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-BvBm0VqE.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-i8jCLCn2.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" };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, onMounted, nextTick, onUnmounted, openBlock, createBlock, unref, withCtx, createElementVNode } from "vue";
2
- import { z as slidCaptchaManager, c as useLayoutConfig, A as isZh, _ as _export_sfc } from "./index-BvBm0VqE.js";
2
+ import { z as slidCaptchaManager, c as useLayoutConfig, A as isZh, _ as _export_sfc } from "./index-i8jCLCn2.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:";
@@ -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, j as usePageResize, A as isZh, _ as _export_sfc } from "./index-BvBm0VqE.js";
11
+ import { a as i18n, j as usePageResize, A as isZh, _ as _export_sfc } from "./index-i8jCLCn2.js";
12
12
  const _YunpianCaptchaManager = class _YunpianCaptchaManager {
13
13
  // eslint-disable-next-line no-useless-constructor
14
14
  constructor() {
@@ -17887,12 +17887,12 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
17887
17887
  setup(__props) {
17888
17888
  const layoutConfig2 = useLayoutConfig();
17889
17889
  const { t: $t } = i18n.global;
17890
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-xQ6gY9Jm.js"));
17891
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-BsMfmT_D.js"));
17892
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-D_-66PNb.js"));
17893
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-DClq-5jV.js"));
17894
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-Bx8U4Q-G.js"));
17895
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-Bxqc1sR9.js"));
17890
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-BVB651h5.js"));
17891
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-HXuwAlUx.js"));
17892
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-Bcbk7Mfq.js"));
17893
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-D0lcY6i5.js"));
17894
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-xk5WHcOA.js"));
17895
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-DYrutZIU.js"));
17896
17896
  const props = __props;
17897
17897
  const repoInfo = inject("repoInfo", computed(() => void 0));
17898
17898
  const orgInfo = inject("orgInfo", computed(() => void 0));
@@ -19256,7 +19256,7 @@ const vElementExposure = {
19256
19256
  beforeUnmount() {
19257
19257
  }
19258
19258
  };
19259
- const NoticeModal = defineAsyncComponent(() => import("./notice-BFliChGn.js"));
19259
+ const NoticeModal = defineAsyncComponent(() => import("./notice-ChnZUVVL.js"));
19260
19260
  function clearNotice() {
19261
19261
  if (localStorage$2.getItem("validator_email")) {
19262
19262
  localStorage$2.removeItem("validator_email");
@@ -21736,9 +21736,9 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
21736
21736
  const layoutConfig2 = useLayoutConfig();
21737
21737
  const { t: t2 } = i18n.global;
21738
21738
  const route = useRoute();
21739
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-BGiju2UG.js"));
21740
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-36_uL6tZ.js"));
21741
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-CWaND1ur.js"));
21739
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem-BWtMu86D.js"));
21740
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-NDHvMtIO.js"));
21741
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-CAOVrzQi.js"));
21742
21742
  const props = __props;
21743
21743
  const useReport2 = inject("useReport");
21744
21744
  const userInfo = inject("userInfo");
@@ -28277,7 +28277,7 @@ const _SlidCaptchaManager = class _SlidCaptchaManager {
28277
28277
  __publicField(_SlidCaptchaManager, "instance");
28278
28278
  let SlidCaptchaManager = _SlidCaptchaManager;
28279
28279
  const slidCaptchaManager = SlidCaptchaManager.getInstance();
28280
- const SlidCaptcha = defineAsyncComponent(() => import("./index-Cw-KfpUO.js"));
28280
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-5zUG2lC3.js"));
28281
28281
  const useSlidCaptcha = () => {
28282
28282
  const { mount, unMount, isMounted } = usePopup("slid-captcha-popup");
28283
28283
  const open = (config2) => {
@@ -28307,7 +28307,7 @@ const useSlidCaptcha = () => {
28307
28307
  close
28308
28308
  };
28309
28309
  };
28310
- const YunpianCaptcha = defineAsyncComponent(() => import("./index-CPHdhVj6.js"));
28310
+ const YunpianCaptcha = defineAsyncComponent(() => import("./index-C_R856-N.js"));
28311
28311
  const useYunpianCaptcha = () => {
28312
28312
  const { mount, unMount } = usePopup("yunpian-captcha-popup");
28313
28313
  const open = (config2) => {
@@ -32425,10 +32425,20 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
32425
32425
  const repo = String(ref2.repo_path || "").trim();
32426
32426
  const namespace = String(ref2.namespace || "").trim();
32427
32427
  const branch = String(ref2.branch || "").trim();
32428
- const repoLabel = repo || namespace;
32428
+ const refRepo = repo || namespace;
32429
+ const repoLabel = branch && isOwnRepo(repo, namespace) ? "" : refRepo;
32429
32430
  if (repoLabel && branch) return `${repoLabel}:${branch}`;
32430
32431
  return repoLabel || branch;
32431
32432
  }
32433
+ function isOwnRepo(repo, namespace) {
32434
+ const own = normalizeRepoPath(props.data.repo_path);
32435
+ if (!own) return false;
32436
+ const refRepo = normalizeRepoPath(repo);
32437
+ if (refRepo) return refRepo === own;
32438
+ const refNamespace = normalizeRepoPath(namespace);
32439
+ if (!refNamespace) return false;
32440
+ return refNamespace === own || own.startsWith(`${refNamespace}/`);
32441
+ }
32432
32442
  const flow = computed(() => {
32433
32443
  const baseLabel = refLabel(props.data.base);
32434
32444
  const headLabel = refLabel(props.data.head);
@@ -33277,6 +33287,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33277
33287
  let skeletonTimer = null;
33278
33288
  let closeTimer = null;
33279
33289
  let displayTimer = null;
33290
+ let requestTimer = null;
33280
33291
  let pendingAnchor = null;
33281
33292
  let pendingTarget = null;
33282
33293
  let suppressedAnchor = null;
@@ -33360,6 +33371,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33360
33371
  displayTimer = null;
33361
33372
  }
33362
33373
  }
33374
+ function clearRequestTimer() {
33375
+ if (requestTimer) {
33376
+ clearTimeout(requestTimer);
33377
+ requestTimer = null;
33378
+ }
33379
+ }
33363
33380
  function releaseCurrentRequest() {
33364
33381
  if (!releaseRequest) return;
33365
33382
  const release = releaseRequest;
@@ -33390,6 +33407,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33390
33407
  clearSkeletonTimer();
33391
33408
  clearCloseTimer();
33392
33409
  clearDisplayTimer();
33410
+ clearRequestTimer();
33393
33411
  releaseCurrentRequest();
33394
33412
  cardTarget.value = null;
33395
33413
  cardAnchor = null;
@@ -33511,7 +33529,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33511
33529
  const handle = inFlight.acquire(baseKey, (signal) => {
33512
33530
  const instance = host();
33513
33531
  if (!instance) return Promise.resolve(null);
33514
- return instance.loadPreview(target.query, { signal });
33532
+ return instance.loadPreview(target.query, { signal, timeout: config2.requestTimeout });
33515
33533
  });
33516
33534
  let settled = false;
33517
33535
  const releaseOnce = () => {
@@ -33521,6 +33539,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33521
33539
  handle.release();
33522
33540
  };
33523
33541
  releaseRequest = releaseOnce;
33542
+ clearRequestTimer();
33543
+ if (config2.requestTimeout > 0) {
33544
+ requestTimer = setTimeout(() => {
33545
+ requestTimer = null;
33546
+ if (currentGeneration !== generation) return;
33547
+ closeCard();
33548
+ }, config2.requestTimeout);
33549
+ }
33524
33550
  skeletonTimer = setTimeout(() => {
33525
33551
  if (currentGeneration !== generation) return;
33526
33552
  if (preview.value) return;
@@ -33530,6 +33556,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33530
33556
  handle.promise.then((result2) => {
33531
33557
  releaseOnce();
33532
33558
  if (currentGeneration !== generation) return;
33559
+ clearRequestTimer();
33533
33560
  clearSkeletonTimer();
33534
33561
  if (!result2) {
33535
33562
  closeCard();
@@ -33546,6 +33573,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33546
33573
  }).catch(() => {
33547
33574
  releaseOnce();
33548
33575
  if (currentGeneration !== generation) return;
33576
+ clearRequestTimer();
33549
33577
  clearSkeletonTimer();
33550
33578
  closeCard();
33551
33579
  });
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { P, Q, S, U, V, W, X, Y, Z, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, C, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL } from "./index-BvBm0VqE.js";
1
+ import { P, Q, S, U, V, W, X, Y, Z, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, C, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL } from "./index-i8jCLCn2.js";
2
2
  export {
3
3
  P as AsideFooterTools,
4
4
  Q as AtomCodeLauncher,
@@ -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-BvBm0VqE.js";
2
+ import { i as isPhone, u as useModel, _ as _export_sfc } from "./index-i8jCLCn2.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.78",
3
+ "version": "1.12.80",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, toDisplayString, unref, useModel, ref, watch, openBlock, createElementBlock, createVNode, normalizeClass, withDirectives, createElementVNode, vShow, mergeModels, inject, withModifiers, createBlock, Fragment, computed, normalizeStyle, createCommentVNode, createTextVNode, renderList, withCtx, reactive, onMounted, watchEffect } from "vue";
2
- import { d as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, r as reqCatch, e as useRequestReport, h as headRequest, a as i18n, T as TOPIC_TYPE, f as useTimeFormat, g as useCookie, j as usePageResize, L as LANG_ZH, k as isGstarRepo, m as _sfc_main$b, o as isIncubationRepo, p as highlightWords, t as transformUrl, q as _frEventTrack, E as EVENT_NAME, w as REPO_TYPE, x as extractRepoInfoWithURL, y as LANG_KEY } from "./index-BvBm0VqE.js";
3
- import { t as transWebUrl } from "./transWebUrl-DRxMMqi_.js";
2
+ import { d as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, r as reqCatch, e as useRequestReport, h as headRequest, a as i18n, T as TOPIC_TYPE, f as useTimeFormat, g as useCookie, j as usePageResize, L as LANG_ZH, k as isGstarRepo, m as _sfc_main$b, o as isIncubationRepo, p as highlightWords, t as transformUrl, q as _frEventTrack, E as EVENT_NAME, w as REPO_TYPE, x as extractRepoInfoWithURL, y as LANG_KEY } from "./index-i8jCLCn2.js";
3
+ import { t as transWebUrl } from "./transWebUrl-GSTP9sGm.js";
4
4
  import { useRouter } from "vue-router";
5
5
  import { Row, Col } from "vue-devui-lal/grid";
6
6
  import { Skeleton, SkeletonItem } from "vue-devui-lal/skeleton";
@@ -1,4 +1,4 @@
1
- import { c as useLayoutConfig } from "./index-BvBm0VqE.js";
1
+ import { c as useLayoutConfig } from "./index-i8jCLCn2.js";
2
2
  const layoutConfig = useLayoutConfig();
3
3
  const transWebUrl = (url, params, options = {}) => {
4
4
  if (!url) return url;