mirror of
https://github.com/keven1024/015.git
synced 2026-05-31 09:29:35 +00:00
fix: update package.json dependencies and refactor share composables for improved functionality
This commit is contained in:
@@ -5,14 +5,15 @@ import { Input } from "@/components/ui/input";
|
||||
import { useClipboard } from "@vueuse/core";
|
||||
import { toast } from "vue-sonner";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import useAppShare from "@/composables/useShare";
|
||||
import useMyAppShare from "~/composables/useMyAppShare";
|
||||
import useMyAppConfig from "@/composables/useMyAppConfig";
|
||||
const props = defineProps<{
|
||||
data: { file: File; config: any; handle_type: string; file_id: string };
|
||||
}>();
|
||||
const emit = defineEmits<{
|
||||
(e: "change", key: string): void;
|
||||
}>();
|
||||
const { createFileShare } = useAppShare();
|
||||
const { createFileShare } = useMyAppShare();
|
||||
const { data } = useQuery({
|
||||
queryKey: ["create-share", props?.data?.file_id],
|
||||
queryFn: async () => {
|
||||
@@ -27,7 +28,7 @@ const { data } = useQuery({
|
||||
},
|
||||
});
|
||||
|
||||
const appConfig = useAppConfig();
|
||||
const appConfig = useMyAppConfig();
|
||||
const url = computed(() => {
|
||||
const { id } = data?.value || {};
|
||||
return `${appConfig?.value?.site_url}/s/${id}`;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useQuery } from "@tanstack/vue-query";
|
||||
import { AsyncButton, Button } from "@/components/ui/button";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { filesize } from "filesize";
|
||||
import useAppShare from "~/composables/useShare";
|
||||
import useMyAppShare from "~/composables/useMyAppShare";
|
||||
import { toast } from "vue-sonner";
|
||||
const emit = defineEmits<{
|
||||
(e: "change", key: string): void;
|
||||
@@ -63,7 +63,7 @@ const { data: taskData, refetch } = useQuery({
|
||||
enabled: !!taskId.value,
|
||||
});
|
||||
|
||||
const { downloadFile, createFileShare } = useAppShare();
|
||||
const { downloadFile, createFileShare } = useMyAppShare();
|
||||
|
||||
const { counter, pause } = useInterval(2000, { controls: true });
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ import { Input } from "@/components/ui/input";
|
||||
import { useClipboard } from "@vueuse/core";
|
||||
import { toast } from "vue-sonner";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import useAppShare from "@/composables/useShare";
|
||||
import useMyAppShare from "~/composables/useMyAppShare";
|
||||
import useMyAppConfig from "@/composables/useMyAppConfig";
|
||||
|
||||
const props = defineProps<{
|
||||
data: { text: string; config: any; handle_type: string };
|
||||
@@ -14,7 +15,7 @@ const emit = defineEmits<{
|
||||
(e: "change", key: string): void;
|
||||
}>();
|
||||
|
||||
const { createTextShare } = useAppShare();
|
||||
const { createTextShare } = useMyAppShare();
|
||||
const { data } = useQuery({
|
||||
queryKey: ["create-share", props?.data?.text],
|
||||
queryFn: async () => {
|
||||
@@ -26,7 +27,7 @@ const { data } = useQuery({
|
||||
return data?.data;
|
||||
},
|
||||
});
|
||||
const appConfig = useAppConfig();
|
||||
const appConfig = useMyAppConfig();
|
||||
const url = computed(() => {
|
||||
const { id } = data?.value || {};
|
||||
return `${appConfig?.value?.site_url}/s/${id}`;
|
||||
|
||||
Reference in New Issue
Block a user