fixed some animations, removed unneeded files, improved context menu

This commit is contained in:
subnub
2024-06-22 18:19:21 -04:00
parent 45bcd5a7d6
commit 1794ae688e
16 changed files with 534 additions and 504 deletions
+16 -1
View File
@@ -1,5 +1,6 @@
import { QueryFunctionContext } from "react-query";
import axios from "../axiosInterceptor";
import { getUserToken } from "./user";
interface QueryKeyParams {
parent: string;
@@ -44,12 +45,26 @@ export const getFilesList = async ({
export const getQuickFilesList = async () => {
const response = await axios.get(`/file-service/quick-list`, {
params: {
limit: 12,
limit: 20,
},
});
return response.data;
};
export const downloadFile = async (fileID: string) => {
await getUserToken();
// TODO: Change this
const url = `http://localhost:5173/api/file-service/download/${fileID}`;
const link = document.createElement("a");
document.body.appendChild(link);
link.href = url;
link.setAttribute("type", "hidden");
link.setAttribute("download", "true");
link.click();
};
export const getFileThumbnail = async (thumbnailID: string) => {
const url = `http://localhost:5173/api/file-service/thumbnail/${thumbnailID}`;
const config = {