vue-layout-gitcode 1.6.8 → 1.6.10

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.
@@ -1,7 +1,7 @@
1
- import { ref, watchEffect, defineComponent, toDisplayString, unref, mergeModels, useModel, watch, openBlock, createElementBlock, createVNode, normalizeClass, withDirectives, createElementVNode, vShow, inject, withModifiers, createBlock, Fragment, computed, normalizeStyle, createCommentVNode, createTextVNode, onMounted, onUnmounted, renderList, withCtx, reactive } from "vue";
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 { t as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, r as reqCatch, h as headRequest, d as useRequestReport, 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-24e39a36.js";
4
- import { t as transWebUrl } from "./transWebUrl-e0cbdabf.js";
3
+ import { d as transferNumber, G as GIcon, _ as _export_sfc, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, a as i18n, T as TOPIC_TYPE, g as useTimeFormat, L as LANG_KEY, j as LANG_ZH, k as usePageResize, m as isGstarRepo, n as _sfc_main$b, o as isIncubationRepo, p as highlightWords, t as transformUrl, q as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-CNqIyce7.js";
4
+ import { t as transWebUrl } from "./transWebUrl-ogPju1FK.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
- channelNames.push(data.channelName);
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 index_vue_vue_type_style_index_0_scoped_7320dc21_lang = "";
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 index_vue_vue_type_style_index_0_scoped_e0391cc6_lang = "";
270
- const StarTag = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-e0391cc6"]]);
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 index_vue_vue_type_style_index_0_scoped_cb84d9d8_lang = "";
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 index_vue_vue_type_style_index_0_scoped_f41c9ade_lang = "";
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 index_vue_vue_type_style_index_0_scoped_33d28127_lang = "";
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 index_vue_vue_type_style_index_0_scoped_04cad993_lang = "";
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 index_vue_vue_type_style_index_0_scoped_e6ca367c_lang = "";
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",
@@ -551,8 +541,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
551
541
  };
552
542
  }
553
543
  });
554
- const index_vue_vue_type_style_index_0_scoped_51dde95b_lang = "";
555
- const NewTag = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-51dde95b"]]);
544
+ const NewTag = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-vue-layout-gitcode"]]);
556
545
  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
546
  const _hoisted_2$1 = {
558
547
  key: 1,
@@ -652,7 +641,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
652
641
  const { widthType } = usePageResize();
653
642
  const { t: $t } = i18n.global;
654
643
  const handleClick = () => {
655
- window.open(transWebUrl(props.info.web_url, props.urlParams), "_blank");
644
+ window.open(transWebUrl(transformUrl(props.info.web_url), props.urlParams), "_blank");
656
645
  emits("report");
657
646
  _frEventTrack(EVENT_NAME.CLICK_SEARCH_RESULT);
658
647
  };
@@ -726,8 +715,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
726
715
  return highlightWords(keyword, contentArr.join("/"), true);
727
716
  };
728
717
  onMounted(() => {
729
- if (props.info.is_recommend && props.info.index === 0)
730
- handleQueryGraph();
718
+ if (props.info.is_recommend && props.info.index === 0) handleQueryGraph();
731
719
  });
732
720
  return (_ctx, _cache) => {
733
721
  return openBlock(), createElementBlock("a", {
@@ -863,8 +851,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
863
851
  };
864
852
  }
865
853
  });
866
- const index_vue_vue_type_style_index_0_scoped_942f3914_lang = "";
867
- const SearchRepoCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-942f3914"]]);
854
+ const SearchRepoCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-vue-layout-gitcode"]]);
868
855
  export {
869
856
  SearchRepoCard as S,
870
857
  formatNameSpace as f,
@@ -0,0 +1,60 @@
1
+ import { defineComponent, onMounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
2
+ import { FixedOverlay } from "vue-devui-lal/overlay";
3
+ import { w as useLayoutConfig, _ as _export_sfc } from "./index-CNqIyce7.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.host/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
+ });
54
+ };
55
+ }
56
+ });
57
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-vue-layout-gitcode"]]);
58
+ export {
59
+ index as default
60
+ };
package/index.js CHANGED
@@ -1,65 +1,14 @@
1
- import { J, K, O, I, S, H, x, Q, N, P, M } from "./index-24e39a36.js";
2
- import "vue";
3
- import "vue-devui-lal/button";
4
- import "vue-devui-lal/popover";
5
- import "vue-devui-lal/tooltip";
6
- import "vue-devui-lal/textarea";
7
- import "vue-devui-lal/button/style.css";
8
- import "vue-devui-lal/popover/style.css";
9
- import "vue-devui-lal/tooltip/style.css";
10
- import "vue-devui-lal/textarea/style.css";
11
- import "vue-devui-lal/icon";
12
- import "vue-devui-lal/icon/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/style.css";
42
- import "vue-devui-lal/radio";
43
- import "@devui-design/icons/icomoon/devui-icon.css";
44
- import "vue-devui-lal/radio/style.css";
45
- import "vue-devui-lal/select";
46
- import "vue-devui-lal/editable-select";
47
- import "vue-devui-lal/select/style.css";
48
- import "vue-devui-lal/editable-select/style.css";
49
- import "vue-devui-lal/checkbox";
50
- import "vue-devui-lal/checkbox/style.css";
51
- import "vue-devui-lal/modal";
52
- import "vue-devui-lal/modal/style.css";
1
+ import { M, N, Q, K, S, J, y, V, P, U, O } from "./index-CNqIyce7.js";
53
2
  export {
54
- J as GitCodeAside,
55
- K as GitCodeHeader,
56
- O as GitCodeLayoutEmitter,
57
- I as Login,
3
+ M as GitCodeAside,
4
+ N as GitCodeHeader,
5
+ Q as GitCodeLayoutEmitter,
6
+ K as Login,
58
7
  S as SceneValue,
59
- H as ToolsFloat,
60
- x as currentTheme,
61
- Q as default,
62
- N as setLayoutConfig,
63
- P as setTheme,
64
- M as useLogin
8
+ J as ToolsFloat,
9
+ y as currentTheme,
10
+ V as default,
11
+ P as setLayoutConfig,
12
+ U as setTheme,
13
+ O as useLogin
65
14
  };
@@ -1,55 +1,9 @@
1
- import { defineComponent, computed, openBlock, createBlock, unref, isRef, withCtx, createElementVNode, normalizeClass, createVNode, createTextVNode } from "vue";
2
- import { i as isPhone, u as useModel } from "./index-24e39a36.js";
1
+ import { defineComponent, computed, createBlock, openBlock, unref, isRef, withCtx, createElementVNode, normalizeClass, createVNode, createTextVNode } from "vue";
2
+ import { i as isPhone, u as useModel } from "./index-CNqIyce7.js";
3
3
  import { Notification } from "vue-devui-lal/notification";
4
4
  import { Button } from "vue-devui-lal/button";
5
5
  import "vue-devui-lal/notification/style.css";
6
6
  import "vue-devui-lal/button/style.css";
7
- import "vue-devui-lal/popover";
8
- import "vue-devui-lal/tooltip";
9
- import "vue-devui-lal/textarea";
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-devui-lal/icon";
14
- import "vue-devui-lal/icon/style.css";
15
- import "vue-router";
16
- import "@vueuse/core";
17
- import "vue-devui-lal/avatar";
18
- import "vue-devui-lal/avatar/style.css";
19
- import "lodash/last";
20
- import "lodash/cloneDeep";
21
- import "dayjs";
22
- import "lodash/isDate";
23
- import "vue-devui-lal/skeleton";
24
- import "vue-devui-lal/skeleton/style.css";
25
- import "vue-devui-lal/dropdown";
26
- import "vue-devui-lal/message";
27
- import "vue-devui-lal/dropdown/style.css";
28
- import "vue-devui-lal/message/style.css";
29
- import "lodash/debounce";
30
- import "vue-devui-lal/badge";
31
- import "vue-devui-lal/badge/style.css";
32
- import "vue-devui-lal/tabs/style.css";
33
- import "vue-devui-lal/drawer";
34
- import "vue-devui-lal/drawer/style.css";
35
- import "vue-devui-lal/input";
36
- import "vue-devui-lal/form";
37
- import "vue-devui-lal/input/style.css";
38
- import "vue-devui-lal/form/style.css";
39
- import "vue-devui-lal/menu";
40
- import "vue-devui-lal/menu/style.css";
41
- import "vue-devui-lal/layout/style.css";
42
- import "vue-devui-lal/radio";
43
- import "@devui-design/icons/icomoon/devui-icon.css";
44
- import "vue-devui-lal/radio/style.css";
45
- import "vue-devui-lal/select";
46
- import "vue-devui-lal/editable-select";
47
- import "vue-devui-lal/select/style.css";
48
- import "vue-devui-lal/editable-select/style.css";
49
- import "vue-devui-lal/checkbox";
50
- import "vue-devui-lal/checkbox/style.css";
51
- import "vue-devui-lal/modal";
52
- import "vue-devui-lal/modal/style.css";
53
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
54
8
  __name: "notice",
55
9
  props: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-layout-gitcode",
3
- "version": "1.6.8",
3
+ "version": "1.6.10",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
@@ -10,4 +10,4 @@
10
10
  },
11
11
  "author": "lal,nevins",
12
12
  "license": "ISC"
13
- }
13
+ }