vue-layout-gitcode 1.11.4 → 1.11.6

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
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { defineComponent, computed, createBlock, createElementBlock, openBlock, unref, normalizeProps, mergeProps, normalizeClass, renderSlot, normalizeStyle, createElementVNode, reactive, readonly, inject, effectScope, ref, shallowRef, watch, isRef, getCurrentInstance, h, Fragment, onBeforeMount, onMounted, onUnmounted, createVNode, Text, provide, createCommentVNode, withCtx, toDisplayString as toDisplayString$1, renderList, createTextVNode, Transition, withModifiers, resolveComponent, watchEffect, guardReactiveProps, resolveDirective, withDirectives, onBeforeUnmount, resolveDynamicComponent, nextTick, defineAsyncComponent, vShow, withKeys, useCssVars, createSlots, render, toRaw, mergeModels, useModel as useModel$1, watchPostEffect, useSlots } from "vue";
4
+ import { defineComponent, computed, createBlock, createElementBlock, openBlock, unref, normalizeProps, mergeProps, normalizeClass, renderSlot, normalizeStyle, createElementVNode, reactive, readonly, inject, effectScope, ref, shallowRef, watch, isRef, getCurrentInstance, h, Fragment, onBeforeMount, onMounted, onUnmounted, createVNode, Text, provide, createCommentVNode, withCtx, toDisplayString as toDisplayString$1, renderList, createTextVNode, Transition, withModifiers, resolveComponent, watchEffect, guardReactiveProps, resolveDirective, withDirectives, onBeforeUnmount, markRaw, resolveDynamicComponent, nextTick, defineAsyncComponent, vShow, withKeys, useCssVars, createSlots, render, toRaw, mergeModels, useModel as useModel$1, watchPostEffect, useSlots } from "vue";
5
5
  import { Button } from "vue-devui-lal/button";
6
6
  import { Popover } from "vue-devui-lal/popover";
7
7
  import { Tooltip } from "vue-devui-lal/tooltip";
@@ -57,9 +57,9 @@ import { Checkbox } from "vue-devui-lal/checkbox";
57
57
  import "vue-devui-lal/checkbox/style.css";
58
58
  import { Modal } from "vue-devui-lal/modal";
59
59
  import "vue-devui-lal/modal/style.css";
60
- const _hoisted_1$A = ["xlink:href"];
61
- const _hoisted_2$p = ["xlink:href"];
62
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
60
+ const _hoisted_1$B = ["xlink:href"];
61
+ const _hoisted_2$q = ["xlink:href"];
62
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
63
63
  __name: "index",
64
64
  props: {
65
65
  name: { default: "gt-run" },
@@ -88,7 +88,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
88
88
  }, [
89
89
  createElementVNode("use", {
90
90
  "xlink:href": `#${__props.name}`
91
- }, null, 8, _hoisted_1$A)
91
+ }, null, 8, _hoisted_1$B)
92
92
  ], 6)),
93
93
  renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
94
94
  ], 2)) : (openBlock(), createElementBlock("svg", {
@@ -99,7 +99,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
99
99
  }, [
100
100
  createElementVNode("use", {
101
101
  "xlink:href": `#${__props.name}`
102
- }, null, 8, _hoisted_2$p)
102
+ }, null, 8, _hoisted_2$q)
103
103
  ], 6));
104
104
  };
105
105
  }
@@ -111,7 +111,7 @@ const _export_sfc = (sfc, props) => {
111
111
  }
112
112
  return target;
113
113
  };
114
- const GIcon = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-vue-layout-gitcode"]]);
114
+ const GIcon = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-vue-layout-gitcode"]]);
115
115
  const defaultConfig = {
116
116
  VITE_ENV: "production",
117
117
  VITE_HOST: "https://gitcode.com",
@@ -7779,6 +7779,7 @@ const gitCodeLayout$1 = {
7779
7779
  header: {
7780
7780
  create: "新建",
7781
7781
  createRepo: "新建项目",
7782
+ createRepo_01: "新建项目",
7782
7783
  importRepo: "导入项目",
7783
7784
  createOrg: "新建组织",
7784
7785
  home: "首页",
@@ -7807,6 +7808,7 @@ const gitCodeLayout$1 = {
7807
7808
  myNotebook: "我的 Notebook",
7808
7809
  myCloudSpace: "我的 云开发环境",
7809
7810
  mySpace: "我的 Spaces",
7811
+ enterpriseFlag: "企业版",
7810
7812
  aihub: {
7811
7813
  documentCenter: "文档中心"
7812
7814
  }
@@ -8161,6 +8163,7 @@ const gitCodeLayout = {
8161
8163
  header: {
8162
8164
  create: "New",
8163
8165
  createRepo: "New Repository",
8166
+ createRepo_01: "New Repo",
8164
8167
  importRepo: "Import Project",
8165
8168
  createOrg: "New organization",
8166
8169
  home: "Home",
@@ -8189,6 +8192,7 @@ const gitCodeLayout = {
8189
8192
  myNotebook: "Your Notebook",
8190
8193
  myCloudSpace: "Your Cloud Development",
8191
8194
  mySpace: "Your Spaces",
8195
+ enterpriseFlag: "Enterprise",
8192
8196
  aihub: {
8193
8197
  documentCenter: "Docs"
8194
8198
  }
@@ -9085,20 +9089,20 @@ const currentHelpDocsAiCommunityUrl = () => {
9085
9089
  const baseUrl = isGitCodeHost() ? HELP_DOCS_URL_GITCODE + "/docs/help/home/ai-community/" : HELP_DOCS_URL_ATOMGIT + "/docs/help/home/ai-community/";
9086
9090
  return appendLangPathToHelpDocsUrl(baseUrl);
9087
9091
  };
9088
- const _hoisted_1$z = { class: "home-nav-right" };
9089
- const _hoisted_2$o = { class: "home-nav-item" };
9090
- const _hoisted_3$n = { class: "tooltip-sign" };
9091
- const _hoisted_4$i = { class: "home-nav-tooltip-wrapper" };
9092
- const _hoisted_5$d = { class: "home-nav-text" };
9093
- const _hoisted_6$c = { class: "home-nav-tooltip-wrapper" };
9094
- const _hoisted_7$9 = { class: "home-nav-text" };
9095
- const _hoisted_8$8 = {
9092
+ const _hoisted_1$A = { class: "home-nav-right" };
9093
+ const _hoisted_2$p = { class: "home-nav-item" };
9094
+ const _hoisted_3$o = { class: "tooltip-sign" };
9095
+ const _hoisted_4$j = { class: "home-nav-tooltip-wrapper" };
9096
+ const _hoisted_5$f = { class: "home-nav-text" };
9097
+ const _hoisted_6$d = { class: "home-nav-tooltip-wrapper" };
9098
+ const _hoisted_7$a = { class: "home-nav-text" };
9099
+ const _hoisted_8$9 = {
9096
9100
  key: 2,
9097
9101
  class: "tools-list"
9098
9102
  };
9099
- const _hoisted_9$6 = { class: "home-nav-tooltip-wrapper" };
9100
- const _hoisted_10$6 = { class: "home-nav-text" };
9101
- const _hoisted_11$5 = { class: "text-[var(--theme-placeholder)] text-[10px]" };
9103
+ const _hoisted_9$7 = { class: "home-nav-tooltip-wrapper" };
9104
+ const _hoisted_10$7 = { class: "home-nav-text" };
9105
+ const _hoisted_11$6 = { class: "text-[var(--theme-placeholder)] text-[10px]" };
9102
9106
  const _hoisted_12$5 = { class: "qrcode-wrapper" };
9103
9107
  const _hoisted_13$2 = { class: "pl-[8px]" };
9104
9108
  const _hoisted_14$2 = { class: "tools-list-item" };
@@ -9139,7 +9143,7 @@ const _hoisted_30$1 = { class: "ml-2 font-[600] text-[var(--theme-aide-text)] te
9139
9143
  const _hoisted_31$1 = { class: "home-nav-item collapse-tool" };
9140
9144
  const _hoisted_32$1 = { class: "home-nav-item" };
9141
9145
  const _hoisted_33$1 = ["src", "alt"];
9142
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
9146
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
9143
9147
  __name: "index",
9144
9148
  props: {
9145
9149
  sceneValue: { default: SceneValue.home },
@@ -9378,15 +9382,15 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9378
9382
  size: "18px"
9379
9383
  })
9380
9384
  ])) : createCommentVNode("", true),
9381
- createElementVNode("div", _hoisted_1$z, [
9385
+ createElementVNode("div", _hoisted_1$A, [
9382
9386
  inviteVisible.value ? (openBlock(), createBlock(unref(Tooltip), {
9383
9387
  key: 0,
9384
9388
  position: "left",
9385
9389
  "overlay-class": "tools-tag-tooltip"
9386
9390
  }, {
9387
9391
  content: withCtx(() => [
9388
- createElementVNode("div", _hoisted_4$i, [
9389
- createElementVNode("div", _hoisted_5$d, toDisplayString$1(unref(t2)("gitCodeLayout.growthCenter.invite")), 1)
9392
+ createElementVNode("div", _hoisted_4$j, [
9393
+ createElementVNode("div", _hoisted_5$f, toDisplayString$1(unref(t2)("gitCodeLayout.growthCenter.invite")), 1)
9390
9394
  ])
9391
9395
  ]),
9392
9396
  default: withCtx(() => [
@@ -9394,13 +9398,13 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9394
9398
  class: "home-nav-link computing",
9395
9399
  onClick: handleInvite
9396
9400
  }, [
9397
- createElementVNode("div", _hoisted_2$o, [
9401
+ createElementVNode("div", _hoisted_2$p, [
9398
9402
  _cache[5] || (_cache[5] = createElementVNode("img", {
9399
9403
  class: "common-icon inline-block h-[20px] w-[20px]",
9400
9404
  src: "https://cdn-static.gitcode.com/static/images/homeweb/invite.svg",
9401
9405
  alt: ""
9402
9406
  }, null, -1)),
9403
- createElementVNode("div", _hoisted_3$n, toDisplayString$1(unref(t2)("gitCodeLayout.growthCenter.invite")), 1)
9407
+ createElementVNode("div", _hoisted_3$o, toDisplayString$1(unref(t2)("gitCodeLayout.growthCenter.invite")), 1)
9404
9408
  ])
9405
9409
  ])
9406
9410
  ]),
@@ -9412,8 +9416,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9412
9416
  "overlay-class": "tools-tag-tooltip"
9413
9417
  }, {
9414
9418
  content: withCtx(() => [
9415
- createElementVNode("div", _hoisted_6$c, [
9416
- createElementVNode("div", _hoisted_7$9, toDisplayString$1(unref(t2)("gitCodeLayout.userSetting.menu.growthCenter")), 1)
9419
+ createElementVNode("div", _hoisted_6$d, [
9420
+ createElementVNode("div", _hoisted_7$a, toDisplayString$1(unref(t2)("gitCodeLayout.userSetting.menu.growthCenter")), 1)
9417
9421
  ])
9418
9422
  ]),
9419
9423
  default: withCtx(() => [
@@ -9432,16 +9436,16 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9432
9436
  ]),
9433
9437
  _: 1
9434
9438
  })) : createCommentVNode("", true),
9435
- isModuleVisible(unref(ToolsFloatDisplayItem).ELSE) ? (openBlock(), createElementBlock("div", _hoisted_8$8, [
9439
+ isModuleVisible(unref(ToolsFloatDisplayItem).ELSE) ? (openBlock(), createElementBlock("div", _hoisted_8$9, [
9436
9440
  createVNode(unref(Tooltip), {
9437
9441
  position: "left",
9438
9442
  "overlay-class": "tools-tag-tooltip"
9439
9443
  }, {
9440
9444
  content: withCtx(() => [
9441
- createElementVNode("div", _hoisted_9$6, [
9442
- createElementVNode("div", _hoisted_10$6, [
9445
+ createElementVNode("div", _hoisted_9$7, [
9446
+ createElementVNode("div", _hoisted_10$7, [
9443
9447
  createElementVNode("p", null, toDisplayString$1(unref(t2)("gitCodeLayout.home.userFeedback01")), 1),
9444
- createElementVNode("p", _hoisted_11$5, toDisplayString$1(unref(t2)("gitCodeLayout.home.userFeedback02")), 1)
9448
+ createElementVNode("p", _hoisted_11$6, toDisplayString$1(unref(t2)("gitCodeLayout.home.userFeedback02")), 1)
9445
9449
  ])
9446
9450
  ])
9447
9451
  ]),
@@ -9679,7 +9683,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9679
9683
  };
9680
9684
  }
9681
9685
  });
9682
- const ToolsFloat = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-vue-layout-gitcode"]]);
9686
+ const ToolsFloat = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-vue-layout-gitcode"]]);
9683
9687
  var repoTypeEnum = /* @__PURE__ */ ((repoTypeEnum2) => {
9684
9688
  repoTypeEnum2["NORMAL"] = "0";
9685
9689
  repoTypeEnum2["MODEL"] = "1";
@@ -9820,8 +9824,8 @@ const collectRegisterLoginEvent = ({ isRegister, registerLoginMethod, success, e
9820
9824
  delete reportData["utm_source"];
9821
9825
  window.collectEvent("beconEvent", isRegister ? "register" : "login", reportData);
9822
9826
  };
9823
- const _hoisted_1$y = ["href", "target", "disabled"];
9824
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
9827
+ const _hoisted_1$z = ["href", "target", "disabled"];
9828
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
9825
9829
  ...{
9826
9830
  name: "GLink"
9827
9831
  },
@@ -9865,11 +9869,11 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
9865
9869
  disabled: __props.disabled || __props.noPointer
9866
9870
  }, [
9867
9871
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
9868
- ], 10, _hoisted_1$y));
9872
+ ], 10, _hoisted_1$z));
9869
9873
  };
9870
9874
  }
9871
9875
  });
9872
- const GLink = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-vue-layout-gitcode"]]);
9876
+ const GLink = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-vue-layout-gitcode"]]);
9873
9877
  const headerHeight = ref(56);
9874
9878
  const useHeaderHeight = () => {
9875
9879
  const setHeaderHeight = (height) => {
@@ -10317,6 +10321,9 @@ watch(currentThemeStorage, (newValue) => {
10317
10321
  const currentTheme = computed(() => {
10318
10322
  return setThemeVal.value || currentThemeStorage.value || ThemeType.WHITE;
10319
10323
  });
10324
+ const isWhiteTheme = () => {
10325
+ return currentTheme.value === ThemeType.WHITE;
10326
+ };
10320
10327
  const setTheme = (theme2) => {
10321
10328
  const themeValue = theme2 || api.get("gitcode_theme") || ThemeType.WHITE;
10322
10329
  setThemeVal.value = themeValue;
@@ -10427,7 +10434,7 @@ if (isBrowser) {
10427
10434
  }
10428
10435
  const sessionStorage$1 = sessionStorage;
10429
10436
  const _imports_0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAmsSURBVHgB7VpdbxxnFT7nfccmRam6/gXZXIBy1y3qRe8YR6kUoUpdbhACJNtShFJUSCyBBFd2I1ClAoklVAE32BYXRAJqIwEyUOrNL4h70dtm+wvqNG7deGbe03PO+7Gzlr27/kpzsSeazO5kZvZ95jnnOR8TgLGNbWxjG9vYDjWEp8zyNjUg22lBiS1TuOeNo5YFbBgyTUMAFgz4PXYnDEzf3XimO+h+GTwFls9S43G5O2NLaLtqp2VKaJiSCB0yGEQEJAHFIMkwKXxMjl8AopwvXxl07y8V4EvXdnMo3cye+6xtK3jOVISmYCAlb/KZgTBT4Pd8TD+TfGegiApyiH0pAF+6vpvzOhegoNxUvNiSwZS88II32VcAniVhTIAya6AgeS9/AK0AFXKH2BMFmN+kxqfF4wVXwA0snQdUgQcXtwoFgLJk/T6xqG7Kx2w4xi5Mw37ziQF88fXd/NHe58scZxfYBdGzBQkYFkxVpSBQAXkXZJC8CYMUXTQCxZEU0sATsG/c+PwOL3/TVnhBY0vYqyABk7jjGJSnvc0L72qMeQaxB8gIWGGPgtjw+fRw2G+fKYMv/nQ3dwUuG2VNGfPMCagYd+yiWFGXH8Dcfzae7cRr2y/vzHJKuM3gGh4cX+tUXKAHHLvD1nDqAFuLnMc+ezyLlXnVFS5XN4ziUQpbAgySqGAF3Qmqpjc2prr1+6z/7/zK917e2XJg70eXtMFtmT3vtkDbw9ZzKon+0pvUnHhc5FTiDC+a8xg1AqAeuCIATIqpqUCUcva/G+dXD7v39y/v3WGtvGlDHhT2VGD4+zkwU0sdHAjyWAxeukPN0rk2L/J5jp0c98omRcGoakCKnoik3BZFpRQmDHz1XPGPQb9ljemgo5uqrME1hRWpZIaBOzLA5u+paQtYLsX1Ks8ABpZEJDAy0wcuuWUQFU0FZFBiCmh9fWrgIvmah2iikqJPH8j3Q3h/lDWPrKLNt9n1CrrP+csn5+hyhVN2cE/VkIL7UQIXXJKBkX8QoTLhLeNE/cqVR/nABRpq8oNgl/R50fKDsfp0cG2UdY8EsLnMMVXBGi/4OSvMFE4XbXnxtopMyTEXlNFFEQmqGR6IVigQVVBSAWQ2mxn023zWgj4MERjJg6wslv3OTMC9UdY+EsDsISx4qYeecIgCMns+j0VBCUAkaSc2fcxZ513MahaLUs/XOJz5zpXdhf2/eZO7imt5cYfBNbkk89UN/2Wt7jtLG8NThD6gYSc0WVAy5x54twzMiEDsOS8a+/KaFXctqFah+PhM8aN1pCFflYSqhUQMcIvBrPDnh/xvF9glZxUcqKCw2PBemBOA6OZ+/e9sBUawoQC/dts9QGEvyb1DDyLGmcP+dKAu7MWHY9CD6wGJUh9rTHG/UHv6mtMBxHNDyabgBJjN+GEZ7L71L3MRRrSBKvr13xJX/K5py6CWQe49uAgUA9CacqrCgiRxBReSMwYwmBbv/PFQY1I6FyXeQu3JMafgdOPjhlbhCHYoQMl1VLhFLFMq6CXp0ss+ps91Nw0PoFIgqXAOe5V7jF2BB5diUhllcCgs8lkh5lBc0wOELv/CCpwGQCroDvbnsH4gyhz0qpJ6T1ehFxBfYlESlBqbsWnt6xS0BZIYkwTvgSX2BCSz98t3TBeOYAfG4KU3ixwcbpr9zNVbnCIJSmSOcE/Usq8TT66Zvke2yAMSN62XXypE/CVL4CiIC3Z/9ffRYw8GMUgOb2S9uDuIuRCLdRfl4YmLAKJi1kQDtFHt7+sAUroQcJzEGQhhxh8YEMeegGOWeZ9N4DQcww4EyMm8lUQlxlMCF5SzSK7pK5Z6zGm+gygUDLWW96AmJnXBAc+c5jmvmOgFRkYT8Mbi3dHy3n47MNEjuG/bgrZToSzlWFBOTfBclmEsrKtQRGs745N4HDlEoKl/A8+irXUF0uvptfyFFRJqiklh3731N7sIx7QDGfxgcXKr9fPdF0xpZpjJpq14CZXTeQlUjmeU1LAFflNd1Lugd0+o5bveyCG5pSWsl2qQ4s5qKsAAKqgmPzQ+MTPuDTiBHbsfnH7lExlB5LXRQm3EkJJ5YJFrVj8Ng16CD6ADY3W19PUmCeDuwl+OLix1O/ZMxpbY6WND48r/8SoJyT2TgjrwM5U4ejBQT+ReVEL8yT7LTsae2LFHFnzhPaxJvwmioi2NqqKh9AB6M03vxj7PxdoSA3PskqKerJiqoPJvpgMntJEYlPcFl9uP1vJv8TuDYBs8IGK366TOoDfew1ploqzG2EsTamFuXxKXOLS6MThR0Azu/WLleMpZt6EM6ssQ+HQTKmhxLPFnSPkoq9w8w7kfhAXrc0uLWC/HQicuSokQSi8VFE0DNpRk1gNX0BO4DqdgZhRwnAZakhZ4LfnVq70OnCdfW8aZeY0pCnNLrSf9GyDjAjBhTjvx0BHYmkpmQWgyVKDqnpnQX440kjg2wDo4yYVZSuDY14G/8+65JSbjlk/aRgXEhpFEHL2r+5rohqjllzKVEZhYivETUbCBwZ/9YaIDZwkQYIcHtk7BCQvowhgdcLZ9ld8K1ezuu88sctjMsQt/JC6JFAe0Rl2Vi2Sf2zxbJHspx2RLzPnc5/OhwQ6ckh0K0Mo7uirlLazFklQvy9+9utusn//n9yZXVt+bvIhEcxnRvfSiJDSrPgWI/OsGsQyzNbeMdSczuwVnDfD//3x2+vxXqqmswhdSJ06hM+BRAlRm8wdXuOvYZ3/qTK78sZNNy1CWF7uqOU3Z8e6X1DMd90OkkOxD/JmRBkonAigmM0t+yg27r8XxsQVNbjs2Zy/vLV87AKgMZTNrHphepRJryyQq3j1DUpcyLdNOovvjpdNR0KEAxfg3W2mkUJuraCog7Q1moMLNH+buw+t5P1BTYybLVDUpxCKpm6ZeT87V7kEGSieuXo4EkJ/zq71SLPV2aHsvJH1sAl3k5JD33TxUK6FhpSyopWctdQuh7lT3nH/t9mjTslFtaKKX/+Vgomv29pReK8euHczK2x1c7Lv5pNOXzCE1qFJpM5tRck3f97FqUjn/o99Mnpq4jASwnX/cCFVJlxN6B8m9n7lJjo9ShrGbCSgquLn91xumS1XReLc0me/5bOr54GNm+dbrS2YJzsgGAlzvTG2323Txr+v9b3Gu57vgaBJC4bx6EDi9eVZ9pNWo1pYI/eCwU1mc+8nSyevNQXbsfvC13K2xi24fBk5scZYaWUUfcgxOxZqT43Cbg3d+/nenG2uH2Zn/T6e3ZvdarCJrIjA8w181k9nS/NLw93pjG9vYxja2p8G+ADz7MtW/3lU1AAAAAElFTkSuQmCC";
10430
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
10437
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
10431
10438
  ...{
10432
10439
  name: "GAvatar"
10433
10440
  },
@@ -10473,8 +10480,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
10473
10480
  };
10474
10481
  }
10475
10482
  });
10476
- const _hoisted_1$x = ["src"];
10477
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
10483
+ const _hoisted_1$y = ["src"];
10484
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
10478
10485
  ...{ name: "FlashTag" },
10479
10486
  __name: "FlashTag",
10480
10487
  props: {
@@ -10519,7 +10526,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
10519
10526
  key: 0,
10520
10527
  class: "w-[16px] h-[16px]",
10521
10528
  src: iconUrl.value
10522
- }, null, 8, _hoisted_1$x)) : renderSlot(_ctx.$slots, "default", { key: 1 })
10529
+ }, null, 8, _hoisted_1$y)) : renderSlot(_ctx.$slots, "default", { key: 1 })
10523
10530
  ], 16)
10524
10531
  ]),
10525
10532
  _: 3
@@ -11324,36 +11331,36 @@ const useTimeFormat = () => {
11324
11331
  formatTime
11325
11332
  };
11326
11333
  };
11327
- const _hoisted_1$w = {
11334
+ const _hoisted_1$x = {
11328
11335
  key: 0,
11329
11336
  class: "org-layout-toolbar"
11330
11337
  };
11331
- const _hoisted_2$n = { class: "org-layout-toolbar-title flex-1 ellipsis-two-line" };
11332
- const _hoisted_3$m = { class: "text-xs" };
11333
- const _hoisted_4$h = { class: "flex items-center w-full g-repo-breadcrumb-custom" };
11334
- const _hoisted_5$c = {
11338
+ const _hoisted_2$o = { class: "org-layout-toolbar-title flex-1 ellipsis-two-line" };
11339
+ const _hoisted_3$n = { class: "text-xs" };
11340
+ const _hoisted_4$i = { class: "flex items-center w-full g-repo-breadcrumb-custom" };
11341
+ const _hoisted_5$e = {
11335
11342
  key: 1,
11336
11343
  class: "flex items-center min-w-[30px]"
11337
11344
  };
11338
- const _hoisted_6$b = {
11345
+ const _hoisted_6$c = {
11339
11346
  key: 0,
11340
11347
  src: _imports_0,
11341
11348
  alt: "mirrors-avatar-phone",
11342
11349
  class: "h-[24px] w-[24px]"
11343
11350
  };
11344
- const _hoisted_7$8 = {
11351
+ const _hoisted_7$9 = {
11345
11352
  key: 1,
11346
11353
  src: "https://cdn-static.gitcode.com/static/images/mirrors-avata_20250411.gif",
11347
11354
  alt: "mirrors-avatar",
11348
11355
  class: "h-[24px]"
11349
11356
  };
11350
- const _hoisted_8$7 = { class: "g-repo-breadcrumb-container" };
11351
- const _hoisted_9$5 = {
11357
+ const _hoisted_8$8 = { class: "g-repo-breadcrumb-container" };
11358
+ const _hoisted_9$6 = {
11352
11359
  key: 0,
11353
11360
  class: "flex items-center w-full"
11354
11361
  };
11355
- const _hoisted_10$5 = ["title"];
11356
- const _hoisted_11$4 = ["title"];
11362
+ const _hoisted_10$6 = ["title"];
11363
+ const _hoisted_11$5 = ["title"];
11357
11364
  const _hoisted_12$4 = {
11358
11365
  key: 0,
11359
11366
  class: "mb-[2px]"
@@ -11383,7 +11390,7 @@ const _hoisted_20$1 = {
11383
11390
  };
11384
11391
  const _hoisted_21$1 = { class: "user-layout-toolbar-title flex-1 ellipsis-two-line" };
11385
11392
  const _hoisted_22$1 = { class: "text-xs" };
11386
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
11393
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
11387
11394
  __name: "HeaderCustom",
11388
11395
  props: {
11389
11396
  scene: { default: SceneValue.home },
@@ -11503,7 +11510,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11503
11510
  });
11504
11511
  return (_ctx, _cache) => {
11505
11512
  var _a, _b;
11506
- return __props.scene === unref(SceneValue).org && !__props.errorCode ? (openBlock(), createElementBlock("div", _hoisted_1$w, [
11513
+ return __props.scene === unref(SceneValue).org && !__props.errorCode ? (openBlock(), createElementBlock("div", _hoisted_1$x, [
11507
11514
  createVNode(GLink, {
11508
11515
  to: { name: "homepage" },
11509
11516
  class: "flex flex-1 items-center gap-[8px]"
@@ -11511,7 +11518,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11511
11518
  default: withCtx(() => {
11512
11519
  var _a2, _b2, _c;
11513
11520
  return [
11514
- createVNode(_sfc_main$E, {
11521
+ createVNode(_sfc_main$F, {
11515
11522
  class: "g-border",
11516
11523
  src: (_a2 = unref(orgInfo)) == null ? void 0 : _a2.avatar,
11517
11524
  name: (_b2 = unref(orgInfo)) == null ? void 0 : _b2.name,
@@ -11519,7 +11526,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11519
11526
  height: 28,
11520
11527
  is_round: false
11521
11528
  }, null, 8, ["src", "name"]),
11522
- createElementVNode("div", _hoisted_2$n, toDisplayString$1((_c = unref(orgInfo)) == null ? void 0 : _c.name), 1)
11529
+ createElementVNode("div", _hoisted_2$o, toDisplayString$1((_c = unref(orgInfo)) == null ? void 0 : _c.name), 1)
11523
11530
  ];
11524
11531
  }),
11525
11532
  _: 1
@@ -11534,7 +11541,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11534
11541
  default: withCtx(() => {
11535
11542
  var _a2;
11536
11543
  return [
11537
- createElementVNode("span", _hoisted_3$m, toDisplayString$1(((_a2 = __props.orgProps) == null ? void 0 : _a2.isOrgFollow) ? unref(t2)("gitCodeLayout.home.alreadyFollowed") : unref(t2)("gitCodeLayout.home.focusOn")), 1)
11544
+ createElementVNode("span", _hoisted_3$n, toDisplayString$1(((_a2 = __props.orgProps) == null ? void 0 : _a2.isOrgFollow) ? unref(t2)("gitCodeLayout.home.alreadyFollowed") : unref(t2)("gitCodeLayout.home.focusOn")), 1)
11538
11545
  ];
11539
11546
  }),
11540
11547
  _: 1
@@ -11556,7 +11563,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11556
11563
  default: withCtx(() => {
11557
11564
  var _a2, _b2, _c, _d, _e, _f, _g;
11558
11565
  return [
11559
- createElementVNode("h2", _hoisted_4$h, [
11566
+ createElementVNode("h2", _hoisted_4$i, [
11560
11567
  createVNode(GLink, {
11561
11568
  href: (_a2 = unref(breadcrumb)[0]) == null ? void 0 : _a2.path,
11562
11569
  class: "pr-[12px]"
@@ -11564,7 +11571,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11564
11571
  default: withCtx(() => {
11565
11572
  var _a3, _b3, _c2, _d2;
11566
11573
  return [
11567
- !((_a3 = __props.repoProps) == null ? void 0 : _a3.isGhMirrors) ? (openBlock(), createBlock(_sfc_main$E, {
11574
+ !((_a3 = __props.repoProps) == null ? void 0 : _a3.isGhMirrors) ? (openBlock(), createBlock(_sfc_main$F, {
11568
11575
  key: 0,
11569
11576
  class: normalizeClass({ "g-border": isOrg.value }),
11570
11577
  src: (_c2 = (_b3 = unref(repoInfo)) == null ? void 0 : _b3.namespace) == null ? void 0 : _c2.avatar_url,
@@ -11572,14 +11579,14 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11572
11579
  width: 28,
11573
11580
  height: 28,
11574
11581
  is_round: !isOrg.value
11575
- }, null, 8, ["class", "src", "name", "is_round"])) : (openBlock(), createElementBlock("div", _hoisted_5$c, [
11576
- unref(isPhone)() ? (openBlock(), createElementBlock("img", _hoisted_6$b)) : (openBlock(), createElementBlock("img", _hoisted_7$8))
11582
+ }, null, 8, ["class", "src", "name", "is_round"])) : (openBlock(), createElementBlock("div", _hoisted_5$e, [
11583
+ unref(isPhone)() ? (openBlock(), createElementBlock("img", _hoisted_6$c)) : (openBlock(), createElementBlock("img", _hoisted_7$9))
11577
11584
  ]))
11578
11585
  ];
11579
11586
  }),
11580
11587
  _: 1
11581
11588
  }, 8, ["href"]),
11582
- createElementVNode("div", _hoisted_8$7, [
11589
+ createElementVNode("div", _hoisted_8$8, [
11583
11590
  !((_b2 = __props.repoProps) == null ? void 0 : _b2.isGhMirrors) ? (openBlock(), createElementBlock("div", {
11584
11591
  key: 0,
11585
11592
  ref_key: "breadcrumbRef",
@@ -11590,7 +11597,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11590
11597
  return openBlock(), createElementBlock(Fragment, {
11591
11598
  key: item.path
11592
11599
  }, [
11593
- index2 !== unref(breadcrumb).length - 1 ? (openBlock(), createElementBlock("span", _hoisted_9$5, [
11600
+ index2 !== unref(breadcrumb).length - 1 ? (openBlock(), createElementBlock("span", _hoisted_9$6, [
11594
11601
  createVNode(GLink, {
11595
11602
  class: "linkTx",
11596
11603
  href: item.path
@@ -11602,7 +11609,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11602
11609
  ref: breadcrumbTextRef,
11603
11610
  title: item.label,
11604
11611
  class: normalizeClass(["linkTx", index2 === unref(breadcrumb).length - 1 ? "font-bold" : ""])
11605
- }, toDisplayString$1(item.label), 11, _hoisted_10$5)
11612
+ }, toDisplayString$1(item.label), 11, _hoisted_10$6)
11606
11613
  ]),
11607
11614
  _: 2
11608
11615
  }, 1032, ["href"]),
@@ -11627,12 +11634,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11627
11634
  ref: breadcrumbNextTextRef,
11628
11635
  title: unref(breadcrumb)[unref(breadcrumb).length - 1].label,
11629
11636
  class: "linkTx font-bold"
11630
- }, toDisplayString$1(unref(breadcrumb)[unref(breadcrumb).length - 1].label), 9, _hoisted_11$4)
11637
+ }, toDisplayString$1(unref(breadcrumb)[unref(breadcrumb).length - 1].label), 9, _hoisted_11$5)
11631
11638
  ]),
11632
11639
  _: 1
11633
11640
  }, 8, ["to"]),
11634
11641
  unref(isGstarRepo)(unref(repoInfo).topic_names) ? (openBlock(), createElementBlock("div", _hoisted_12$4, [
11635
- createVNode(_sfc_main$D, {
11642
+ createVNode(_sfc_main$E, {
11636
11643
  origin: "repo",
11637
11644
  icon: "",
11638
11645
  type: "gstar",
@@ -11644,7 +11651,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11644
11651
  _: 1
11645
11652
  }, 8, ["message"])
11646
11653
  ])) : unref(isIncubationRepo)(unref(repoInfo).topic_names) ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
11647
- createVNode(_sfc_main$D, {
11654
+ createVNode(_sfc_main$E, {
11648
11655
  origin: "repo",
11649
11656
  icon: "",
11650
11657
  type: "incubation",
@@ -11657,7 +11664,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11657
11664
  }, 8, ["message"])
11658
11665
  ])) : createCommentVNode("", true),
11659
11666
  unref(isTrustedRepo)(unref(repoInfo).topic_names) ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
11660
- createVNode(_sfc_main$D, {
11667
+ createVNode(_sfc_main$E, {
11661
11668
  trusted: "",
11662
11669
  message: unref(t2)("gitCodeLayout.trusted.title"),
11663
11670
  icon: "",
@@ -11706,7 +11713,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11706
11713
  default: withCtx(() => {
11707
11714
  var _a2, _b2, _c, _d, _e;
11708
11715
  return [
11709
- createVNode(_sfc_main$E, {
11716
+ createVNode(_sfc_main$F, {
11710
11717
  src: (_a2 = unref(otherUserInfo)) == null ? void 0 : _a2.avatarUrl,
11711
11718
  name: ((_b2 = unref(otherUserInfo)) == null ? void 0 : _b2.name) || ((_c = unref(otherUserInfo)) == null ? void 0 : _c.nickname),
11712
11719
  width: 28,
@@ -11733,17 +11740,17 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11733
11740
  };
11734
11741
  }
11735
11742
  });
11736
- const HeaderCustom = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11737
- const _hoisted_1$v = ["src"];
11738
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
11743
+ const HeaderCustom = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11744
+ const _hoisted_1$w = ["src"];
11745
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
11739
11746
  ...{ name: "OperationEntry" },
11740
11747
  __name: "OperationEntry",
11741
11748
  setup(__props) {
11742
11749
  const request = inject("request");
11743
11750
  const API = asideRequest(request);
11744
11751
  const headerEntryConfig = ref({
11745
- img_white: "",
11746
- img_black: "",
11752
+ img_light: "",
11753
+ img_dark: "",
11747
11754
  url: ""
11748
11755
  });
11749
11756
  const handleClick = () => {
@@ -11751,8 +11758,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
11751
11758
  window.open(`${transformUrl((_a = headerEntryConfig.value) == null ? void 0 : _a.url)}`, "_blank");
11752
11759
  };
11753
11760
  const img = computed(() => {
11754
- const { img_white, img_black } = headerEntryConfig.value;
11755
- return (currentTheme.value === ThemeType.BLACK ? img_black : img_white) || img_white;
11761
+ const { img_light, img_dark } = headerEntryConfig.value;
11762
+ return (currentTheme.value === ThemeType.BLACK ? img_dark : img_light) || img_light;
11756
11763
  });
11757
11764
  const getHeaderEntryConfig = async () => {
11758
11765
  var _a;
@@ -11760,8 +11767,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
11760
11767
  const res = await API.getHeaderEntryConfig();
11761
11768
  const data = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || {};
11762
11769
  headerEntryConfig.value = {
11763
- img_white: data.img_white,
11764
- img_black: data.img_black,
11770
+ img_light: data.img_light,
11771
+ img_dark: data.img_dark,
11765
11772
  url: data.url
11766
11773
  };
11767
11774
  } catch (error) {
@@ -11779,14 +11786,14 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
11779
11786
  class: "w-[71px]",
11780
11787
  src: img.value,
11781
11788
  alt: "operation-entry"
11782
- }, null, 8, _hoisted_1$v)
11789
+ }, null, 8, _hoisted_1$w)
11783
11790
  ])) : createCommentVNode("", true);
11784
11791
  };
11785
11792
  }
11786
11793
  });
11787
- const OperationEntry = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11788
- const _hoisted_1$u = ["src"];
11789
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
11794
+ const OperationEntry = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11795
+ const _hoisted_1$v = ["src"];
11796
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
11790
11797
  __name: "ClaimPower",
11791
11798
  props: {
11792
11799
  config: {}
@@ -11809,14 +11816,14 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
11809
11816
  createElementVNode("img", {
11810
11817
  src: __props.config.logo_url,
11811
11818
  alt: "claim power"
11812
- }, null, 8, _hoisted_1$u)
11819
+ }, null, 8, _hoisted_1$v)
11813
11820
  ])) : createCommentVNode("", true);
11814
11821
  };
11815
11822
  }
11816
11823
  });
11817
- const ClaimPower = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11818
- const _hoisted_1$t = { class: "devui-select__item g-option-link" };
11819
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
11824
+ const ClaimPower = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11825
+ const _hoisted_1$u = { class: "devui-select__item g-option-link" };
11826
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
11820
11827
  ...{
11821
11828
  name: "OptionLink"
11822
11829
  },
@@ -11834,7 +11841,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
11834
11841
  },
11835
11842
  setup(__props) {
11836
11843
  return (_ctx, _cache) => {
11837
- return openBlock(), createElementBlock("li", _hoisted_1$t, [
11844
+ return openBlock(), createElementBlock("li", _hoisted_1$u, [
11838
11845
  createVNode(GLink, normalizeProps(guardReactiveProps(_ctx.$props)), {
11839
11846
  default: withCtx(() => [
11840
11847
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
@@ -11845,7 +11852,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
11845
11852
  };
11846
11853
  }
11847
11854
  });
11848
- const OptionLink = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11855
+ const OptionLink = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-vue-layout-gitcode"]]);
11849
11856
  var aes = { exports: {} };
11850
11857
  function commonjsRequire(path) {
11851
11858
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
@@ -14300,7 +14307,7 @@ function headRequest(request) {
14300
14307
  }
14301
14308
  };
14302
14309
  }
14303
- const _sfc_main$y = /* @__PURE__ */ Object.assign({
14310
+ const _sfc_main$z = /* @__PURE__ */ Object.assign({
14304
14311
  name: "Create"
14305
14312
  }, {
14306
14313
  __name: "index",
@@ -14390,8 +14397,8 @@ const _sfc_main$y = /* @__PURE__ */ Object.assign({
14390
14397
  };
14391
14398
  }
14392
14399
  });
14393
- const Create = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14394
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
14400
+ const Create = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14401
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
14395
14402
  ...{
14396
14403
  name: "DocumentCenter"
14397
14404
  },
@@ -14416,12 +14423,12 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
14416
14423
  };
14417
14424
  }
14418
14425
  });
14419
- const DocumentCenter = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14420
- const _hoisted_1$s = {
14426
+ const DocumentCenter = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14427
+ const _hoisted_1$t = {
14421
14428
  key: 1,
14422
14429
  class: "g-text-all"
14423
14430
  };
14424
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
14431
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
14425
14432
  ...{ name: "GText" },
14426
14433
  __name: "index",
14427
14434
  props: {
@@ -14498,24 +14505,24 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
14498
14505
  class: "watch-all",
14499
14506
  onClick: onShowAll
14500
14507
  }, toDisplayString$1(_ctx.$t("utils.viewAll")), 1)) : createCommentVNode("", true)
14501
- ], 6)) : showAllContent.value && finalConfig.value.showAll ? (openBlock(), createElementBlock("div", _hoisted_1$s, [
14508
+ ], 6)) : showAllContent.value && finalConfig.value.showAll ? (openBlock(), createElementBlock("div", _hoisted_1$t, [
14502
14509
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
14503
14510
  ])) : createCommentVNode("", true);
14504
14511
  };
14505
14512
  }
14506
14513
  });
14507
- const GText = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14508
- const _hoisted_1$r = { class: "message-item flex" };
14509
- const _hoisted_2$m = { class: "message-item-footer" };
14510
- const _hoisted_3$l = ["title"];
14511
- const _hoisted_4$g = ["href"];
14512
- const _hoisted_5$b = { class: "message-item-info-content flex-auto flex items-center justify-between" };
14513
- const _hoisted_6$a = { class: "flex message-item-body flex-1" };
14514
- const _hoisted_7$7 = ["title", "innerHTML"];
14515
- const _hoisted_8$6 = ["title"];
14516
- const _hoisted_9$4 = { class: "message-item-info flex" };
14517
- const _hoisted_10$4 = { class: "flex justify-end message-item-rightTx message-item-date" };
14518
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
14514
+ const GText = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14515
+ const _hoisted_1$s = { class: "message-item flex" };
14516
+ const _hoisted_2$n = { class: "message-item-footer" };
14517
+ const _hoisted_3$m = ["title"];
14518
+ const _hoisted_4$h = ["href"];
14519
+ const _hoisted_5$d = { class: "message-item-info-content flex-auto flex items-center justify-between" };
14520
+ const _hoisted_6$b = { class: "flex message-item-body flex-1" };
14521
+ const _hoisted_7$8 = ["title", "innerHTML"];
14522
+ const _hoisted_8$7 = ["title"];
14523
+ const _hoisted_9$5 = { class: "message-item-info flex" };
14524
+ const _hoisted_10$5 = { class: "flex justify-end message-item-rightTx message-item-date" };
14525
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
14519
14526
  __name: "index",
14520
14527
  props: {
14521
14528
  data: { default: () => ({}) },
@@ -14527,8 +14534,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
14527
14534
  const { formatTimeFromNow } = useTimeFormat();
14528
14535
  return (_ctx, _cache) => {
14529
14536
  var _a;
14530
- return openBlock(), createElementBlock("div", _hoisted_1$r, [
14531
- createElementVNode("div", _hoisted_2$m, [
14537
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
14538
+ createElementVNode("div", _hoisted_2$n, [
14532
14539
  createElementVNode("div", {
14533
14540
  class: "flex items-center",
14534
14541
  title: __props.data.nickname
@@ -14538,17 +14545,17 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
14538
14545
  target: "_blank",
14539
14546
  class: "user-info flex w-[48px] items-center linktx"
14540
14547
  }, [
14541
- createVNode(_sfc_main$E, {
14548
+ createVNode(_sfc_main$F, {
14542
14549
  name: __props.data.nickname,
14543
14550
  src: __props.data.avatar,
14544
14551
  width: 32,
14545
14552
  height: 32
14546
14553
  }, null, 8, ["name", "src"])
14547
- ], 8, _hoisted_4$g)
14548
- ], 8, _hoisted_3$l)
14554
+ ], 8, _hoisted_4$h)
14555
+ ], 8, _hoisted_3$m)
14549
14556
  ]),
14550
- createElementVNode("div", _hoisted_5$b, [
14551
- createElementVNode("div", _hoisted_6$a, [
14557
+ createElementVNode("div", _hoisted_5$d, [
14558
+ createElementVNode("div", _hoisted_6$b, [
14552
14559
  createVNode(GLink, {
14553
14560
  href: unref(transformUrl)(__props.data.url),
14554
14561
  target: "_blank",
@@ -14563,17 +14570,17 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
14563
14570
  title: __props.data.title,
14564
14571
  innerHTML: unref(xssPurify)(__props.data.title) || "",
14565
14572
  class: "overflow-hidden"
14566
- }, null, 8, _hoisted_7$7)) : (openBlock(), createElementBlock("span", {
14573
+ }, null, 8, _hoisted_7$8)) : (openBlock(), createElementBlock("span", {
14567
14574
  key: 1,
14568
14575
  title: __props.data.title
14569
- }, toDisplayString$1(__props.data.title || "-"), 9, _hoisted_8$6))
14576
+ }, toDisplayString$1(__props.data.title || "-"), 9, _hoisted_8$7))
14570
14577
  ]),
14571
14578
  _: 1
14572
14579
  })
14573
14580
  ]),
14574
14581
  _: 1
14575
14582
  }, 8, ["href", "class"]),
14576
- createElementVNode("div", _hoisted_9$4, [
14583
+ createElementVNode("div", _hoisted_9$5, [
14577
14584
  createVNode(GText, null, {
14578
14585
  default: withCtx(() => [
14579
14586
  createTextVNode(toDisplayString$1(__props.data.repo), 1)
@@ -14590,52 +14597,52 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
14590
14597
  ])
14591
14598
  ])
14592
14599
  ]),
14593
- createElementVNode("div", _hoisted_10$4, toDisplayString$1(unref(formatTimeFromNow)(__props.data.time)), 1)
14600
+ createElementVNode("div", _hoisted_10$5, toDisplayString$1(unref(formatTimeFromNow)(__props.data.time)), 1)
14594
14601
  ]);
14595
14602
  };
14596
14603
  }
14597
14604
  });
14598
- const MessageItem = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14599
- const _hoisted_1$q = { class: "message-header-nav" };
14600
- const _hoisted_2$l = {
14605
+ const MessageItem = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-vue-layout-gitcode"]]);
14606
+ const _hoisted_1$r = { class: "message-header-nav" };
14607
+ const _hoisted_2$m = {
14601
14608
  key: 0,
14602
14609
  class: "item-count-icon"
14603
14610
  };
14604
- const _hoisted_3$k = {
14611
+ const _hoisted_3$l = {
14605
14612
  key: 1,
14606
14613
  class: "g-number"
14607
14614
  };
14608
- const _hoisted_4$f = {
14615
+ const _hoisted_4$g = {
14609
14616
  key: 0,
14610
14617
  class: "g-number ml-[8px]"
14611
14618
  };
14612
- const _hoisted_5$a = { class: "message-content-cover" };
14613
- const _hoisted_6$9 = {
14619
+ const _hoisted_5$c = { class: "message-content-cover" };
14620
+ const _hoisted_6$a = {
14614
14621
  key: 0,
14615
14622
  class: "message-content-header"
14616
14623
  };
14617
- const _hoisted_7$6 = {
14624
+ const _hoisted_7$7 = {
14618
14625
  key: 0,
14619
14626
  class: "g-number"
14620
14627
  };
14621
- const _hoisted_8$5 = {
14628
+ const _hoisted_8$6 = {
14622
14629
  key: 0,
14623
14630
  class: "g-number"
14624
14631
  };
14625
- const _hoisted_9$3 = {
14632
+ const _hoisted_9$4 = {
14626
14633
  key: 2,
14627
14634
  class: "message-content-empty"
14628
14635
  };
14629
- const _hoisted_10$3 = {
14636
+ const _hoisted_10$4 = {
14630
14637
  key: 3,
14631
14638
  class: "loading-more"
14632
14639
  };
14633
- const _hoisted_11$3 = {
14640
+ const _hoisted_11$4 = {
14634
14641
  key: 4,
14635
14642
  class: "no-more"
14636
14643
  };
14637
14644
  const _hoisted_12$3 = { class: "message-footer-nav" };
14638
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
14645
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
14639
14646
  __name: "MessageBox",
14640
14647
  setup(__props, { expose: __expose }) {
14641
14648
  var _a;
@@ -14906,7 +14913,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14906
14913
  class: "message-box",
14907
14914
  onClick: _cache[5] || (_cache[5] = withModifiers(($event) => console.log("stop"), ["stop"]))
14908
14915
  }, [
14909
- createElementVNode("div", _hoisted_1$q, [
14916
+ createElementVNode("div", _hoisted_1$r, [
14910
14917
  createVNode(unref(Tabs), {
14911
14918
  modelValue: checkedId.value,
14912
14919
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checkedId.value = $event),
@@ -14922,7 +14929,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14922
14929
  createElementVNode("div", {
14923
14930
  class: normalizeClass(["message-header-nav-item", { "message-header-nav-item-active": item.messageType === checkedId.value }])
14924
14931
  }, [
14925
- item.icon ? (openBlock(), createElementBlock("div", _hoisted_2$l, [
14932
+ item.icon ? (openBlock(), createElementBlock("div", _hoisted_2$m, [
14926
14933
  createVNode(GIcon, {
14927
14934
  name: item.icon,
14928
14935
  size: "16px",
@@ -14935,7 +14942,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14935
14942
  }, null, 8, ["name"])
14936
14943
  ])) : createCommentVNode("", true),
14937
14944
  createElementVNode("span", null, toDisplayString$1(item.text), 1),
14938
- item.count > 0 ? (openBlock(), createElementBlock("span", _hoisted_3$k, toDisplayString$1(item.count), 1)) : createCommentVNode("", true)
14945
+ item.count > 0 ? (openBlock(), createElementBlock("span", _hoisted_3$l, toDisplayString$1(item.count), 1)) : createCommentVNode("", true)
14939
14946
  ], 2)
14940
14947
  ]),
14941
14948
  _: 2
@@ -14949,7 +14956,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14949
14956
  onClick: _cache[1] || (_cache[1] = ($event) => toPage("unread"))
14950
14957
  }, [
14951
14958
  createTextVNode(toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.allUnread")), 1),
14952
- msgCount.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString$1(msgCount.value), 1)) : createCommentVNode("", true)
14959
+ msgCount.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_4$g, toDisplayString$1(msgCount.value), 1)) : createCommentVNode("", true)
14953
14960
  ])
14954
14961
  ]),
14955
14962
  createElementVNode("div", {
@@ -14957,21 +14964,21 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14957
14964
  ref: scrollContainer,
14958
14965
  class: "message-content"
14959
14966
  }, [
14960
- withDirectives((openBlock(), createElementBlock("div", _hoisted_5$a, [
14961
- currentType.value === "mention" ? (openBlock(), createElementBlock("div", _hoisted_6$9, [
14967
+ withDirectives((openBlock(), createElementBlock("div", _hoisted_5$c, [
14968
+ currentType.value === "mention" ? (openBlock(), createElementBlock("div", _hoisted_6$a, [
14962
14969
  createElementVNode("div", {
14963
14970
  class: normalizeClass(["message-content-header-item mr-[8px]", { active: mentionSubTab.value === "project" }]),
14964
14971
  onClick: _cache[2] || (_cache[2] = ($event) => switchMentionSubTab("project"))
14965
14972
  }, [
14966
14973
  _cache[6] || (_cache[6] = createTextVNode(" 项目相关 ", -1)),
14967
- mentionSubTabCount.value.project > 0 ? (openBlock(), createElementBlock("span", _hoisted_7$6, toDisplayString$1(mentionSubTabCount.value.project), 1)) : createCommentVNode("", true)
14974
+ mentionSubTabCount.value.project > 0 ? (openBlock(), createElementBlock("span", _hoisted_7$7, toDisplayString$1(mentionSubTabCount.value.project), 1)) : createCommentVNode("", true)
14968
14975
  ], 2),
14969
14976
  createElementVNode("div", {
14970
14977
  class: normalizeClass(["message-content-header-item", { active: mentionSubTab.value === "discussion" }]),
14971
14978
  onClick: _cache[3] || (_cache[3] = ($event) => switchMentionSubTab("discussion"))
14972
14979
  }, [
14973
14980
  _cache[7] || (_cache[7] = createTextVNode(" 在线讨论 ", -1)),
14974
- mentionSubTabCount.value.discussion > 0 ? (openBlock(), createElementBlock("span", _hoisted_8$5, toDisplayString$1(mentionSubTabCount.value.discussion), 1)) : createCommentVNode("", true)
14981
+ mentionSubTabCount.value.discussion > 0 ? (openBlock(), createElementBlock("span", _hoisted_8$6, toDisplayString$1(mentionSubTabCount.value.discussion), 1)) : createCommentVNode("", true)
14975
14982
  ], 2)
14976
14983
  ])) : createCommentVNode("", true),
14977
14984
  listData.value.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(listData.value, (item) => {
@@ -14981,11 +14988,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
14981
14988
  data: item,
14982
14989
  onTrigger: ($event) => handleMessageRead(item)
14983
14990
  }, null, 8, ["type", "data", "onTrigger"]);
14984
- }), 128)) : (openBlock(), createElementBlock("div", _hoisted_9$3, [
14991
+ }), 128)) : (openBlock(), createElementBlock("div", _hoisted_9$4, [
14985
14992
  createElementVNode("div", null, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.noMessage")), 1)
14986
14993
  ])),
14987
- loadingMore.value ? (openBlock(), createElementBlock("div", _hoisted_10$3, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.loading")) + "... ", 1)) : createCommentVNode("", true),
14988
- !hasMore.value && listData.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_11$3, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.noMore")), 1)) : createCommentVNode("", true)
14994
+ loadingMore.value ? (openBlock(), createElementBlock("div", _hoisted_10$4, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.loading")) + "... ", 1)) : createCommentVNode("", true),
14995
+ !hasMore.value && listData.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_11$4, toDisplayString$1(unref(t2)("gitCodeLayout.notice.msg.noMore")), 1)) : createCommentVNode("", true)
14989
14996
  ])), [
14990
14997
  [_directive_loading, loading.value]
14991
14998
  ])
@@ -15000,8 +15007,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
15000
15007
  };
15001
15008
  }
15002
15009
  });
15003
- const MessageBox = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-vue-layout-gitcode"]]);
15004
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
15010
+ const MessageBox = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-vue-layout-gitcode"]]);
15011
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
15005
15012
  ...{
15006
15013
  name: "Notice"
15007
15014
  },
@@ -15070,6 +15077,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
15070
15077
  position: ["bottom-start"],
15071
15078
  "destroy-on-hide": false,
15072
15079
  trigger: "hover",
15080
+ offset: { mainAxis: 14, crossAxis: 0 },
15073
15081
  onClick: _cache[0] || (_cache[0] = withModifiers(() => {
15074
15082
  }, ["stop"])),
15075
15083
  "overlay-class": "g-user-dropdown",
@@ -15112,18 +15120,85 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
15112
15120
  };
15113
15121
  }
15114
15122
  });
15115
- const Notice = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-vue-layout-gitcode"]]);
15123
+ const Notice = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-vue-layout-gitcode"]]);
15124
+ function useCookie(key, defaultValue, options = COOKIE_OPTIONS) {
15125
+ const allCookies = api.get() || {};
15126
+ const storedValue = allCookies[key] || localStorage$2.getItem(key);
15127
+ const initialValue = storedValue || defaultValue;
15128
+ const value = ref(initialValue);
15129
+ if (!storedValue) {
15130
+ api.set(key, initialValue, options);
15131
+ }
15132
+ watch(
15133
+ value,
15134
+ (newValue) => {
15135
+ if (newValue) {
15136
+ api.set(key, newValue, options);
15137
+ localStorage$2.setItem(key, newValue);
15138
+ } else {
15139
+ api.remove(key, { domain: COOKIE_DOMAIN() });
15140
+ }
15141
+ },
15142
+ { flush: "sync" }
15143
+ // 立即同步,不等待下一个 tick
15144
+ );
15145
+ return value;
15146
+ }
15147
+ const _hoisted_1$q = { class: "tools-item-wrapper" };
15148
+ const _hoisted_2$l = { class: "tools-item-wrapper-checkbox" };
15149
+ const _hoisted_3$k = ["onClick", "title"];
15150
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
15151
+ __name: "Lang",
15152
+ setup(__props) {
15153
+ const lang = useCookie(LANG_KEY, LANG_ZH);
15154
+ const linkList = ref(LANGUAGE);
15155
+ const router2 = useRouter();
15156
+ const { t: t2 } = i18n.global;
15157
+ const handleClick = (linkItem) => {
15158
+ if (lang.value === linkItem.value) return;
15159
+ lang.value = linkItem.value;
15160
+ const isHomePage = router2.currentRoute.value.name === "home";
15161
+ if (isHomePage) {
15162
+ sessionStorage$1.setItem("page_reload", "changedLang");
15163
+ }
15164
+ window.location.reload();
15165
+ };
15166
+ return (_ctx, _cache) => {
15167
+ return openBlock(), createElementBlock("div", _hoisted_1$q, [
15168
+ createElementVNode("div", null, toDisplayString$1(unref(t2)("gitCodeLayout.common.footerSetting.lang")), 1),
15169
+ createElementVNode("div", _hoisted_2$l, [
15170
+ (openBlock(true), createElementBlock(Fragment, null, renderList(linkList.value, (item) => {
15171
+ return openBlock(), createElementBlock("div", mergeProps({
15172
+ key: item.label
15173
+ }, { ref_for: true }, item, {
15174
+ class: ["tools-item-wrapper-checkbox-item", { "checked": unref(lang) === item.value }],
15175
+ onClick: ($event) => handleClick(item),
15176
+ title: item.value
15177
+ }), [
15178
+ createVNode(GIcon, {
15179
+ name: item.icon,
15180
+ size: "16",
15181
+ color: "var(--theme-icon-fill-weak)",
15182
+ class: "checkbox-item-icon"
15183
+ }, null, 8, ["name"])
15184
+ ], 16, _hoisted_3$k);
15185
+ }), 128))
15186
+ ])
15187
+ ]);
15188
+ };
15189
+ }
15190
+ });
15116
15191
  const _hoisted_1$p = {
15117
15192
  key: 0,
15118
15193
  class: "user-level-avatar-badge"
15119
15194
  };
15120
15195
  const _hoisted_2$k = { class: "flex items-center font-medium gap-[4px]" };
15121
15196
  const _hoisted_3$j = ["src"];
15122
- const _hoisted_4$e = { class: "level-name" };
15123
- const _hoisted_5$9 = { class: "level-icon" };
15124
- const _hoisted_6$8 = ["src"];
15125
- const _hoisted_7$5 = { class: "custom-btn" };
15126
- const _hoisted_8$4 = { class: "flex items-center justify-center" };
15197
+ const _hoisted_4$f = { class: "level-name" };
15198
+ const _hoisted_5$b = { class: "level-icon" };
15199
+ const _hoisted_6$9 = ["src"];
15200
+ const _hoisted_7$6 = { class: "custom-btn" };
15201
+ const _hoisted_8$5 = { class: "flex items-center justify-center" };
15127
15202
  const maxLevel = 3;
15128
15203
  const _sfc_main$s = /* @__PURE__ */ defineComponent({
15129
15204
  ...{ name: "UserLevel" },
@@ -15183,18 +15258,18 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
15183
15258
  src: levelInfo.value.avatar,
15184
15259
  alt: ""
15185
15260
  }, null, 8, _hoisted_3$j),
15186
- createElementVNode("div", _hoisted_4$e, [
15261
+ createElementVNode("div", _hoisted_4$f, [
15187
15262
  createElementVNode("div", null, toDisplayString$1(levelInfo.value.name), 1),
15188
- createElementVNode("div", _hoisted_5$9, [
15263
+ createElementVNode("div", _hoisted_5$b, [
15189
15264
  createElementVNode("img", {
15190
15265
  src: levelInfo.value.level,
15191
15266
  alt: ""
15192
- }, null, 8, _hoisted_6$8)
15267
+ }, null, 8, _hoisted_6$9)
15193
15268
  ])
15194
15269
  ])
15195
15270
  ]),
15196
- createElementVNode("div", _hoisted_7$5, [
15197
- createElementVNode("div", _hoisted_8$4, toDisplayString$1(unref(t2)("gitCodeLayout.userSetting.tips.getPoints")), 1)
15271
+ createElementVNode("div", _hoisted_7$6, [
15272
+ createElementVNode("div", _hoisted_8$5, toDisplayString$1(unref(t2)("gitCodeLayout.userSetting.tips.getPoints")), 1)
15198
15273
  ])
15199
15274
  ], 2);
15200
15275
  };
@@ -15204,7 +15279,11 @@ const UserLevel = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-
15204
15279
  const _hoisted_1$o = { class: "g-user-drawer-info-list pl-[16px]" };
15205
15280
  const _hoisted_2$j = { class: "max-w-[200px]" };
15206
15281
  const _hoisted_3$i = ["title"];
15207
- const _hoisted_4$d = ["title"];
15282
+ const _hoisted_4$e = ["title"];
15283
+ const _hoisted_5$a = {
15284
+ key: 0,
15285
+ class: "g-user-drawer-lang-row"
15286
+ };
15208
15287
  const _sfc_main$r = /* @__PURE__ */ defineComponent({
15209
15288
  __name: "UserAvatarMenu",
15210
15289
  props: {
@@ -15213,7 +15292,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
15213
15292
  loginOutFinish: { type: Function },
15214
15293
  inAIHub: { type: Boolean },
15215
15294
  independence: { type: Boolean },
15216
- userMenus: {}
15295
+ userMenus: {},
15296
+ inEnterpriseHeader: { type: Boolean }
15217
15297
  },
15218
15298
  emits: ["link-click"],
15219
15299
  setup(__props, { emit: __emit }) {
@@ -15342,11 +15422,25 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
15342
15422
  ]
15343
15423
  ];
15344
15424
  });
15425
+ const avatarLangBlock = {
15426
+ id: "avatar-lang",
15427
+ component: markRaw(_sfc_main$t),
15428
+ avatarLangRow: true
15429
+ };
15430
+ const shouldShowEnterpriseLang = computed(
15431
+ () => {
15432
+ var _a;
15433
+ return Boolean(props.inEnterpriseHeader && !((_a = props.userMenus) == null ? void 0 : _a.length));
15434
+ }
15435
+ );
15345
15436
  const userMenuList = computed(() => {
15346
- if (props.independence) {
15347
- return hrefList.value;
15437
+ const base = props.independence ? hrefList.value : routerMenuList.value;
15438
+ if (!shouldShowEnterpriseLang.value) {
15439
+ return base;
15348
15440
  }
15349
- return routerMenuList.value;
15441
+ const next = [...base];
15442
+ next.splice(next.length - 1, 0, avatarLangBlock);
15443
+ return next;
15350
15444
  });
15351
15445
  function handleClick(item) {
15352
15446
  if (item == null ? void 0 : item.action) {
@@ -15405,7 +15499,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
15405
15499
  target: __props.isChatBot ? "_blank" : ""
15406
15500
  }, {
15407
15501
  default: withCtx(() => [
15408
- createVNode(_sfc_main$E, {
15502
+ createVNode(_sfc_main$F, {
15409
15503
  name: __props.accountInfo.nickname,
15410
15504
  src: __props.accountInfo.avatar,
15411
15505
  width: 52,
@@ -15420,7 +15514,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
15420
15514
  createElementVNode("p", {
15421
15515
  class: "g-user-drawer-info-list-id ellipsis",
15422
15516
  title: __props.accountInfo.username
15423
- }, "@" + toDisplayString$1(__props.accountInfo.username), 9, _hoisted_4$d)
15517
+ }, "@" + toDisplayString$1(__props.accountInfo.username), 9, _hoisted_4$e)
15424
15518
  ]),
15425
15519
  createVNode(GIcon, {
15426
15520
  name: "gt-line-right",
@@ -15439,9 +15533,15 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
15439
15533
  class: normalizeClass(["g-user-drawer-block", { "!pt-[0px]": index2 === 0 && __props.inAIHub }]),
15440
15534
  key: index2
15441
15535
  }, [
15442
- block.component ? (openBlock(), createBlock(resolveDynamicComponent(block.component), {
15443
- key: block.id
15444
- })) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(block, (item) => {
15536
+ block.component ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
15537
+ block.avatarLangRow ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
15538
+ (openBlock(), createBlock(resolveDynamicComponent(block.component), {
15539
+ key: block.id
15540
+ }))
15541
+ ])) : (openBlock(), createBlock(resolveDynamicComponent(block.component), {
15542
+ key: block.id
15543
+ }))
15544
+ ], 64)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(block, (item) => {
15445
15545
  return openBlock(), createBlock(OptionLink, mergeProps({
15446
15546
  key: item.id
15447
15547
  }, { ref_for: true }, item, {
@@ -15472,18 +15572,25 @@ const _hoisted_2$i = {
15472
15572
  class: "g-user-avatar__badge"
15473
15573
  };
15474
15574
  const _hoisted_3$h = { class: "g-user-avatar flex-center ml-1" };
15475
- const _hoisted_4$c = {
15575
+ const _hoisted_4$d = {
15476
15576
  key: 0,
15477
15577
  class: "g-user-avatar__badge"
15478
15578
  };
15479
- const _hoisted_5$8 = { class: "g-user-drawer" };
15480
- const _hoisted_6$7 = { class: "p-[16px] pt-[8px] pb-0 flex justify-end items-center h-[48px]" };
15579
+ const _hoisted_5$9 = { class: "g-user-drawer" };
15580
+ const _hoisted_6$8 = { class: "p-[16px] pt-[8px] pb-0 flex justify-end items-center h-[48px]" };
15481
15581
  const _sfc_main$q = /* @__PURE__ */ defineComponent({
15482
15582
  ...{
15483
15583
  name: "UserAvatar"
15484
15584
  },
15485
15585
  __name: "UserAvatar",
15486
- props: ["isChatBot", "loginOutFinish", "inAIHub", "independence", "userMenus"],
15586
+ props: {
15587
+ isChatBot: { type: Boolean, default: false },
15588
+ loginOutFinish: { type: Function, default: void 0 },
15589
+ inAIHub: { type: Boolean, default: false },
15590
+ independence: { type: Boolean, default: false },
15591
+ userMenus: { default: () => [] },
15592
+ inEnterpriseHeader: { type: Boolean, default: false }
15593
+ },
15487
15594
  setup(__props) {
15488
15595
  const { isMobile } = usePageResize();
15489
15596
  const drawerVisible = ref(false);
@@ -15611,7 +15718,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
15611
15718
  onClick: _cache[0] || (_cache[0] = ($event) => drawerVisible.value = true)
15612
15719
  }, [
15613
15720
  createElementVNode("div", _hoisted_1$n, [
15614
- createVNode(_sfc_main$E, {
15721
+ createVNode(_sfc_main$F, {
15615
15722
  name: accountInfo.value.nickname,
15616
15723
  src: unref(transformUrl)(accountInfo.value.avatar)
15617
15724
  }, null, 8, ["name", "src"]),
@@ -15628,7 +15735,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
15628
15735
  onToggle: handleToggle
15629
15736
  }, {
15630
15737
  menu: withCtx(() => [
15631
- createElementVNode("div", _hoisted_5$8, [
15738
+ createElementVNode("div", _hoisted_5$9, [
15632
15739
  createVNode(UserAvatarMenu, {
15633
15740
  independence: __props.independence,
15634
15741
  loginOutFinish: __props.loginOutFinish,
@@ -15636,17 +15743,18 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
15636
15743
  isChatBot: __props.isChatBot,
15637
15744
  inAIHub: __props.inAIHub,
15638
15745
  userMenus: __props.userMenus,
15746
+ inEnterpriseHeader: __props.inEnterpriseHeader,
15639
15747
  onLinkClick: resetOverflow
15640
- }, null, 8, ["independence", "loginOutFinish", "accountInfo", "isChatBot", "inAIHub", "userMenus"])
15748
+ }, null, 8, ["independence", "loginOutFinish", "accountInfo", "isChatBot", "inAIHub", "userMenus", "inEnterpriseHeader"])
15641
15749
  ])
15642
15750
  ]),
15643
15751
  default: withCtx(() => [
15644
15752
  createElementVNode("div", _hoisted_3$h, [
15645
- createVNode(_sfc_main$E, {
15753
+ createVNode(_sfc_main$F, {
15646
15754
  name: accountInfo.value.nickname,
15647
15755
  src: unref(transformUrl)(accountInfo.value.avatar)
15648
15756
  }, null, 8, ["name", "src"]),
15649
- accountInfo.value.need_tips && !haveVisited.value ? (openBlock(), createElementBlock("div", _hoisted_4$c, [..._cache[5] || (_cache[5] = [
15757
+ accountInfo.value.need_tips && !haveVisited.value ? (openBlock(), createElementBlock("div", _hoisted_4$d, [..._cache[5] || (_cache[5] = [
15650
15758
  createElementVNode("div", null, null, -1)
15651
15759
  ])])) : createCommentVNode("", true)
15652
15760
  ])
@@ -15662,7 +15770,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
15662
15770
  }, {
15663
15771
  default: withCtx(() => [
15664
15772
  createElementVNode("div", null, [
15665
- createElementVNode("div", _hoisted_6$7, [
15773
+ createElementVNode("div", _hoisted_6$8, [
15666
15774
  createVNode(unref(Button), {
15667
15775
  class: "cursor-pointer draw-side-bar-close",
15668
15776
  icon: "close",
@@ -15677,9 +15785,10 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
15677
15785
  isChatBot: __props.isChatBot,
15678
15786
  inAIHub: __props.inAIHub,
15679
15787
  userMenus: __props.userMenus,
15788
+ inEnterpriseHeader: __props.inEnterpriseHeader,
15680
15789
  onClick: _cache[2] || (_cache[2] = ($event) => drawerVisible.value = false),
15681
15790
  onLinkClick: resetOverflow
15682
- }, null, 8, ["independence", "loginOutFinish", "accountInfo", "isChatBot", "inAIHub", "userMenus"])
15791
+ }, null, 8, ["independence", "loginOutFinish", "accountInfo", "isChatBot", "inAIHub", "userMenus", "inEnterpriseHeader"])
15683
15792
  ])
15684
15793
  ]),
15685
15794
  _: 1
@@ -15780,9 +15889,9 @@ const setlocalVistHistory = (data, localType) => {
15780
15889
  const _hoisted_1$m = { class: "g-header-search-prefix" };
15781
15890
  const _hoisted_2$h = ["innerHTML"];
15782
15891
  const _hoisted_3$g = { class: "g-header-search-suffix-splitline" };
15783
- const _hoisted_4$b = { class: "g-header-search-suffix-suffixIcon" };
15784
- const _hoisted_5$7 = { class: "history-list" };
15785
- const _hoisted_6$6 = {
15892
+ const _hoisted_4$c = { class: "g-header-search-suffix-suffixIcon" };
15893
+ const _hoisted_5$8 = { class: "history-list" };
15894
+ const _hoisted_6$7 = {
15786
15895
  key: 1,
15787
15896
  class: "aireposearch flex-1"
15788
15897
  };
@@ -15797,13 +15906,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
15797
15906
  var _a;
15798
15907
  const layoutConfig2 = useLayoutConfig();
15799
15908
  const { t: $t } = i18n.global;
15800
- const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-WQ-yhwd9.js"));
15801
- const UserSearch = defineAsyncComponent(() => import("./UserSearch-DSPqr3C3.js"));
15802
- const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-Culg1crd.js"));
15803
- const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-BSZrf2yu.js"));
15804
- const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-zokWYoeW.js"));
15805
- const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-D8ry9GQ1.js"));
15806
- const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-BuD0HbMu.js"));
15909
+ const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-D19VOmR7.js"));
15910
+ const UserSearch = defineAsyncComponent(() => import("./UserSearch-apL230OG.js"));
15911
+ const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-CMhbibC7.js"));
15912
+ const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-j6-2U9aS.js"));
15913
+ const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-DJZXU0oU.js"));
15914
+ const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-C0OBu6qo.js"));
15915
+ const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-uiIWyrlk.js"));
15807
15916
  const props = __props;
15808
15917
  const repoInfo = inject("repoInfo");
15809
15918
  const orgInfo = inject("orgInfo");
@@ -16283,7 +16392,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
16283
16392
  }, {
16284
16393
  menu: withCtx(() => [
16285
16394
  createElementVNode("div", null, [
16286
- withDirectives(createElementVNode("div", _hoisted_5$7, [
16395
+ withDirectives(createElementVNode("div", _hoisted_5$8, [
16287
16396
  createVNode(unref(SearchScopeList), {
16288
16397
  searchScopeList: searchScopeList.value,
16289
16398
  searchStr: searchStr.value,
@@ -16412,7 +16521,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
16412
16521
  withDirectives(createElementVNode("span", _hoisted_3$g, "|", 512), [
16413
16522
  [vShow, searchStr.value]
16414
16523
  ]),
16415
- createElementVNode("div", _hoisted_4$b, [
16524
+ createElementVNode("div", _hoisted_4$c, [
16416
16525
  createVNode(GIcon, {
16417
16526
  name: "search",
16418
16527
  class: "g-header-search-icon",
@@ -16430,7 +16539,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
16430
16539
  _: 3
16431
16540
  }, 8, ["overlay-class", "visible"])
16432
16541
  ], 2)) : createCommentVNode("", true),
16433
- __props.inAIHub ? (openBlock(), createElementBlock("div", _hoisted_6$6, [
16542
+ __props.inAIHub ? (openBlock(), createElementBlock("div", _hoisted_6$7, [
16434
16543
  createVNode(unref(Input), {
16435
16544
  placeholder: unref($t)("gitCodeLayout.home.searchPlaceholder"),
16436
16545
  onKeydown: withKeys(searchResult, ["enter"]),
@@ -16454,10 +16563,10 @@ const Search = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-v
16454
16563
  const _hoisted_1$l = { class: "announce-mobile-top" };
16455
16564
  const _hoisted_2$g = { class: "announce-mobile-bottom" };
16456
16565
  const _hoisted_3$f = ["href"];
16457
- const _hoisted_4$a = { class: "announce-content" };
16458
- const _hoisted_5$6 = { class: "text-left" };
16459
- const _hoisted_6$5 = ["href"];
16460
- const _hoisted_7$4 = { class: "announce-handle-wrapper" };
16566
+ const _hoisted_4$b = { class: "announce-content" };
16567
+ const _hoisted_5$7 = { class: "text-left" };
16568
+ const _hoisted_6$6 = ["href"];
16569
+ const _hoisted_7$5 = { class: "announce-handle-wrapper" };
16461
16570
  const ANNOUNCE_STATUS_KEY = "site_announcement_status";
16462
16571
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
16463
16572
  ...{ name: "SiteAnnouncement" },
@@ -16528,8 +16637,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
16528
16637
  }, toDisplayString$1(unref(t2)("gitCodeLayout.home.migrationAnnounce.close")), 1)
16529
16638
  ])
16530
16639
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
16531
- createElementVNode("div", _hoisted_4$a, [
16532
- createElementVNode("div", _hoisted_5$6, [
16640
+ createElementVNode("div", _hoisted_4$b, [
16641
+ createElementVNode("div", _hoisted_5$7, [
16533
16642
  createVNode(GIcon, {
16534
16643
  name: "gt-plane-warningCircular-blue",
16535
16644
  size: "16",
@@ -16539,10 +16648,10 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
16539
16648
  createElementVNode("a", {
16540
16649
  class: "announce-detail",
16541
16650
  href: migrationAnnounceUrl.value
16542
- }, toDisplayString$1(unref(t2)("gitCodeLayout.home.migrationAnnounce.viewDetail")), 9, _hoisted_6$5)
16651
+ }, toDisplayString$1(unref(t2)("gitCodeLayout.home.migrationAnnounce.viewDetail")), 9, _hoisted_6$6)
16543
16652
  ])
16544
16653
  ]),
16545
- createElementVNode("div", _hoisted_7$4, [
16654
+ createElementVNode("div", _hoisted_7$5, [
16546
16655
  createElementVNode("span", {
16547
16656
  class: "announce-handle",
16548
16657
  onClick: _cache[1] || (_cache[1] = ($event) => handleClose())
@@ -16577,7 +16686,7 @@ const autoAvokeLogin = ({ isLogin, loginFunc, openHarmonyGuide, loginSuccess, lo
16577
16686
  loginFunc({ type: "login", triggerType: "", loginTriggerSource: "router_login_auth", ...loginFuncOpts }, loginSuccess, openHarmonyGuide);
16578
16687
  }
16579
16688
  };
16580
- const NoticeModal = defineAsyncComponent(() => import("./notice-D5tJXygv.js"));
16689
+ const NoticeModal = defineAsyncComponent(() => import("./notice-Cn9W9Ucj.js"));
16581
16690
  function clearNotice() {
16582
16691
  if (localStorage$2.getItem("validator_email")) {
16583
16692
  localStorage$2.removeItem("validator_email");
@@ -16610,14 +16719,14 @@ const _hoisted_3$e = {
16610
16719
  key: 1,
16611
16720
  class: "search-avatar flex-1 flex items-center justify-center"
16612
16721
  };
16613
- const _hoisted_4$9 = { class: "flex items-center gap-[8px]" };
16614
- const _hoisted_5$5 = {
16722
+ const _hoisted_4$a = { class: "flex items-center gap-[8px]" };
16723
+ const _hoisted_5$6 = {
16615
16724
  key: 1,
16616
16725
  class: "g-header-body"
16617
16726
  };
16618
- const _hoisted_6$4 = { class: "g-header-body-left h-full" };
16619
- const _hoisted_7$3 = { class: "g-header-body-right h-full" };
16620
- const _hoisted_8$3 = { key: 2 };
16727
+ const _hoisted_6$5 = { class: "g-header-body-left h-full" };
16728
+ const _hoisted_7$4 = { class: "g-header-body-right h-full" };
16729
+ const _hoisted_8$4 = { key: 2 };
16621
16730
  const _sfc_main$n = /* @__PURE__ */ defineComponent({
16622
16731
  ...{
16623
16732
  name: "GitCodeHeader"
@@ -17106,7 +17215,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
17106
17215
  createElementVNode("div", {
17107
17216
  class: normalizeClass(["g-toolbar-right gap-[16px] flex-[1] justify-end max-md:gap-[12px] allow-click-stop", inAIHub.value ? "flex-none" : ""])
17108
17217
  }, [
17109
- createElementVNode("div", _hoisted_4$9, [
17218
+ createElementVNode("div", _hoisted_4$a, [
17110
17219
  createVNode(ClaimPower, { config: claimPowerConfig.value }, null, 8, ["config"]),
17111
17220
  isModuleVisible(unref(HeaderDisplayItem).OPERATION_ENTRY) ? (openBlock(), createBlock(OperationEntry, { key: 0 })) : createCommentVNode("", true)
17112
17221
  ]),
@@ -17162,17 +17271,17 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
17162
17271
  ])), [
17163
17272
  [unref(vElementExposure), { trigger: (type) => handleToolbarExpo() }]
17164
17273
  ]),
17165
- _ctx.$slots.info || _ctx.$slots.menu || _ctx.$slots.bodyHeader ? (openBlock(), createElementBlock("div", _hoisted_5$5, [
17274
+ _ctx.$slots.info || _ctx.$slots.menu || _ctx.$slots.bodyHeader ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
17166
17275
  renderSlot(_ctx.$slots, "bodyHeader", {}, () => [
17167
- createElementVNode("div", _hoisted_6$4, [
17276
+ createElementVNode("div", _hoisted_6$5, [
17168
17277
  renderSlot(_ctx.$slots, "info", {}, void 0, true)
17169
17278
  ]),
17170
- createElementVNode("div", _hoisted_7$3, [
17279
+ createElementVNode("div", _hoisted_7$4, [
17171
17280
  renderSlot(_ctx.$slots, "menu", {}, void 0, true)
17172
17281
  ])
17173
17282
  ], true)
17174
17283
  ])) : createCommentVNode("", true),
17175
- _ctx.$slots.headerBottom ? (openBlock(), createElementBlock("div", _hoisted_8$3, [
17284
+ _ctx.$slots.headerBottom ? (openBlock(), createElementBlock("div", _hoisted_8$4, [
17176
17285
  renderSlot(_ctx.$slots, "headerBottom", {}, void 0, true)
17177
17286
  ])) : createCommentVNode("", true)
17178
17287
  ], 6)
@@ -17181,84 +17290,449 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
17181
17290
  }
17182
17291
  });
17183
17292
  const GitCodeHeader = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-vue-layout-gitcode"]]);
17184
- const layoutConfig$1 = useLayoutConfig();
17185
- const useConfigSide = (request, sceneValue) => {
17186
- const API = asideRequest(request);
17187
- const route = useRoute();
17188
- const sideLoading = ref(false);
17189
- const isEn = computed(() => {
17190
- return getLocaleLang() === LANG_EN;
17191
- });
17192
- const showBgColor = computed(() => {
17193
- return route.meta.showBgColor || false;
17194
- });
17195
- const area = ref([]);
17196
- const assetMenus = computed(() => {
17197
- return [
17198
- {
17199
- left_menu_name_cn: "首页",
17200
- left_menu_name_cn_shrink: "首页",
17201
- left_menu_name_en: "Home",
17202
- left_menu_name_en_shrink: "Home",
17203
- area: 1,
17204
- display_order: 1,
17205
- jump_type: 1,
17206
- is_open_new_tab: false,
17207
- isIcon: true,
17208
- left_menu_logo: "gt-line-home-2",
17209
- left_menu_logo_black: "gt-line-home-2",
17210
- left_menu_logo_hover: "gt-plane-home-2",
17211
- left_menu_logo_hover_black: "gt-plane-home-2",
17212
- search_type: 1,
17213
- left_menu_url: "/",
17214
- id: 0
17293
+ const _hoisted_1$j = { class: "g-toolbar w-full overflow-hidden allow-click-stop" };
17294
+ const _hoisted_2$e = { class: "g-toolbar-left items-center allow-click-stop flex-[1] min-w-0" };
17295
+ const _hoisted_3$d = { class: "g-toolbar-custom" };
17296
+ const _hoisted_4$9 = { class: "text-sm font-bold" };
17297
+ const _hoisted_5$5 = { class: "text-[var(--theme-placeholder)] text-[12px]" };
17298
+ const _hoisted_6$4 = { class: "search-avatar flex-1 flex items-center justify-center" };
17299
+ const _hoisted_7$3 = { class: "g-toolbar-right gap-[16px] flex-[1] justify-end max-md:gap-[12px] allow-click-stop" };
17300
+ const _hoisted_8$3 = {
17301
+ key: 0,
17302
+ class: "g-header-body"
17303
+ };
17304
+ const _hoisted_9$3 = { class: "g-header-body-left h-full" };
17305
+ const _hoisted_10$3 = { class: "g-header-body-right h-full" };
17306
+ const _hoisted_11$3 = { key: 1 };
17307
+ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17308
+ ...{
17309
+ name: "EnterpriseHeader"
17310
+ },
17311
+ __name: "EnterpriseHeader",
17312
+ props: {
17313
+ isLogin: { type: Boolean, default: false },
17314
+ request: { type: Function, default: proxyService },
17315
+ globalStore: { default: () => ({
17316
+ httpStatus: 200
17317
+ }) },
17318
+ loginSuccess: {},
17319
+ enterpriseInfo: { default: () => ({
17320
+ avatar: "",
17321
+ name: ""
17322
+ }) },
17323
+ loginOutFinish: {},
17324
+ orgInfo: { default: () => ({
17325
+ avatar: "",
17326
+ name: ""
17327
+ }) },
17328
+ userInfo: { default: () => ({}) },
17329
+ headerFunctions: {},
17330
+ openHarmonyGuide: { type: Boolean },
17331
+ headerBorder: { type: Boolean, default: false },
17332
+ independence: { type: Boolean, default: false },
17333
+ userMenus: {},
17334
+ loginChildComponents: {}
17335
+ },
17336
+ emits: ["followDevCommunity", "followUser", "resetPwdDirectlySuccess"],
17337
+ setup(__props, { emit: __emit }) {
17338
+ var _a;
17339
+ const route = useRoute();
17340
+ const props = __props;
17341
+ const emit = __emit;
17342
+ const { useReport: useReport2 } = useRequestReport(props.request, props.globalStore);
17343
+ provide("request", props.request);
17344
+ provide(
17345
+ "globalStore",
17346
+ computed(() => props.globalStore)
17347
+ );
17348
+ provide(
17349
+ "orgInfo",
17350
+ computed(() => props.orgInfo)
17351
+ );
17352
+ provide(
17353
+ "enterpriseInfo",
17354
+ computed(() => props.enterpriseInfo)
17355
+ );
17356
+ provide(
17357
+ "userInfo",
17358
+ computed(() => props.userInfo)
17359
+ );
17360
+ provide("useReport", useReport2);
17361
+ provide(
17362
+ "isLogin",
17363
+ computed(() => props.isLogin)
17364
+ );
17365
+ const visibleItems = computed(() => {
17366
+ if (props.headerFunctions && props.headerFunctions.length > 0) {
17367
+ return props.headerFunctions;
17215
17368
  }
17216
- ];
17217
- });
17218
- const judgeIsShowAssetMenus = (data) => {
17219
- return data.filter((item) => {
17220
- if (item.area === 1) {
17221
- if (item.select_scene && item.select_scene.length > 0) {
17222
- return item.select_scene.includes(sceneValue);
17369
+ const usualItems = [
17370
+ HeaderDisplayItem.LOGIN_AND_AVATAR,
17371
+ HeaderDisplayItem.MESSAGE_CENTER,
17372
+ HeaderDisplayItem.NEW_BUTTON,
17373
+ HeaderDisplayItem.SEARCH_BUTTON,
17374
+ HeaderDisplayItem.ASIDE_BUTTON,
17375
+ HeaderDisplayItem.OPERATION_ENTRY
17376
+ ];
17377
+ return [...usualItems, HeaderDisplayItem.CUSTOM_CONTENT];
17378
+ });
17379
+ const isModuleVisible = (auth) => {
17380
+ return visibleItems.value.includes(auth);
17381
+ };
17382
+ const { isMobile } = usePageResize();
17383
+ const { widthType } = usePageResize();
17384
+ const headerRef = ref(null);
17385
+ const { height } = useElementSize(headerRef);
17386
+ const { setHeaderHeight } = useHeaderHeight();
17387
+ watch(
17388
+ height,
17389
+ (newHeight) => {
17390
+ if (newHeight) {
17391
+ setHeaderHeight(newHeight);
17223
17392
  }
17224
- return true;
17225
- }
17226
- return false;
17227
- }).length === 0;
17228
- };
17229
- const groupByArea = (data) => {
17230
- const sortedData = [...data].sort((a, b) => a.area - b.area);
17231
- const grouped = {};
17232
- sortedData.forEach((item) => {
17233
- if (!grouped[item.area]) {
17234
- grouped[item.area] = [];
17393
+ },
17394
+ { immediate: true }
17395
+ );
17396
+ const headerClassName = computed(() => {
17397
+ var _a2, _b;
17398
+ if ((_a2 = route == null ? void 0 : route.meta) == null ? void 0 : _a2.headerClassName) {
17399
+ return (_b = route == null ? void 0 : route.meta) == null ? void 0 : _b.headerClassName;
17235
17400
  }
17236
- grouped[item.area].push(item);
17401
+ return "";
17237
17402
  });
17238
- return Object.values(grouped);
17239
- };
17240
- const fetchArea = async () => {
17241
- var _a, _b;
17242
- sideLoading.value = true;
17243
- const res = await API.getAsideConfig();
17244
- let asideList = (((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || []).map((item) => {
17245
- let processedUrl = item.left_menu_url;
17246
- if (processedUrl == null ? void 0 : processedUrl.startsWith("https://competition.")) {
17247
- const competitionUrl = replaceHost({ url: processedUrl, customHost: transformUrl(layoutConfig$1.VITE_COMPETITION_HOST) });
17248
- processedUrl = competitionUrl.includes("atomgit") ? competitionUrl.replace("competition", "competitions") : competitionUrl;
17249
- } else if (processedUrl == null ? void 0 : processedUrl.startsWith("https://ai.")) {
17250
- processedUrl = replaceHost({ url: processedUrl, customHost: transformUrl(layoutConfig$1.VITE_AI_HOST) });
17251
- } else {
17252
- processedUrl = transformUrl(processedUrl);
17403
+ if (!((_a = route == null ? void 0 : route.meta) == null ? void 0 : _a.hiddenThemeSetting)) {
17404
+ theme.initAutoTheme();
17405
+ }
17406
+ const showHeaderShadow = ref(false);
17407
+ window.addEventListener("scroll", function() {
17408
+ if (window.scrollY > 1 && !showHeaderShadow.value) {
17409
+ showHeaderShadow.value = true;
17410
+ }
17411
+ if (window.scrollY < 1 && showHeaderShadow.value) {
17412
+ showHeaderShadow.value = false;
17253
17413
  }
17254
- return {
17255
- ...item,
17256
- left_menu_url: processedUrl,
17257
- left_menu_logo: transformUrl(item.left_menu_logo),
17258
- left_menu_logo_black: transformUrl(item.left_menu_logo_black),
17259
- left_menu_logo_hover: transformUrl(item.left_menu_logo_hover),
17260
- left_menu_logo_hover_black: transformUrl(item.left_menu_logo_hover_black)
17261
- };
17414
+ });
17415
+ const handleLogin = (type) => {
17416
+ const reportLoginString = handleReportParamsByDomain("toolbar_login");
17417
+ emitEvent("login", {
17418
+ type,
17419
+ triggerType: "主动注册",
17420
+ loginTriggerSource: type === "login" ? reportLoginString : ""
17421
+ });
17422
+ if (type === "register") {
17423
+ const reportRegisterString = handleReportParamsByDomain("toolbar_register");
17424
+ sessionStorage$1.setItem(REGISTER_SOURCE_TAB, reportRegisterString);
17425
+ sessionStorage$1.removeItem(LOGIN_MODAL_TRIGGER_SOURCE);
17426
+ }
17427
+ localStorage$2.setItem("sign_path", (window == null ? void 0 : window.location.href) || "");
17428
+ };
17429
+ const { notice } = useNotification();
17430
+ const status = ref(false);
17431
+ const { login, isMounted } = useLogin(props.request, props.globalStore);
17432
+ const { t: t2 } = i18n.global;
17433
+ const toNotice = () => {
17434
+ if (localStorage$2.getItem("validator_email") === "invalid") {
17435
+ notice();
17436
+ }
17437
+ };
17438
+ const handleToolbarExpo = (_type) => {
17439
+ useReport2(REPO_EVENT.SHOW, { module_name: ASIDE_MENU_REPO.TOOLBAREXPO });
17440
+ };
17441
+ const handleThemeChange = () => {
17442
+ setTheme(currentTheme.value === ThemeType.WHITE ? ThemeType.BLACK : ThemeType.WHITE);
17443
+ };
17444
+ const layoutConfig2 = useLayoutConfig();
17445
+ const handleNewRepo = () => {
17446
+ window.open(`${layoutConfig2.VITE_HOST}/create?position=nav_top`, "_blank");
17447
+ };
17448
+ const loginDataFormat = (options) => {
17449
+ return {
17450
+ ...options || {},
17451
+ childComponents: props == null ? void 0 : props.loginChildComponents
17452
+ };
17453
+ };
17454
+ onMounted(() => {
17455
+ toNotice();
17456
+ nextTick(() => {
17457
+ autoAvokeLogin({
17458
+ isLogin: props.isLogin,
17459
+ loginFunc: login,
17460
+ loginFuncOpts: { childComponents: props == null ? void 0 : props.loginChildComponents },
17461
+ openHarmonyGuide: props.openHarmonyGuide,
17462
+ loginSuccess: props.loginSuccess
17463
+ });
17464
+ });
17465
+ addEventListener("logout", (options) => {
17466
+ const token = localStorage$2.getItem("access_token");
17467
+ if (!status.value) {
17468
+ status.value = true;
17469
+ if (isMounted()) {
17470
+ setTimeout(() => {
17471
+ status.value = false;
17472
+ }, 2e3);
17473
+ } else {
17474
+ NotificationService.open({
17475
+ type: "success",
17476
+ title: t2("gitCodeLayout.common.tips.notcieTitle"),
17477
+ content: token ? t2("gitCodeLayout.common.tips.notcie1") : t2("gitCodeLayout.common.tips.notcie2"),
17478
+ onClose: () => {
17479
+ status.value = false;
17480
+ }
17481
+ });
17482
+ }
17483
+ props.loginOutFinish && props.loginOutFinish();
17484
+ const data = typeof options === "boolean" ? { Authorization: options } : options;
17485
+ const newOptions = loginDataFormat(data);
17486
+ login(newOptions, props.loginSuccess, props.openHarmonyGuide);
17487
+ }
17488
+ });
17489
+ addEventListener("login", (options) => {
17490
+ console.log("唤起Login");
17491
+ const newOptions = loginDataFormat(options);
17492
+ login(newOptions, props.loginSuccess, props.openHarmonyGuide);
17493
+ });
17494
+ addEventListener("updateUserInfo", (options) => {
17495
+ props.loginSuccess(options);
17496
+ });
17497
+ addEventListener("notice", toNotice);
17498
+ addEventListener("resetPwdDirectlySuccess", () => {
17499
+ emit("resetPwdDirectlySuccess");
17500
+ });
17501
+ window.addEventListener("message", (event) => {
17502
+ var _a2, _b;
17503
+ const action = HandleParentWindowGetLoginInfo(props.request);
17504
+ if ([AuthResType.SUCCESS, AuthResType.FAIL].includes((_a2 = event.data) == null ? void 0 : _a2.type)) {
17505
+ action[(_b = event.data) == null ? void 0 : _b.type](event);
17506
+ }
17507
+ });
17508
+ });
17509
+ onBeforeUnmount(() => {
17510
+ offEvent("notice");
17511
+ offEvent("updateUserInfo");
17512
+ offEvent("login");
17513
+ offEvent("logout");
17514
+ offEvent("resetPwdDirectlySuccess");
17515
+ });
17516
+ return (_ctx, _cache) => {
17517
+ var _a2, _b, _c;
17518
+ return openBlock(), createElementBlock("div", {
17519
+ class: "gitcode-header-wrapper w-full",
17520
+ style: normalizeStyle({ height: `${unref(height)}px` })
17521
+ }, [
17522
+ createElementVNode("div", {
17523
+ ref_key: "headerRef",
17524
+ ref: headerRef,
17525
+ class: normalizeClass(["g-header allow-click-stop fixed z-[21] bg-[var(--theme-default-bg)]", [showHeaderShadow.value ? "head-shadow" : "", __props.headerBorder ? "oldBorder" : "", headerClassName.value]])
17526
+ }, [
17527
+ createVNode(SiteAnnouncement),
17528
+ withDirectives((openBlock(), createElementBlock("div", _hoisted_1$j, [
17529
+ createElementVNode("div", _hoisted_2$e, [
17530
+ createElementVNode("div", _hoisted_3$d, [
17531
+ createVNode(_sfc_main$F, {
17532
+ src: (_a2 = __props.enterpriseInfo) == null ? void 0 : _a2.avatar,
17533
+ name: (_b = __props.enterpriseInfo) == null ? void 0 : _b.name,
17534
+ isRound: false,
17535
+ width: 32,
17536
+ height: 32,
17537
+ class: "enterprise-avatar"
17538
+ }, null, 8, ["src", "name"]),
17539
+ createElementVNode("span", _hoisted_4$9, toDisplayString$1((_c = __props.enterpriseInfo) == null ? void 0 : _c.name), 1),
17540
+ createElementVNode("span", _hoisted_5$5, toDisplayString$1(unref(t2)("gitCodeLayout.header.enterpriseFlag")), 1)
17541
+ ])
17542
+ ]),
17543
+ createElementVNode("div", _hoisted_6$4, [
17544
+ isModuleVisible(unref(HeaderDisplayItem).SEARCH_BUTTON) ? renderSlot(_ctx.$slots, "search", { key: 0 }, () => [
17545
+ (openBlock(), createBlock(Search, {
17546
+ inAIHub: false,
17547
+ key: _ctx.$route.fullPath,
17548
+ sceneValue: unref(SceneValue).home,
17549
+ isShowStickyNotice: false
17550
+ }, {
17551
+ searchRecommend: withCtx(() => [
17552
+ renderSlot(_ctx.$slots, "searchRecommend", {}, void 0, true)
17553
+ ]),
17554
+ globalSearch: withCtx(({ searchStr, searchMore }) => [
17555
+ renderSlot(_ctx.$slots, "globalSearch", normalizeProps(guardReactiveProps({ searchStr, searchMore })), void 0, true)
17556
+ ]),
17557
+ _: 3
17558
+ }, 8, ["sceneValue"]))
17559
+ ], true) : createCommentVNode("", true)
17560
+ ]),
17561
+ createElementVNode("div", _hoisted_7$3, [
17562
+ !__props.isLogin ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
17563
+ isModuleVisible(unref(HeaderDisplayItem).LOGIN_AND_AVATAR) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
17564
+ unref(isMobile) ? (openBlock(), createElementBlock("section", {
17565
+ key: 0,
17566
+ class: "app-login-warp border-none login-icon",
17567
+ onClick: _cache[0] || (_cache[0] = ($event) => handleLogin("login"))
17568
+ }, [
17569
+ createVNode(GIcon, {
17570
+ name: "gt-line-NotLoggedIn",
17571
+ size: "24px",
17572
+ color: "var(--devui-aide-text)"
17573
+ })
17574
+ ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
17575
+ createVNode(unref(Button), {
17576
+ variant: "solid",
17577
+ color: "primary",
17578
+ onClick: _cache[1] || (_cache[1] = withModifiers(($event) => handleLogin("login"), ["stop"]))
17579
+ }, {
17580
+ default: withCtx(() => [
17581
+ createTextVNode(toDisplayString$1(unref(t2)("gitCodeLayout.header.login")), 1)
17582
+ ]),
17583
+ _: 1
17584
+ }),
17585
+ createVNode(unref(Button), {
17586
+ onClick: _cache[2] || (_cache[2] = withModifiers(($event) => handleLogin("register"), ["stop"])),
17587
+ class: "min-w-[64px]"
17588
+ }, {
17589
+ default: withCtx(() => [
17590
+ createTextVNode(toDisplayString$1(unref(t2)("gitCodeLayout.header.register")), 1)
17591
+ ]),
17592
+ _: 1
17593
+ })
17594
+ ], 64))
17595
+ ], 64)) : createCommentVNode("", true)
17596
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
17597
+ !["sm"].includes(unref(widthType)) && isModuleVisible(unref(HeaderDisplayItem).NEW_BUTTON) ? (openBlock(), createBlock(unref(Button), {
17598
+ key: 0,
17599
+ class: "border-none btn-add",
17600
+ variant: "solid",
17601
+ onClick: handleNewRepo
17602
+ }, {
17603
+ default: withCtx(() => [
17604
+ createVNode(GIcon, {
17605
+ name: "gt-add",
17606
+ color: "var(--theme-light-text)",
17607
+ class: "mr-1"
17608
+ }),
17609
+ createTextVNode(toDisplayString$1(unref(t2)("gitCodeLayout.header.createRepo_01")), 1)
17610
+ ]),
17611
+ _: 1
17612
+ })) : createCommentVNode("", true),
17613
+ isModuleVisible(unref(HeaderDisplayItem).MESSAGE_CENTER) ? (openBlock(), createBlock(Notice, { key: 1 })) : createCommentVNode("", true),
17614
+ createVNode(GIcon, {
17615
+ name: "gt-line-help",
17616
+ size: "16px",
17617
+ class: "cursor-pointer"
17618
+ }),
17619
+ createVNode(GIcon, {
17620
+ name: unref(isWhiteTheme)() ? "gt-line-light" : "gt-line-dark",
17621
+ size: "16px",
17622
+ onClick: handleThemeChange,
17623
+ class: "cursor-pointer"
17624
+ }, null, 8, ["name"]),
17625
+ isModuleVisible(unref(HeaderDisplayItem).LOGIN_AND_AVATAR) ? (openBlock(), createBlock(UserAvatar, {
17626
+ key: 2,
17627
+ isChatBot: false,
17628
+ loginOutFinish: __props.loginOutFinish,
17629
+ inAIHub: false,
17630
+ independence: __props.independence,
17631
+ userMenus: __props.userMenus,
17632
+ inEnterpriseHeader: true
17633
+ }, null, 8, ["loginOutFinish", "independence", "userMenus"])) : createCommentVNode("", true)
17634
+ ], 64))
17635
+ ])
17636
+ ])), [
17637
+ [unref(vElementExposure), { trigger: (type) => handleToolbarExpo() }]
17638
+ ]),
17639
+ _ctx.$slots.info || _ctx.$slots.menu || _ctx.$slots.bodyHeader ? (openBlock(), createElementBlock("div", _hoisted_8$3, [
17640
+ renderSlot(_ctx.$slots, "bodyHeader", {}, () => [
17641
+ createElementVNode("div", _hoisted_9$3, [
17642
+ renderSlot(_ctx.$slots, "info", {}, void 0, true)
17643
+ ]),
17644
+ createElementVNode("div", _hoisted_10$3, [
17645
+ renderSlot(_ctx.$slots, "menu", {}, void 0, true)
17646
+ ])
17647
+ ], true)
17648
+ ])) : createCommentVNode("", true),
17649
+ _ctx.$slots.headerBottom ? (openBlock(), createElementBlock("div", _hoisted_11$3, [
17650
+ renderSlot(_ctx.$slots, "headerBottom", {}, void 0, true)
17651
+ ])) : createCommentVNode("", true)
17652
+ ], 2)
17653
+ ], 4);
17654
+ };
17655
+ }
17656
+ });
17657
+ const EnterpriseHeader = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-vue-layout-gitcode"]]);
17658
+ const layoutConfig$1 = useLayoutConfig();
17659
+ const useConfigSide = (request, sceneValue) => {
17660
+ const API = asideRequest(request);
17661
+ const route = useRoute();
17662
+ const sideLoading = ref(false);
17663
+ const isEn = computed(() => {
17664
+ return getLocaleLang() === LANG_EN;
17665
+ });
17666
+ const showBgColor = computed(() => {
17667
+ return route.meta.showBgColor || false;
17668
+ });
17669
+ const area = ref([]);
17670
+ const assetMenus = computed(() => {
17671
+ return [
17672
+ {
17673
+ left_menu_name_cn: "首页",
17674
+ left_menu_name_cn_shrink: "首页",
17675
+ left_menu_name_en: "Home",
17676
+ left_menu_name_en_shrink: "Home",
17677
+ area: 1,
17678
+ display_order: 1,
17679
+ jump_type: 1,
17680
+ is_open_new_tab: false,
17681
+ isIcon: true,
17682
+ left_menu_logo: "gt-line-home-2",
17683
+ left_menu_logo_black: "gt-line-home-2",
17684
+ left_menu_logo_hover: "gt-plane-home-2",
17685
+ left_menu_logo_hover_black: "gt-plane-home-2",
17686
+ search_type: 1,
17687
+ left_menu_url: "/",
17688
+ id: 0
17689
+ }
17690
+ ];
17691
+ });
17692
+ const judgeIsShowAssetMenus = (data) => {
17693
+ return data.filter((item) => {
17694
+ if (item.area === 1) {
17695
+ if (item.select_scene && item.select_scene.length > 0) {
17696
+ return item.select_scene.includes(sceneValue);
17697
+ }
17698
+ return true;
17699
+ }
17700
+ return false;
17701
+ }).length === 0;
17702
+ };
17703
+ const groupByArea = (data) => {
17704
+ const sortedData = [...data].sort((a, b) => a.area - b.area);
17705
+ const grouped = {};
17706
+ sortedData.forEach((item) => {
17707
+ if (!grouped[item.area]) {
17708
+ grouped[item.area] = [];
17709
+ }
17710
+ grouped[item.area].push(item);
17711
+ });
17712
+ return Object.values(grouped);
17713
+ };
17714
+ const fetchArea = async () => {
17715
+ var _a, _b;
17716
+ sideLoading.value = true;
17717
+ const res = await API.getAsideConfig();
17718
+ let asideList = (((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || []).map((item) => {
17719
+ let processedUrl = item.left_menu_url;
17720
+ if (processedUrl == null ? void 0 : processedUrl.startsWith("https://competition.")) {
17721
+ const competitionUrl = replaceHost({ url: processedUrl, customHost: transformUrl(layoutConfig$1.VITE_COMPETITION_HOST) });
17722
+ processedUrl = competitionUrl.includes("atomgit") ? competitionUrl.replace("competition", "competitions") : competitionUrl;
17723
+ } else if (processedUrl == null ? void 0 : processedUrl.startsWith("https://ai.")) {
17724
+ processedUrl = replaceHost({ url: processedUrl, customHost: transformUrl(layoutConfig$1.VITE_AI_HOST) });
17725
+ } else {
17726
+ processedUrl = transformUrl(processedUrl);
17727
+ }
17728
+ return {
17729
+ ...item,
17730
+ left_menu_url: processedUrl,
17731
+ left_menu_logo: transformUrl(item.left_menu_logo),
17732
+ left_menu_logo_black: transformUrl(item.left_menu_logo_black),
17733
+ left_menu_logo_hover: transformUrl(item.left_menu_logo_hover),
17734
+ left_menu_logo_hover_black: transformUrl(item.left_menu_logo_hover_black)
17735
+ };
17262
17736
  });
17263
17737
  if (typeof window !== "undefined" && GUI_YANG_GITCODE_HOST && ((_b = window.location) == null ? void 0 : _b.origin.includes(GUI_YANG_GITCODE_HOST))) {
17264
17738
  asideList = asideList.filter((item) => !(item.left_menu_url && item.left_menu_url.includes("https://competition.gitcode")));
@@ -17369,9 +17843,9 @@ var SearchType = /* @__PURE__ */ ((SearchType2) => {
17369
17843
  SearchType2[SearchType2["Organization"] = 2] = "Organization";
17370
17844
  return SearchType2;
17371
17845
  })(SearchType || {});
17372
- const _hoisted_1$j = { class: "area" };
17373
- const _hoisted_2$e = { class: "w-[208px] max-h-[240px]" };
17374
- const _sfc_main$m = /* @__PURE__ */ defineComponent({
17846
+ const _hoisted_1$i = { class: "area" };
17847
+ const _hoisted_2$d = { class: "w-[208px] max-h-[240px]" };
17848
+ const _sfc_main$l = /* @__PURE__ */ defineComponent({
17375
17849
  __name: "Area",
17376
17850
  props: {
17377
17851
  list: {},
@@ -17384,9 +17858,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17384
17858
  const layoutConfig2 = useLayoutConfig();
17385
17859
  const { t: t2 } = i18n.global;
17386
17860
  const route = useRoute();
17387
- const MenuItem = defineAsyncComponent(() => import("./MenuItem-BBU1yNPa.js"));
17388
- const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-BT9uWfo1.js"));
17389
- const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-CFDCSWsY.js"));
17861
+ const MenuItem = defineAsyncComponent(() => import("./MenuItem-y13ySAoS.js"));
17862
+ const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-DN-OS1_Z.js"));
17863
+ const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-BLEujU6B.js"));
17390
17864
  const props = __props;
17391
17865
  console.log("slotKeys", props.slotKeys);
17392
17866
  console.log("props", props);
@@ -17543,7 +18017,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17543
18017
  window.open(url, openMode);
17544
18018
  };
17545
18019
  return (_ctx, _cache) => {
17546
- return openBlock(), createElementBlock("div", _hoisted_1$j, [
18020
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
17547
18021
  createVNode(unref(Menu), {
17548
18022
  class: "menu",
17549
18023
  onSelect: onMenuClick,
@@ -17567,104 +18041,37 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17567
18041
  }),
17568
18042
  renderList(layoutSlotKeys.value, (key) => {
17569
18043
  return {
17570
- name: key,
17571
- fn: withCtx(() => [
17572
- createElementVNode("div", _hoisted_2$e, [
17573
- createVNode(unref(Menu), {
17574
- class: "menu",
17575
- onSelect: onMenuClick,
17576
- "open-keys": ["team", "project"]
17577
- }, {
17578
- default: withCtx(() => [
17579
- (openBlock(), createBlock(resolveDynamicComponent(LayoutSlotComponent(key)), mergeProps({ ref_for: true }, getProps(item), {
17580
- slotKeys: __props.slotKeys,
17581
- item,
17582
- isLogin: __props.isLogin
17583
- }), null, 16, ["slotKeys", "item", "isLogin"]))
17584
- ]),
17585
- _: 2
17586
- }, 1024)
17587
- ])
17588
- ])
17589
- };
17590
- })
17591
- ]), 1040, ["isLogin", "item", "slotKeys"]);
17592
- }), 128))
17593
- ]),
17594
- _: 3
17595
- })
17596
- ]);
17597
- };
17598
- }
17599
- });
17600
- const Area = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-vue-layout-gitcode"]]);
17601
- function useCookie(key, defaultValue, options = COOKIE_OPTIONS) {
17602
- const allCookies = api.get() || {};
17603
- const storedValue = allCookies[key] || localStorage$2.getItem(key);
17604
- const initialValue = storedValue || defaultValue;
17605
- const value = ref(initialValue);
17606
- if (!storedValue) {
17607
- api.set(key, initialValue, options);
17608
- }
17609
- watch(
17610
- value,
17611
- (newValue) => {
17612
- if (newValue) {
17613
- api.set(key, newValue, options);
17614
- localStorage$2.setItem(key, newValue);
17615
- } else {
17616
- api.remove(key, { domain: COOKIE_DOMAIN() });
17617
- }
17618
- },
17619
- { flush: "sync" }
17620
- // 立即同步,不等待下一个 tick
17621
- );
17622
- return value;
17623
- }
17624
- const _hoisted_1$i = { class: "tools-item-wrapper" };
17625
- const _hoisted_2$d = { class: "tools-item-wrapper-checkbox" };
17626
- const _hoisted_3$d = ["onClick", "title"];
17627
- const _sfc_main$l = /* @__PURE__ */ defineComponent({
17628
- __name: "Lang",
17629
- setup(__props) {
17630
- const lang = useCookie(LANG_KEY, LANG_ZH);
17631
- const linkList = ref(LANGUAGE);
17632
- const router2 = useRouter();
17633
- const { t: t2 } = i18n.global;
17634
- const handleClick = (linkItem) => {
17635
- if (lang.value === linkItem.value) return;
17636
- lang.value = linkItem.value;
17637
- const isHomePage = router2.currentRoute.value.name === "home";
17638
- if (isHomePage) {
17639
- sessionStorage$1.setItem("page_reload", "changedLang");
17640
- }
17641
- window.location.reload();
17642
- };
17643
- return (_ctx, _cache) => {
17644
- return openBlock(), createElementBlock("div", _hoisted_1$i, [
17645
- createElementVNode("div", null, toDisplayString$1(unref(t2)("gitCodeLayout.common.footerSetting.lang")), 1),
17646
- createElementVNode("div", _hoisted_2$d, [
17647
- (openBlock(true), createElementBlock(Fragment, null, renderList(linkList.value, (item) => {
17648
- return openBlock(), createElementBlock("div", mergeProps({
17649
- key: item.label
17650
- }, { ref_for: true }, item, {
17651
- class: ["tools-item-wrapper-checkbox-item", { "checked": unref(lang) === item.value }],
17652
- onClick: ($event) => handleClick(item),
17653
- title: item.value
17654
- }), [
17655
- createVNode(GIcon, {
17656
- name: item.icon,
17657
- size: "16",
17658
- color: "var(--theme-icon-fill-weak)",
17659
- class: "checkbox-item-icon"
17660
- }, null, 8, ["name"])
17661
- ], 16, _hoisted_3$d);
17662
- }), 128))
17663
- ])
18044
+ name: key,
18045
+ fn: withCtx(() => [
18046
+ createElementVNode("div", _hoisted_2$d, [
18047
+ createVNode(unref(Menu), {
18048
+ class: "menu",
18049
+ onSelect: onMenuClick,
18050
+ "open-keys": ["team", "project"]
18051
+ }, {
18052
+ default: withCtx(() => [
18053
+ (openBlock(), createBlock(resolveDynamicComponent(LayoutSlotComponent(key)), mergeProps({ ref_for: true }, getProps(item), {
18054
+ slotKeys: __props.slotKeys,
18055
+ item,
18056
+ isLogin: __props.isLogin
18057
+ }), null, 16, ["slotKeys", "item", "isLogin"]))
18058
+ ]),
18059
+ _: 2
18060
+ }, 1024)
18061
+ ])
18062
+ ])
18063
+ };
18064
+ })
18065
+ ]), 1040, ["isLogin", "item", "slotKeys"]);
18066
+ }), 128))
18067
+ ]),
18068
+ _: 3
18069
+ })
17664
18070
  ]);
17665
18071
  };
17666
18072
  }
17667
18073
  });
18074
+ const Area = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-vue-layout-gitcode"]]);
17668
18075
  const _hoisted_1$h = { class: "tools-item-wrapper" };
17669
18076
  const _hoisted_2$c = { class: "tools-item-wrapper-checkbox" };
17670
18077
  const _hoisted_3$c = ["onClick", "title"];
@@ -17742,7 +18149,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
17742
18149
  [vShow, __props.showThemeSetting]
17743
18150
  ]),
17744
18151
  withDirectives(createElementVNode("div", _hoisted_3$b, [
17745
- createVNode(_sfc_main$l)
18152
+ createVNode(_sfc_main$t)
17746
18153
  ], 512), [
17747
18154
  [vShow, __props.showLangSetting]
17748
18155
  ])
@@ -18832,6 +19239,206 @@ const orgInfoData = {
18832
19239
  "audit_fields": null,
18833
19240
  "topic_info": null
18834
19241
  };
19242
+ const enterpriseInfoData = {
19243
+ "created_at": "2024-04-01T10:56:07.241+08:00",
19244
+ "description": "123213123123123",
19245
+ "full_name": "Uasdasdasdasd",
19246
+ "full_path": "hsaiodho123123213",
19247
+ "id": 140855,
19248
+ "name": "aolin1",
19249
+ "parent_id": null,
19250
+ "path": "hsaiodho123123213",
19251
+ "web_url": "https://test.gitcode.net/hsaiodho123123213",
19252
+ "starred": true,
19253
+ "visibility": "public",
19254
+ "member_count": null,
19255
+ "members": 6,
19256
+ "project_count": 4,
19257
+ "sub_group_count": 0,
19258
+ "star_count": 2,
19259
+ "avatar": "https://gitcode-img.obs.cn-south-1.myhuaweicloud.com:443/db/cc/d65b23555c60c557bcec9d114316a117540f3ee2d2d7d1ddbac8bc02a2f7e012.png?time=1742179241789",
19260
+ "my_role": {
19261
+ "id": 263127,
19262
+ "access_level": 50,
19263
+ "source_id": 140855,
19264
+ "source_type": "Namespace",
19265
+ "user_id": 495,
19266
+ "notification_level": 3,
19267
+ "created_at": "2024-04-01T10:56:07.261+08:00",
19268
+ "updated_at": "2024-04-01T10:56:07.261+08:00",
19269
+ "created_by_id": null,
19270
+ "invite_email": null,
19271
+ "invite_token": null,
19272
+ "invite_accepted_at": null,
19273
+ "requested_at": null,
19274
+ "expires_at": null,
19275
+ "limited": false
19276
+ },
19277
+ "public_projects_count": null,
19278
+ "private_projects_count": null,
19279
+ "total_project_storage_size": null,
19280
+ "email": null,
19281
+ "home_page": "www.baidu.com",
19282
+ "last_owner": false,
19283
+ "readme_switch": 1,
19284
+ "readme_show_mode": 2,
19285
+ "readme_repo": "hsaiodho123123213/SASDHIOASDH",
19286
+ "readme_branch": "",
19287
+ "readme_file_path": "",
19288
+ "create_ai": false,
19289
+ "watch_count": null,
19290
+ "fork_count": null,
19291
+ "can_create_private_project": false,
19292
+ "children": null,
19293
+ "group_extend": {
19294
+ "id": 140425,
19295
+ "group_id": 140855,
19296
+ "disable_fork": null,
19297
+ "is_official": false,
19298
+ "cmo_name": null,
19299
+ "email": null,
19300
+ "home_page": "www.baidu.com",
19301
+ "join_way": 0,
19302
+ "can_create_private_project": false,
19303
+ "enable_file_control": false,
19304
+ "location": "",
19305
+ "restrict_mr_issue_related": false,
19306
+ "allow_author_relate_issue": false,
19307
+ "member_mgnt_mode": 1,
19308
+ "allow_mention_member_query_for_non_member": 1,
19309
+ "allow_merged_mr_change_label": false,
19310
+ "only_owner_can_merge": false
19311
+ },
19312
+ "item_type": "Group",
19313
+ "lfs_enabled": true,
19314
+ "request_access_enabled": false,
19315
+ "share_with_group_lock": false,
19316
+ "module_setting": {
19317
+ "group_id": 140855,
19318
+ "modules": [
19319
+ {
19320
+ "key": "LOCATION",
19321
+ "type": "GROUP_MODULE",
19322
+ "value": ""
19323
+ },
19324
+ {
19325
+ "key": "COMMUNITY",
19326
+ "type": "GROUP_MODULE",
19327
+ "value": "1"
19328
+ },
19329
+ {
19330
+ "key": "DISCUSSION",
19331
+ "type": "GROUP_MODULE",
19332
+ "value": "1"
19333
+ },
19334
+ {
19335
+ "key": "MENTION_ALLOW_MEMBER_QUERY_FOR_NON_MEMBER",
19336
+ "type": "GROUP_MODULE",
19337
+ "value": "1"
19338
+ },
19339
+ {
19340
+ "key": "GROUP_LFS_ENABLED",
19341
+ "type": "GROUP_MODULE",
19342
+ "value": "1"
19343
+ },
19344
+ {
19345
+ "key": "GROUP_DYNAMIC_SHOW_MODE",
19346
+ "type": "GROUP_MODULE",
19347
+ "value": "all"
19348
+ }
19349
+ ]
19350
+ },
19351
+ "external_setting": {
19352
+ "group_id": 140855,
19353
+ "modules": [
19354
+ {
19355
+ "key": "LOCATION",
19356
+ "type": "GROUP_MODULE",
19357
+ "value": ""
19358
+ },
19359
+ {
19360
+ "key": "COMMUNITY",
19361
+ "type": "GROUP_MODULE",
19362
+ "value": "1"
19363
+ },
19364
+ {
19365
+ "key": "DISCUSSION",
19366
+ "type": "GROUP_MODULE",
19367
+ "value": "1"
19368
+ },
19369
+ {
19370
+ "key": "MENTION_ALLOW_MEMBER_QUERY_FOR_NON_MEMBER",
19371
+ "type": "GROUP_MODULE",
19372
+ "value": "1"
19373
+ },
19374
+ {
19375
+ "key": "GROUP_LFS_ENABLED",
19376
+ "type": "GROUP_MODULE",
19377
+ "value": "1"
19378
+ },
19379
+ {
19380
+ "key": "GROUP_DYNAMIC_SHOW_MODE",
19381
+ "type": "GROUP_MODULE",
19382
+ "value": "all"
19383
+ }
19384
+ ]
19385
+ },
19386
+ "sum": {
19387
+ "open_issues_count": 14,
19388
+ "open_merge_requests_count": 1,
19389
+ "open_change_requests_count": null,
19390
+ "all_issues_count": 14,
19391
+ "all_merge_requests_count": 2,
19392
+ "project_star_count": 1
19393
+ },
19394
+ "product_id": "8b3814da62024a0dbbf58c9b8ac5be89",
19395
+ "can_create_kanban": true,
19396
+ "achievements": [
19397
+ {
19398
+ "type": "watch_counts",
19399
+ "num": 0
19400
+ },
19401
+ {
19402
+ "type": "star_counts",
19403
+ "num": 1
19404
+ },
19405
+ {
19406
+ "type": "fork_counts",
19407
+ "num": 0
19408
+ },
19409
+ {
19410
+ "type": "issue_counts",
19411
+ "num": 0
19412
+ },
19413
+ {
19414
+ "type": "pr_counts",
19415
+ "num": 0
19416
+ },
19417
+ {
19418
+ "type": "project_num",
19419
+ "num": 4
19420
+ }
19421
+ ],
19422
+ "top_languages": [],
19423
+ "can_batch_operator": false,
19424
+ "can_claim": false,
19425
+ "repo_count": {
19426
+ "code": 4,
19427
+ "model": 1,
19428
+ "dataset": 0,
19429
+ "prompt": 0
19430
+ },
19431
+ "enterprise": {
19432
+ "name": "aolin1",
19433
+ "avatar": "",
19434
+ "id": 3,
19435
+ "creator_id": 495,
19436
+ "created_at": "2025-02-17T18:23:50.168+08:00",
19437
+ "updated_at": "2025-02-17T18:23:50.168+08:00"
19438
+ },
19439
+ "audit_fields": null,
19440
+ "topic_info": null
19441
+ };
18835
19442
  const otherUserInfoData = {
18836
19443
  "profile": {
18837
19444
  "website": "",
@@ -18882,6 +19489,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
18882
19489
  const repoInfo = ref({});
18883
19490
  const orgInfo = ref({});
18884
19491
  const otherUserInfo = ref({});
19492
+ const enterpriseInfo = ref(enterpriseInfoData);
18885
19493
  const headerCustomProps = ref(headerCustomPropsData);
18886
19494
  const loginSuccess = (data) => {
18887
19495
  isLogin.value = true;
@@ -18898,6 +19506,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
18898
19506
  localStorage$2.removeItem("xauth_token");
18899
19507
  localStorage$2.removeItem("userInfo");
18900
19508
  };
19509
+ const showCommonHeader = ref(true);
18901
19510
  const sceneSelected = ref(SceneValue.home);
18902
19511
  const independence = ref(false);
18903
19512
  const directionRowList = ref(Object.values(SceneValue));
@@ -18945,7 +19554,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
18945
19554
  });
18946
19555
  return (_ctx, _cache) => {
18947
19556
  return openBlock(), createElementBlock("div", _hoisted_1$c, [
18948
- createVNode(GitCodeHeader, {
19557
+ showCommonHeader.value ? (openBlock(), createBlock(GitCodeHeader, {
19558
+ key: 0,
18949
19559
  sceneValue: sceneSelected.value,
18950
19560
  independence: independence.value,
18951
19561
  isLogin: isLogin.value,
@@ -18962,7 +19572,20 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
18962
19572
  headerCustomProps: headerCustomProps.value,
18963
19573
  onFollowDevCommunity: followDevCommunity,
18964
19574
  onFollowUser: followUser
18965
- }, null, 8, ["sceneValue", "independence", "isLogin", "request", "globalStore", "userInfo", "repoInfo", "orgInfo", "otherUserInfo", "headerCustomProps"]),
19575
+ }, null, 8, ["sceneValue", "independence", "isLogin", "request", "globalStore", "userInfo", "repoInfo", "orgInfo", "otherUserInfo", "headerCustomProps"])) : (openBlock(), createBlock(EnterpriseHeader, {
19576
+ key: 1,
19577
+ independence: independence.value,
19578
+ isLogin: isLogin.value,
19579
+ request: unref(proxyService),
19580
+ loginSuccess,
19581
+ loginOutFinish,
19582
+ globalStore: globalStore.value,
19583
+ enterpriseInfo: enterpriseInfo.value,
19584
+ userInfo: userInfo.value,
19585
+ headerFunctions: [],
19586
+ openHarmonyGuide: true,
19587
+ headerCustomProps: headerCustomProps.value
19588
+ }, null, 8, ["independence", "isLogin", "request", "globalStore", "enterpriseInfo", "userInfo", "headerCustomProps"])),
18966
19589
  createElementVNode("div", _hoisted_2$8, [
18967
19590
  createElementVNode("div", _hoisted_3$8, [
18968
19591
  createVNode(GitCodeAside, {
@@ -18977,22 +19600,50 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
18977
19600
  showLangSetting: "",
18978
19601
  showThemeSetting: ""
18979
19602
  }, {
18980
- home: withCtx(() => [..._cache[2] || (_cache[2] = [
19603
+ home: withCtx(() => [..._cache[3] || (_cache[3] = [
18981
19604
  createElementVNode("div", null, "首页hover-插槽", -1)
18982
19605
  ])]),
18983
- issues: withCtx(() => [..._cache[3] || (_cache[3] = [
19606
+ issues: withCtx(() => [..._cache[4] || (_cache[4] = [
18984
19607
  createElementVNode("div", null, "issues hover-插槽", -1)
18985
19608
  ])]),
18986
19609
  _: 1
18987
19610
  }, 8, ["sceneValue", "userInfo", "isLogin", "request", "globalStore", "independence", "collapseMode"])
18988
19611
  ]),
18989
19612
  createElementVNode("div", _hoisted_4$6, [
18990
- _cache[6] || (_cache[6] = createElementVNode("h1", null, "控制 Header 值传入", -1)),
18991
- _cache[7] || (_cache[7] = createElementVNode("h2", null, "场景值 SceneValue", -1)),
19613
+ _cache[9] || (_cache[9] = createElementVNode("h1", null, "控制Header 切换", -1)),
19614
+ createVNode(unref(RadioGroup), {
19615
+ direction: "row",
19616
+ modelValue: showCommonHeader.value,
19617
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showCommonHeader.value = $event)
19618
+ }, {
19619
+ default: withCtx(() => [
19620
+ (openBlock(), createBlock(unref(Radio), {
19621
+ key: "是",
19622
+ value: true
19623
+ }, {
19624
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
19625
+ createTextVNode("普通 Header", -1)
19626
+ ])]),
19627
+ _: 1
19628
+ })),
19629
+ (openBlock(), createBlock(unref(Radio), {
19630
+ key: "否",
19631
+ value: false
19632
+ }, {
19633
+ default: withCtx(() => [..._cache[6] || (_cache[6] = [
19634
+ createTextVNode("企业版 Header", -1)
19635
+ ])]),
19636
+ _: 1
19637
+ }))
19638
+ ]),
19639
+ _: 1
19640
+ }, 8, ["modelValue"]),
19641
+ _cache[10] || (_cache[10] = createElementVNode("hr", { class: "my-4" }, null, -1)),
19642
+ _cache[11] || (_cache[11] = createElementVNode("h1", { class: "my-2" }, "控制普通 Header,场景值 SceneValue 传入", -1)),
18992
19643
  createVNode(unref(RadioGroup), {
18993
19644
  direction: "row",
18994
19645
  modelValue: sceneSelected.value,
18995
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sceneSelected.value = $event),
19646
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => sceneSelected.value = $event),
18996
19647
  onChange: handleSceneChange
18997
19648
  }, {
18998
19649
  default: withCtx(() => [
@@ -19010,18 +19661,19 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
19010
19661
  ]),
19011
19662
  _: 1
19012
19663
  }, 8, ["modelValue"]),
19013
- _cache[8] || (_cache[8] = createElementVNode("h2", null, "是否独立部署", -1)),
19664
+ _cache[12] || (_cache[12] = createElementVNode("hr", { class: "my-4" }, null, -1)),
19665
+ _cache[13] || (_cache[13] = createElementVNode("h2", { class: "mt-2" }, "是否独立部署", -1)),
19014
19666
  createVNode(unref(RadioGroup), {
19015
19667
  direction: "row",
19016
19668
  modelValue: independence.value,
19017
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => independence.value = $event)
19669
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => independence.value = $event)
19018
19670
  }, {
19019
19671
  default: withCtx(() => [
19020
19672
  (openBlock(), createBlock(unref(Radio), {
19021
19673
  key: "是",
19022
19674
  value: true
19023
19675
  }, {
19024
- default: withCtx(() => [..._cache[4] || (_cache[4] = [
19676
+ default: withCtx(() => [..._cache[7] || (_cache[7] = [
19025
19677
  createTextVNode("是", -1)
19026
19678
  ])]),
19027
19679
  _: 1
@@ -19030,7 +19682,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
19030
19682
  key: "否",
19031
19683
  value: false
19032
19684
  }, {
19033
- default: withCtx(() => [..._cache[5] || (_cache[5] = [
19685
+ default: withCtx(() => [..._cache[8] || (_cache[8] = [
19034
19686
  createTextVNode("否", -1)
19035
19687
  ])]),
19036
19688
  _: 1
@@ -23597,7 +24249,7 @@ const _SlidCaptchaManager = class _SlidCaptchaManager {
23597
24249
  __publicField(_SlidCaptchaManager, "instance");
23598
24250
  let SlidCaptchaManager = _SlidCaptchaManager;
23599
24251
  const slidCaptchaManager = SlidCaptchaManager.getInstance();
23600
- const SlidCaptcha = defineAsyncComponent(() => import("./index-BBqyN8Dg.js"));
24252
+ const SlidCaptcha = defineAsyncComponent(() => import("./index-BNTNJVWd.js"));
23601
24253
  const useSlidCaptcha = () => {
23602
24254
  const { mount, unMount, isMounted } = usePopup("slid-captcha-popup");
23603
24255
  const open = (config) => {
@@ -23627,7 +24279,7 @@ const useSlidCaptcha = () => {
23627
24279
  close
23628
24280
  };
23629
24281
  };
23630
- const YunpianCaptcha = defineAsyncComponent(() => import("./index-Dafdhx59.js"));
24282
+ const YunpianCaptcha = defineAsyncComponent(() => import("./index-CWraK2Ue.js"));
23631
24283
  const useYunpianCaptcha = () => {
23632
24284
  const { mount, unMount } = usePopup("yunpian-captcha-popup");
23633
24285
  const open = (config) => {
@@ -26500,22 +27152,23 @@ export {
26500
27152
  GIcon as G,
26501
27153
  isHttps as H,
26502
27154
  asideRequest as I,
26503
- _sfc_main$E as J,
27155
+ _sfc_main$F as J,
26504
27156
  loadAsideData as K,
26505
27157
  LANG_ZH as L,
26506
27158
  ToolsFloat as M,
26507
27159
  _sfc_main as N,
26508
27160
  GitCodeAside as O,
26509
27161
  GitCodeHeader as P,
26510
- SiteAnnouncement as Q,
27162
+ EnterpriseHeader as Q,
26511
27163
  REPO_MODULE as R,
26512
27164
  SceneValue as S,
26513
27165
  TOPIC_TYPE as T,
26514
- useLogin as U,
26515
- setLayoutConfig as V,
26516
- GitCodeLayoutEmitter as W,
26517
- setTheme as X,
26518
- index as Y,
27166
+ SiteAnnouncement as U,
27167
+ useLogin as V,
27168
+ setLayoutConfig as W,
27169
+ GitCodeLayoutEmitter as X,
27170
+ setTheme as Y,
27171
+ index as Z,
26519
27172
  _export_sfc as _,
26520
27173
  i18n as a,
26521
27174
  REPO_EVENT as b,
@@ -26530,7 +27183,7 @@ export {
26530
27183
  usePageResize as k,
26531
27184
  localStorage$2 as l,
26532
27185
  isGstarRepo as m,
26533
- _sfc_main$D as n,
27186
+ _sfc_main$E as n,
26534
27187
  isIncubationRepo as o,
26535
27188
  highlightWords as p,
26536
27189
  _frEventTrack as q,