Files hub frontend

This commit is contained in:
2026-10-29 17:50:21 -03:00
parent 8272636310
commit ec9bdb8e8e
9 changed files with 364 additions and 9 deletions
+2 -7
View File
@@ -4,6 +4,7 @@ import Button from "@/components/Button.tsx";
import InputField from "@/components/InputField.tsx";
import TextAreaField from "@/components/TextAreaField.tsx";
import { post_json } from "@/src/client.ts";
import { download_blob } from "@/src/files.ts";
import { save_master_key } from "@/src/key_store.ts";
import {
export_key_text,
@@ -53,13 +54,7 @@ export default function KeysCreate(props: KeysCreateProps) {
}
function download_key_file() {
const url = URL.createObjectURL(new Blob([key_text.value + "\n"], { type: "text/plain" }));
const link = document.createElement("a");
link.href = url;
link.download = "vces-key.txt";
link.click();
// Revoking right away can cancel the download in some browsers
setTimeout(() => URL.revokeObjectURL(url), 60_000);
download_blob(new Blob([key_text.value + "\n"], { type: "text/plain" }), "vces-key.txt");
}
async function finish(event: SubmitEvent) {