vue-layout-gitcode 1.12.15-beta.66 → 1.12.15-beta.68
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.
- package/{GloabarSearch-Diyst7cl.js → GloabarSearch-B0wIE39O.js} +14 -41
- package/{MenuItem-Dk9LTilC.js → MenuItem-CsHiiACR.js} +2 -2
- package/{ProjectMenuList-Dqu95rNf.js → ProjectMenuList-BrCjzTrr.js} +11 -11
- package/{ProjectMenuListV2-UCVXfI9e.js → ProjectMenuListV2-B15AqjCJ.js} +4 -4
- package/{ProjectSearch-DX4uCpR1.js → ProjectSearch-BGkdpIP6.js} +2 -2
- package/{SearchHistoryList-KxJ1Ia2p.js → SearchHistoryList-Ds1zbGk2.js} +6 -6
- package/{SearchRecommed-UVP8pIiJ.js → SearchRecommed-DZanoUB-.js} +18 -12
- package/{SearchScopeList-KjsZJhZi.js → SearchScopeList-CZOmkppy.js} +3 -3
- package/{UserSearch-DYjtbj72.js → UserSearch-Brf46y3U.js} +2 -2
- package/{index-BHzDye0L.js → index-7OmUcYU-.js} +5 -6
- package/{index-By8V1pEl.js → index-CpFSAE16.js} +3358 -2486
- package/{index-qtwDiRcQ.js → index-DhX-BVJb.js} +2 -2
- package/index.js +19 -19
- package/{notice-B__eBSrb.js → notice-CtuWUZZ8.js} +11 -13
- package/package.json +1 -1
- package/{useReportRepo-HMsMztZ4.js → search-suggestion-Yf_1oAM9.js} +118 -51
- package/style.css +1 -1
- package/{transWebUrl-BiYYzBat.js → transWebUrl-BmM4mCCe.js} +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, inject,
|
|
2
|
-
import { h as headRequest, R as REPO_MODULE, v as vElementExposure, b as REPO_EVENT, _ as _export_sfc,
|
|
3
|
-
import { u as useReportRepo, S as SearchRepoCard,
|
|
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-CpFSAE16.js";
|
|
3
|
+
import { u as useReportRepo, S as SearchRepoCard, m as mergeSearchSuggestions } from "./search-suggestion-Yf_1oAM9.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({
|
|
@@ -33,8 +33,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
hideDescription: "",
|
|
34
34
|
onReport: () => handleReport(item),
|
|
35
35
|
cardType: item.searchType || props.type,
|
|
36
|
-
"url-params": { source_module: "search_project" }
|
|
37
|
-
|
|
36
|
+
"url-params": { source_module: "search_project" },
|
|
37
|
+
"preserve-url-origin": item.searchType === "repo"
|
|
38
|
+
}, null, 8, ["info", "keyword", "onReport", "cardType", "preserve-url-origin"])), [
|
|
38
39
|
[unref(vElementExposure), { trigger: (type) => unref(triggerReport)(type, item) }]
|
|
39
40
|
]);
|
|
40
41
|
}), 128);
|
|
@@ -42,39 +43,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
42
43
|
}
|
|
43
44
|
});
|
|
44
45
|
const SearchRepoCardList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
45
|
-
const normalizeOrigin = (origin) => origin.replace(/\/+$/, "");
|
|
46
|
-
const getStringValue = (value) => typeof value === "string" ? value : "";
|
|
47
|
-
const convertDataList = ({ dataList, searchType, origin }) => {
|
|
48
|
-
if (!Array.isArray(dataList)) {
|
|
49
|
-
return { items: [] };
|
|
50
|
-
}
|
|
51
|
-
const baseOrigin = normalizeOrigin(origin);
|
|
52
|
-
const items = dataList.slice(0, 3).filter((item) => Boolean(item) && typeof item === "object" && !Array.isArray(item)).map((item) => {
|
|
53
|
-
const isGitcodeRepo = REPO_TYPE.GITCODE === item.is_mirrors;
|
|
54
|
-
const importUrl = getStringValue(item.import_url);
|
|
55
|
-
const importedRepoName = importUrl ? extractRepoInfoWithURL(importUrl) : "";
|
|
56
|
-
const nameWithNamespace = getStringValue(item.name_with_namespace);
|
|
57
|
-
const pathWithNamespace = getStringValue(item.path_with_namespace);
|
|
58
|
-
const repoName = (isGitcodeRepo ? nameWithNamespace : importedRepoName) || nameWithNamespace || pathWithNamespace;
|
|
59
|
-
const displayName = formatNameSpace(repoName).join("/");
|
|
60
|
-
const path = `${baseOrigin}/${pathWithNamespace}`;
|
|
61
|
-
return {
|
|
62
|
-
...item,
|
|
63
|
-
searchType,
|
|
64
|
-
path,
|
|
65
|
-
displayName,
|
|
66
|
-
web_url: path
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
return { items };
|
|
70
|
-
};
|
|
71
|
-
const mergeSearchSuggestions = ({ response = {}, origin }) => ({
|
|
72
|
-
items: [
|
|
73
|
-
...convertDataList({ dataList: response.recommend_project, searchType: "repo", origin }).items,
|
|
74
|
-
...convertDataList({ dataList: response.recommend_model, searchType: "model", origin }).items,
|
|
75
|
-
...convertDataList({ dataList: response.recommend_dataset, searchType: "dataset", origin }).items
|
|
76
|
-
]
|
|
77
|
-
});
|
|
78
46
|
const _hoisted_1 = {
|
|
79
47
|
key: 0,
|
|
80
48
|
class: "history-list-project history-list-project--padded"
|
|
@@ -89,6 +57,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
57
|
const emits = __emit;
|
|
90
58
|
const { t: $t } = i18n.global;
|
|
91
59
|
const API = headRequest(inject("request", () => Promise.resolve({ data: {} })));
|
|
60
|
+
const layoutConfig = useLayoutConfig();
|
|
92
61
|
const useReport = inject("useReport", () => {
|
|
93
62
|
});
|
|
94
63
|
const searchSuggestionList = ref([]);
|
|
@@ -105,7 +74,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
74
|
try {
|
|
106
75
|
useReport("search-project", {});
|
|
107
76
|
const res = await API.getGloabarSearchKeyLink({ q: props.searchStr });
|
|
108
|
-
searchSuggestionList.value = mergeSearchSuggestions({
|
|
77
|
+
searchSuggestionList.value = mergeSearchSuggestions({
|
|
78
|
+
response: res.data || {},
|
|
79
|
+
origin,
|
|
80
|
+
projectOrigin: layoutConfig.VITE_HOST
|
|
81
|
+
}).items;
|
|
109
82
|
} catch (error) {
|
|
110
83
|
console.error("Failed to fetch search results:", error);
|
|
111
84
|
searchSuggestionList.value = [];
|
|
@@ -136,12 +109,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
136
109
|
name: "gt-search",
|
|
137
110
|
color: "var(--theme-placeholder)"
|
|
138
111
|
}),
|
|
139
|
-
createElementVNode("span", null, toDisplayString(unref($t)("gitCodeLayout.header.searchAll", { keyword:
|
|
112
|
+
createElementVNode("span", null, toDisplayString(unref($t)("gitCodeLayout.header.searchAll", { keyword: __props.searchStr })), 1)
|
|
140
113
|
]),
|
|
141
114
|
searchSuggestionList.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
142
115
|
createVNode(SearchRepoCardList, {
|
|
143
116
|
"data-list": searchSuggestionList.value,
|
|
144
|
-
"search-str":
|
|
117
|
+
"search-str": __props.searchStr,
|
|
145
118
|
type: "repo"
|
|
146
119
|
}, null, 8, ["data-list", "search-str"])
|
|
147
120
|
])) : createCommentVNode("", true)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, inject, useSlots, computed, ref,
|
|
2
|
-
import { a as i18n,
|
|
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-CpFSAE16.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
|
-
import { defineComponent, inject, ref, reactive, watch, computed,
|
|
2
|
-
import { a as i18n,
|
|
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-CpFSAE16.js";
|
|
3
3
|
import { useRouter } from "vue-router";
|
|
4
|
-
import { t as transWebUrl } from "./transWebUrl-
|
|
4
|
+
import { t as transWebUrl } from "./transWebUrl-BmM4mCCe.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";
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
402
|
+
title: __props.type === "project" ? `${item.namespace}/${item.label}` : item.label
|
|
403
403
|
}, {
|
|
404
404
|
icon: withCtx(() => [
|
|
405
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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,
|
|
2
|
-
import { a as i18n,
|
|
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-CpFSAE16.js";
|
|
3
3
|
import { useRouter } from "vue-router";
|
|
4
|
-
import { t as transWebUrl } from "./transWebUrl-
|
|
4
|
+
import { t as transWebUrl } from "./transWebUrl-BmM4mCCe.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";
|
|
@@ -220,7 +220,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
220
220
|
onClick: withModifiers(createRepoOrOrg, ["stop"])
|
|
221
221
|
}, {
|
|
222
222
|
default: withCtx(() => [
|
|
223
|
-
createTextVNode(toDisplayString(
|
|
223
|
+
createTextVNode(toDisplayString(__props.buttonText), 1)
|
|
224
224
|
]),
|
|
225
225
|
_: 1
|
|
226
226
|
})) : createCommentVNode("", true),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, inject, watch, computed, withDirectives,
|
|
2
|
-
import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-
|
|
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-CpFSAE16.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,
|
|
2
|
-
import { a as i18n, n as normalizeSearchHistoryEntry, G as GIcon, _ as _export_sfc } from "./index-
|
|
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-CpFSAE16.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" };
|
|
@@ -120,7 +120,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
120
120
|
};
|
|
121
121
|
return (_ctx, _cache) => {
|
|
122
122
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
123
|
-
|
|
123
|
+
__props.searchHistoryList.length ? (openBlock(), createElementBlock("ul", {
|
|
124
124
|
key: 0,
|
|
125
125
|
class: "history-list-box history-list-box--mt",
|
|
126
126
|
onMouseleave: resetIndex
|
|
@@ -128,7 +128,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
128
128
|
(openBlock(true), createElementBlock(Fragment, null, renderList(historyList.value, (item, index) => {
|
|
129
129
|
return openBlock(), createElementBlock("li", {
|
|
130
130
|
key: `${item.q}-${item.type || "repo"}-${index}`,
|
|
131
|
-
class: normalizeClass(
|
|
131
|
+
class: normalizeClass(__props.activeIndex === index ? "hoverbg" : ""),
|
|
132
132
|
onClick: ($event) => toSearch(item),
|
|
133
133
|
onMouseenter: ($event) => onSearchEnter(index)
|
|
134
134
|
}, [
|
|
@@ -151,10 +151,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
151
151
|
]),
|
|
152
152
|
createElementVNode("div", _hoisted_8, [
|
|
153
153
|
createElementVNode("span", {
|
|
154
|
-
class: normalizeClass(
|
|
154
|
+
class: normalizeClass(__props.activeIndex === index ? "history-list-box__type-text--active" : "history-list-box__type-text")
|
|
155
155
|
}, toDisplayString(getRepoType(item).text), 3),
|
|
156
156
|
createVNode(GIcon, {
|
|
157
|
-
name:
|
|
157
|
+
name: __props.activeIndex === index ? getRepoType(item).hoverIcon : getRepoType(item).icon
|
|
158
158
|
}, null, 8, ["name"])
|
|
159
159
|
])
|
|
160
160
|
]),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, inject, ref, onMounted,
|
|
2
|
-
import { u as useReportRepo, S as SearchRepoCard } from "./
|
|
3
|
-
import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-
|
|
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-Yf_1oAM9.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-CpFSAE16.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";
|
|
@@ -14,9 +14,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
setup(__props) {
|
|
15
15
|
const { t: $t } = i18n.global;
|
|
16
16
|
const API = headRequest(inject("request"));
|
|
17
|
+
const layoutConfig = useLayoutConfig();
|
|
17
18
|
const useReport = inject("useReport");
|
|
18
19
|
const { triggerReport } = useReportRepo({ moduleName: REPO_MODULE.SEARCH_RECOMMEND_CARD }, API.viewReport);
|
|
19
20
|
const recommendRepoList = ref([]);
|
|
21
|
+
const getCardType = (repoType) => repoType ? String(repoType) : "repo";
|
|
20
22
|
const handleReport = (repo, index, evt) => {
|
|
21
23
|
const params = evt === "starReport" ? {
|
|
22
24
|
module_name: REPO_MODULE.SEARCH_RECOMMEND_CARD,
|
|
@@ -38,10 +40,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
40
|
}
|
|
39
41
|
const params = { history: JSON.stringify(localSearchText) };
|
|
40
42
|
const res = await API.openSourceProject(params);
|
|
41
|
-
const data = (((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.content) || []).map((item) =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
const data = (((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.content) || []).map((item) => {
|
|
44
|
+
const isProject = isProjectSuggestionType(item.repo_type);
|
|
45
|
+
return {
|
|
46
|
+
...item,
|
|
47
|
+
...isProject && item.web_url ? { web_url: normalizeProjectUrlForMainSite(item.web_url, layoutConfig.VITE_HOST, window.location.origin) } : {},
|
|
48
|
+
tags: item.tags || item.topic_names
|
|
49
|
+
};
|
|
50
|
+
});
|
|
45
51
|
data.forEach((item, index) => {
|
|
46
52
|
triggerReport("expo", { ...item, index });
|
|
47
53
|
});
|
|
@@ -57,7 +63,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
63
|
createElementVNode("div", _hoisted_3, toDisplayString(unref($t)("gitCodeLayout.search.trendingToday")), 1),
|
|
58
64
|
(openBlock(true), createElementBlock(Fragment, null, renderList(recommendRepoList.value, (item, index) => {
|
|
59
65
|
return renderSlot(_ctx.$slots, "default", {
|
|
60
|
-
key: item.id,
|
|
61
66
|
item,
|
|
62
67
|
index
|
|
63
68
|
}, () => [
|
|
@@ -69,10 +74,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
74
|
hover: "",
|
|
70
75
|
hideTopicTags: "",
|
|
71
76
|
onReport: (evt) => handleReport(item, index, evt),
|
|
72
|
-
cardType: (item
|
|
73
|
-
"url-params": { source_module: "search_box_discovery" }
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
cardType: getCardType(item.repo_type),
|
|
78
|
+
"url-params": { source_module: "search_box_discovery" },
|
|
79
|
+
"preserve-url-origin": unref(isProjectSuggestionType)(item.repo_type)
|
|
80
|
+
}, null, 8, ["info", "onReport", "cardType", "preserve-url-origin"]))
|
|
81
|
+
], true, item.id);
|
|
76
82
|
}), 128))
|
|
77
83
|
])) : (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
78
84
|
(openBlock(), createElementBlock(Fragment, null, renderList(5, (item) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-
|
|
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-CpFSAE16.js";
|
|
3
3
|
import "vue-devui-lal/icon";
|
|
4
4
|
import "vue-devui-lal/icon/style.css";
|
|
5
5
|
const _hoisted_1 = ["onClick"];
|
|
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
};
|
|
26
26
|
return (_ctx, _cache) => {
|
|
27
27
|
return openBlock(), createElementBlock("ul", null, [
|
|
28
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
28
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.searchScopeList, (item, index) => {
|
|
29
29
|
return openBlock(), createElementBlock("li", {
|
|
30
30
|
key: index,
|
|
31
31
|
class: "g-header-search-scopechoose",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, inject, ref, watch, withDirectives,
|
|
2
|
-
import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-
|
|
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-CpFSAE16.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
|
-
import { defineComponent, onMounted, nextTick, onUnmounted,
|
|
2
|
-
import {
|
|
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-CpFSAE16.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:";
|
|
@@ -105,11 +105,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
105
|
});
|
|
106
106
|
return (_ctx, _cache) => {
|
|
107
107
|
return openBlock(), createBlock(unref(FixedOverlay), { class: "captcha-overlay-slid" }, {
|
|
108
|
-
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
108
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
109
109
|
createElementVNode("div", { id: "captcha-box" }, null, -1)
|
|
110
|
-
])),
|
|
111
|
-
_: 1
|
|
112
|
-
__: [0]
|
|
110
|
+
])]),
|
|
111
|
+
_: 1
|
|
113
112
|
});
|
|
114
113
|
};
|
|
115
114
|
}
|