vue-layout-gitcode 1.1.29 → 1.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import { inject, ref, watch, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createBlock, createCommentVNode } from "vue";
2
2
  import "vue-devui-lal/icon";
3
3
  import "vue-devui-lal/icon/style.css";
4
- import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-5e727914.js";
5
- import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-c971b0e3.js";
4
+ import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-1809d81d.js";
5
+ import { u as useReportRepo, S as SearchRepoCard, f as formatNameSpace } from "./index-15c42de5.js";
6
6
  import "vue-devui-lal/button";
7
7
  import "vue-devui-lal/popover";
8
8
  import "vue-devui-lal/tooltip";
@@ -1,5 +1,5 @@
1
1
  import { ref, inject, computed, withDirectives, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
2
- import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-5e727914.js";
2
+ import { a as i18n, h as headRequest, G as GIcon, r as reqCatch } from "./index-1809d81d.js";
3
3
  import { useRoute, useRouter } from "vue-router";
4
4
  import "vue-devui-lal/icon";
5
5
  import "vue-devui-lal/icon/style.css";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, createVNode, toDisplayString, withModifiers, createCommentVNode } from "vue";
2
- import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-5e727914.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-1809d81d.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  import "vue-devui-lal/button";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, withDirectives, withModifiers, createVNode, vShow } from "vue";
2
- import { G as GIcon, _ as _export_sfc } from "./index-5e727914.js";
2
+ import { G as GIcon, _ as _export_sfc } from "./index-1809d81d.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  import "vue-devui-lal/button";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, inject, ref, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createBlock, createVNode, withCtx } from "vue";
2
- import { u as useReportRepo, S as SearchRepoCard } from "./index-c971b0e3.js";
3
- import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-5e727914.js";
2
+ import { u as useReportRepo, S as SearchRepoCard } from "./index-15c42de5.js";
3
+ import { a as i18n, h as headRequest, R as REPO_MODULE, b as REPO_EVENT, l as localStorage, _ as _export_sfc } from "./index-1809d81d.js";
4
4
  import { Row, Col } from "vue-devui-lal/grid";
5
5
  import { SkeletonItem } from "vue-devui-lal/skeleton";
6
6
  import "vue-devui-lal/grid/style.css";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createElementBlock, Fragment, renderList, createElementVNode, createVNode, toDisplayString, createCommentVNode, unref } from "vue";
2
- import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-5e727914.js";
2
+ import { a as i18n, G as GIcon, _ as _export_sfc } from "./index-1809d81d.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  import "vue-devui-lal/button";
@@ -1,5 +1,5 @@
1
1
  import { inject, ref, watch, withDirectives, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, Fragment, renderList, createVNode, vShow } from "vue";
2
- import { a as i18n, h as headRequest, G as GIcon } from "./index-5e727914.js";
2
+ import { a as i18n, h as headRequest, G as GIcon } from "./index-1809d81d.js";
3
3
  import "vue-devui-lal/icon";
4
4
  import "vue-devui-lal/icon/style.css";
5
5
  import "vue-devui-lal/button";
@@ -1,5 +1,5 @@
1
1
  import { ref, watchEffect, defineComponent, toDisplayString, inject, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, withDirectives, vShow, createVNode, computed, unref, normalizeStyle, createCommentVNode, 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, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-5e727914.js";
2
+ import { d as debounce, G as GIcon, r as reqCatch, h as headRequest, f as useRequestReport, _ 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, c as REPO_TYPE, e as extractRepoInfoWithURL } from "./index-1809d81d.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";
@@ -32,9 +32,10 @@ const useReportRepo = (reportParams, viewReport) => {
32
32
  channelNames.push(data.channelName);
33
33
  if (data.subChannelName)
34
34
  channelNames.push(data.subChannelName);
35
+ const repoId = isNaN(Number(data.id)) ? data.id : Number(data.id);
35
36
  return {
36
37
  type: "gitcode",
37
- repo_id: data.id,
38
+ repo_id: repoId,
38
39
  dest_url: data.web_url,
39
40
  strategy: channelNames.join("、") || "",
40
41
  // 官方项目
@@ -125,11 +126,16 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
125
126
  starInfo: { default: () => ({
126
127
  starred: false,
127
128
  starCount: 0
128
- }) }
129
+ }) },
130
+ loginTriggerSource: { default: "search_star_repo_recommend" }
129
131
  },
130
132
  emits: ["report"],
131
133
  setup(__props, { emit: __emit }) {
132
- const API = headRequest(inject("request"));
134
+ const request = inject("request");
135
+ const API = headRequest(request);
136
+ const globalStore = inject("globalStore");
137
+ const isLogin = inject("isLogin");
138
+ const { useReport } = useRequestReport(request, globalStore);
133
139
  const props = __props;
134
140
  const emits = __emit;
135
141
  const running = ref(false);
@@ -138,6 +144,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
138
144
  const starLoading = ref(false);
139
145
  const handleStar = async (e) => {
140
146
  e.preventDefault();
147
+ if (!isLogin.value) {
148
+ useReport("login_exposure", { source: props.loginTriggerSource || "search_star_repo_recommend" });
149
+ }
141
150
  try {
142
151
  if (starLoading.value)
143
152
  return;
@@ -206,8 +215,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
206
215
  };
207
216
  }
208
217
  });
209
- const index_vue_vue_type_style_index_0_scoped_754df2e0_lang = "";
210
- const StarTag = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-754df2e0"]]);
218
+ const index_vue_vue_type_style_index_0_scoped_5e8b2cbd_lang = "";
219
+ const StarTag = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-5e8b2cbd"]]);
211
220
  const _hoisted_1$4 = { class: "fork-tag" };
212
221
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
213
222
  __name: "index",