vue-layout-gitcode 1.10.19 → 1.10.21

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-CgnUP-uK.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-UmqMg3AE.js";
5
5
  import "lodash/debounce";
6
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-C-F7N-db.js";
7
- import "./transWebUrl-DKMEW4RK.js";
6
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-1L7k-MTT.js";
7
+ import "./transWebUrl-CyL-oXhv.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 { a as i18n, z as useLayoutConfig, A as ThemeType, B as currentTheme, L as LANG_ZH, C as LANG_EN, x as getLocaleLang, G as GIcon, D as emitEvent, F as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-CgnUP-uK.js";
2
+ import { a as i18n, z as useLayoutConfig, A as ThemeType, B as currentTheme, L as LANG_ZH, C as LANG_EN, x as getLocaleLang, G as GIcon, D as emitEvent, F as isHttps, b as REPO_EVENT, _ as _export_sfc } from "./index-UmqMg3AE.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, z as useLayoutConfig, G as GIcon, t as transformUrl, I as _sfc_main$1, J as loadAsideData, D as emitEvent, s as setLoginTriggerSource, f as useRequestReport, H as asideRequest, _ as _export_sfc } from "./index-CgnUP-uK.js";
2
+ import { a as i18n, z as useLayoutConfig, G as GIcon, t as transformUrl, I as _sfc_main$1, J as loadAsideData, D as emitEvent, s as setLoginTriggerSource, f as useRequestReport, H as asideRequest, _ as _export_sfc } from "./index-UmqMg3AE.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-DKMEW4RK.js";
4
+ import { t as transWebUrl } from "./transWebUrl-CyL-oXhv.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, z as useLayoutConfig, t as transformUrl, H as asideRequest, G as GIcon, D as emitEvent, s as setLoginTriggerSource, f as useRequestReport, _ as _export_sfc } from "./index-CgnUP-uK.js";
2
+ import { a as i18n, z as useLayoutConfig, t as transformUrl, H as asideRequest, G as GIcon, D as emitEvent, s as setLoginTriggerSource, f as useRequestReport, _ as _export_sfc } from "./index-UmqMg3AE.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-DKMEW4RK.js";
4
+ import { t as transWebUrl } from "./transWebUrl-CyL-oXhv.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";
@@ -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-CgnUP-uK.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-UmqMg3AE.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-CgnUP-uK.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-UmqMg3AE.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-CgnUP-uK.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-UmqMg3AE.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, renderSlot, createBlock, createVNode, withCtx } from "vue";
2
- import { u as useReportRepo, S as SearchRepoCard } from "./index-C-F7N-db.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-CgnUP-uK.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-1L7k-MTT.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-UmqMg3AE.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-CgnUP-uK.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-UmqMg3AE.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, t as transformUrl } from "./index-CgnUP-uK.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, t as transformUrl } from "./index-UmqMg3AE.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,7 +1,7 @@
1
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 { 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, j as useCookie, k as usePageResize, L as LANG_ZH, 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, w as LANG_KEY } from "./index-CgnUP-uK.js";
4
- import { t as transWebUrl } from "./transWebUrl-DKMEW4RK.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, j as useCookie, k as usePageResize, L as LANG_ZH, 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, w as LANG_KEY } from "./index-UmqMg3AE.js";
4
+ import { t as transWebUrl } from "./transWebUrl-CyL-oXhv.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";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, onMounted, nextTick, onUnmounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
2
- import { x as getLocaleLang, L as LANG_ZH, y as slidCaptchaManager, z as useLayoutConfig, _ as _export_sfc } from "./index-CgnUP-uK.js";
2
+ import { x as getLocaleLang, L as LANG_ZH, y as slidCaptchaManager, z as useLayoutConfig, _ as _export_sfc } from "./index-UmqMg3AE.js";
3
3
  import { FixedOverlay } from "vue-devui-lal/overlay";
4
4
  import "vue-devui-lal/overlay/style.css";
5
5
  const TARGET_TEXT = "Click in order:";
@@ -8,7 +8,7 @@ import { Message } from "vue-devui-lal/message";
8
8
  import "vue-devui-lal/message/style.css";
9
9
  import { FixedOverlay } from "vue-devui-lal/overlay";
10
10
  import "vue-devui-lal/overlay/style.css";
11
- import { a as i18n, k as usePageResize, x as getLocaleLang, L as LANG_ZH, _ as _export_sfc } from "./index-CgnUP-uK.js";
11
+ import { a as i18n, k as usePageResize, x as getLocaleLang, L as LANG_ZH, _ as _export_sfc } from "./index-UmqMg3AE.js";
12
12
  const _YunpianCaptchaManager = class _YunpianCaptchaManager {
13
13
  constructor() {
14
14
  __publicField(this, "ypRiddlerInstance", null);
@@ -15,7 +15,7 @@ import "vue-devui-lal/icon/style.css";
15
15
  import cloneDeep from "lodash/cloneDeep";
16
16
  import axios from "axios";
17
17
  import { useRouter, useRoute, createRouter, createWebHistory, createMemoryHistory } from "vue-router";
18
- import { useWindowSize, useMutationObserver, useResizeObserver, useEventListener, useElementSize, useStorage, useDebounceFn } from "@vueuse/core";
18
+ import { useWindowSize, useMutationObserver, useResizeObserver, useInfiniteScroll, useEventListener, useElementSize, useStorage, useDebounceFn } from "@vueuse/core";
19
19
  import { Avatar } from "vue-devui-lal/avatar";
20
20
  import "vue-devui-lal/avatar/style.css";
21
21
  import "lodash/last";
@@ -32,6 +32,8 @@ import { Badge } from "vue-devui-lal/badge";
32
32
  import "vue-devui-lal/badge/style.css";
33
33
  import { Tabs, Tab } from "vue-devui-lal/tabs";
34
34
  import "vue-devui-lal/tabs/style.css";
35
+ import "vue-devui-lal/loading/style.css";
36
+ import { LoadingDirective } from "vue-devui-lal/loading";
35
37
  import { Drawer } from "vue-devui-lal/drawer";
36
38
  import "vue-devui-lal/drawer/style.css";
37
39
  import { Input } from "vue-devui-lal/input";
@@ -8969,7 +8971,7 @@ const _hoisted_8$8 = {
8969
8971
  class: "tools-list"
8970
8972
  };
8971
8973
  const _hoisted_9$6 = { class: "home-nav-tooltip-wrapper" };
8972
- const _hoisted_10$6 = { class: "home-nav-text" };
8974
+ const _hoisted_10$5 = { class: "home-nav-text" };
8973
8975
  const _hoisted_11$4 = { class: "text-[var(--theme-placeholder)] text-[10px]" };
8974
8976
  const _hoisted_12$4 = { class: "qrcode-wrapper" };
8975
8977
  const _hoisted_13$2 = { class: "pl-[8px]" };
@@ -9311,7 +9313,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9311
9313
  }, {
9312
9314
  content: withCtx(() => [
9313
9315
  createElementVNode("div", _hoisted_9$6, [
9314
- createElementVNode("div", _hoisted_10$6, [
9316
+ createElementVNode("div", _hoisted_10$5, [
9315
9317
  createElementVNode("p", null, toDisplayString$1(unref(t2)("gitCodeLayout.home.userFeedback01")), 1),
9316
9318
  createElementVNode("p", _hoisted_11$4, toDisplayString$1(unref(t2)("gitCodeLayout.home.userFeedback02")), 1)
9317
9319
  ])
@@ -11225,7 +11227,7 @@ const _hoisted_9$5 = {
11225
11227
  key: 0,
11226
11228
  class: "flex items-center w-full"
11227
11229
  };
11228
- const _hoisted_10$5 = ["title"];
11230
+ const _hoisted_10$4 = ["title"];
11229
11231
  const _hoisted_11$3 = ["title"];
11230
11232
  const _hoisted_12$3 = {
11231
11233
  key: 0,
@@ -11475,7 +11477,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11475
11477
  ref: breadcrumbTextRef,
11476
11478
  title: item.label,
11477
11479
  class: normalizeClass(["linkTx", index2 === unref(breadcrumb).length - 1 ? "font-bold" : ""])
11478
- }, toDisplayString$1(item.label), 11, _hoisted_10$5)
11480
+ }, toDisplayString$1(item.label), 11, _hoisted_10$4)
11479
11481
  ]),
11480
11482
  _: 2
11481
11483
  }, 1032, ["href"]),
@@ -13715,6 +13717,14 @@ function headRequest(request) {
13715
13717
  params: {}
13716
13718
  });
13717
13719
  },
13720
+ /* 获取邀请信息相关数量 */
13721
+ getMsgCount(params) {
13722
+ return request({
13723
+ url: "/api/v1/user/notify/unread_count",
13724
+ method: "get",
13725
+ params
13726
+ });
13727
+ },
13718
13728
  // 获取消息列表
13719
13729
  getMessageList2(params) {
13720
13730
  return request({
@@ -14310,7 +14320,6 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
14310
14320
  });
14311
14321
  return (_ctx, _cache) => {
14312
14322
  var _a, _b, _c;
14313
- const _component_d_tooltip = resolveComponent("d-tooltip");
14314
14323
  return !showAllContent.value ? (openBlock(), createElementBlock("div", {
14315
14324
  key: 0,
14316
14325
  ref_key: "textRef",
@@ -14318,7 +14327,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
14318
14327
  class: normalizeClass(["g-text", { "is-ellipse": (_a = finalConfig.value) == null ? void 0 : _a.ellipse }]),
14319
14328
  style: normalizeStyle({ "-webkit-line-clamp": (_b = finalConfig.value) == null ? void 0 : _b.line })
14320
14329
  }, [
14321
- createVNode(_component_d_tooltip, {
14330
+ createVNode(unref(Tooltip), {
14322
14331
  position: _ctx.position,
14323
14332
  disabled: !content.value || !((_c = finalConfig.value) == null ? void 0 : _c.tooltip),
14324
14333
  content: content.value
@@ -14349,7 +14358,7 @@ const _hoisted_6$a = { class: "flex message-item-body flex-1" };
14349
14358
  const _hoisted_7$7 = ["title", "innerHTML"];
14350
14359
  const _hoisted_8$6 = ["title"];
14351
14360
  const _hoisted_9$4 = { class: "message-item-info flex" };
14352
- const _hoisted_10$4 = { class: "flex justify-end message-item-rightTx message-item-date" };
14361
+ const _hoisted_10$3 = { class: "flex justify-end message-item-rightTx message-item-date" };
14353
14362
  const _sfc_main$v = /* @__PURE__ */ defineComponent({
14354
14363
  __name: "index",
14355
14364
  props: {
@@ -14425,7 +14434,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
14425
14434
  ])
14426
14435
  ])
14427
14436
  ]),
14428
- createElementVNode("div", _hoisted_10$4, toDisplayString$1(unref(formatTimeFromNow)(_ctx.data.time)), 1)
14437
+ createElementVNode("div", _hoisted_10$3, toDisplayString$1(unref(formatTimeFromNow)(_ctx.data.time)), 1)
14429
14438
  ]);
14430
14439
  };
14431
14440
  }
@@ -14444,25 +14453,28 @@ const _hoisted_4$f = {
14444
14453
  key: 0,
14445
14454
  class: "g-number ml-[8px]"
14446
14455
  };
14447
- const _hoisted_5$a = { class: "message-content" };
14448
- const _hoisted_6$9 = ["infinite-scroll-disabled"];
14449
- const _hoisted_7$6 = {
14456
+ const _hoisted_5$a = { class: "message-content-cover" };
14457
+ const _hoisted_6$9 = {
14450
14458
  key: 1,
14451
14459
  class: "message-content-empty"
14452
14460
  };
14453
- const _hoisted_8$5 = {
14461
+ const _hoisted_7$6 = {
14454
14462
  key: 2,
14455
14463
  class: "loading-more"
14456
14464
  };
14457
- const _hoisted_9$3 = {
14465
+ const _hoisted_8$5 = {
14458
14466
  key: 3,
14459
14467
  class: "no-more"
14460
14468
  };
14461
- const _hoisted_10$3 = { class: "message-footer-nav" };
14469
+ const _hoisted_9$3 = { class: "message-footer-nav" };
14462
14470
  const _sfc_main$u = /* @__PURE__ */ defineComponent({
14463
14471
  __name: "MessageBox",
14464
- setup(__props) {
14472
+ setup(__props, { expose: __expose }) {
14465
14473
  var _a;
14474
+ const instance = getCurrentInstance();
14475
+ if (instance) {
14476
+ instance.appContext.app.directive("loading", LoadingDirective);
14477
+ }
14466
14478
  const { t: t2 } = i18n.global;
14467
14479
  const API = headRequest(inject("request"));
14468
14480
  const checkedId = ref("mention");
@@ -14475,6 +14487,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14475
14487
  const total = ref(0);
14476
14488
  const hasMore = ref(false);
14477
14489
  const loadingMore = ref(false);
14490
+ const scrollContainer = ref(null);
14478
14491
  const formData = ref([
14479
14492
  {
14480
14493
  icon: "gt-plane_at_close",
@@ -14543,6 +14556,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14543
14556
  }
14544
14557
  };
14545
14558
  const setPageRead = async () => {
14559
+ if (listData.value.length === 0) {
14560
+ return;
14561
+ }
14546
14562
  const res = await API.updateMsgStatus(listData.value.map((item) => item.id), accountInfo.value.id);
14547
14563
  if (res && !(res == null ? void 0 : res.error)) {
14548
14564
  init2();
@@ -14551,9 +14567,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14551
14567
  const getCounts = async () => {
14552
14568
  var _a2;
14553
14569
  const res = await API.getMsgDict();
14554
- msgCount.value = 0;
14555
14570
  msgDict.value = res.data;
14556
- console.log(res.data);
14557
14571
  (_a2 = res.data) == null ? void 0 : _a2.forEach((item) => {
14558
14572
  if (!item.act) return;
14559
14573
  for (const i in formData.value) {
@@ -14562,9 +14576,16 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14562
14576
  formData.value[i].count = Number(item.un_read_count);
14563
14577
  }
14564
14578
  }
14565
- msgCount.value += Number(item.un_read_count);
14566
14579
  });
14567
14580
  };
14581
+ const getUnreadCount = async () => {
14582
+ const res = await API.getMsgCount({ curr_user_id: accountInfo.value.id });
14583
+ if (res && !(res == null ? void 0 : res.error)) {
14584
+ msgCount.value = res.data.remind_count;
14585
+ } else {
14586
+ msgCount.value = 0;
14587
+ }
14588
+ };
14568
14589
  const productQueryArgs = (page = 1) => {
14569
14590
  const typeString = checkedId.value;
14570
14591
  const queryArgs = {
@@ -14572,7 +14593,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14572
14593
  page_size: pageSize.value,
14573
14594
  content: "",
14574
14595
  curr_user_id: accountInfo.value.id || void 0,
14575
- target_type: typeString
14596
+ target_type: typeString,
14597
+ read_state: 0
14576
14598
  };
14577
14599
  if (typeString === "system") {
14578
14600
  delete queryArgs.target_type;
@@ -14590,16 +14612,21 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14590
14612
  return t2("gitCodeLayout.notice.systemMsg");
14591
14613
  };
14592
14614
  const getList = async (isLoadMore = false) => {
14593
- var _a2, _b;
14615
+ var _a2, _b, _c, _d;
14594
14616
  if (isLoadMore) {
14595
14617
  loadingMore.value = true;
14596
14618
  } else {
14597
14619
  loading.value = true;
14620
+ (_a2 = scrollContainer.value) == null ? void 0 : _a2.scrollTo({
14621
+ top: 0,
14622
+ behavior: "auto"
14623
+ });
14598
14624
  }
14599
14625
  const { queryArgs } = productQueryArgs(pageNum.value);
14600
14626
  const res = await API.getMessageList2(queryArgs);
14601
- total.value = Number(((_a2 = res.data) == null ? void 0 : _a2.total) || 0);
14602
- const newRecords = ((_b = res.data) == null ? void 0 : _b.records.map((item) => {
14627
+ total.value = Number(((_b = res.data) == null ? void 0 : _b.total) || 0);
14628
+ const pages = ((_c = res.data) == null ? void 0 : _c.pages) || 0;
14629
+ const newRecords = ((_d = res.data) == null ? void 0 : _d.records.map((item) => {
14603
14630
  const path = item.name_space.type === "org" ? item.name_space.name : item.name_space.path;
14604
14631
  const nickName = item.sender_id === "system" ? t2("gitCodeLayout.notice.systemMsgMenu") : item.sender_name || "Gitcode";
14605
14632
  return {
@@ -14618,15 +14645,15 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14618
14645
  targetType: item.target_type
14619
14646
  };
14620
14647
  })) || [];
14621
- const unreadRecords = newRecords.filter((one) => !one.read);
14622
14648
  if (isLoadMore) {
14623
- listData.value = [...listData.value, ...unreadRecords];
14649
+ listData.value = [...listData.value, ...newRecords];
14624
14650
  loadingMore.value = false;
14625
14651
  } else {
14626
- listData.value = unreadRecords;
14652
+ listData.value = newRecords;
14627
14653
  loading.value = false;
14628
14654
  }
14629
- hasMore.value = queryArgs.page_num * queryArgs.page_size < total.value;
14655
+ console.log("pages", pages, queryArgs.page_num);
14656
+ hasMore.value = queryArgs.page_num < pages;
14630
14657
  };
14631
14658
  const loadMore = () => {
14632
14659
  if (!hasMore.value || loadingMore.value || loading.value) {
@@ -14649,20 +14676,35 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14649
14676
  if (resetPage) {
14650
14677
  pageNum.value = 1;
14651
14678
  hasMore.value = false;
14652
- listData.value = [];
14679
+ loading.value = false;
14680
+ loadingMore.value = false;
14653
14681
  }
14654
14682
  await getCounts();
14655
- getList();
14683
+ getUnreadCount();
14684
+ getList(false);
14656
14685
  };
14686
+ __expose({
14687
+ init: init2
14688
+ });
14657
14689
  const layoutConfig2 = useLayoutConfig();
14658
14690
  const toPage = (type) => {
14659
14691
  let href = `${transformUrl(layoutConfig2.VITE_HOST)}/notice?message_sate=countNotRead`;
14660
14692
  if (type === "all") {
14661
- href = `${transformUrl(layoutConfig2.VITE_HOST)}/notice?message_sate=countAll`;
14693
+ href = `${transformUrl(layoutConfig2.VITE_HOST)}/notice?message_type=${checkedId.value}`;
14662
14694
  }
14663
14695
  console.log(href);
14664
14696
  window.location.href = href;
14665
14697
  };
14698
+ useInfiniteScroll(
14699
+ scrollContainer,
14700
+ () => {
14701
+ loadMore();
14702
+ },
14703
+ {
14704
+ distance: 300,
14705
+ canLoadMore: () => hasMore.value && !loadingMore.value && !loading.value
14706
+ }
14707
+ );
14666
14708
  onMounted(() => {
14667
14709
  var _a2;
14668
14710
  if ((_a2 = accountInfo.value) == null ? void 0 : _a2.id) {
@@ -14671,7 +14713,6 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14671
14713
  });
14672
14714
  return (_ctx, _cache) => {
14673
14715
  const _directive_loading = resolveDirective("loading");
14674
- const _directive_infinite_scroll = resolveDirective("infinite-scroll");
14675
14716
  return openBlock(), createElementBlock("div", {
14676
14717
  class: "message-box",
14677
14718
  onClick: _cache[3] || (_cache[3] = withModifiers(($event) => console.log("stop"), ["stop"]))
@@ -14722,12 +14763,12 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14722
14763
  msgCount.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString$1(msgCount.value), 1)) : createCommentVNode("", true)
14723
14764
  ])
14724
14765
  ]),
14725
- createElementVNode("div", _hoisted_5$a, [
14726
- withDirectives((openBlock(), createElementBlock("div", {
14727
- class: "message-content-cover",
14728
- "infinite-scroll-disabled": !hasMore.value || loadingMore.value,
14729
- "infinite-scroll-distance": "100"
14730
- }, [
14766
+ createElementVNode("div", {
14767
+ ref_key: "scrollContainer",
14768
+ ref: scrollContainer,
14769
+ class: "message-content"
14770
+ }, [
14771
+ withDirectives((openBlock(), createElementBlock("div", _hoisted_5$a, [
14731
14772
  listData.value.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(listData.value, (item) => {
14732
14773
  return openBlock(), createBlock(MessageItem, {
14733
14774
  type: checkedId.value,
@@ -14735,15 +14776,14 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14735
14776
  data: item,
14736
14777
  onTrigger: ($event) => handleMessageRead(item)
14737
14778
  }, null, 8, ["type", "data", "onTrigger"]);
14738
- }), 128)) : (openBlock(), createElementBlock("div", _hoisted_7$6, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.noMessage")), 1)),
14739
- loadingMore.value ? (openBlock(), createElementBlock("div", _hoisted_8$5, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.loading")) + "... ", 1)) : createCommentVNode("", true),
14740
- !hasMore.value && listData.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9$3, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.noMore")), 1)) : createCommentVNode("", true)
14741
- ], 8, _hoisted_6$9)), [
14742
- [_directive_loading, loading.value],
14743
- [_directive_infinite_scroll, loadMore]
14779
+ }), 128)) : (openBlock(), createElementBlock("div", _hoisted_6$9, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.noMessage")), 1)),
14780
+ loadingMore.value ? (openBlock(), createElementBlock("div", _hoisted_7$6, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.loading")) + "... ", 1)) : createCommentVNode("", true),
14781
+ !hasMore.value && listData.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_8$5, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.noMore")), 1)) : createCommentVNode("", true)
14782
+ ])), [
14783
+ [_directive_loading, loading.value]
14744
14784
  ])
14745
- ]),
14746
- createElementVNode("div", _hoisted_10$3, [
14785
+ ], 512),
14786
+ createElementVNode("div", _hoisted_9$3, [
14747
14787
  createElementVNode("div", { onClick: setPageRead }, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.pageRead")), 1),
14748
14788
  createElementVNode("div", {
14749
14789
  onClick: _cache[2] || (_cache[2] = ($event) => toPage("all"))
@@ -14767,13 +14807,20 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
14767
14807
  API.getMessageCount().then((result2) => {
14768
14808
  var _a;
14769
14809
  counts.value = ((_a = result2.data) == null ? void 0 : _a.reduce((prev, curr) => {
14770
- if (curr.type === "audit") {
14810
+ if (curr.type === "audit" || curr.type === "operation") {
14771
14811
  return prev;
14772
14812
  }
14773
14813
  return prev + curr.un_read_count;
14774
14814
  }, 0)) || 0;
14815
+ console.log("counts", counts.value);
14775
14816
  });
14776
14817
  };
14818
+ const messageBoxRef = ref(null);
14819
+ const handleToggle = (value) => {
14820
+ if (value && messageBoxRef.value) {
14821
+ messageBoxRef.value.init(true);
14822
+ }
14823
+ };
14777
14824
  onMounted(() => {
14778
14825
  getCounts();
14779
14826
  addEventListener("updateNotice", debounce(() => {
@@ -14817,10 +14864,14 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
14817
14864
  "destroy-on-hide": false,
14818
14865
  trigger: "hover",
14819
14866
  "overlay-class": "g-user-dropdown",
14820
- onToggle: _ctx.handleToggle
14867
+ onToggle: handleToggle
14821
14868
  }, {
14822
14869
  menu: withCtx(() => [
14823
- createVNode(MessageBox)
14870
+ createVNode(MessageBox, {
14871
+ msgCount: counts.value,
14872
+ ref_key: "messageBoxRef",
14873
+ ref: messageBoxRef
14874
+ }, null, 8, ["msgCount"])
14824
14875
  ]),
14825
14876
  default: withCtx(() => [
14826
14877
  createVNode(GLink, {
@@ -14848,7 +14899,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
14848
14899
  }, 8, ["href"])
14849
14900
  ]),
14850
14901
  _: 1
14851
- }, 8, ["onToggle"]));
14902
+ }));
14852
14903
  };
14853
14904
  }
14854
14905
  });
@@ -14962,7 +15013,6 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
14962
15013
  const repoInfo = inject("repoInfo");
14963
15014
  const orgInfo = inject("orgInfo");
14964
15015
  const userInfo = inject("userInfo");
14965
- const spaceRouteEnabled = inject("spaceRouteEnabled");
14966
15016
  const { t: t2, locale: locale2 } = i18n.global;
14967
15017
  const props = __props;
14968
15018
  const emit = __emit;
@@ -15038,7 +15088,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
15038
15088
  { id: "dashboard", label: t2("gitCodeLayout.header.workbench"), icon: "gt-plane-user", to: getRouterLink("dashboard") },
15039
15089
  { id: "myOrg", label: t2("gitCodeLayout.header.myOrg"), icon: "gt-plane-organization", to: getRouterLink({ name: "settingOrganization" }) },
15040
15090
  { id: "myRepo", label: t2("gitCodeLayout.header.myRepo"), icon: "gt-plane-projectHome1", to: getRouterLink("settingRepo") },
15041
- ...spaceRouteEnabled.value ? [{ id: "myNotebook", label: t2("gitCodeLayout.header.myNotebook"), icon: "gt-plane-Notebook", to: getRouterLink("myNotebook") }] : [],
15091
+ { id: "myNotebook", label: t2("gitCodeLayout.header.myNotebook"), icon: "gt-plane-Notebook", to: getRouterLink("myNotebook") },
15042
15092
  // { id: 'myCloudSpace', label: t('gitCodeLayout.header.myCloudSpace'), icon: 'gt-plane-cloud', target: '_blank', href: 'https://devstation.connect.huaweicloud.com/devdesktop/webide' },
15043
15093
  { id: "mySpaces", label: t2("gitCodeLayout.header.mySpace"), icon: "gt-plane-Space", to: getRouterLink("userSpaces") },
15044
15094
  { id: "myStar", label: t2("gitCodeLayout.header.myStar"), icon: "gt-plane-star", to: getRouterLink("userStars") }
@@ -15063,7 +15113,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
15063
15113
  { id: "dashboard", label: t2("gitCodeLayout.header.workbench"), icon: "gt-plane-user", link: "/dashboard" },
15064
15114
  { id: "myOrg", label: t2("gitCodeLayout.header.myOrg"), icon: "gt-plane-organization", link: "/setting/organization" },
15065
15115
  { id: "myRepo", label: t2("gitCodeLayout.header.myRepo"), icon: "gt-plane-projectHome1", link: "/setting/repo" },
15066
- ...spaceRouteEnabled.value ? [{ id: "myNotebook", label: t2("gitCodeLayout.header.myNotebook"), icon: "gt-plane-Notebook", show: props.inAIHub, link: `/user/${userInfo.value.username}/notebook` }] : [],
15116
+ { id: "myNotebook", label: t2("gitCodeLayout.header.myNotebook"), icon: "gt-plane-Notebook", show: props.inAIHub, link: `/user/${userInfo.value.username}/notebook` },
15067
15117
  // { id: 'myCloudSpace', label: t('gitCodeLayout.header.myCloudSpace'), icon: 'gt-plane-cloud', link: 'https://devstation.connect.huaweicloud.com/devdesktop/webide' },
15068
15118
  { id: "mySpaces", label: t2("gitCodeLayout.header.mySpace"), icon: "gt-plane-Space", show: props.inAIHub, link: `/user/${userInfo.value.username}/spaces` },
15069
15119
  { id: "myStar", label: t2("gitCodeLayout.header.myStar"), icon: "gt-plane-star", link: `/user/${userInfo.value.username}/stars` }
@@ -15538,13 +15588,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
15538
15588
  var _a;
15539
15589
  const layoutConfig2 = useLayoutConfig();
15540
15590
  const { t: $t } = i18n.global;
15541
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-pRrb26Dw.js"));
15542
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-Cg_etcLX.js"));
15543
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-CNaBgztq.js"));
15544
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-DIbk3oKM.js"));
15545
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-BCmigxN6.js"));
15546
- const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-B7SD9ENp.js"));
15547
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-Brk12NWM.js"));
15591
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-rzm74pa0.js"));
15592
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-YiYFi861.js"));
15593
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-C5hrEYNU.js"));
15594
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-BLdSsczU.js"));
15595
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-D7JbfP68.js"));
15596
+ const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-AQC5lnUJ.js"));
15597
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-DBreGOOc.js"));
15548
15598
  const props = __props;
15549
15599
  const repoInfo = inject("repoInfo");
15550
15600
  const orgInfo = inject("orgInfo");
@@ -16317,7 +16367,7 @@ const autoAvokeLogin = ({ isLogin, loginFunc, openHarmonyGuide, loginSuccess, lo
16317
16367
  loginFunc({ type: "login", triggerType: "", loginTriggerSource: "router_login_auth", ...loginFuncOpts }, loginSuccess, openHarmonyGuide);
16318
16368
  }
16319
16369
  };
16320
- const NoticeModal = defineAsyncComponent(() => import("./notice-BY6hEK36.js"));
16370
+ const NoticeModal = defineAsyncComponent(() => import("./notice-IffakHGz.js"));
16321
16371
  function clearNotice() {
16322
16372
  if (localStorage$2.getItem("validator_email")) {
16323
16373
  localStorage$2.removeItem("validator_email");
@@ -17120,9 +17170,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17120
17170
  const layoutConfig2 = useLayoutConfig();
17121
17171
  const { t: t2 } = i18n.global;
17122
17172
  const route = useRoute();
17123
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-DiHKwH2X.js"));
17124
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-DZlVkUEj.js"));
17125
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-B-mvGC0i.js"));
17173
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem-CzDG0FMb.js"));
17174
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-BrYfNnAK.js"));
17175
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-BsyWVtmD.js"));
17126
17176
  const props = __props;
17127
17177
  console.log("slotKeys", props.slotKeys);
17128
17178
  console.log("props", props);
@@ -23260,7 +23310,7 @@ const _SlidCaptchaManager = class _SlidCaptchaManager {
23260
23310
  __publicField(_SlidCaptchaManager, "instance");
23261
23311
  let SlidCaptchaManager = _SlidCaptchaManager;
23262
23312
  const slidCaptchaManager = SlidCaptchaManager.getInstance();
23263
- const SlidCaptcha = defineAsyncComponent(() => import("./index-BaXMrwKq.js"));
23313
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-B2yhjoyQ.js"));
23264
23314
  const useSlidCaptcha = () => {
23265
23315
  const { mount, unMount, isMounted } = usePopup("slid-captcha-popup");
23266
23316
  const open = (config) => {
@@ -23290,7 +23340,7 @@ const useSlidCaptcha = () => {
23290
23340
  close
23291
23341
  };
23292
23342
  };
23293
- const YunpianCaptcha = defineAsyncComponent(() => import("./index-CNEiSVFF.js"));
23343
+ const YunpianCaptcha = defineAsyncComponent(() => import("./index-BF4WOIXo.js"));
23294
23344
  const useYunpianCaptcha = () => {
23295
23345
  const { mount, unMount } = usePopup("yunpian-captcha-popup");
23296
23346
  const open = (config) => {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { N, O, V, M, S, P, K, B, X, U, W, Q } from "./index-CgnUP-uK.js";
1
+ import { N, O, V, M, S, P, K, B, X, U, W, Q } from "./index-UmqMg3AE.js";
2
2
  export {
3
3
  N as GitCodeAside,
4
4
  O as GitCodeHeader,
@@ -1,5 +1,5 @@
1
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-CgnUP-uK.js";
2
+ import { i as isPhone, u as useModel } from "./index-UmqMg3AE.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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-layout-gitcode",
3
- "version": "1.10.19",
3
+ "version": "1.10.21",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",
@@ -1,4 +1,4 @@
1
- import { z as useLayoutConfig } from "./index-CgnUP-uK.js";
1
+ import { z as useLayoutConfig } from "./index-UmqMg3AE.js";
2
2
  const layoutConfig = useLayoutConfig();
3
3
  const transWebUrl = (url, params) => {
4
4
  if (!url) return url;