vue-layout-gitcode 1.1.25 → 1.1.27

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,5 +1,5 @@
1
1
  import { ref, watchEffect, defineComponent, toDisplayString, inject, createElementBlock, openBlock, normalizeClass, createElementVNode, withModifiers, withDirectives, vShow, createVNode, computed, createCommentVNode, unref, normalizeStyle, createTextVNode, onMounted, onUnmounted, Fragment, createBlock, renderList, reactive, withCtx } from "vue";
2
- import { d as debounce, h as headRequest, G as GIcon, r as reqCatch, _ as _export_sfc, a as i18n, T as TOPIC_TYPE, f as useTimeFormat, L as LANG_KEY, g as LANG_ZH, j as usePageResize, k as isGstarRepo, m as _sfc_main$8, n as isIncubationRepo, o as highlightWords, t as transWebUrl, p as _frEventTrack, E as EVENT_NAME, b as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-BcHpCD9I.js";
2
+ import { d as debounce, G as GIcon, f as useRequestReport, r as reqCatch, h as headRequest, _ as _export_sfc, a as i18n, T as TOPIC_TYPE, g as useTimeFormat, L as LANG_KEY, j as LANG_ZH, k as usePageResize, m as isGstarRepo, n as _sfc_main$8, o as isIncubationRepo, p as highlightWords, t as transWebUrl, q as _frEventTrack, E as EVENT_NAME, b as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-CFV2tQ1P.js";
3
3
  import { useRouter } from "vue-router";
4
4
  import { Row, Col } from "vue-devui-lal/grid";
5
5
  import { Skeleton, SkeletonItem } from "vue-devui-lal/skeleton";
@@ -124,11 +124,16 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
124
124
  starInfo: { default: () => ({
125
125
  starred: false,
126
126
  starCount: 0
127
- }) }
127
+ }) },
128
+ loginTriggerSource: { default: "search_star_repo_recommend" }
128
129
  },
129
130
  emits: ["report"],
130
131
  setup(__props, { emit: __emit }) {
131
- const API = headRequest(inject("request"));
132
+ const request = inject("request");
133
+ const API = headRequest(request);
134
+ const globalStore = inject("globalStore");
135
+ const isLogin = inject("isLogin");
136
+ const { useReport } = useRequestReport(request, globalStore);
132
137
  const props = __props;
133
138
  const emits = __emit;
134
139
  const running = ref(false);
@@ -137,6 +142,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
137
142
  const starLoading = ref(false);
138
143
  const handleStar = async (e) => {
139
144
  e.preventDefault();
145
+ if (!isLogin.value) {
146
+ useReport("login_exposure", { source: props.loginTriggerSource || "search_star_repo_recommend" });
147
+ }
140
148
  try {
141
149
  if (starLoading.value) return;
142
150
  starLoading.value = true;
package/index.d.ts CHANGED
@@ -547,7 +547,7 @@ export declare const ToolsFloat: DefineComponent<ExtractPropTypes<{
547
547
  globalStore: Object;
548
548
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
549
549
 
550
- export declare function useLogin(request: any): {
550
+ export declare function useLogin(request: any, globalStore?: any): {
551
551
  login: (options?: LoginOptions, loginSuccess?: Function, openHarmonyGuide?: boolean) => void;
552
552
  unMount: () => void;
553
553
  isMounted: () => boolean;
package/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { w, x, A, v, S, s, B, D, z, C, y } from "./index-BcHpCD9I.js";
1
+ import { x, y, B, w, S, v, C, F, A, D, z } from "./index-CFV2tQ1P.js";
2
2
  export {
3
- w as GitCodeAside,
4
- x as GitCodeHeader,
5
- A as GitCodeLayoutEmitter,
6
- v as Login,
3
+ x as GitCodeAside,
4
+ y as GitCodeHeader,
5
+ B as GitCodeLayoutEmitter,
6
+ w as Login,
7
7
  S as SceneValue,
8
- s as ToolsFloat,
9
- B as currentTheme,
10
- D as default,
11
- z as setLayoutConfig,
12
- C as setTheme,
13
- y as useLogin
8
+ v as ToolsFloat,
9
+ C as currentTheme,
10
+ F as default,
11
+ A as setLayoutConfig,
12
+ D as setTheme,
13
+ z as useLogin
14
14
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, createBlock, openBlock, unref, isRef, withCtx, createElementVNode, normalizeClass, createVNode, createTextVNode } from "vue";
2
- import { i as isPhone, u as useModel } from "./index-BcHpCD9I.js";
2
+ import { i as isPhone, u as useModel } from "./index-CFV2tQ1P.js";
3
3
  import { Notification } from "vue-devui-lal/notification";
4
4
  import { Button } from "vue-devui-lal/button";
5
5
  import "vue-devui-lal/notification/style.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-layout-gitcode",
3
- "version": "1.1.25",
3
+ "version": "1.1.27",
4
4
  "description": "用于 gitcode 站点生产环境使用",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",