Files hub frontend
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user