vue-layout-gitcode 1.12.15-beta.1 → 1.12.15-beta.10

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
- import { defineComponent, inject, createElementBlock, openBlock, Fragment, createElementVNode, toDisplayString, createVNode, unref, renderList, withDirectives, createBlock, ref, watch, onMounted, createCommentVNode } from "vue";
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-0AjxTFDx.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-BcmNxd28.js";
5
5
  import "lodash/debounce";
6
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-bZAi191d.js";
7
- import "./transWebUrl-TUzSMmWj.js";
6
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-BB4Ahsk2.js";
7
+ import "./transWebUrl-Y8-wNaJD.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
- import { defineComponent, inject, useSlots, computed, ref, createBlock, openBlock, 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, b as REPO_EVENT, _ as _export_sfc } from "./index-0AjxTFDx.js";
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-BcmNxd28.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";
@@ -93,7 +93,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
93
93
  useReport(REPO_EVENT.CLICK, { module_name: `侧边栏_${reportName}` });
94
94
  }
95
95
  };
96
- const handleMenuClick = () => {
96
+ const handleMenuClick = async () => {
97
97
  var _a, _b;
98
98
  const currentHref = window.location.href;
99
99
  if (!props.item.left_menu_url) {
@@ -106,6 +106,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
106
106
  emitEvent("login", { loginTriggerSource: `aside_${props.item.left_menu_url}` });
107
107
  return;
108
108
  }
109
+ if (props.item.left_menu_url === "/dashboard/downloads?tab=view") {
110
+ window.open(props.item.left_menu_url, "_blank");
111
+ return;
112
+ }
109
113
  if (props.item.left_menu_url === "/dashboard/downloads") {
110
114
  (_b = (_a = globalStore.value) == null ? void 0 : _a.downloadClickRequest) == null ? void 0 : _b.call(_a);
111
115
  }
@@ -113,14 +117,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
113
117
  window.open(props.item.left_menu_url, "_blank");
114
118
  } else if (isHttps(props.item.left_menu_url || "")) {
115
119
  window.open(props.item.left_menu_url, "_self");
120
+ } else if (independence) {
121
+ window.open(layoutConfig.VITE_HOST + props.item.left_menu_url, "_self");
122
+ return;
116
123
  } else {
117
- if (independence) {
118
- window.open(layoutConfig.VITE_HOST + props.item.left_menu_url, "_self");
119
- return;
120
- }
121
- router.push({
122
- path: props.item.left_menu_url
123
- });
124
+ clickMenuReport();
125
+ await navigateWithMigrationGuard(router, { path: props.item.left_menu_url });
126
+ return;
124
127
  }
125
128
  clickMenuReport();
126
129
  };
@@ -145,7 +148,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
145
148
  ]),
146
149
  default: withCtx(() => [
147
150
  createElementVNode("div", {
148
- class: normalizeClass(["menu-item", { "menu-item__selected": isSelected.value, "menu-item__aihub": isAIHub.value }]),
151
+ class: normalizeClass(["menu-item", { "menu-item__selected": isSelected.value }]),
149
152
  onMouseenter: handleMouseEnter,
150
153
  onMouseleave: handleMouseLeave,
151
154
  onClick: handleMenuClick
@@ -1,7 +1,7 @@
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, J as _sfc_main$1, K as loadAsideData, F as emitEvent, s as setLoginTriggerSource, f as useRequestReport, I as asideRequest, _ as _export_sfc } from "./index-0AjxTFDx.js";
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-BcmNxd28.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-TUzSMmWj.js";
4
+ import { t as transWebUrl } from "./transWebUrl-Y8-wNaJD.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";
@@ -170,13 +170,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
170
170
  }
171
171
  return [...DEFAULT_ORG_FILTER_OPTIONS, ...moreOrgData.value];
172
172
  });
173
- const fastToLink = (type) => {
173
+ const fastToLink = async (type) => {
174
174
  if (type === "project") {
175
- router.push({ name: "userRepos", params: { namespace: props.username } });
175
+ await navigateWithMigrationGuard(router, { name: "userRepos", params: { namespace: props.username } });
176
176
  } else if (type === "enterprise") {
177
177
  window.location.href = transformUrl(`${layoutConfig.VITE_HOST}/setting/enterprise`);
178
178
  } else {
179
- router.push({ name: "settingOrganization" });
179
+ await navigateWithMigrationGuard(router, { name: "settingOrganization" });
180
180
  }
181
181
  };
182
182
  const loadMoreTeams = () => {
@@ -250,7 +250,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
250
250
  };
251
251
  return (_ctx, _cache) => {
252
252
  return openBlock(), createElementBlock("ul", _hoisted_1, [
253
- _ctx.type === "project" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
253
+ __props.type === "project" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
254
254
  createElementVNode("div", _hoisted_2, [
255
255
  _cache[17] || (_cache[17] = createElementVNode("span", { class: "devui-menu-icon" }, null, -1)),
256
256
  createElementVNode("span", _hoisted_3, [
@@ -311,7 +311,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
311
311
  }, 8, ["modelValue", "placeholder"])
312
312
  ], 2)
313
313
  ], 64)) : createCommentVNode("", true),
314
- _ctx.type === "team" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
314
+ __props.type === "team" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
315
315
  createElementVNode("div", _hoisted_4, [
316
316
  _cache[18] || (_cache[18] = createElementVNode("span", { class: "devui-menu-icon" }, null, -1)),
317
317
  createElementVNode("span", _hoisted_5, [
@@ -350,7 +350,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
350
350
  }, 8, ["modelValue", "placeholder"])
351
351
  ], 2)
352
352
  ], 64)) : createCommentVNode("", true),
353
- _ctx.type === "enterprise" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
353
+ __props.type === "enterprise" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
354
354
  createElementVNode("div", _hoisted_6, [
355
355
  _cache[19] || (_cache[19] = createElementVNode("span", { class: "devui-menu-icon" }, null, -1)),
356
356
  createElementVNode("span", _hoisted_7, [
@@ -399,10 +399,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
399
399
  "data-openBlank": true,
400
400
  "data-href": unref(transformUrl)(unref(transWebUrl)(item.web_url)),
401
401
  class: "text",
402
- title: _ctx.type === "project" ? `${item.namespace}/${item.label}` : item.label
402
+ title: __props.type === "project" ? `${item.namespace}/${item.label}` : item.label
403
403
  }, {
404
404
  icon: withCtx(() => [
405
- _ctx.type === "project" ? (openBlock(), createBlock(GIcon, {
405
+ __props.type === "project" ? (openBlock(), createBlock(GIcon, {
406
406
  key: 0,
407
407
  name: "gt-line-project",
408
408
  color: "var(--theme-menu-icon-fill)",
@@ -417,7 +417,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
417
417
  }, null, 8, ["src", "name", "class"]))
418
418
  ]),
419
419
  default: withCtx(() => [
420
- _ctx.type === "project" ? (openBlock(), createElementBlock("span", _hoisted_8, [
420
+ __props.type === "project" ? (openBlock(), createElementBlock("span", _hoisted_8, [
421
421
  createElementVNode("span", _hoisted_9, toDisplayString((item.namespace || "").slice(0, 10)) + toDisplayString((item.namespace || "").length > 10 ? "..." : ""), 1),
422
422
  createElementVNode("span", _hoisted_10, "/" + toDisplayString(item.label), 1)
423
423
  ])) : (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(item.label), 1))
@@ -425,14 +425,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
425
425
  _: 2
426
426
  }, 1032, ["data-href", "title"]);
427
427
  }), 128)),
428
- _ctx.type !== "enterprise" && !totalNum.value && !firstLoading.value ? (openBlock(), createBlock(unref(Button), {
428
+ __props.type !== "enterprise" && !totalNum.value && !firstLoading.value ? (openBlock(), createBlock(unref(Button), {
429
429
  key: 4,
430
430
  variant: "text",
431
431
  class: "more-btn",
432
432
  onClick: withModifiers(createRepoOrOrg, ["stop"])
433
433
  }, {
434
434
  default: withCtx(() => [
435
- createTextVNode(toDisplayString(_ctx.buttonText), 1)
435
+ createTextVNode(toDisplayString(__props.buttonText), 1)
436
436
  ]),
437
437
  _: 1
438
438
  })) : createCommentVNode("", true),
@@ -1,7 +1,7 @@
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, t as transformUrl, I as asideRequest, G as GIcon, F as emitEvent, s as setLoginTriggerSource, f as useRequestReport, _ as _export_sfc } from "./index-0AjxTFDx.js";
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-BcmNxd28.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-TUzSMmWj.js";
4
+ import { t as transWebUrl } from "./transWebUrl-Y8-wNaJD.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";
@@ -113,8 +113,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
113
113
  }, 200);
114
114
  };
115
115
  const router = useRouter();
116
- const fastToLink = () => {
117
- router.push({ name: "userRepos", params: { namespace: props.username } });
116
+ const fastToLink = async () => {
117
+ await navigateWithMigrationGuard(router, { name: "userRepos", params: { namespace: props.username } });
118
118
  };
119
119
  const handleOpenSearch = () => {
120
120
  if (!props.isLogin) {
@@ -220,7 +220,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
220
220
  onClick: withModifiers(createRepoOrOrg, ["stop"])
221
221
  }, {
222
222
  default: withCtx(() => [
223
- createTextVNode(toDisplayString(_ctx.buttonText), 1)
223
+ createTextVNode(toDisplayString(__props.buttonText), 1)
224
224
  ]),
225
225
  _: 1
226
226
  })) : createCommentVNode("", true),
@@ -1,5 +1,5 @@
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-0AjxTFDx.js";
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-BcmNxd28.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
- 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-0AjxTFDx.js";
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-BcmNxd28.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" };
@@ -87,9 +87,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
87
87
  };
88
88
  const historyList = computed(() => {
89
89
  var _a;
90
- return (_a = props.searchHistoryList) == null ? void 0 : _a.map((item) => {
90
+ return (_a = props.searchHistoryList) == null ? void 0 : _a.map((raw) => typeof raw === "string" ? { q: raw } : raw).filter((item) => item == null ? void 0 : item.q).map((item) => {
91
91
  const repoTitle = item.repo ? `${t("gitCodeLayout.header.repo")} ${decodeURIComponent(item.repo)}:` : "";
92
- const namespaceTitle = item.namespace ? `${item.scope === "group" ? t("gitCodeLayout.header.org") : t("gitCodeLayout.header.user")} ${decodeURIComponent(item.namespace)}:` : "";
92
+ const userVal = item.user || (item.scope === "user" ? item.namespace : "");
93
+ const orgVal = item.org || (item.scope === "user" ? "" : item.namespace);
94
+ let namespaceTitle = "";
95
+ if (userVal) {
96
+ namespaceTitle = `${t("gitCodeLayout.header.user")} ${decodeURIComponent(userVal)}:`;
97
+ } else if (orgVal) {
98
+ namespaceTitle = `${t("gitCodeLayout.header.org")} ${decodeURIComponent(orgVal)}:`;
99
+ }
93
100
  return { ...item, repoTitle, namespaceTitle };
94
101
  });
95
102
  });
@@ -110,7 +117,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
110
117
  };
111
118
  return (_ctx, _cache) => {
112
119
  return openBlock(), createElementBlock("div", _hoisted_1, [
113
- _ctx.searchHistoryList.length ? (openBlock(), createElementBlock("ul", {
120
+ __props.searchHistoryList.length ? (openBlock(), createElementBlock("ul", {
114
121
  key: 0,
115
122
  class: "history-list-box history-list-box--mt",
116
123
  onMouseleave: resetIndex
@@ -118,7 +125,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
118
125
  (openBlock(true), createElementBlock(Fragment, null, renderList(historyList.value, (item, index) => {
119
126
  return openBlock(), createElementBlock("li", {
120
127
  key: item,
121
- class: normalizeClass(_ctx.activeIndex === index ? "hoverbg" : ""),
128
+ class: normalizeClass(__props.activeIndex === index ? "hoverbg" : ""),
122
129
  onClick: ($event) => toSearch(item),
123
130
  onMouseenter: ($event) => onSearchEnter(index)
124
131
  }, [
@@ -137,14 +144,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
137
144
  class: "history-list-box__ellipsis",
138
145
  title: item.namespaceTitle
139
146
  }, toDisplayString(item.namespaceTitle), 9, _hoisted_6),
140
- createElementVNode("span", _hoisted_7, toDisplayString(item.q || item), 1)
147
+ createElementVNode("span", _hoisted_7, toDisplayString(item.q), 1)
141
148
  ]),
142
149
  createElementVNode("div", _hoisted_8, [
143
150
  createElementVNode("span", {
144
- class: normalizeClass(_ctx.activeIndex === index ? "history-list-box__type-text--active" : "history-list-box__type-text")
151
+ class: normalizeClass(__props.activeIndex === index ? "history-list-box__type-text--active" : "history-list-box__type-text")
145
152
  }, toDisplayString(getRepoType(item).text), 3),
146
153
  createVNode(GIcon, {
147
- name: _ctx.activeIndex === index ? getRepoType(item).hoverIcon : getRepoType(item).icon
154
+ name: __props.activeIndex === index ? getRepoType(item).hoverIcon : getRepoType(item).icon
148
155
  }, null, 8, ["name"])
149
156
  ])
150
157
  ]),
@@ -1,6 +1,6 @@
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-bZAi191d.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-0AjxTFDx.js";
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-BB4Ahsk2.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-BcmNxd28.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";
@@ -57,7 +57,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
57
  createElementVNode("div", _hoisted_3, toDisplayString(unref($t)("gitCodeLayout.search.trendingToday")), 1),
58
58
  (openBlock(true), createElementBlock(Fragment, null, renderList(recommendRepoList.value, (item, index) => {
59
59
  return renderSlot(_ctx.$slots, "default", {
60
- key: item.id,
61
60
  item,
62
61
  index
63
62
  }, () => [
@@ -72,7 +71,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
72
71
  cardType: (item == null ? void 0 : item.repo_type) || "repo",
73
72
  "url-params": { source_module: "search_box_discovery" }
74
73
  }, null, 8, ["info", "onReport", "cardType"]))
75
- ], true);
74
+ ], true, item.id);
76
75
  }), 128))
77
76
  ])) : (openBlock(), createElementBlock("div", _hoisted_4, [
78
77
  (openBlock(), createElementBlock(Fragment, null, renderList(5, (item) => {
@@ -1,5 +1,5 @@
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-0AjxTFDx.js";
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-BcmNxd28.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  const _hoisted_1 = ["onClick"];
@@ -10,13 +10,11 @@ const _hoisted_4 = {
10
10
  class: "g-header-search-scopechoose__label"
11
11
  };
12
12
  const _hoisted_5 = { key: 1 };
13
- const _hoisted_6 = { class: "g-header-search-scopechoose__label" };
14
- const _hoisted_7 = { class: "right-text" };
13
+ const _hoisted_6 = { class: "right-text" };
15
14
  const _sfc_main = /* @__PURE__ */ defineComponent({
16
15
  __name: "SearchScopeList",
17
16
  props: {
18
- searchScopeList: {},
19
- searchStr: {}
17
+ searchScopeList: {}
20
18
  },
21
19
  emits: ["scopeSearch"],
22
20
  setup(__props, { emit: __emit }) {
@@ -27,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
27
25
  };
28
26
  return (_ctx, _cache) => {
29
27
  return openBlock(), createElementBlock("ul", null, [
30
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.searchScopeList, (item, index) => {
28
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.searchScopeList, (item, index) => {
31
29
  return openBlock(), createElementBlock("li", {
32
30
  key: index,
33
31
  class: "g-header-search-scopechoose",
@@ -40,10 +38,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
38
  class: "g-header-search-icon"
41
39
  }),
42
40
  item.label ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(item.label) + ":", 1)) : createCommentVNode("", true),
43
- item.value ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(item.value), 1)) : createCommentVNode("", true),
44
- createElementVNode("span", _hoisted_6, toDisplayString(_ctx.searchStr), 1)
41
+ item.value ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(item.value), 1)) : createCommentVNode("", true)
45
42
  ]),
46
- createElementVNode("p", _hoisted_7, [
43
+ createElementVNode("p", _hoisted_6, [
47
44
  createElementVNode("span", null, toDisplayString(item.label ? `${item.label}${unref($t)("gitCodeLayout.header.underSearch")}` : item.title), 1),
48
45
  createVNode(GIcon, { name: "gt-line-right" })
49
46
  ])
@@ -1,5 +1,5 @@
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-0AjxTFDx.js";
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-BcmNxd28.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,7 +1,7 @@
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";
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, 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-0AjxTFDx.js";
4
- import { t as transWebUrl } from "./transWebUrl-TUzSMmWj.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-BcmNxd28.js";
4
+ import { t as transWebUrl } from "./transWebUrl-Y8-wNaJD.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";
@@ -87,7 +87,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
87
87
  },
88
88
  setup(__props) {
89
89
  return (_ctx, _cache) => {
90
- return toDisplayString(unref(transferNumber)({ number: _ctx.number, fixed: _ctx.fixed, byte: _ctx.byte, gt100: _ctx.gt100 }));
90
+ return toDisplayString(unref(transferNumber)({ number: __props.number, fixed: __props.fixed, byte: __props.byte, gt100: __props.gt100 }));
91
91
  };
92
92
  }
93
93
  });
@@ -225,7 +225,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
225
225
  }]),
226
226
  onClick: withModifiers(handleStar, ["stop", "prevent"])
227
227
  }, [
228
- _ctx.isLike ? (openBlock(), createBlock(Like, {
228
+ __props.isLike ? (openBlock(), createBlock(Like, {
229
229
  key: 0,
230
230
  class: "i-star-tag__icon-mr",
231
231
  modelValue: starred.value,
@@ -279,7 +279,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
279
279
  }),
280
280
  createElementVNode("span", null, [
281
281
  createVNode(_sfc_main$a, {
282
- number: _ctx.count || 0
282
+ number: __props.count || 0
283
283
  }, null, 8, ["number"])
284
284
  ])
285
285
  ]);
@@ -350,9 +350,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
350
350
  color: "var(--theme-home-card-color-placeholder)",
351
351
  size: "14"
352
352
  }),
353
- !_ctx.hideText ? (openBlock(), createElementBlock("span", _hoisted_2$4, toDisplayString(unref($t)("gitCodeLayout.components.repo.today")), 1)) : createCommentVNode("", true),
353
+ !__props.hideText ? (openBlock(), createElementBlock("span", _hoisted_2$4, toDisplayString(unref($t)("gitCodeLayout.components.repo.today")), 1)) : createCommentVNode("", true),
354
354
  createVNode(_sfc_main$a, {
355
- number: _ctx.starCountOne || 0
355
+ number: __props.starCountOne || 0
356
356
  }, null, 8, ["number"])
357
357
  ]);
358
358
  };
@@ -383,9 +383,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
383
383
  size: "14"
384
384
  }),
385
385
  createElementVNode("span", _hoisted_2$3, [
386
- _cache[0] || (_cache[0] = createTextVNode("Star ")),
386
+ _cache[0] || (_cache[0] = createTextVNode("Star ", -1)),
387
387
  createVNode(_sfc_main$a, {
388
- number: _ctx.count || 0,
388
+ number: __props.count || 0,
389
389
  gt100: true
390
390
  }, null, 8, ["number"])
391
391
  ])
@@ -445,32 +445,32 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
445
445
  return openBlock(), createElementBlock(Fragment, null, [
446
446
  createElementVNode("div", null, [
447
447
  createElementVNode("div", _hoisted_1$3, [
448
- _ctx.tagInfo ? (openBlock(), createBlock(LanguageTag, {
448
+ __props.tagInfo ? (openBlock(), createBlock(LanguageTag, {
449
449
  key: 0,
450
- "tag-info": _ctx.tagInfo
450
+ "tag-info": __props.tagInfo
451
451
  }, null, 8, ["tag-info"])) : createCommentVNode("", true),
452
- !_ctx.hideStarCount ? (openBlock(), createBlock(StarCountOne, {
452
+ !__props.hideStarCount ? (openBlock(), createBlock(StarCountOne, {
453
453
  key: 1,
454
454
  hideText: "",
455
- starCountOne: _ctx.repoInfo.star_count
455
+ starCountOne: __props.repoInfo.star_count
456
456
  }, null, 8, ["starCountOne"])) : createCommentVNode("", true),
457
- _ctx.repoInfo.forks_count ? (openBlock(), createBlock(ForkTag, {
457
+ __props.repoInfo.forks_count ? (openBlock(), createBlock(ForkTag, {
458
458
  key: 2,
459
- count: _ctx.repoInfo.forks_count
459
+ count: __props.repoInfo.forks_count
460
460
  }, null, 8, ["count"])) : createCommentVNode("", true),
461
461
  showUpdateTimeDot.value ? (openBlock(), createElementBlock("div", _hoisted_2$2)) : createCommentVNode("", true),
462
- !_ctx.hideUpdateTime ? (openBlock(), createElementBlock("div", _hoisted_3$2, toDisplayString(unref(formatTimeFromNow)((_ctx.searchCard ? _ctx.repoInfo.last_repository_updated_at : _ctx.repoInfo.last_activity_at) || _ctx.repoInfo.last_activity_at)), 1)) : createCommentVNode("", true),
463
- !_ctx.hideStarIncrease && _ctx.repoInfo.star_count_one ? (openBlock(), createBlock(StarCountOne, {
462
+ !__props.hideUpdateTime ? (openBlock(), createElementBlock("div", _hoisted_3$2, toDisplayString(unref(formatTimeFromNow)((__props.searchCard ? __props.repoInfo.last_repository_updated_at : __props.repoInfo.last_activity_at) || __props.repoInfo.last_activity_at)), 1)) : createCommentVNode("", true),
463
+ !__props.hideStarIncrease && __props.repoInfo.star_count_one ? (openBlock(), createBlock(StarCountOne, {
464
464
  key: 5,
465
- starCountOne: _ctx.repoInfo.star_count_one
465
+ starCountOne: __props.repoInfo.star_count_one
466
466
  }, null, 8, ["starCountOne"])) : createCommentVNode("", true),
467
- _ctx.repoInfo.is_gh_mirrors ? (openBlock(), createBlock(GithubStarNum, {
467
+ __props.repoInfo.is_gh_mirrors ? (openBlock(), createBlock(GithubStarNum, {
468
468
  key: 6,
469
- count: _ctx.repoInfo.import_star_count
469
+ count: __props.repoInfo.import_star_count
470
470
  }, null, 8, ["count"])) : createCommentVNode("", true)
471
471
  ])
472
472
  ]),
473
- !_ctx.hideTopicTags && topicNames.value.length && _ctx.searchCard ? (openBlock(), createElementBlock("div", {
473
+ !__props.hideTopicTags && topicNames.value.length && __props.searchCard ? (openBlock(), createElementBlock("div", {
474
474
  key: 0,
475
475
  class: "topic-tags",
476
476
  ref_key: "topicTagsRef",
@@ -718,7 +718,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
718
718
  });
719
719
  return (_ctx, _cache) => {
720
720
  return openBlock(), createElementBlock("a", {
721
- class: normalizeClass(["i-search-projects-card", { noborder: _ctx.noborder, "full-hover": _ctx.hover }]),
721
+ class: normalizeClass(["i-search-projects-card", { noborder: __props.noborder, "full-hover": __props.hover }]),
722
722
  onClick: handleClick
723
723
  }, [
724
724
  createVNode(unref(Row), { class: "i-search-projects-card-title" }, {
@@ -732,43 +732,43 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
732
732
  return [
733
733
  createVNode(GIcon, {
734
734
  name: iconName.value,
735
- class: normalizeClass({ "align-middle": _ctx.info.is_gh_mirrors }),
735
+ class: normalizeClass({ "align-middle": __props.info.is_gh_mirrors }),
736
736
  color: "var(--theme-placeholder)"
737
737
  }, null, 8, ["name", "class"]),
738
738
  createElementVNode("span", {
739
739
  class: "repo-title",
740
740
  innerHTML: preHandWord()
741
741
  }, null, 8, _hoisted_1),
742
- _ctx.info.show_recommend_icon ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(unref($t)("gitCodeLayout.search.recommendTag")), 1)) : createCommentVNode("", true),
743
- unref(isGstarRepo)(_ctx.info.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_3, [
742
+ __props.info.show_recommend_icon ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(unref($t)("gitCodeLayout.search.recommendTag")), 1)) : createCommentVNode("", true),
743
+ unref(isGstarRepo)(__props.info.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_3, [
744
744
  createVNode(_sfc_main$b, {
745
745
  origin: "repo",
746
746
  icon: "",
747
747
  type: "gstar",
748
748
  message: `G-Star ${unref($t)("gitCodeLayout.GStar.project.graduation")}`
749
749
  }, {
750
- default: withCtx(() => _cache[0] || (_cache[0] = [
751
- createTextVNode("G-Star ")
752
- ])),
750
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
751
+ createTextVNode("G-Star ", -1)
752
+ ])]),
753
753
  _: 1
754
754
  }, 8, ["message"])
755
755
  ])) : createCommentVNode("", true),
756
- unref(isIncubationRepo)(_ctx.info.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_4, [
756
+ unref(isIncubationRepo)(__props.info.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_4, [
757
757
  createVNode(_sfc_main$b, {
758
758
  origin: "repo",
759
759
  icon: "",
760
760
  type: "incubation",
761
761
  message: `G-Star ${unref($t)("gitCodeLayout.GStar.project.incubation")}`
762
762
  }, {
763
- default: withCtx(() => _cache[1] || (_cache[1] = [
764
- createTextVNode(" G-Star ")
765
- ])),
763
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [
764
+ createTextVNode(" G-Star ", -1)
765
+ ])]),
766
766
  _: 1
767
767
  }, 8, ["message"])
768
768
  ])) : createCommentVNode("", true),
769
769
  createVNode(NewTag, {
770
- repoType: _ctx.cardType,
771
- isNew: ((_a = _ctx.info) == null ? void 0 : _a.is_new) || false
770
+ repoType: __props.cardType,
771
+ isNew: ((_a = __props.info) == null ? void 0 : _a.is_new) || false
772
772
  }, null, 8, ["repoType", "isNew"])
773
773
  ];
774
774
  }),
@@ -776,7 +776,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
776
776
  }),
777
777
  createVNode(unref(Col), { flex: "none" }, {
778
778
  default: withCtx(() => [
779
- !_ctx.hideStarBtn ? (openBlock(), createBlock(StarTag, {
779
+ !__props.hideStarBtn ? (openBlock(), createBlock(StarTag, {
780
780
  key: 0,
781
781
  isLike: isModel.value,
782
782
  "star-info": starInfo.value,
@@ -788,12 +788,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
788
788
  ]),
789
789
  _: 1
790
790
  }),
791
- !_ctx.hideDescription ? (openBlock(), createElementBlock("div", {
791
+ !__props.hideDescription ? (openBlock(), createElementBlock("div", {
792
792
  key: 0,
793
793
  innerHTML: unref(highlightWords)("", description.value),
794
794
  class: "i-search-projects-card-desc ellipsis"
795
795
  }, null, 8, _hoisted_5)) : createCommentVNode("", true),
796
- _ctx.info.index === 0 && _ctx.info.is_recommend ? (openBlock(), createElementBlock("div", _hoisted_6, [
796
+ __props.info.index === 0 && __props.info.is_recommend ? (openBlock(), createElementBlock("div", _hoisted_6, [
797
797
  queryLoading.value ? (openBlock(), createBlock(unref(Skeleton), { key: 0 }, {
798
798
  placeholder: withCtx(() => [
799
799
  createVNode(unref(Row), {
@@ -833,14 +833,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
833
833
  })) : createCommentVNode("", true)
834
834
  ])) : isModel.value ? (openBlock(), createBlock(ModelCardFooter, {
835
835
  key: 2,
836
- repoInfo: _ctx.info
836
+ repoInfo: __props.info
837
837
  }, null, 8, ["repoInfo"])) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
838
- !_ctx.hideFooter ? (openBlock(), createBlock(RepoCardFooter, {
838
+ !__props.hideFooter ? (openBlock(), createBlock(RepoCardFooter, {
839
839
  key: 0,
840
- hideTopicTags: _ctx.hideTopicTags,
840
+ hideTopicTags: __props.hideTopicTags,
841
841
  hideStarCount: "",
842
842
  tagInfo: tagInfo.value,
843
- repoInfo: _ctx.info,
843
+ repoInfo: __props.info,
844
844
  searchCard: "",
845
845
  class: "i-search-projects-card-bottom",
846
846
  onTopicClick: handleTopicClick