feat: add disk usage information to the sidebar
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { fetchURL, removePrefix, createURL } from "./utils";
|
||||
import { createURL, fetchURL, removePrefix } from "./utils";
|
||||
import { baseURL } from "@/utils/constants";
|
||||
import store from "@/store";
|
||||
|
||||
@@ -176,3 +176,11 @@ export function getSubtitlesURL(file) {
|
||||
|
||||
return subtitles;
|
||||
}
|
||||
|
||||
export async function usage(url) {
|
||||
url = removePrefix(url);
|
||||
|
||||
const res = await fetchURL(`/api/usage${url}`, {});
|
||||
|
||||
return await res.json();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user