vue-layout-gitcode 1.5.61 → 1.5.62

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-oJa_vuEx.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-qLrOzgxs.js";
5
5
  import "lodash/debounce";
6
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-BxKYyDqY.js";
7
- import "./transWebUrl-C5V3QPRL.js";
6
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-5ZMJRXkB.js";
7
+ import "./transWebUrl-Cxmfzomb.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-oJa_vuEx.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-qLrOzgxs.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-oJa_vuEx.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-qLrOzgxs.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-C5V3QPRL.js";
4
+ import { t as transWebUrl } from "./transWebUrl-Cxmfzomb.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-oJa_vuEx.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-qLrOzgxs.js";
3
3
  import { useRouter } from "vue-router";
4
- import { t as transWebUrl } from "./transWebUrl-C5V3QPRL.js";
4
+ import { t as transWebUrl } from "./transWebUrl-Cxmfzomb.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-oJa_vuEx.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-qLrOzgxs.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-oJa_vuEx.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-qLrOzgxs.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-oJa_vuEx.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-qLrOzgxs.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-BxKYyDqY.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-oJa_vuEx.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-5ZMJRXkB.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-qLrOzgxs.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-oJa_vuEx.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-qLrOzgxs.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-oJa_vuEx.js";
2
+ import { a as i18n, h as headRequest, G as GIcon } from "./index-qLrOzgxs.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, inject, createElementBlock, openBlock, normalizeClass, createElementVNode, withModifiers, withDirectives, vShow, createVNode, computed, createCommentVNode, normalizeStyle, createTextVNode, onMounted, onUnmounted, Fragment, createBlock, renderList, withCtx, reactive } from "vue";
2
2
  import debounce from "lodash/debounce";
3
- import { t as transferNumber, G as GIcon, s as setLoginTriggerSource, d as useRequestReport, r as reqCatch, h as headRequest, _ as _export_sfc, 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$9, n as isIncubationRepo, o as highlightWords, p as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-oJa_vuEx.js";
4
- import { t as transWebUrl } from "./transWebUrl-C5V3QPRL.js";
3
+ import { t as transferNumber, G as GIcon, s as setLoginTriggerSource, d as useRequestReport, r as reqCatch, h as headRequest, _ as _export_sfc, 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$9, n as isIncubationRepo, o as highlightWords, p as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-qLrOzgxs.js";
4
+ import { t as transWebUrl } from "./transWebUrl-Cxmfzomb.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,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 { q as useLayoutConfig, _ as _export_sfc } from "./index-oJa_vuEx.js";
3
+ import { q as useLayoutConfig, _ as _export_sfc } from "./index-qLrOzgxs.js";
4
4
  import "vue-devui-lal/overlay/style.css";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "index",
@@ -459,6 +459,7 @@ var AsideReportEvent = /* @__PURE__ */ ((AsideReportEvent2) => {
459
459
  })(AsideReportEvent || {});
460
460
  const AICopilot_ROUTE_NAME = "aiCopilot";
461
461
  const HELP_DOCS_URL = "https://docs.gitcode.com";
462
+ const INFORMATION_CENTER_URL = "https://news.gitcode.com/news";
462
463
  const AVATAR_VISITED_DATE = "avatar-visitedDate";
463
464
  const AVATAR_VISITED_USERNAME = "avatar-visited-username";
464
465
  var CLICK_TIME_MODULE = /* @__PURE__ */ ((CLICK_TIME_MODULE2) => {
@@ -16657,7 +16658,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16657
16658
  const repoInfo = inject("repoInfo");
16658
16659
  const orgInfo = inject("orgInfo");
16659
16660
  const userInfo = inject("userInfo");
16660
- const { t: t2 } = i18n.global;
16661
+ const { t: t2, locale: locale2 } = i18n.global;
16661
16662
  const props = __props;
16662
16663
  const router2 = useRouter();
16663
16664
  const route = useRoute();
@@ -16742,6 +16743,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16742
16743
  ],
16743
16744
  [
16744
16745
  { id: "personalSetting", label: t2("gitCodeLayout.header.personSetting"), icon: "gt-plane-setting", to: getRouterLink("setting") },
16746
+ { id: "news", label: t2("gitCodeLayout.home.informationCenter"), icon: "gt-plane-consulting", target: "_blank", href: `${INFORMATION_CENTER_URL}?lang=${(locale2 == null ? void 0 : locale2.value) || "zh"}` },
16745
16747
  { id: "help", label: t2("gitCodeLayout.header.helpDocument"), icon: "gt-plane-project-opened", href: HELP_DOCS_URL }
16746
16748
  ]
16747
16749
  ];
@@ -16765,6 +16767,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16765
16767
  ],
16766
16768
  [
16767
16769
  { id: "personalSetting", label: t2("gitCodeLayout.header.personSetting"), icon: "gt-plane-setting", link: "/setting" },
16770
+ { id: "news", label: t2("gitCodeLayout.home.informationCenter"), icon: "gt-plane-consulting", target: "_blank", href: `${INFORMATION_CENTER_URL}?lang=${(locale2 == null ? void 0 : locale2.value) || "zh"}` },
16768
16771
  { id: "help", label: t2("gitCodeLayout.header.helpDocument"), icon: "gt-plane-project-opened", target: "_blank", href: HELP_DOCS_URL }
16769
16772
  ]
16770
16773
  ];
@@ -17141,13 +17144,13 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
17141
17144
  var _a;
17142
17145
  const layoutConfig2 = useLayoutConfig();
17143
17146
  const { t: $t } = i18n.global;
17144
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-CM-UyKuX.js"));
17145
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-hjLtlXlZ.js"));
17146
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-DBasbNTH.js"));
17147
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-ClU_i9u_.js"));
17148
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-BfFcNLC_.js"));
17149
- const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-WGKqutcN.js"));
17150
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-DYFxjEgt.js"));
17147
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-B2BdLgf6.js"));
17148
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-DYAn41by.js"));
17149
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-DSZ5rrut.js"));
17150
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-CWHeWQ7m.js"));
17151
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-CNG0E_C5.js"));
17152
+ const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-DYcSY9Mz.js"));
17153
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-BCwzid6d.js"));
17151
17154
  const props = __props;
17152
17155
  const repoInfo = inject("repoInfo");
17153
17156
  const orgInfo = inject("orgInfo");
@@ -17761,7 +17764,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
17761
17764
  }
17762
17765
  });
17763
17766
  const Search = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-vue-layout-gitcode"]]);
17764
- const NoticeModal = defineAsyncComponent(() => import("./notice-Cc6tIE9-.js"));
17767
+ const autoAvokeLogin = ({ isLogin, loginFunc, openHarmonyGuide, loginSuccess }) => {
17768
+ const urlParams = new URLSearchParams(window.location.search);
17769
+ const hasLoginParam = urlParams.get("isLogin") === "9";
17770
+ if (hasLoginParam && !isLogin) {
17771
+ loginFunc({ type: "login", triggerType: "", loginTriggerSource: "router_login_auth" }, loginSuccess, openHarmonyGuide);
17772
+ }
17773
+ };
17774
+ const NoticeModal = defineAsyncComponent(() => import("./notice-j9wjoba5.js"));
17765
17775
  function clearNotice() {
17766
17776
  if (localStorage$2.getItem("validator_email")) {
17767
17777
  localStorage$2.removeItem("validator_email");
@@ -18021,8 +18031,17 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18021
18031
  window.open(props.bgConfig.detail_toolbar_url, "_blank");
18022
18032
  }
18023
18033
  };
18034
+ const loginDataFormat = (options) => {
18035
+ return {
18036
+ ...options || {},
18037
+ childComponents: props == null ? void 0 : props.loginChildComponents
18038
+ };
18039
+ };
18024
18040
  onMounted(() => {
18025
18041
  toNotice();
18042
+ nextTick(() => {
18043
+ autoAvokeLogin({ isLogin: props.isLogin, loginFunc: login, openHarmonyGuide: props.openHarmonyGuide, loginSuccess: props.loginSuccess });
18044
+ });
18026
18045
  addEventListener("logout", (options) => {
18027
18046
  const token = localStorage$2.getItem("access_token");
18028
18047
  if (!status.value) {
@@ -18043,15 +18062,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
18043
18062
  }
18044
18063
  props.loginOutFinish && props.loginOutFinish();
18045
18064
  const data = typeof options === "boolean" ? { Authorization: options } : options;
18046
- login(data, props.loginSuccess, props.openHarmonyGuide);
18065
+ const newOptions = loginDataFormat(data);
18066
+ login(newOptions, props.loginSuccess, props.openHarmonyGuide);
18047
18067
  }
18048
18068
  });
18049
18069
  addEventListener("login", (options) => {
18050
18070
  console.log("唤起Login");
18051
- const newOptions = {
18052
- ...options || {},
18053
- childComponents: props == null ? void 0 : props.loginChildComponents
18054
- };
18071
+ const newOptions = loginDataFormat(options);
18055
18072
  login(newOptions, props.loginSuccess, props.openHarmonyGuide);
18056
18073
  });
18057
18074
  addEventListener("updateUserInfo", (options) => {
@@ -18420,9 +18437,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18420
18437
  const layoutConfig2 = useLayoutConfig();
18421
18438
  const { t: t2 } = i18n.global;
18422
18439
  const route = useRoute();
18423
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-D2Q-9o53.js"));
18424
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-D5wZdxMm.js"));
18425
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-BxgXO2gU.js"));
18440
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem-CQ8Ff_70.js"));
18441
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-BvILfa3e.js"));
18442
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-BQpROUox.js"));
18426
18443
  const props = __props;
18427
18444
  const useReport2 = inject("useReport");
18428
18445
  const userInfo = inject("userInfo");
@@ -20064,10 +20081,10 @@ async function csdnloginCheck(route, loginCallback, request) {
20064
20081
  if ((_a = route == null ? void 0 : route.query) == null ? void 0 : _a.utm_source) {
20065
20082
  setUtmSourceSign(((_b = route == null ? void 0 : route.query) == null ? void 0 : _b.utm_source) || "");
20066
20083
  }
20067
- if (((_c = route == null ? void 0 : route.query) == null ? void 0 : _c.isLogin) && !localStorage$2.getItem("access_token")) {
20084
+ const loginList = ["88", "99", "always", "1"];
20085
+ if (loginList.includes((_c = route == null ? void 0 : route.query) == null ? void 0 : _c.isLogin) && !localStorage$2.getItem("access_token")) {
20068
20086
  const cache_timeStamp = Number(localStorage$2.getItem("cache_timeStamp") || 0);
20069
20087
  let loginTimes = Number(localStorage$2.getItem("cache_loginTimes") || 0);
20070
- const loginList = ["88", "99", "always"];
20071
20088
  const nowDate = (/* @__PURE__ */ new Date()).toLocaleDateString("zh-CN");
20072
20089
  const targetDate = new Date(cache_timeStamp).toLocaleDateString("zh-CN");
20073
20090
  const isToDay = nowDate === targetDate;
@@ -23967,7 +23984,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
23967
23984
  }
23968
23985
  });
23969
23986
  const MFA = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-vue-layout-gitcode"]]);
23970
- const SlidCaptcha = defineAsyncComponent(() => import("./index-D5glUAY1.js"));
23987
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-D7JSK1OR.js"));
23971
23988
  const useSlidCaptcha = () => {
23972
23989
  const { mount, unMount } = usePopup("slid-captcha-popup");
23973
23990
  const open = (config) => {
package/index.d.ts CHANGED
@@ -562,8 +562,10 @@ export declare const Login: DefineComponent<ExtractPropTypes<{
562
562
  declare interface LoginOptions {
563
563
  Authorization?: boolean;
564
564
  type?: 'login' | 'register';
565
- [x: string]: any;
566
565
  triggerType?: string;
566
+ loginTriggerSource?: string;
567
+ resetPwdSource?: string;
568
+ [x: string]: any;
567
569
  }
568
570
 
569
571
  export declare enum SceneValue {
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { J, K, O, I, S, H, x, Q, N, P, M } from "./index-oJa_vuEx.js";
1
+ import { J, K, O, I, S, H, x, Q, N, P, M } from "./index-qLrOzgxs.js";
2
2
  export {
3
3
  J as GitCodeAside,
4
4
  K 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-oJa_vuEx.js";
2
+ import { i as isPhone, u as useModel } from "./index-qLrOzgxs.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.5.61",
3
+ "version": "1.5.62",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",