vue-layout-gitcode 1.4.1 → 1.4.3

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,8 +1,8 @@
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-D-yWEijo.js";
5
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-D9j_e8jR.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-Cu2YsLYo.js";
5
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-CLYvYYeS.js";
6
6
  import "vue-devui-lal/tooltip";
7
7
  import "vue-devui-lal/tooltip/style.css";
8
8
  import "vue-router";
@@ -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-D-yWEijo.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-Cu2YsLYo.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-D-yWEijo.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-Cu2YsLYo.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-D-yWEijo.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-Cu2YsLYo.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-D9j_e8jR.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-D-yWEijo.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-CLYvYYeS.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-Cu2YsLYo.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-D-yWEijo.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-Cu2YsLYo.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-D-yWEijo.js";
2
+ import { a as i18n, h as headRequest, G as GIcon } from "./index-Cu2YsLYo.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,5 +1,5 @@
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
- import { d as debounce, t as transferNumber, G as GIcon, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, _ as _export_sfc, 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$9, o as isIncubationRepo, p as highlightWords, q as transWebUrl, w as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-D-yWEijo.js";
2
+ import { d as debounce, t as transferNumber, G as GIcon, s as setLoginTriggerSource, f as useRequestReport, r as reqCatch, h as headRequest, _ as _export_sfc, 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$9, o as isIncubationRepo, p as highlightWords, q as transWebUrl, w as _frEventTrack, E as EVENT_NAME, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-Cu2YsLYo.js";
3
3
  import { useRouter } from "vue-router";
4
4
  import { Row, Col } from "vue-devui-lal/grid";
5
5
  import { Skeleton, SkeletonItem } from "vue-devui-lal/skeleton";
@@ -101,6 +101,9 @@ const _export_sfc = (sfc, props) => {
101
101
  return target;
102
102
  };
103
103
  const GIcon = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-gitcode-layout-lib"]]);
104
+ const transformUrl = (url) => {
105
+ return url == null ? void 0 : url.replace(/gitcode\.com/g, location.host);
106
+ };
104
107
  const defaultConfig = {
105
108
  VITE_ENV: "production",
106
109
  VITE_HOST: "https://gitcode.com",
@@ -116,7 +119,7 @@ const defaultConfig = {
116
119
  VITE_SECRET_KEY: "SA!nUNPZ5o!OSV&B",
117
120
  VITE_SECRET_IV: "SA!nwwwZ5o!OSV&B"
118
121
  };
119
- let layoutConfig$5 = reactive({ ...defaultConfig });
122
+ const layoutConfig$5 = reactive({ ...defaultConfig, VITE_HOST_TIANQI: transformUrl(defaultConfig.VITE_HOST_TIANQI) });
120
123
  function setLayoutConfig(customConfig) {
121
124
  Object.assign(layoutConfig$5, customConfig);
122
125
  }
@@ -17775,10 +17778,14 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
17775
17778
  ]),
17776
17779
  _: 1
17777
17780
  }, 8, ["href", "target"]),
17778
- createVNode(UserLevel, { accountInfo: __props.accountInfo }, null, 8, ["accountInfo"]),
17781
+ !__props.inAIHub ? (openBlock(), createBlock(UserLevel, {
17782
+ key: 0,
17783
+ accountInfo: __props.accountInfo,
17784
+ class: "mb-[16px]"
17785
+ }, null, 8, ["accountInfo"])) : createCommentVNode("", true),
17779
17786
  (openBlock(true), createElementBlock(Fragment, null, renderList(blockList.value, (block, index2) => {
17780
17787
  return openBlock(), createElementBlock("div", {
17781
- class: "g-user-drawer-block",
17788
+ class: "g-user-drawer-block pb-[16px]",
17782
17789
  key: index2
17783
17790
  }, [
17784
17791
  (openBlock(true), createElementBlock(Fragment, null, renderList(block, (item) => {
@@ -18088,13 +18095,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18088
18095
  var _a;
18089
18096
  const layoutConfig2 = useLayoutConfig();
18090
18097
  const { t: $t } = i18n.global;
18091
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-CcrLvEeR.js"));
18092
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-ck4Q7yWz.js"));
18093
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-DJJlMHn2.js"));
18094
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-BqVN1fHD.js"));
18095
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-MckQme5c.js"));
18096
- const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-CsiC7PhG.js"));
18097
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-BBRsZfsV.js"));
18098
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-BJKhXW9j.js"));
18099
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-BtJbErCu.js"));
18100
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-CW0SwbrS.js"));
18101
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-DIe_i71A.js"));
18102
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-Ll-UO5EK.js"));
18103
+ const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-4xjYgyJb.js"));
18104
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-BQxZo-VT.js"));
18098
18105
  const props = __props;
18099
18106
  const repoInfo = inject("repoInfo");
18100
18107
  const orgInfo = inject("orgInfo");
@@ -18704,7 +18711,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
18704
18711
  }
18705
18712
  });
18706
18713
  const Search = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-gitcode-layout-lib"]]);
18707
- const NoticeModal = defineAsyncComponent(() => import("./notice-BjpT7egm.js"));
18714
+ const NoticeModal = defineAsyncComponent(() => import("./notice-CgbAOXvX.js"));
18708
18715
  function clearNotice() {
18709
18716
  if (localStorage$2.getItem("validator_email")) {
18710
18717
  localStorage$2.removeItem("validator_email");
@@ -21898,9 +21905,13 @@ async function checkUserRepositoryIssue(API) {
21898
21905
  async function successResolve(params, API) {
21899
21906
  var _a;
21900
21907
  const { path, userInfo, type, loginMethod } = params;
21908
+ const transformUserInfo = {
21909
+ ...userInfo,
21910
+ avatar: transformUrl(userInfo == null ? void 0 : userInfo.avatar)
21911
+ };
21901
21912
  if (userInfo) {
21902
- emitEvent("updateUserInfo", userInfo);
21903
- const { username, email } = userInfo;
21913
+ emitEvent("updateUserInfo", transformUserInfo);
21914
+ const { username, email } = transformUserInfo;
21904
21915
  setEmailValid(username, email);
21905
21916
  }
21906
21917
  saveLastLoginType(loginMethod);
@@ -25526,7 +25537,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
25526
25537
  }
25527
25538
  });
25528
25539
  const MFA = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-gitcode-layout-lib"]]);
25529
- const SlidCaptcha = defineAsyncComponent(() => import("./index-DXoHqw6D.js"));
25540
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-CwMo1Uk5.js"));
25530
25541
  const useSlidCaptcha = () => {
25531
25542
  const { mount, unMount } = usePopup("slid-captcha-popup");
25532
25543
  const open = (config) => {
@@ -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 { x as useLayoutConfig, _ as _export_sfc } from "./index-D-yWEijo.js";
3
+ import { x as useLayoutConfig, _ as _export_sfc } from "./index-Cu2YsLYo.js";
4
4
  import "vue-devui-lal/overlay/style.css";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "index",
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A, B, F, z, S, y, H, J, D, I, C } from "./index-D-yWEijo.js";
1
+ import { A, B, F, z, S, y, H, J, D, I, C } from "./index-Cu2YsLYo.js";
2
2
  export {
3
3
  A as GitCodeAside,
4
4
  B 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-D-yWEijo.js";
2
+ import { i as isPhone, u as useModel } from "./index-Cu2YsLYo.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.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",