vue-layout-gitcode 1.3.24 → 1.3.26

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.
@@ -0,0 +1,216 @@
1
+ import { defineComponent, inject, createElementBlock, openBlock, Fragment, createElementVNode, toDisplayString, createVNode, unref, renderList, withDirectives, createBlock, ref, watch, onMounted, createCommentVNode } from "vue";
2
+ import "vue-devui-lal/icon";
3
+ import "vue-devui-lal/icon/style.css";
4
+ import { h as headRequest, R as REPO_MODULE, a as i18n, G as GIcon, b as REPO_EVENT, _ as _export_sfc, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-BYT6vV5V.js";
5
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-D3q4EUnq.js";
6
+ import "vue-devui-lal/tooltip";
7
+ import "vue-devui-lal/tooltip/style.css";
8
+ import "vue-router";
9
+ import "vue-devui-lal/grid";
10
+ import "vue-devui-lal/skeleton";
11
+ import "vue-devui-lal/grid/style.css";
12
+ import "vue-devui-lal/skeleton/style.css";
13
+ import "@vueuse/core";
14
+ const vElementExposure = {
15
+ mounted(el, binding) {
16
+ let observer = new IntersectionObserver(function(entries, observer2) {
17
+ entries.forEach(function(entry) {
18
+ var _a;
19
+ if (entry.isIntersecting) {
20
+ (_a = binding.value) == null ? void 0 : _a.trigger("expo");
21
+ observer2.unobserve(entry.target);
22
+ }
23
+ });
24
+ }, { threshold: 0 });
25
+ observer.observe(el);
26
+ },
27
+ beforeUnmount() {
28
+ }
29
+ };
30
+ const _hoisted_1$1 = { class: "mb-[4px] mt-[16px] flex justify-between" };
31
+ const _hoisted_2$1 = { class: "title" };
32
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
33
+ __name: "SearchRepoCardList",
34
+ props: {
35
+ dataList: {
36
+ type: Array,
37
+ default: () => []
38
+ },
39
+ searchStr: {
40
+ type: String,
41
+ default: ""
42
+ },
43
+ type: {
44
+ type: String,
45
+ default: ""
46
+ },
47
+ name: {
48
+ type: String,
49
+ default: ""
50
+ }
51
+ },
52
+ emits: ["report"],
53
+ setup(__props, { emit: __emit }) {
54
+ const API = headRequest(inject("request"));
55
+ const { triggerReport } = useReportRepo({ moduleName: REPO_MODULE.SEARCH_SUGGESTION_CARD }, API.viewReport);
56
+ const { t: $t } = i18n.global;
57
+ const useReport = inject("useReport");
58
+ const emits = __emit;
59
+ const handleReport = (item) => {
60
+ useReport(REPO_EVENT.CLICK, { module_name: REPO_MODULE.SEARCH_SUGGESTION_CARD, repo_id: item.id });
61
+ };
62
+ const handleMore = () => {
63
+ emits("more");
64
+ };
65
+ return (_ctx, _cache) => {
66
+ return openBlock(), createElementBlock(Fragment, null, [
67
+ createElementVNode("div", _hoisted_1$1, [
68
+ createElementVNode("p", _hoisted_2$1, toDisplayString(__props.name), 1),
69
+ createElementVNode("a", {
70
+ class: "more-btn",
71
+ onClick: handleMore
72
+ }, [
73
+ createElementVNode("span", null, toDisplayString(unref($t)("gitCodeLayout.common.more")), 1),
74
+ createVNode(GIcon, {
75
+ name: "gt-line-right",
76
+ color: "var(--theme-placeholder)"
77
+ })
78
+ ])
79
+ ]),
80
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.dataList, (item, index) => {
81
+ return withDirectives((openBlock(), createBlock(SearchRepoCard, {
82
+ key: item.id,
83
+ class: "mb-[8px]",
84
+ info: { ...item, index },
85
+ keyword: __props.searchStr,
86
+ hover: "",
87
+ hideTopicTags: "",
88
+ hideStarBtn: "",
89
+ hideFooter: "",
90
+ hideDescription: "",
91
+ onReport: () => handleReport(item),
92
+ cardType: __props.type,
93
+ "url-params": { source_module: "search_project" }
94
+ }, null, 8, ["info", "keyword", "onReport", "cardType"])), [
95
+ [unref(vElementExposure), { trigger: (type) => unref(triggerReport)(type, item) }]
96
+ ]);
97
+ }), 128))
98
+ ], 64);
99
+ };
100
+ }
101
+ });
102
+ const SearchRepoCardList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-gitcode-layout-lib"]]);
103
+ const _hoisted_1 = {
104
+ key: 0,
105
+ class: "px-[8px] history-list-project pl-[8px]"
106
+ };
107
+ const _hoisted_2 = {
108
+ key: 1,
109
+ class: "px-[8px] history-list-project pl-[8px]"
110
+ };
111
+ const _hoisted_3 = {
112
+ key: 2,
113
+ class: "px-[8px] history-list-project pl-[8px]"
114
+ };
115
+ const _sfc_main = {
116
+ __name: "GloabarSearch",
117
+ props: ["searchStr"],
118
+ emits: ["searchMore"],
119
+ setup(__props, { emit: __emit }) {
120
+ const emits = __emit;
121
+ const { t: $t } = i18n.global;
122
+ const API = headRequest(inject("request"));
123
+ const useReport = inject("useReport");
124
+ const projectList = ref([]);
125
+ const datasetList = ref([]);
126
+ const modelList = ref([]);
127
+ const origin = window.location.origin;
128
+ const props = __props;
129
+ let timer = null;
130
+ const convertDataList = (dataList) => {
131
+ return dataList == null ? void 0 : dataList.slice(0, 5).map((item) => {
132
+ const isGitcodeRepo = REPO_TYPE.GITCODE === item.is_mirrors;
133
+ const repoName = (!isGitcodeRepo ? extractRepoInfoWithURL(item.import_url) : item.name_with_namespace) || item.name_with_namespace;
134
+ const displayName = formatNameSpace(repoName).join("/");
135
+ return {
136
+ ...item,
137
+ path: `${origin}/${item.path_with_namespace}`,
138
+ displayName,
139
+ web_url: `${origin}/${item.path_with_namespace}`
140
+ };
141
+ });
142
+ };
143
+ const handleMore = (type) => {
144
+ emits("searchMore", type);
145
+ };
146
+ const getData = async () => {
147
+ if (!props.searchStr) {
148
+ return;
149
+ }
150
+ try {
151
+ useReport("search-project", {});
152
+ const res = await API.getGloabarSearchKeyLink({ q: props.searchStr });
153
+ const { recommend_project = [], recommend_model = [], recommend_dataset = [] } = res.data || {};
154
+ projectList.value = convertDataList(recommend_project);
155
+ modelList.value = convertDataList(recommend_model);
156
+ datasetList.value = convertDataList(recommend_dataset);
157
+ } catch (error) {
158
+ console.error("Failed to fetch search results:", error);
159
+ projectList.value = [];
160
+ modelList.value = [];
161
+ datasetList.value = [];
162
+ }
163
+ };
164
+ if (props.searchStr) {
165
+ getData();
166
+ }
167
+ watch(
168
+ () => props.searchStr,
169
+ () => {
170
+ if (timer) {
171
+ clearTimeout(timer);
172
+ }
173
+ timer = setTimeout(() => {
174
+ getData();
175
+ }, 300);
176
+ }
177
+ );
178
+ onMounted(() => {
179
+ console.log("GloabarSearch");
180
+ });
181
+ return (_ctx, _cache) => {
182
+ return openBlock(), createElementBlock(Fragment, null, [
183
+ projectList.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
184
+ createVNode(SearchRepoCardList, {
185
+ "data-list": projectList.value,
186
+ "search-str": __props.searchStr,
187
+ name: unref($t)("gitCodeLayout.header.repo"),
188
+ type: "repo",
189
+ onMore: _cache[0] || (_cache[0] = () => handleMore("repo"))
190
+ }, null, 8, ["data-list", "search-str", "name"])
191
+ ])) : createCommentVNode("", true),
192
+ modelList.value.length ? (openBlock(), createElementBlock("div", _hoisted_2, [
193
+ createVNode(SearchRepoCardList, {
194
+ "data-list": modelList.value,
195
+ "search-str": __props.searchStr,
196
+ name: unref($t)("gitCodeLayout.aihub.model"),
197
+ type: "model",
198
+ onMore: _cache[1] || (_cache[1] = () => handleMore("model"))
199
+ }, null, 8, ["data-list", "search-str", "name"])
200
+ ])) : createCommentVNode("", true),
201
+ datasetList.value.length ? (openBlock(), createElementBlock("div", _hoisted_3, [
202
+ createVNode(SearchRepoCardList, {
203
+ "data-list": datasetList.value,
204
+ "search-str": __props.searchStr,
205
+ name: unref($t)("gitCodeLayout.aihub.dataSet"),
206
+ type: "dataset",
207
+ onMore: _cache[2] || (_cache[2] = () => handleMore("dataset"))
208
+ }, null, 8, ["data-list", "search-str", "name"])
209
+ ])) : createCommentVNode("", true)
210
+ ], 64);
211
+ };
212
+ }
213
+ };
214
+ export {
215
+ _sfc_main as default
216
+ };
@@ -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-DC9YPjPv.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-BYT6vV5V.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
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-DC9YPjPv.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-BYT6vV5V.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" };
@@ -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-DC9YPjPv.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-BYT6vV5V.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-243BN_SR.js";
3
- import { a as i18n, h as headRequest, R as REPO_MODULE, c as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-DC9YPjPv.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-D3q4EUnq.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-BYT6vV5V.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";
@@ -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-DC9YPjPv.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-BYT6vV5V.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-DC9YPjPv.js";
2
+ import { a as i18n, h as headRequest, G as GIcon } from "./index-BYT6vV5V.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]" };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, onMounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
2
2
  import { FixedOverlay } from "vue-devui-lal/overlay";
3
- import { w as useLayoutConfig, _ as _export_sfc } from "./index-DC9YPjPv.js";
3
+ import { w as useLayoutConfig, _ as _export_sfc } from "./index-BYT6vV5V.js";
4
4
  import "vue-devui-lal/overlay/style.css";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "index",
@@ -7659,6 +7659,7 @@ const gitCodeLayout$1 = {
7659
7659
  theme: "主题",
7660
7660
  preSetting: "偏好设置"
7661
7661
  },
7662
+ more: "查看更多",
7662
7663
  search: "搜索",
7663
7664
  organize: "组织",
7664
7665
  all: "全部",
@@ -7942,6 +7943,7 @@ const gitCodeLayout = {
7942
7943
  theme: "Theme",
7943
7944
  preSetting: "Preferences"
7944
7945
  },
7946
+ more: "More",
7945
7947
  search: "Search",
7946
7948
  organize: "Organizations",
7947
7949
  all: "All",
@@ -16832,17 +16834,24 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
16832
16834
  });
16833
16835
  const request = inject("request");
16834
16836
  const API = asideRequest(request);
16837
+ const loaded = ref(false);
16835
16838
  const getTianqiRouteConfig = async () => {
16836
16839
  var _a;
16837
- const res = await API.getTianqiRouteConfig();
16838
- const data = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || {};
16839
- const { top_button: topButton } = data;
16840
- if (topButton) {
16841
- tianqiButtonConfig.value = {
16842
- img: topButton.img,
16843
- img_black: topButton.img_black,
16844
- url: topButton.url
16845
- };
16840
+ try {
16841
+ const res = await API.getTianqiRouteConfig();
16842
+ const data = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || {};
16843
+ const { top_button: topButton } = data;
16844
+ if (topButton) {
16845
+ tianqiButtonConfig.value = {
16846
+ img: topButton.img,
16847
+ img_black: topButton.img_black,
16848
+ url: topButton.url
16849
+ };
16850
+ }
16851
+ loaded.value = true;
16852
+ } catch (error) {
16853
+ console.error(error);
16854
+ loaded.value = true;
16846
16855
  }
16847
16856
  };
16848
16857
  getTianqiRouteConfig();
@@ -16852,21 +16861,27 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
16852
16861
  }
16853
16862
  return currentTheme.value === ThemeType.BLACK ? logoBlack : logoWhite;
16854
16863
  });
16864
+ const customClass = computed(() => {
16865
+ return {
16866
+ "custom": tianqiButtonConfig.value.img
16867
+ };
16868
+ });
16855
16869
  function goPage() {
16856
16870
  const url = tianqiButtonConfig.value.url || layoutConfig2.VITE_HOST_TIANQI + "?utm_source=toolbar";
16857
16871
  window.open(url);
16858
16872
  }
16859
16873
  return (_ctx, _cache) => {
16860
16874
  return openBlock(), createElementBlock("div", {
16861
- class: "agent-tips",
16875
+ class: normalizeClass(["agent-tips", customClass.value]),
16862
16876
  onClick: withModifiers(goPage, ["stop"])
16863
16877
  }, [
16864
- createElementVNode("img", {
16878
+ loaded.value ? (openBlock(), createElementBlock("img", {
16879
+ key: 0,
16865
16880
  src: logo.value,
16866
16881
  alt: "logo",
16867
16882
  class: "w-[108px] cursor-pointer"
16868
- }, null, 8, _hoisted_1$p)
16869
- ]);
16883
+ }, null, 8, _hoisted_1$p)) : createCommentVNode("", true)
16884
+ ], 2);
16870
16885
  };
16871
16886
  }
16872
16887
  });
@@ -17822,13 +17837,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17822
17837
  setup(__props) {
17823
17838
  var _a;
17824
17839
  const { t: $t } = i18n.global;
17825
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-Dp3UEGf6.js"));
17826
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-U0Atsr6S.js"));
17827
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-ClyjLgMy.js"));
17828
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-D2XYb905.js"));
17829
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-DPJlDv5L.js"));
17830
- const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-Cw2YCQw5.js"));
17831
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-hZ6Qy0Vx.js"));
17840
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-DRqIYuRa.js"));
17841
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-CoYIxR82.js"));
17842
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-jFuTLWIT.js"));
17843
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-B2bIvzab.js"));
17844
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-BkrASZDr.js"));
17845
+ const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-B-kq4k0s.js"));
17846
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-MiT0AQ3u.js"));
17832
17847
  const props = __props;
17833
17848
  const repoInfo = inject("repoInfo");
17834
17849
  const orgInfo = inject("orgInfo");
@@ -17927,7 +17942,11 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17927
17942
  const projectTagVisible = computed(() => {
17928
17943
  return (isSearchPage.value || isFocus.value) && localSearchInfo.value.searchScopeName;
17929
17944
  });
17930
- const cnScopeMap = { repo: $t("gitCodeLayout.header.repo"), group: $t("gitCodeLayout.header.org"), user: $t("gitCodeLayout.header.user") };
17945
+ const cnScopeMap = {
17946
+ repo: $t("gitCodeLayout.header.repo"),
17947
+ group: $t("gitCodeLayout.header.org"),
17948
+ user: $t("gitCodeLayout.header.user")
17949
+ };
17931
17950
  const languageTagVisible = computed(() => {
17932
17951
  return (isSearchPage.value || isFocus.value) && searchStr && language.value;
17933
17952
  });
@@ -17947,22 +17966,22 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17947
17966
  label: localSearchInfo.value.projectType === "user" ? $t("gitCodeLayout.header.user") : $t("gitCodeLayout.header.org"),
17948
17967
  enLabel: localSearchInfo.value.projectType === "user" ? "user" : "group",
17949
17968
  value: localSearchInfo.value.nameOrOrg
17950
- },
17951
- { title: $t("gitCodeLayout.header.platformSearch") }
17969
+ }
17970
+ // { title: $t('gitCodeLayout.header.platformSearch') }
17952
17971
  ];
17953
17972
  case "group":
17954
17973
  return [
17955
- { label: cnScopeMap.group, enLabel: "group", value: localSearchInfo.value.searchScopeName },
17956
- { title: $t("gitCodeLayout.header.platformSearch") }
17974
+ { label: cnScopeMap.group, enLabel: "group", value: localSearchInfo.value.searchScopeName }
17975
+ // { title: $t('gitCodeLayout.header.platformSearch') }
17957
17976
  ];
17958
17977
  case "user":
17959
17978
  return [
17960
- { label: cnScopeMap.user, enLabel: "user", value: localSearchInfo.value.searchScopeName },
17961
- { title: $t("gitCodeLayout.header.platformSearch") }
17979
+ { label: cnScopeMap.user, enLabel: "user", value: localSearchInfo.value.searchScopeName }
17980
+ // { title: $t('gitCodeLayout.header.platformSearch') }
17962
17981
  ];
17963
17982
  }
17964
17983
  }
17965
- return [{ title: $t("gitCodeLayout.header.platformSearch") }];
17984
+ return [];
17966
17985
  });
17967
17986
  let localSearchText = localStorage$2.getItem("localSearchText");
17968
17987
  if (localSearchText) {
@@ -17987,7 +18006,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17987
18006
  isFocus.value = false;
17988
18007
  searchDropDownVisible.value = false;
17989
18008
  };
17990
- const onScopeSearch = (data) => {
18009
+ const onScopeSearch = (data = {}) => {
17991
18010
  searchParams = { scope: data.enLabel ? data.enLabel : void 0 };
17992
18011
  if (isSearchPage.value && route.query.type && route.query.type !== "commit") {
17993
18012
  searchParams.type = route.query.type;
@@ -18016,6 +18035,11 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18016
18035
  }
18017
18036
  }
18018
18037
  };
18038
+ const handleSearchMore = (type) => {
18039
+ console.log(type);
18040
+ searchParams.type = type;
18041
+ onSearch();
18042
+ };
18019
18043
  const toSearch = (data) => {
18020
18044
  if (typeof data === "string") {
18021
18045
  searchStr.value = data;
@@ -18070,26 +18094,37 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18070
18094
  localSearchInfo.value = {};
18071
18095
  };
18072
18096
  let memorySearchKey = "";
18073
- watch(() => isFocus.value, () => {
18074
- if (!isFocus.value && !isSearchPage.value) {
18075
- memorySearchKey = searchStr.value;
18076
- searchStr.value = "";
18097
+ watch(
18098
+ () => isFocus.value,
18099
+ () => {
18100
+ if (!isFocus.value && !isSearchPage.value) {
18101
+ memorySearchKey = searchStr.value;
18102
+ searchStr.value = "";
18103
+ }
18077
18104
  }
18078
- });
18079
- watch([() => searchStr.value, () => isFocus.value], () => {
18080
- if (isFocus.value || searchStr.value) {
18081
- interval.value && clearInterval(interval.value);
18082
- } else {
18083
- scrollRecommend();
18105
+ );
18106
+ watch(
18107
+ [() => searchStr.value, () => isFocus.value],
18108
+ () => {
18109
+ if (isFocus.value || searchStr.value) {
18110
+ interval.value && clearInterval(interval.value);
18111
+ } else {
18112
+ scrollRecommend();
18113
+ }
18114
+ },
18115
+ {
18116
+ immediate: true
18084
18117
  }
18085
- }, {
18086
- immediate: true
18087
- });
18118
+ );
18088
18119
  const onFocus = () => {
18089
- useReport2(REPO_EVENT.CLICK, {
18090
- module_name: REPO_MODULE.SEARCH_BAR_CLICK
18091
- }, () => {
18092
- });
18120
+ useReport2(
18121
+ REPO_EVENT.CLICK,
18122
+ {
18123
+ module_name: REPO_MODULE.SEARCH_BAR_CLICK
18124
+ },
18125
+ () => {
18126
+ }
18127
+ );
18093
18128
  if (isFocus.value) {
18094
18129
  return;
18095
18130
  }
@@ -18185,10 +18220,14 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18185
18220
  getSearchHot();
18186
18221
  onMounted(() => {
18187
18222
  var _a2, _b;
18188
- useReport2 && useReport2(REPO_EVENT.SHOW, {
18189
- module_name: REPO_MODULE.SEARCH_BAR_EXPO
18190
- }, () => {
18191
- });
18223
+ useReport2 && useReport2(
18224
+ REPO_EVENT.SHOW,
18225
+ {
18226
+ module_name: REPO_MODULE.SEARCH_BAR_EXPO
18227
+ },
18228
+ () => {
18229
+ }
18230
+ );
18192
18231
  searchStr.value = ((_a2 = route == null ? void 0 : route.query) == null ? void 0 : _a2.q) || "";
18193
18232
  const index2 = (_b = searchHotWords.value) == null ? void 0 : _b.findIndex((item) => item === searchStr.value);
18194
18233
  activeSearchKey.value = index2 === -1 ? 0 : index2;
@@ -18260,7 +18299,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18260
18299
  }, null, 8, ["searchStr", "searchInfo"])) : createCommentVNode("", true),
18261
18300
  !localSearchInfo.value.searchScope ? (openBlock(), createBlock(unref(GloabarSearch), {
18262
18301
  key: 2,
18263
- searchStr: searchStr.value
18302
+ searchStr: searchStr.value,
18303
+ onSearchMore: _cache[5] || (_cache[5] = (type) => handleSearchMore(type))
18264
18304
  }, null, 8, ["searchStr"])) : createCommentVNode("", true)
18265
18305
  ], 512), [
18266
18306
  [vShow, searchStr.value]
@@ -18315,12 +18355,12 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18315
18355
  ]),
18316
18356
  showRecommendSearch.value ? (openBlock(), createElementBlock("div", {
18317
18357
  key: 0,
18318
- class: normalizeClass(["g-header-search-recommend-placeholder z-[-1] absolute top-0 left-[44px] w-full h-full leading-[100%] text-[var(--theme-placeholder)]", { "default": !isFocus.value, "focus": isFocus.value }])
18358
+ class: normalizeClass(["g-header-search-recommend-placeholder z-[-1] absolute top-0 left-[44px] w-full h-full leading-[100%] text-[var(--theme-placeholder)]", { default: !isFocus.value, focus: isFocus.value }])
18319
18359
  }, [
18320
- _cache[6] || (_cache[6] = createElementVNode("div", { class: "absolute top-0 left-0 h-full flex items-center" }, " 🔥 ", -1)),
18360
+ _cache[7] || (_cache[7] = createElementVNode("div", { class: "absolute top-0 left-0 h-full flex items-center" }, "🔥", -1)),
18321
18361
  (openBlock(true), createElementBlock(Fragment, null, renderList(searchHotWords.value, (item, index2) => {
18322
18362
  return openBlock(), createElementBlock("div", {
18323
- class: normalizeClass(["g-header-search-recommend-item absolute top-0 left-[24px] h-full flex items-center", { "fadeInUp": activeSearchKey.value === index2, "fadeOutUp": activeSearchKey.value !== index2 }]),
18363
+ class: normalizeClass(["g-header-search-recommend-item absolute top-0 left-[24px] h-full flex items-center", { fadeInUp: activeSearchKey.value === index2, fadeOutUp: activeSearchKey.value !== index2 }]),
18324
18364
  key: item
18325
18365
  }, toDisplayString$1(item.content), 3);
18326
18366
  }), 128))
@@ -18381,7 +18421,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18381
18421
  placeholder: unref($t)("gitCodeLayout.home.searchPlaceholder"),
18382
18422
  onKeydown: withKeys(searchResult, ["enter"]),
18383
18423
  modelValue: searchStr.value,
18384
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => searchStr.value = $event)
18424
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => searchStr.value = $event)
18385
18425
  }, {
18386
18426
  prefix: withCtx(() => [
18387
18427
  createVNode(GIcon, {
@@ -18397,7 +18437,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18397
18437
  }
18398
18438
  });
18399
18439
  const Search = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-gitcode-layout-lib"]]);
18400
- const NoticeModal = defineAsyncComponent(() => import("./notice-CvqB4FHy.js"));
18440
+ const NoticeModal = defineAsyncComponent(() => import("./notice-C0rOjRir.js"));
18401
18441
  function clearNotice() {
18402
18442
  if (localStorage$2.getItem("validator_email")) {
18403
18443
  localStorage$2.removeItem("validator_email");
@@ -18459,7 +18499,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
18459
18499
  bgConfig: { default: () => ({
18460
18500
  index_head: "",
18461
18501
  detail_top: "",
18502
+ detail_top_black: "",
18462
18503
  detail_toolbar: "",
18504
+ detail_toolbar_black: "",
18463
18505
  detail_top_url: "",
18464
18506
  index_head_url: "",
18465
18507
  detail_toolbar_url: ""
@@ -18579,11 +18621,17 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
18579
18621
  const isShowStickyNotice = computed(() => {
18580
18622
  return ([SceneValue.repo, SceneValue.org, SceneValue.user, SceneValue.aiRepo].includes(props.sceneValue) || isHome.value && window.location.pathname != "/" && !homeTabPage.includes(window.location.pathname)) && props.bgConfig.detail_toolbar;
18581
18623
  });
18624
+ const detailToolbarImg = computed(() => {
18625
+ return (currentTheme.value === ThemeType.WHITE ? props.bgConfig.detail_toolbar : props.bgConfig.detail_toolbar_black) || props.bgConfig.detail_toolbar;
18626
+ });
18627
+ const detailTopImg = computed(() => {
18628
+ return (currentTheme.value === ThemeType.WHITE ? props.bgConfig.detail_top : props.bgConfig.detail_top_black) || props.bgConfig.detail_top;
18629
+ });
18582
18630
  const stickyNoticeInfo = computed(() => {
18583
- return isShowStickyNotice.value ? props.bgConfig.detail_top : "";
18631
+ return isShowStickyNotice.value ? detailTopImg.value : "";
18584
18632
  });
18585
18633
  const detailBgInfo = computed(() => {
18586
- return isShowStickyNotice.value ? props.bgConfig.detail_toolbar : "";
18634
+ return isShowStickyNotice.value ? detailToolbarImg.value : "";
18587
18635
  });
18588
18636
  const detailBgStyle = computed(() => {
18589
18637
  return detailBgInfo.value ? {
@@ -25019,7 +25067,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
25019
25067
  }
25020
25068
  });
25021
25069
  const MFA = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-gitcode-layout-lib"]]);
25022
- const SlidCaptcha = defineAsyncComponent(() => import("./index-DmtOCma-.js"));
25070
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-B4_q-aJ0.js"));
25023
25071
  const useSlidCaptcha = () => {
25024
25072
  const { mount, unMount } = usePopup("slid-captcha-popup");
25025
25073
  const open = (config) => {
@@ -26617,8 +26665,8 @@ export {
26617
26665
  TOPIC_TYPE as T,
26618
26666
  _export_sfc as _,
26619
26667
  i18n as a,
26620
- REPO_TYPE as b,
26621
- REPO_EVENT as c,
26668
+ REPO_EVENT as b,
26669
+ REPO_TYPE as c,
26622
26670
  debounce$1 as d,
26623
26671
  extractRepoInfoWithURL as e,
26624
26672
  useRequestReport as f,