@@ -115,6 +121,9 @@ function onDragLeave() {
+
diff --git a/src/download.ts b/src/download.ts
new file mode 100644
index 0000000..b44d632
--- /dev/null
+++ b/src/download.ts
@@ -0,0 +1,13 @@
+export function download(value: string, filename: string): void {
+ const a = document.createElement('a');
+ a.href = value;
+ a.download = filename;
+ a.click();
+ a.remove();
+}
+
+export function downloadBlob(blob: Blob, filename: string): void {
+ const url = URL.createObjectURL(blob);
+ download(url, filename);
+ URL.revokeObjectURL(url);
+}
diff --git a/src/style.css b/src/style.css
index f86aba1..2f106dc 100644
--- a/src/style.css
+++ b/src/style.css
@@ -79,7 +79,7 @@ button:focus-visible,
a:hover {
color: #747bff;
}
- button {
+ button, .button {
background-color: #f9f9f9;
}
}
@@ -108,3 +108,7 @@ button:focus-visible,
height: 50%;
top: 50%;
}
+
+svg {
+ vertical-align: middle;
+}
diff --git a/tsconfig.json b/tsconfig.json
index 9e03e60..b022a7b 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -4,6 +4,7 @@
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
+ "types": ["vite/client", "unplugin-icons/types/vue"],
"skipLibCheck": true,
/* Bundler mode */
diff --git a/vite.config.ts b/vite.config.ts
index 05c1740..283cae3 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,7 +1,8 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
+import Icons from 'unplugin-icons/vite'
// https://vitejs.dev/config/
export default defineConfig({
- plugins: [vue()],
+ plugins: [vue(), Icons({ compiler: 'vue3' })],
})