feat: add disk usage information to the sidebar

This commit is contained in:
Oleg Lobanov
2022-06-02 12:52:24 +02:00
parent 42a39b3f1d
commit d1d8e3e340
9 changed files with 144 additions and 1 deletions

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();
}