vue-layout-gitcode 1.7.2 → 1.7.4
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-b2756991.js → GloabarSearch-DNaPDp6V.js} +5 -47
- package/{MenuItem-1fd24e33.js → MenuItem-DW23yYlt.js} +3 -53
- package/{ProjectMenuList-2a6149ed.js → ProjectMenuList-CljXAnGU.js} +6 -49
- package/{ProjectMenuListV2-73185b74.js → ProjectMenuListV2-Cx2ooQpv.js} +6 -52
- package/{ProjectSearch-9b7aa136.js → ProjectSearch-CZCho-q9.js} +3 -53
- package/{SearchHistoryList-10183ba2.js → SearchHistoryList-CEDj3z51.js} +3 -53
- package/SearchPrefixTag-CpOxdIQ2.js +46 -0
- package/{SearchRecommed-30a4400f.js → SearchRecommed-Cuh5yNJx.js} +4 -55
- package/{SearchScopeList-0e1cd79b.js → SearchScopeList-CJrxQ4Lp.js} +3 -53
- package/{UserSearch-34939b97.js → UserSearch-CWApOx0h.js} +3 -62
- package/index-BPXRBWIR.js +61 -0
- package/{index-628b8678.js → index-CQWvNH8k.js} +23 -33
- package/{index-5bcdb26a.js → index-DqHll-Tt.js} +1234 -1425
- package/index.js +11 -63
- package/{notice-169ce3dc.js → notice-CszZY9kn.js} +6 -51
- package/package.json +1 -1
- package/style.css +1 -1
- package/{transWebUrl-d207ebc7.js → transWebUrl-CKqZIaw9.js} +3 -5
- package/SearchPrefixTag-f8fecfca.js +0 -96
- package/index-8931db99.js +0 -112
|
@@ -1,57 +1,7 @@
|
|
|
1
|
-
import { inject, ref, watch, withDirectives,
|
|
2
|
-
import { a as i18n, h as headRequest, G as GIcon
|
|
1
|
+
import { inject, ref, watch, withDirectives, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
|
|
2
|
+
import { a as i18n, h as headRequest, G as GIcon } from "./index-DqHll-Tt.js";
|
|
3
3
|
import "vue-devui-lal/icon";
|
|
4
4
|
import "vue-devui-lal/icon/style.css";
|
|
5
|
-
import "vue-devui-lal/button";
|
|
6
|
-
import "vue-devui-lal/popover";
|
|
7
|
-
import "vue-devui-lal/tooltip";
|
|
8
|
-
import "vue-devui-lal/textarea";
|
|
9
|
-
import "vue-devui-lal/button/style.css";
|
|
10
|
-
import "vue-devui-lal/popover/style.css";
|
|
11
|
-
import "vue-devui-lal/tooltip/style.css";
|
|
12
|
-
import "vue-devui-lal/textarea/style.css";
|
|
13
|
-
import "vue-router";
|
|
14
|
-
import "@vueuse/core";
|
|
15
|
-
import "vue-devui-lal/avatar";
|
|
16
|
-
import "vue-devui-lal/avatar/style.css";
|
|
17
|
-
import "lodash/last";
|
|
18
|
-
import "lodash/cloneDeep";
|
|
19
|
-
import "dayjs";
|
|
20
|
-
import "lodash/isDate";
|
|
21
|
-
import "vue-devui-lal/skeleton";
|
|
22
|
-
import "vue-devui-lal/skeleton/style.css";
|
|
23
|
-
import "vue-devui-lal/dropdown";
|
|
24
|
-
import "vue-devui-lal/message";
|
|
25
|
-
import "vue-devui-lal/dropdown/style.css";
|
|
26
|
-
import "vue-devui-lal/message/style.css";
|
|
27
|
-
import "lodash/debounce";
|
|
28
|
-
import "vue-devui-lal/badge";
|
|
29
|
-
import "vue-devui-lal/badge/style.css";
|
|
30
|
-
import "vue-devui-lal/tabs/style.css";
|
|
31
|
-
import "vue-devui-lal/drawer";
|
|
32
|
-
import "vue-devui-lal/drawer/style.css";
|
|
33
|
-
import "vue-devui-lal/input";
|
|
34
|
-
import "vue-devui-lal/form";
|
|
35
|
-
import "vue-devui-lal/input/style.css";
|
|
36
|
-
import "vue-devui-lal/form/style.css";
|
|
37
|
-
import "vue-devui-lal/notification";
|
|
38
|
-
import "vue-devui-lal/notification/style.css";
|
|
39
|
-
import "vue-devui-lal/menu";
|
|
40
|
-
import "vue-devui-lal/menu/style.css";
|
|
41
|
-
import "vue-devui-lal/layout";
|
|
42
|
-
import "vue-devui-lal/layout/style.css";
|
|
43
|
-
import "vue-devui-lal/radio";
|
|
44
|
-
import "@devui-design/icons/icomoon/devui-icon.css";
|
|
45
|
-
import "vue-devui-lal/radio/style.css";
|
|
46
|
-
import "vue-devui-lal/select";
|
|
47
|
-
import "vue-devui-lal/editable-select";
|
|
48
|
-
import "vue-devui-lal/select/style.css";
|
|
49
|
-
import "vue-devui-lal/editable-select/style.css";
|
|
50
|
-
import "vue-devui-lal/checkbox";
|
|
51
|
-
import "vue-devui-lal/checkbox/style.css";
|
|
52
|
-
import "vue-devui-lal/modal";
|
|
53
|
-
import "vue-devui-lal/modal/style.css";
|
|
54
|
-
const UserSearch_vue_vue_type_style_index_0_lang = "";
|
|
55
5
|
const _hoisted_1 = { class: "px-[8px] history-list-project pl-[8px]" };
|
|
56
6
|
const _hoisted_2 = { class: "history-list-project-globartitle mb-[4px] mt-[16px]" };
|
|
57
7
|
const _hoisted_3 = ["href"];
|
|
@@ -91,16 +41,7 @@ const _sfc_main = {
|
|
|
91
41
|
search: props.searchStr
|
|
92
42
|
}).then((res) => {
|
|
93
43
|
const data = res.data || {};
|
|
94
|
-
searchFileList.value = data.content
|
|
95
|
-
return {
|
|
96
|
-
...item,
|
|
97
|
-
web_url: transformUrl(item.web_url),
|
|
98
|
-
ssh_url_to_repo: transformUrl(item.ssh_url_to_repo),
|
|
99
|
-
http_url_to_repo: transformUrl(item.http_url_to_repo),
|
|
100
|
-
readme_url: transformUrl(item.readme_url),
|
|
101
|
-
avatar_url: transformUrl(item.avatar_url)
|
|
102
|
-
};
|
|
103
|
-
}) || [];
|
|
44
|
+
searchFileList.value = data.content || [];
|
|
104
45
|
}).finally(() => {
|
|
105
46
|
loading.value = false;
|
|
106
47
|
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineComponent, onMounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
|
|
2
|
+
import { FixedOverlay } from "vue-devui-lal/overlay";
|
|
3
|
+
import { q as useLayoutConfig, _ as _export_sfc } from "./index-DqHll-Tt.js";
|
|
4
|
+
import "vue-devui-lal/overlay/style.css";
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "index",
|
|
7
|
+
emits: ["close", "success"],
|
|
8
|
+
setup(__props, { emit: __emit }) {
|
|
9
|
+
const emits = __emit;
|
|
10
|
+
const captchaInit = () => {
|
|
11
|
+
if (!window.initTAC) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const baseURL = useLayoutConfig().VITE_API_HOST;
|
|
15
|
+
const config = {
|
|
16
|
+
requestCaptchaDataUrl: `${baseURL}/uc/api/v1/captcha/gen`,
|
|
17
|
+
validCaptchaUrl: `${baseURL}/uc/api/v1/captcha/check`,
|
|
18
|
+
bindEl: "#captcha-box",
|
|
19
|
+
validSuccess: (res, c, tac) => {
|
|
20
|
+
tac.destroyWindow();
|
|
21
|
+
emits("success", res.data);
|
|
22
|
+
},
|
|
23
|
+
validFail: (res, c, tac) => {
|
|
24
|
+
tac.reloadCaptcha();
|
|
25
|
+
},
|
|
26
|
+
btnRefreshFun: (el, tac) => {
|
|
27
|
+
tac.reloadCaptcha();
|
|
28
|
+
},
|
|
29
|
+
btnCloseFun: (el, tac) => {
|
|
30
|
+
tac.destroyWindow();
|
|
31
|
+
emits("close");
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const style = {
|
|
35
|
+
logoUrl: null
|
|
36
|
+
// 去除logo
|
|
37
|
+
};
|
|
38
|
+
window.initTAC("https://cdn-static.gitcode.com/js/tac/", config, style).then((tac) => {
|
|
39
|
+
tac.init();
|
|
40
|
+
}).catch((e) => {
|
|
41
|
+
console.error("初始化tac失败", e);
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
captchaInit();
|
|
46
|
+
});
|
|
47
|
+
return (_ctx, _cache) => {
|
|
48
|
+
return openBlock(), createBlock(unref(FixedOverlay), { class: "captcha-overlay" }, {
|
|
49
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
50
|
+
createElementVNode("div", { id: "captcha-box" }, null, -1)
|
|
51
|
+
])),
|
|
52
|
+
_: 1,
|
|
53
|
+
__: [0]
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
59
|
+
export {
|
|
60
|
+
index as default
|
|
61
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref, watchEffect, defineComponent, toDisplayString, unref, mergeModels, useModel, watch,
|
|
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";
|
|
2
2
|
import debounce from "lodash/debounce";
|
|
3
|
-
import {
|
|
4
|
-
import { t as transWebUrl } from "./transWebUrl-
|
|
3
|
+
import { t as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, d as useRequestReport, r as reqCatch, h as headRequest, a as i18n, T as TOPIC_TYPE, f as useTimeFormat, L as LANG_KEY, g as LANG_ZH, j as usePageResize, k as isGstarRepo, m as _sfc_main$b, n as isIncubationRepo, o as highlightWords, p as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-DqHll-Tt.js";
|
|
4
|
+
import { t as transWebUrl } from "./transWebUrl-CKqZIaw9.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";
|
|
@@ -32,10 +32,8 @@ const useReportRepo = (reportParams, viewReport) => {
|
|
|
32
32
|
};
|
|
33
33
|
const formatItem = (data) => {
|
|
34
34
|
const channelNames = [];
|
|
35
|
-
if (data.channelName)
|
|
36
|
-
|
|
37
|
-
if (data.subChannelName)
|
|
38
|
-
channelNames.push(data.subChannelName);
|
|
35
|
+
if (data.channelName) channelNames.push(data.channelName);
|
|
36
|
+
if (data.subChannelName) channelNames.push(data.subChannelName);
|
|
39
37
|
const repoId = isNaN(Number(data.id)) ? data.id : Number(data.id);
|
|
40
38
|
return {
|
|
41
39
|
type: "gitcode",
|
|
@@ -150,8 +148,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
150
148
|
};
|
|
151
149
|
}
|
|
152
150
|
});
|
|
153
|
-
const
|
|
154
|
-
const Like = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-7320dc21"]]);
|
|
151
|
+
const Like = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
155
152
|
const _hoisted_1$7 = {
|
|
156
153
|
class: "mr-[4px]",
|
|
157
154
|
style: { "width": "15px", "height": "15px" }
|
|
@@ -187,8 +184,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
187
184
|
useReport("login_exposure", { source: props.loginTriggerSource || "search_star_repo_recommend" });
|
|
188
185
|
}
|
|
189
186
|
try {
|
|
190
|
-
if (starLoading.value)
|
|
191
|
-
return;
|
|
187
|
+
if (starLoading.value) return;
|
|
192
188
|
starLoading.value = true;
|
|
193
189
|
const params = { repoId: props.starInfo.id };
|
|
194
190
|
let res;
|
|
@@ -266,8 +262,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
266
262
|
};
|
|
267
263
|
}
|
|
268
264
|
});
|
|
269
|
-
const
|
|
270
|
-
const StarTag = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-6f7d8162"]]);
|
|
265
|
+
const StarTag = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
271
266
|
const _hoisted_1$6 = { class: "fork-tag" };
|
|
272
267
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
273
268
|
__name: "index",
|
|
@@ -292,8 +287,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
292
287
|
};
|
|
293
288
|
}
|
|
294
289
|
});
|
|
295
|
-
const
|
|
296
|
-
const ForkTag = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-cb84d9d8"]]);
|
|
290
|
+
const ForkTag = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
297
291
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
298
292
|
__name: "index",
|
|
299
293
|
props: {
|
|
@@ -339,8 +333,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
339
333
|
};
|
|
340
334
|
}
|
|
341
335
|
});
|
|
342
|
-
const
|
|
343
|
-
const LanguageTag = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f41c9ade"]]);
|
|
336
|
+
const LanguageTag = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
344
337
|
const _hoisted_1$5 = { class: "star-count-one" };
|
|
345
338
|
const _hoisted_2$4 = { key: 0 };
|
|
346
339
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
@@ -367,8 +360,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
367
360
|
};
|
|
368
361
|
}
|
|
369
362
|
});
|
|
370
|
-
const
|
|
371
|
-
const StarCountOne = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-33d28127"]]);
|
|
363
|
+
const StarCountOne = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
372
364
|
const _hoisted_1$4 = {
|
|
373
365
|
key: 0,
|
|
374
366
|
class: "github-star-num"
|
|
@@ -403,8 +395,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
403
395
|
};
|
|
404
396
|
}
|
|
405
397
|
});
|
|
406
|
-
const
|
|
407
|
-
const GithubStarNum = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-04cad993"]]);
|
|
398
|
+
const GithubStarNum = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
408
399
|
const _hoisted_1$3 = { class: "repo-card-footer mt-[4px]" };
|
|
409
400
|
const _hoisted_2$2 = {
|
|
410
401
|
key: 3,
|
|
@@ -499,8 +490,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
499
490
|
};
|
|
500
491
|
}
|
|
501
492
|
});
|
|
502
|
-
const
|
|
503
|
-
const RepoCardFooter = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-e6ca367c"]]);
|
|
493
|
+
const RepoCardFooter = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
504
494
|
const _hoisted_1$2 = { class: "new-tag-content" };
|
|
505
495
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
506
496
|
__name: "index",
|
|
@@ -546,13 +536,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
546
536
|
default: withCtx(() => [
|
|
547
537
|
_cache[0] || (_cache[0] = createElementVNode("div", { class: "new-tag w-[32px] h-[15px] text-[9px] text-[#ffffff] flex items-center justify-center leading-[1]" }, "New", -1))
|
|
548
538
|
]),
|
|
549
|
-
_: 1
|
|
539
|
+
_: 1,
|
|
540
|
+
__: [0]
|
|
550
541
|
})) : createCommentVNode("", true);
|
|
551
542
|
};
|
|
552
543
|
}
|
|
553
544
|
});
|
|
554
|
-
const
|
|
555
|
-
const NewTag = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-51dde95b"]]);
|
|
545
|
+
const NewTag = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
556
546
|
const _hoisted_1$1 = { class: "model-card-footer h-[22px] mt-[4px] flex items-center overflow-hidden whitespace-nowrap text-[14px] leading-[14px] text-[var(--theme-release-card-text-color)]" };
|
|
557
547
|
const _hoisted_2$1 = {
|
|
558
548
|
key: 1,
|
|
@@ -652,7 +642,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
652
642
|
const { widthType } = usePageResize();
|
|
653
643
|
const { t: $t } = i18n.global;
|
|
654
644
|
const handleClick = () => {
|
|
655
|
-
window.open(transWebUrl(
|
|
645
|
+
window.open(transWebUrl(props.info.web_url, props.urlParams), "_blank");
|
|
656
646
|
emits("report");
|
|
657
647
|
_frEventTrack(EVENT_NAME.CLICK_SEARCH_RESULT);
|
|
658
648
|
};
|
|
@@ -726,8 +716,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
726
716
|
return highlightWords(keyword, contentArr.join("/"), true);
|
|
727
717
|
};
|
|
728
718
|
onMounted(() => {
|
|
729
|
-
if (props.info.is_recommend && props.info.index === 0)
|
|
730
|
-
handleQueryGraph();
|
|
719
|
+
if (props.info.is_recommend && props.info.index === 0) handleQueryGraph();
|
|
731
720
|
});
|
|
732
721
|
return (_ctx, _cache) => {
|
|
733
722
|
return openBlock(), createElementBlock("a", {
|
|
@@ -763,7 +752,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
763
752
|
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
764
753
|
createTextVNode("G-Star ")
|
|
765
754
|
])),
|
|
766
|
-
_: 1
|
|
755
|
+
_: 1,
|
|
756
|
+
__: [0]
|
|
767
757
|
}, 8, ["message"])
|
|
768
758
|
])) : createCommentVNode("", true),
|
|
769
759
|
unref(isIncubationRepo)(_ctx.info.topic_names) ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
@@ -776,7 +766,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
776
766
|
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
777
767
|
createTextVNode(" G-Star ")
|
|
778
768
|
])),
|
|
779
|
-
_: 1
|
|
769
|
+
_: 1,
|
|
770
|
+
__: [1]
|
|
780
771
|
}, 8, ["message"])
|
|
781
772
|
])) : createCommentVNode("", true),
|
|
782
773
|
createVNode(NewTag, {
|
|
@@ -863,8 +854,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
863
854
|
};
|
|
864
855
|
}
|
|
865
856
|
});
|
|
866
|
-
const
|
|
867
|
-
const SearchRepoCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ec4fbbd8"]]);
|
|
857
|
+
const SearchRepoCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
868
858
|
export {
|
|
869
859
|
SearchRepoCard as S,
|
|
870
860
|
formatNameSpace as f,
|