feat: add disk usage information to the sidebar

This commit is contained in:
Oleg Lobanov committed 2022-06-02 13:16:37 +02:00
1 parent 42a39b3f1d
commit d1d8e3e340
9 files changed
+144 -1

No files matched your search

+9 -1
View File
@@ -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();
}