vue-layout-gitcode 1.1.18 → 1.1.19
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-DJOC2ste.js → GloabarSearch-23087a9f.js} +49 -3
- package/{ProjectSearch-BaDWiUQz.js → ProjectSearch-573afaa4.js} +47 -3
- package/{SearchHistoryList-CJWe_Sne.js → SearchHistoryList-e2199377.js} +47 -3
- package/SearchPrefixTag-a8add478.js +90 -0
- package/{SearchRecommed-pC5kbYsi.js → SearchRecommed-d10d7aab.js} +48 -4
- package/{SearchScopeList-olDlF_4j.js → SearchScopeList-b83681aa.js} +47 -3
- package/{UserSearch-B0jZYoB2.js → UserSearch-b9b2f048.js} +46 -2
- package/index-25e1b495.js +106 -0
- package/{index-Brdr8yq8.js → index-393a2de4.js} +34 -14
- package/{index-BITTokMy.js → index-d153dd8f.js} +935 -547
- package/index.js +57 -11
- package/{notice-BuIVy3Zy.js → notice-6d0c93f5.js} +43 -2
- package/package.json +1 -1
- package/style.css +1 -1
- package/SearchPrefixTag-8CvFyr_G.js +0 -46
- package/index-D8W8lTsG.js +0 -60
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ref, watchEffect, defineComponent, toDisplayString, inject,
|
|
2
|
-
import { d as debounce, h as headRequest, G as GIcon, r as reqCatch, _ as _export_sfc, a as i18n, T as TOPIC_TYPE, f as useTimeFormat, g as
|
|
1
|
+
import { ref, watchEffect, defineComponent, toDisplayString, inject, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, withDirectives, vShow, createVNode, computed, unref, normalizeStyle, createCommentVNode, createTextVNode, onMounted, onUnmounted, Fragment, createBlock, renderList, reactive, withCtx } from "vue";
|
|
2
|
+
import { d as debounce, h as headRequest, G as GIcon, r as reqCatch, _ as _export_sfc, 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$8, n as isIncubationRepo, o as highlightWords, t as transWebUrl, p as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-d153dd8f.js";
|
|
3
3
|
import { useRouter } from "vue-router";
|
|
4
4
|
import { Row, Col } from "vue-devui-lal/grid";
|
|
5
5
|
import { Skeleton, SkeletonItem } from "vue-devui-lal/skeleton";
|
|
6
6
|
import "vue-devui-lal/grid/style.css";
|
|
7
7
|
import "vue-devui-lal/skeleton/style.css";
|
|
8
|
+
import { useLocalStorage } from "@vueuse/core";
|
|
8
9
|
const useReportRepo = (reportParams, viewReport) => {
|
|
9
10
|
const list = ref([]);
|
|
10
11
|
const pageRef = ref((window == null ? void 0 : window.page_ref) || "");
|
|
@@ -27,8 +28,10 @@ const useReportRepo = (reportParams, viewReport) => {
|
|
|
27
28
|
};
|
|
28
29
|
const formatItem = (data) => {
|
|
29
30
|
const channelNames = [];
|
|
30
|
-
if (data.channelName)
|
|
31
|
-
|
|
31
|
+
if (data.channelName)
|
|
32
|
+
channelNames.push(data.channelName);
|
|
33
|
+
if (data.subChannelName)
|
|
34
|
+
channelNames.push(data.subChannelName);
|
|
32
35
|
return {
|
|
33
36
|
type: "gitcode",
|
|
34
37
|
repo_id: data.id,
|
|
@@ -136,7 +139,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
136
139
|
const handleStar = async (e) => {
|
|
137
140
|
e.preventDefault();
|
|
138
141
|
try {
|
|
139
|
-
if (starLoading.value)
|
|
142
|
+
if (starLoading.value)
|
|
143
|
+
return;
|
|
140
144
|
starLoading.value = true;
|
|
141
145
|
const params = { repoId: props.starInfo.id };
|
|
142
146
|
let res;
|
|
@@ -202,7 +206,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
202
206
|
};
|
|
203
207
|
}
|
|
204
208
|
});
|
|
205
|
-
const
|
|
209
|
+
const index_vue_vue_type_style_index_0_scoped_754df2e0_lang = "";
|
|
210
|
+
const StarTag = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-754df2e0"]]);
|
|
206
211
|
const _hoisted_1$4 = { class: "fork-tag" };
|
|
207
212
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
208
213
|
__name: "index",
|
|
@@ -227,7 +232,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
227
232
|
};
|
|
228
233
|
}
|
|
229
234
|
});
|
|
230
|
-
const
|
|
235
|
+
const index_vue_vue_type_style_index_0_scoped_98be5d7f_lang = "";
|
|
236
|
+
const ForkTag = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-98be5d7f"]]);
|
|
231
237
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
232
238
|
__name: "index",
|
|
233
239
|
props: {
|
|
@@ -273,7 +279,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
273
279
|
};
|
|
274
280
|
}
|
|
275
281
|
});
|
|
276
|
-
const
|
|
282
|
+
const index_vue_vue_type_style_index_0_scoped_6e1aad17_lang = "";
|
|
283
|
+
const LanguageTag = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6e1aad17"]]);
|
|
277
284
|
const _hoisted_1$3 = { class: "star-count-one" };
|
|
278
285
|
const _hoisted_2$3 = { key: 0 };
|
|
279
286
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
@@ -300,7 +307,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
300
307
|
};
|
|
301
308
|
}
|
|
302
309
|
});
|
|
303
|
-
const
|
|
310
|
+
const index_vue_vue_type_style_index_0_scoped_de8d9362_lang = "";
|
|
311
|
+
const StarCountOne = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-de8d9362"]]);
|
|
304
312
|
const _hoisted_1$2 = { class: "github-star-num" };
|
|
305
313
|
const _hoisted_2$2 = { class: "leading-none" };
|
|
306
314
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
@@ -327,7 +335,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
327
335
|
};
|
|
328
336
|
}
|
|
329
337
|
});
|
|
330
|
-
const
|
|
338
|
+
const index_vue_vue_type_style_index_0_scoped_7f7e79b1_lang = "";
|
|
339
|
+
const GithubStarNum = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-7f7e79b1"]]);
|
|
331
340
|
const _hoisted_1$1 = { class: "repo-card-footer mt-[4px]" };
|
|
332
341
|
const _hoisted_2$1 = {
|
|
333
342
|
key: 3,
|
|
@@ -419,7 +428,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
419
428
|
};
|
|
420
429
|
}
|
|
421
430
|
});
|
|
422
|
-
const
|
|
431
|
+
const index_vue_vue_type_style_index_0_scoped_ca800e14_lang = "";
|
|
432
|
+
const RepoCardFooter = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-ca800e14"]]);
|
|
423
433
|
const _hoisted_1 = ["innerHTML"];
|
|
424
434
|
const _hoisted_2 = {
|
|
425
435
|
key: 0,
|
|
@@ -444,6 +454,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
444
454
|
},
|
|
445
455
|
emits: ["report"],
|
|
446
456
|
setup(__props, { emit: __emit }) {
|
|
457
|
+
const lang = useLocalStorage(LANG_KEY, LANG_ZH);
|
|
458
|
+
console.log("lang", lang.value);
|
|
447
459
|
const API = headRequest(inject("request"));
|
|
448
460
|
const emits = __emit;
|
|
449
461
|
const router = useRouter();
|
|
@@ -467,6 +479,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
467
479
|
}
|
|
468
480
|
return repoIcon[props.cardType] || "gt-line-repositories";
|
|
469
481
|
});
|
|
482
|
+
const description = computed(() => {
|
|
483
|
+
if (lang.value === LANG_ZH) {
|
|
484
|
+
return props.info.description_cn;
|
|
485
|
+
}
|
|
486
|
+
return props.info.description || props.info.description_cn;
|
|
487
|
+
});
|
|
470
488
|
const graphInfo = reactive({ commit_stat: null, trends: null });
|
|
471
489
|
const starInfo = computed(() => {
|
|
472
490
|
return { id: props.info.id, starred: props.info.starred, starCount: props.info.star_count };
|
|
@@ -514,7 +532,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
514
532
|
return highlightWords(keyword, contentArr.join("/"), true);
|
|
515
533
|
};
|
|
516
534
|
onMounted(() => {
|
|
517
|
-
if (props.info.is_recommend && props.info.index === 0)
|
|
535
|
+
if (props.info.is_recommend && props.info.index === 0)
|
|
536
|
+
handleQueryGraph();
|
|
518
537
|
});
|
|
519
538
|
return (_ctx, _cache) => {
|
|
520
539
|
return openBlock(), createElementBlock("a", {
|
|
@@ -581,7 +600,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
581
600
|
_: 1
|
|
582
601
|
}),
|
|
583
602
|
createElementVNode("div", {
|
|
584
|
-
innerHTML: unref(highlightWords)("",
|
|
603
|
+
innerHTML: unref(highlightWords)("", description.value),
|
|
585
604
|
class: "i-search-projects-card-desc ellipsis"
|
|
586
605
|
}, null, 8, _hoisted_5),
|
|
587
606
|
_ctx.info.index === 0 && _ctx.info.is_recommend ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
@@ -638,7 +657,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
638
657
|
};
|
|
639
658
|
}
|
|
640
659
|
});
|
|
641
|
-
const
|
|
660
|
+
const index_vue_vue_type_style_index_0_scoped_87123242_lang = "";
|
|
661
|
+
const SearchRepoCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-87123242"]]);
|
|
642
662
|
export {
|
|
643
663
|
SearchRepoCard as S,
|
|
644
664
|
formatNameSpace as f,
|