vue-layout-gitcode 1.5.73 → 1.5.75

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,10 +1,10 @@
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-DJu163Ih.js";
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-Blt5wPLN.js";
5
5
  import "lodash/debounce";
6
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-C9B-aapw.js";
7
- import "./transWebUrl-DYLmpIBL.js";
6
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-BxdFikBd.js";
7
+ import "./transWebUrl-BCEhYTzE.js";
8
8
  import "vue-devui-lal/tooltip";
9
9
  import "vue-devui-lal/tooltip/style.css";
10
10
  import "vue-router";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, inject, useSlots, ref, computed, createBlock, openBlock, unref, withCtx, createElementVNode, normalizeClass, createElementBlock, createTextVNode, createCommentVNode, toDisplayString, renderSlot } from "vue";
2
- import { q as useLayoutConfig, w as ThemeType, x as currentTheme, g as LANG_ZH, y as LANG_EN, z as getLocaleLang, G as GIcon, A as emitEvent, B as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-DJu163Ih.js";
2
+ import { q as useLayoutConfig, w as ThemeType, x as currentTheme, g as LANG_ZH, y as LANG_EN, z as getLocaleLang, G as GIcon, A as emitEvent, B as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-Blt5wPLN.js";
3
3
  import { useRouter } from "vue-router";
4
4
  import { Popover } from "vue-devui-lal/popover";
5
5
  import "vue-devui-lal/popover/style.css";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, inject, ref, reactive, watch, computed, createElementBlock, openBlock, createCommentVNode, createBlock, withDirectives, Fragment, createElementVNode, createVNode, toDisplayString, unref, withModifiers, normalizeClass, withCtx, renderList, createTextVNode, vShow } from "vue";
2
- import { a as i18n, q as useLayoutConfig, G as GIcon, C as _sfc_main$1, D as loadAsideData, A as emitEvent, s as setLoginTriggerSource, d as useRequestReport, F as asideRequest, _ as _export_sfc } from "./index-DJu163Ih.js";
2
+ import { a as i18n, q as useLayoutConfig, G as GIcon, C as _sfc_main$1, D as loadAsideData, A as emitEvent, s as setLoginTriggerSource, d as useRequestReport, F as asideRequest, _ as _export_sfc } from "./index-Blt5wPLN.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-DYLmpIBL.js";
4
+ import { t as transWebUrl } from "./transWebUrl-BCEhYTzE.js";
5
5
  import { Select, Option } from "vue-devui-lal/select";
6
6
  import { Input } from "vue-devui-lal/input";
7
7
  import { Skeleton } from "vue-devui-lal/skeleton";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, inject, ref, reactive, computed, watch, createElementBlock, openBlock, createElementVNode, createVNode, createBlock, createCommentVNode, withDirectives, toDisplayString, unref, withModifiers, normalizeClass, withCtx, Fragment, renderList, createTextVNode, vShow } from "vue";
2
- import { a as i18n, q as useLayoutConfig, G as GIcon, A as emitEvent, s as setLoginTriggerSource, d as useRequestReport, _ as _export_sfc } from "./index-DJu163Ih.js";
2
+ import { a as i18n, q as useLayoutConfig, G as GIcon, A as emitEvent, s as setLoginTriggerSource, d as useRequestReport, _ as _export_sfc } from "./index-Blt5wPLN.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-DYLmpIBL.js";
4
+ import { t as transWebUrl } from "./transWebUrl-BCEhYTzE.js";
5
5
  import { Input } from "vue-devui-lal/input";
6
6
  import { Skeleton } from "vue-devui-lal/skeleton";
7
7
  import { MenuItem } from "vue-devui-lal/menu";
@@ -18,6 +18,10 @@ const _hoisted_2 = {
18
18
  const _hoisted_3 = { class: "devui-submenu-title-content cursor-auto" };
19
19
  const _hoisted_4 = { class: "project-label" };
20
20
  const _hoisted_5 = { class: "project-label flex-1 min-w-0 ellipsis" };
21
+ const _hoisted_6 = {
22
+ key: 2,
23
+ class: "project-empty"
24
+ };
21
25
  const INIT_SHOW_COUNT = 4;
22
26
  const LOAD_MORE_COUNT = 10;
23
27
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -48,9 +52,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
48
52
  const originList = ref([]);
49
53
  const filteredList = computed(() => {
50
54
  if (!searchKey.value) return originList.value;
51
- const key = searchKey.value.toLowerCase();
55
+ const key = searchKey.value.toLowerCase().replace(/\s+/g, "");
56
+ const hasSlash = key.includes("/");
57
+ let a = "";
58
+ let b = "";
59
+ if (hasSlash) {
60
+ const idx = key.indexOf("/");
61
+ a = key.slice(0, idx);
62
+ b = key.slice(idx + 1);
63
+ }
52
64
  return originList.value.filter((item) => {
53
- return item.label && item.label.toLowerCase().includes(key) || item.namespace && item.namespace.toLowerCase().includes(key);
65
+ var _a, _b;
66
+ const label = ((_a = item.label) == null ? void 0 : _a.toLowerCase()) || "";
67
+ const ns = ((_b = item.namespace) == null ? void 0 : _b.toLowerCase()) || "";
68
+ if (hasSlash) {
69
+ return label.includes(b) && ns.includes(a);
70
+ }
71
+ return label.includes(key) || ns.includes(key);
54
72
  });
55
73
  });
56
74
  const projectList = computed(() => {
@@ -164,7 +182,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
164
182
  })) : createCommentVNode("", true),
165
183
  (openBlock(true), createElementBlock(Fragment, null, renderList(projectList.value, (item) => {
166
184
  return openBlock(), createBlock(unref(MenuItem), {
167
- key: item.key,
185
+ key: item.id,
168
186
  "data-openBlank": true,
169
187
  "data-href": unref(transWebUrl)(item.web_url),
170
188
  class: "text",
@@ -210,7 +228,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
210
228
  _: 1
211
229
  }, 8, ["loading", "disabled"]), [
212
230
  [vShow, showExpandMore.value && props.subShow]
213
- ])
231
+ ]),
232
+ !projectList.value.length && !firstLoading.value && _ctx.isLogin ? (openBlock(), createElementBlock("li", _hoisted_6, toDisplayString(unref(t)("gitCodeLayout.common.empty")), 1)) : createCommentVNode("", true)
214
233
  ]);
215
234
  };
216
235
  }
@@ -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-DJu163Ih.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-Blt5wPLN.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-DJu163Ih.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-Blt5wPLN.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-DJu163Ih.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-Blt5wPLN.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-C9B-aapw.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-DJu163Ih.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-BxdFikBd.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-Blt5wPLN.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-DJu163Ih.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-Blt5wPLN.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-DJu163Ih.js";
2
+ import { a as i18n, h as headRequest, G as GIcon } from "./index-Blt5wPLN.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]" };