vue-layout-gitcode 1.5.39 → 1.5.40
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-BFpDrALP.js → GloabarSearch-D__e3zw1.js} +2 -3
- package/MenuItem-DnSLaxJH.js +118 -0
- package/{ProjectSearch-DEq1RGBn.js → ProjectSearch-Dk7fNm1o.js} +1 -1
- package/{SearchHistoryList-BOBIaBMH.js → SearchHistoryList-CMwsyUtO.js} +18 -80
- package/{SearchPrefixTag--a-9m1PF.js → SearchPrefixTag-C__8boi7.js} +1 -1
- package/{SearchRecommed-XTYOsYhU.js → SearchRecommed-CC4IKY86.js} +4 -4
- package/{SearchScopeList-COxlPf-9.js → SearchScopeList-CchityQU.js} +1 -1
- package/{UserSearch-gFIu4tn5.js → UserSearch-BQPcYFsF.js} +1 -1
- package/{index-BoBr_WCM.js → index-B811122P.js} +2311 -1268
- package/{index-DaDQV5c1.js → index-C63Fujt-.js} +2 -3
- package/{index-BGTTACBc.js → index-CRLLxvwN.js} +4 -8
- package/index.js +10 -10
- package/{notice-CcsnyEPz.js → notice-CJ_zldUJ.js} +3 -5
- package/package.json +1 -1
- package/style.css +1 -1
- package/MenuItem-BFDRD4oM.js +0 -156
- package/ProjectMenuList-TzEaRVhf.js +0 -389
- package/ProjectMenuListV2-DJX-l0Ns.js +0 -209
- package/transWebUrl-BGhTRg9b.js +0 -21
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { defineComponent, inject, createElementBlock, openBlock, Fragment, createElementVNode, toDisplayString, createVNode, unref, 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-
|
|
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-B811122P.js";
|
|
5
5
|
import "lodash/debounce";
|
|
6
|
-
import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-
|
|
7
|
-
import "./transWebUrl-BGhTRg9b.js";
|
|
6
|
+
import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-CRLLxvwN.js";
|
|
8
7
|
import "vue-devui-lal/tooltip";
|
|
9
8
|
import "vue-devui-lal/tooltip/style.css";
|
|
10
9
|
import "vue-router";
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { defineComponent, inject, ref, computed, createElementBlock, openBlock, normalizeClass, createBlock, createElementVNode, toDisplayString } from "vue";
|
|
2
|
+
import { x as currentTheme, y as ThemeType, g as LANG_ZH, z as LANG_EN, A as getLocaleLang, G as GIcon, B as isHttps, C as emitEvent, b as REPO_EVENT, _ as _export_sfc } from "./index-B811122P.js";
|
|
3
|
+
import { useRouter } from "vue-router";
|
|
4
|
+
const _hoisted_1 = ["src"];
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "MenuItem",
|
|
7
|
+
props: {
|
|
8
|
+
item: {
|
|
9
|
+
type: Object,
|
|
10
|
+
default: () => {
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
active: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false
|
|
16
|
+
},
|
|
17
|
+
isLogin: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
setup(__props) {
|
|
23
|
+
const useReport = inject("useReport");
|
|
24
|
+
const router = useRouter();
|
|
25
|
+
const props = __props;
|
|
26
|
+
const isHover = ref(false);
|
|
27
|
+
const isSelected = computed(() => {
|
|
28
|
+
return props.active || isHover.value;
|
|
29
|
+
});
|
|
30
|
+
const currentImg = computed(() => {
|
|
31
|
+
console.log("currentTheme", currentTheme.value, "left_menu_logo_black", props.item.left_menu_logo_black);
|
|
32
|
+
const imgMap = {
|
|
33
|
+
[ThemeType.WHITE]: {
|
|
34
|
+
selected: props.item.left_menu_logo_hover,
|
|
35
|
+
unselected: props.item.left_menu_logo
|
|
36
|
+
},
|
|
37
|
+
[ThemeType.BLACK]: {
|
|
38
|
+
selected: props.item.left_menu_logo_hover_black,
|
|
39
|
+
unselected: props.item.left_menu_logo_black
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
if (isSelected.value) {
|
|
43
|
+
return imgMap[currentTheme.value].selected;
|
|
44
|
+
} else {
|
|
45
|
+
return imgMap[currentTheme.value].unselected;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
console.log("currentImg", currentImg.value);
|
|
49
|
+
const currentName = computed(() => {
|
|
50
|
+
const nameMap = {
|
|
51
|
+
[LANG_EN]: props.item.left_menu_name_en,
|
|
52
|
+
[LANG_ZH]: props.item.left_menu_name_cn
|
|
53
|
+
};
|
|
54
|
+
return nameMap[getLocaleLang()] || props.item.left_menu_name_cn;
|
|
55
|
+
});
|
|
56
|
+
const handleMouseEnter = () => {
|
|
57
|
+
isHover.value = true;
|
|
58
|
+
};
|
|
59
|
+
const handleMouseLeave = () => {
|
|
60
|
+
isHover.value = false;
|
|
61
|
+
};
|
|
62
|
+
const clickMenuReport = () => {
|
|
63
|
+
if (!useReport) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const reportName = props.item.left_menu_name_cn;
|
|
67
|
+
if (reportName) {
|
|
68
|
+
useReport(REPO_EVENT.CLICK, { module_name: `侧边栏_${reportName}` });
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const handleMenuClick = () => {
|
|
72
|
+
const currentHref = window.location.href;
|
|
73
|
+
if (props.item.left_menu_url === currentHref) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (props.item.is_open_new_tab) {
|
|
77
|
+
window.open(props.item.left_menu_url, "_blank");
|
|
78
|
+
} else if (isHttps(props.item.left_menu_url)) {
|
|
79
|
+
window.location.href = props.item.left_menu_url;
|
|
80
|
+
} else {
|
|
81
|
+
if (props.item.left_menu_url != "/" && !props.isLogin) {
|
|
82
|
+
emitEvent("login", { loginTriggerSource: `aside_${props.item.left_menu_url}` });
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
router.push({
|
|
86
|
+
path: props.item.left_menu_url
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
clickMenuReport();
|
|
90
|
+
};
|
|
91
|
+
return (_ctx, _cache) => {
|
|
92
|
+
return openBlock(), createElementBlock("div", {
|
|
93
|
+
class: normalizeClass(["menu-item", { "menu-item__selected": isSelected.value }]),
|
|
94
|
+
onMouseenter: handleMouseEnter,
|
|
95
|
+
onMouseleave: handleMouseLeave,
|
|
96
|
+
onClick: handleMenuClick
|
|
97
|
+
}, [
|
|
98
|
+
props.item.isIcon ? (openBlock(), createBlock(GIcon, {
|
|
99
|
+
key: 0,
|
|
100
|
+
name: currentImg.value,
|
|
101
|
+
class: "default-icon",
|
|
102
|
+
size: "16",
|
|
103
|
+
color: "var(--theme-menu-icon-fill)"
|
|
104
|
+
}, null, 8, ["name"])) : (openBlock(), createElementBlock("img", {
|
|
105
|
+
key: 1,
|
|
106
|
+
class: "menu-item__icon",
|
|
107
|
+
src: currentImg.value,
|
|
108
|
+
alt: ""
|
|
109
|
+
}, null, 8, _hoisted_1)),
|
|
110
|
+
createElementVNode("span", null, toDisplayString(currentName.value), 1)
|
|
111
|
+
], 34);
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
const MenuItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-gitcode-layout-lib"]]);
|
|
116
|
+
export {
|
|
117
|
+
MenuItem as default
|
|
118
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-B811122P.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,15 +1,13 @@
|
|
|
1
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-
|
|
2
|
+
import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-B811122P.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" };
|
|
6
6
|
const _hoisted_2 = ["onClick", "onMouseenter"];
|
|
7
|
-
const _hoisted_3 = { class: "history-list-box__content flex items-center
|
|
8
|
-
const _hoisted_4 =
|
|
7
|
+
const _hoisted_3 = { class: "history-list-box__content flex items-center w-full" };
|
|
8
|
+
const _hoisted_4 = ["title"];
|
|
9
9
|
const _hoisted_5 = ["title"];
|
|
10
|
-
const _hoisted_6 =
|
|
11
|
-
const _hoisted_7 = { class: "item-tx" };
|
|
12
|
-
const _hoisted_8 = { class: "flex items-center gap-[8px]" };
|
|
10
|
+
const _hoisted_6 = { class: "item-tx" };
|
|
13
11
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
12
|
__name: "SearchHistoryList",
|
|
15
13
|
props: {
|
|
@@ -30,56 +28,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
28
|
const { t } = i18n.global;
|
|
31
29
|
const props = __props;
|
|
32
30
|
const emits = __emit;
|
|
33
|
-
const getRepoType = (item) => {
|
|
34
|
-
const typeMap = {
|
|
35
|
-
repo: {
|
|
36
|
-
text: t("gitCodeLayout.header.repo"),
|
|
37
|
-
icon: "gt-plane-project",
|
|
38
|
-
hoverIcon: "gt-plane-project-red"
|
|
39
|
-
},
|
|
40
|
-
model: {
|
|
41
|
-
text: t("gitCodeLayout.aihub.model"),
|
|
42
|
-
icon: "gt-plane-Models",
|
|
43
|
-
hoverIcon: "gt-plane-Models-red"
|
|
44
|
-
},
|
|
45
|
-
dataset: {
|
|
46
|
-
text: t("gitCodeLayout.aihub.dataSet"),
|
|
47
|
-
icon: "gt-plane-Datasets",
|
|
48
|
-
hoverIcon: "gt-plane-Datasets-red"
|
|
49
|
-
},
|
|
50
|
-
issue: {
|
|
51
|
-
text: "Issues",
|
|
52
|
-
icon: "gt-plane-issues",
|
|
53
|
-
hoverIcon: "gt-plane-issues-red"
|
|
54
|
-
},
|
|
55
|
-
pullrequest: {
|
|
56
|
-
text: "Pull requests",
|
|
57
|
-
icon: "gt-plane-pullRequest",
|
|
58
|
-
hoverIcon: "gt-plane-pullRequest-red"
|
|
59
|
-
},
|
|
60
|
-
group: {
|
|
61
|
-
text: t("gitCodeLayout.header.org"),
|
|
62
|
-
icon: "gt-plane-users",
|
|
63
|
-
hoverIcon: "gt-plane-users-red"
|
|
64
|
-
},
|
|
65
|
-
user: {
|
|
66
|
-
text: t("gitCodeLayout.header.user"),
|
|
67
|
-
icon: "gt-plane-user",
|
|
68
|
-
hoverIcon: "gt-plane-user-red"
|
|
69
|
-
},
|
|
70
|
-
tag: {
|
|
71
|
-
text: t("gitCodeLayout.header.tags"),
|
|
72
|
-
icon: "gt-plane-topics",
|
|
73
|
-
hoverIcon: "gt-plane-topics-red"
|
|
74
|
-
},
|
|
75
|
-
topic: {
|
|
76
|
-
text: t("gitCodeLayout.header.topic"),
|
|
77
|
-
icon: "gt-plane-topic",
|
|
78
|
-
hoverIcon: "gt-plane-topic-red"
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
return typeMap[item.type] || typeMap["repo"];
|
|
82
|
-
};
|
|
83
31
|
const historyList = computed(() => {
|
|
84
32
|
var _a;
|
|
85
33
|
return (_a = props.searchHistoryList) == null ? void 0 : _a.map((item) => {
|
|
@@ -118,30 +66,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
118
66
|
onMouseenter: ($event) => onSearchEnter(index)
|
|
119
67
|
}, [
|
|
120
68
|
createElementVNode("div", _hoisted_3, [
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
createElementVNode("span", _hoisted_7, toDisplayString(item.q || item), 1)
|
|
136
|
-
]),
|
|
137
|
-
createElementVNode("div", _hoisted_8, [
|
|
138
|
-
createVNode(GIcon, {
|
|
139
|
-
name: _ctx.activeIndex === index ? getRepoType(item).hoverIcon : getRepoType(item).icon
|
|
140
|
-
}, null, 8, ["name"]),
|
|
141
|
-
createElementVNode("span", {
|
|
142
|
-
class: normalizeClass(_ctx.activeIndex === index ? "text-[var(--theme-text)]" : "text-[var(--theme-placeholder)]")
|
|
143
|
-
}, toDisplayString(getRepoType(item).text), 3)
|
|
144
|
-
])
|
|
69
|
+
createVNode(GIcon, {
|
|
70
|
+
name: "gt-line-time",
|
|
71
|
+
color: "var(--devui-aide-text)",
|
|
72
|
+
class: "mr-[8px]"
|
|
73
|
+
}),
|
|
74
|
+
createElementVNode("span", {
|
|
75
|
+
class: "whitespace-nowrap overflow-hidden text-ellipsis",
|
|
76
|
+
title: item.repoTitle
|
|
77
|
+
}, toDisplayString(item.repoTitle), 9, _hoisted_4),
|
|
78
|
+
createElementVNode("span", {
|
|
79
|
+
class: "whitespace-nowrap overflow-hidden text-ellipsis",
|
|
80
|
+
title: item.namespaceTitle
|
|
81
|
+
}, toDisplayString(item.namespaceTitle), 9, _hoisted_5),
|
|
82
|
+
createElementVNode("span", _hoisted_6, toDisplayString(item.q || item), 1)
|
|
145
83
|
]),
|
|
146
84
|
createVNode(GIcon, {
|
|
147
85
|
name: "gt-line-close",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, createElementVNode, withDirectives, toDisplayString, withModifiers, createVNode, vShow } from "vue";
|
|
2
|
-
import { G as GIcon, _ as _export_sfc } from "./index-
|
|
2
|
+
import { G as GIcon, _ as _export_sfc } from "./index-B811122P.js";
|
|
3
3
|
import "vue-devui-lal/icon";
|
|
4
4
|
import "vue-devui-lal/icon/style.css";
|
|
5
5
|
const _hoisted_1 = { class: "ellipsis" };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, onMounted, createElementBlock, openBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createBlock, createVNode, withCtx } from "vue";
|
|
2
|
-
import { u as useReportRepo, S as SearchRepoCard } from "./index-
|
|
3
|
-
import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-
|
|
2
|
+
import { u as useReportRepo, S as SearchRepoCard } from "./index-CRLLxvwN.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-B811122P.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";
|
|
@@ -64,9 +64,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
64
64
|
hover: "",
|
|
65
65
|
hideTopicTags: "",
|
|
66
66
|
onReport: (evt) => handleReport(item, index, evt),
|
|
67
|
-
cardType:
|
|
67
|
+
cardType: "repo",
|
|
68
68
|
"url-params": { source_module: "today_trending" }
|
|
69
|
-
}, null, 8, ["info", "onReport"
|
|
69
|
+
}, null, 8, ["info", "onReport"]);
|
|
70
70
|
}), 128))
|
|
71
71
|
])) : (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
72
72
|
(openBlock(), createElementBlock(Fragment, null, renderList(5, (item) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-B811122P.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 { 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-
|
|
2
|
+
import { a as i18n, h as headRequest, G as GIcon } from "./index-B811122P.js";
|
|
3
3
|
import "vue-devui-lal/icon";
|
|
4
4
|
import "vue-devui-lal/icon/style.css";
|
|
5
5
|
const _hoisted_1 = { class: "px-[8px] history-list-project pl-[8px]" };
|