From c4cfe52712a8054378033b2a8e922439bb8acee2 Mon Sep 17 00:00:00 2001
From: Jisu-Woniu <31986081+Jisu-Woniu@users.noreply.github.com>
Date: Fri, 17 Nov 2023 01:51:13 +0800
Subject: [PATCH] feat: :sparkles: Add light/dark mode switch.
---
index.html | 2 +-
package.json | 7 +-
pnpm-lock.yaml | 320 +++++++++++++++++++++++---------
src/App.vue | 61 ++++--
src/components/FileSelector.vue | 87 +++------
tsconfig.app.json | 3 +-
vite.config.ts | 4 +-
7 files changed, 311 insertions(+), 173 deletions(-)
diff --git a/index.html b/index.html
index e62cce1..fa5f77d 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
-
Tauri + Vue + TS
+ 数字签名工具
diff --git a/package.json b/package.json
index f4186fd..8e17909 100644
--- a/package.json
+++ b/package.json
@@ -17,12 +17,13 @@
"dependencies": {
"@fontsource/noto-sans-sc": "^5.0.16",
"@fontsource/roboto": "^5.0.8",
- "@material-design-icons/svg": "^0.14.13",
"@tauri-apps/api": "^1.5.1",
+ "@vueuse/core": "^10.6.1",
"vue": "^3.3.8",
- "vuetify": "^3.4.1"
+ "vuetify": "^3.4.2"
},
"devDependencies": {
+ "@iconify-json/ic": "^1.1.14",
"@mdi/js": "^7.3.67",
"@tauri-apps/cli": "^1.5.6",
"@types/node": "^20.9.0",
@@ -42,9 +43,9 @@
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^34.0.0",
"typescript": "^5.2.2",
+ "unplugin-icons": "^0.17.4",
"vite": "^5.0.0",
"vite-plugin-vuetify": "^1.0.2",
- "vite-svg-loader": "^4.0.0",
"vue-tsc": "^1.8.22"
},
"browserslist": [
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 44d45c5..83a5cb9 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -11,20 +11,23 @@ dependencies:
'@fontsource/roboto':
specifier: ^5.0.8
version: 5.0.8
- '@material-design-icons/svg':
- specifier: ^0.14.13
- version: 0.14.13
'@tauri-apps/api':
specifier: ^1.5.1
version: 1.5.1
+ '@vueuse/core':
+ specifier: ^10.6.1
+ version: 10.6.1(vue@3.3.8)
vue:
specifier: ^3.3.8
version: 3.3.8(typescript@5.2.2)
vuetify:
- specifier: ^3.4.1
- version: 3.4.1(typescript@5.2.2)(vite-plugin-vuetify@1.0.2)(vue@3.3.8)
+ specifier: ^3.4.2
+ version: 3.4.2(typescript@5.2.2)(vite-plugin-vuetify@1.0.2)(vue@3.3.8)
devDependencies:
+ '@iconify-json/ic':
+ specifier: ^1.1.14
+ version: 1.1.14
'@mdi/js':
specifier: ^7.3.67
version: 7.3.67
@@ -82,15 +85,15 @@ devDependencies:
typescript:
specifier: ^5.2.2
version: 5.2.2
+ unplugin-icons:
+ specifier: ^0.17.4
+ version: 0.17.4
vite:
specifier: ^5.0.0
version: 5.0.0(@types/node@20.9.0)
vite-plugin-vuetify:
specifier: ^1.0.2
- version: 1.0.2(vite@5.0.0)(vue@3.3.8)(vuetify@3.4.1)
- vite-svg-loader:
- specifier: ^4.0.0
- version: 4.0.0
+ version: 1.0.2(vite@5.0.0)(vue@3.3.8)(vuetify@3.4.2)
vue-tsc:
specifier: ^1.8.22
version: 1.8.22(typescript@5.2.2)
@@ -102,6 +105,17 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ /@antfu/install-pkg@0.1.1:
+ resolution: {integrity: sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ==}
+ dependencies:
+ execa: 5.1.1
+ find-up: 5.0.0
+ dev: true
+
+ /@antfu/utils@0.7.6:
+ resolution: {integrity: sha512-pvFiLP2BeOKA/ZOS6jxx4XhKzdVLHDhGlFEaZ2flWWYf2xOqVniqpk38I04DFRyz+L0ASggl7SkItTc+ZLju4w==}
+ dev: true
+
/@babel/code-frame@7.22.13:
resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==}
engines: {node: '>=6.9.0'}
@@ -766,13 +780,32 @@ packages:
resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==}
dev: true
+ /@iconify-json/ic@1.1.14:
+ resolution: {integrity: sha512-vbATa9uwb9pIsRWQ+iXObQCgLTePk/0vo4shBr3Td0GnTjsAU/7VUGTkrZFVf5vpgiG6OsXkcKMPzBPvt966sg==}
+ dependencies:
+ '@iconify/types': 2.0.0
+ dev: true
+
+ /@iconify/types@2.0.0:
+ resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==}
+ dev: true
+
+ /@iconify/utils@2.1.11:
+ resolution: {integrity: sha512-M/w3PkN8zQYXi8N6qK/KhnYMfEbbb6Sk8RZVn8g+Pmmu5ybw177RpsaGwpziyHeUsu4etrexYSWq3rwnIqzYCg==}
+ dependencies:
+ '@antfu/install-pkg': 0.1.1
+ '@antfu/utils': 0.7.6
+ '@iconify/types': 2.0.0
+ debug: 4.3.4
+ kolorist: 1.8.0
+ local-pkg: 0.4.3
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@jridgewell/sourcemap-codec@1.4.15:
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
- /@material-design-icons/svg@0.14.13:
- resolution: {integrity: sha512-nCExGZOtoLoFeeqShEOM4XA9DkkLzLlQdk/ZxHxps0//dz6e1Lw3fvQbZ2X/+0Dz2O+udiEukfZ4Nd4KpHg8aA==}
- dev: false
-
/@mdi/js@7.3.67:
resolution: {integrity: sha512-MnRjknFqpTC6FifhGHjZ0+QYq2bAkZFQqIj8JA2AdPZbBxUvr8QSgB2yPAJ8/ob/XkR41xlg5majDR3c1JP1hw==}
dev: true
@@ -1014,11 +1047,6 @@ packages:
'@tauri-apps/cli-win32-x64-msvc': 1.5.6
dev: true
- /@trysound/sax@0.2.0:
- resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==}
- engines: {node: '>=10.13.0'}
- dev: true
-
/@types/json-schema@7.0.15:
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
dev: true
@@ -1040,6 +1068,10 @@ packages:
resolution: {integrity: sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==}
dev: true
+ /@types/web-bluetooth@0.0.20:
+ resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
+ dev: false
+
/@typescript-eslint/eslint-plugin@6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2):
resolution: {integrity: sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==}
engines: {node: ^16.0.0 || >=18.0.0}
@@ -1336,7 +1368,7 @@ packages:
resolution: {integrity: sha512-CPuIReonid9+zOG/CGTT05FXrPYATEqoDGNrEaqS4hwcw5BUNM2FguC0mOwJD4Jr16UpRVl9N0pY3P+srIbqmg==}
dev: true
- /@vuetify/loader-shared@1.7.1(vue@3.3.8)(vuetify@3.4.1):
+ /@vuetify/loader-shared@1.7.1(vue@3.3.8)(vuetify@3.4.2):
resolution: {integrity: sha512-kLUvuAed6RCvkeeTNJzuy14pqnkur8lTuner7v7pNE/kVhPR97TuyXwBSBMR1cJeiLiOfu6SF5XlCYbXByEx1g==}
peerDependencies:
vue: ^3.0.0
@@ -1345,7 +1377,32 @@ packages:
find-cache-dir: 3.3.2
upath: 2.0.1
vue: 3.3.8(typescript@5.2.2)
- vuetify: 3.4.1(typescript@5.2.2)(vite-plugin-vuetify@1.0.2)(vue@3.3.8)
+ vuetify: 3.4.2(typescript@5.2.2)(vite-plugin-vuetify@1.0.2)(vue@3.3.8)
+
+ /@vueuse/core@10.6.1(vue@3.3.8):
+ resolution: {integrity: sha512-Pc26IJbqgC9VG1u6VY/xrXXfxD33hnvxBnKrLlA2LJlyHII+BSrRoTPJgGYq7qZOu61itITFUnm6QbacwZ4H8Q==}
+ dependencies:
+ '@types/web-bluetooth': 0.0.20
+ '@vueuse/metadata': 10.6.1
+ '@vueuse/shared': 10.6.1(vue@3.3.8)
+ vue-demi: 0.14.6(vue@3.3.8)
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ - vue
+ dev: false
+
+ /@vueuse/metadata@10.6.1:
+ resolution: {integrity: sha512-qhdwPI65Bgcj23e5lpGfQsxcy0bMjCAsUGoXkJ7DsoeDUdasbZ2DBa4dinFCOER3lF4gwUv+UD2AlA11zdzMFw==}
+ dev: false
+
+ /@vueuse/shared@10.6.1(vue@3.3.8):
+ resolution: {integrity: sha512-TECVDTIedFlL0NUfHWncf3zF9Gc4VfdxfQc8JFwoVZQmxpONhLxFrlm0eHQeidHj4rdTPL3KXJa0TZCk1wnc5Q==}
+ dependencies:
+ vue-demi: 0.14.6(vue@3.3.8)
+ transitivePeerDependencies:
+ - '@vue/composition-api'
+ - vue
+ dev: false
/acorn-jsx@5.3.2(acorn@8.11.2):
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
@@ -1403,6 +1460,14 @@ packages:
engines: {node: '>=12'}
dev: true
+ /anymatch@3.1.3:
+ resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
+ engines: {node: '>= 8'}
+ dependencies:
+ normalize-path: 3.0.0
+ picomatch: 2.3.1
+ dev: true
+
/argparse@2.0.1:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
dev: true
@@ -1451,6 +1516,11 @@ packages:
engines: {node: '>=0.6'}
dev: true
+ /binary-extensions@2.2.0:
+ resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
+ engines: {node: '>=8'}
+ dev: true
+
/boolbase@1.0.0:
resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}
dev: true
@@ -1541,6 +1611,21 @@ packages:
supports-color: 7.2.0
dev: true
+ /chokidar@3.5.3:
+ resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
+ engines: {node: '>= 8.10.0'}
+ dependencies:
+ anymatch: 3.1.3
+ braces: 3.0.2
+ glob-parent: 5.1.2
+ is-binary-path: 2.1.0
+ is-glob: 4.0.3
+ normalize-path: 3.0.0
+ readdirp: 3.6.0
+ optionalDependencies:
+ fsevents: 2.3.3
+ dev: true
+
/color-convert@1.9.3:
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
dependencies:
@@ -1566,11 +1651,6 @@ packages:
resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==}
dev: true
- /commander@7.2.0:
- resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
- engines: {node: '>= 10'}
- dev: true
-
/commondir@1.0.1:
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
@@ -1643,24 +1723,6 @@ packages:
postcss: 8.4.31
dev: true
- /css-select@5.1.0:
- resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==}
- dependencies:
- boolbase: 1.0.0
- css-what: 6.1.0
- domhandler: 5.0.3
- domutils: 3.1.0
- nth-check: 2.1.1
- dev: true
-
- /css-tree@2.2.1:
- resolution: {integrity: sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==}
- engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'}
- dependencies:
- mdn-data: 2.0.28
- source-map-js: 1.0.2
- dev: true
-
/css-tree@2.3.1:
resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==}
engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0}
@@ -1669,11 +1731,6 @@ packages:
source-map-js: 1.0.2
dev: true
- /css-what@6.1.0:
- resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==}
- engines: {node: '>= 6'}
- dev: true
-
/cssdb@7.9.0:
resolution: {integrity: sha512-WPMT9seTQq6fPAa1yN4zjgZZeoTriSN2LqW9C+otjar12DQIWA4LuSfFrvFJiKp4oD0xIk1vumDLw8K9ur4NBw==}
dev: true
@@ -1684,13 +1741,6 @@ packages:
hasBin: true
dev: true
- /csso@5.0.5:
- resolution: {integrity: sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==}
- engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'}
- dependencies:
- css-tree: 2.2.1
- dev: true
-
/csstype@3.1.2:
resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
@@ -2331,6 +2381,13 @@ packages:
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
dev: true
+ /is-binary-path@2.1.0:
+ resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
+ engines: {node: '>=8'}
+ dependencies:
+ binary-extensions: 2.2.0
+ dev: true
+
/is-core-module@2.13.1:
resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==}
dependencies:
@@ -2455,6 +2512,10 @@ packages:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
dev: true
+ /jsonc-parser@3.2.0:
+ resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==}
+ dev: true
+
/keyv@4.5.4:
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
dependencies:
@@ -2470,6 +2531,10 @@ packages:
resolution: {integrity: sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==}
dev: true
+ /kolorist@1.8.0:
+ resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==}
+ dev: true
+
/levn@0.4.1:
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
@@ -2487,6 +2552,19 @@ packages:
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: true
+ /local-pkg@0.4.3:
+ resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==}
+ engines: {node: '>=14'}
+ dev: true
+
+ /local-pkg@0.5.0:
+ resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==}
+ engines: {node: '>=14'}
+ dependencies:
+ mlly: 1.4.2
+ pkg-types: 1.0.3
+ dev: true
+
/locate-path@5.0.0:
resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==}
engines: {node: '>=8'}
@@ -2552,10 +2630,6 @@ packages:
resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==}
dev: true
- /mdn-data@2.0.28:
- resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==}
- dev: true
-
/mdn-data@2.0.30:
resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
dev: true
@@ -2637,6 +2711,15 @@ packages:
kind-of: 6.0.3
dev: true
+ /mlly@1.4.2:
+ resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==}
+ dependencies:
+ acorn: 8.11.2
+ pathe: 1.1.1
+ pkg-types: 1.0.3
+ ufo: 1.3.2
+ dev: true
+
/ms@2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
@@ -2849,6 +2932,10 @@ packages:
engines: {node: '>=8'}
dev: true
+ /pathe@1.1.1:
+ resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==}
+ dev: true
+
/picocolors@1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
@@ -2869,6 +2956,14 @@ packages:
dependencies:
find-up: 4.1.0
+ /pkg-types@1.0.3:
+ resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==}
+ dependencies:
+ jsonc-parser: 3.2.0
+ mlly: 1.4.2
+ pathe: 1.1.1
+ dev: true
+
/postcss-attribute-case-insensitive@6.0.2(postcss@8.4.31):
resolution: {integrity: sha512-IRuCwwAAQbgaLhxQdQcIIK0dCVXg3XDUnzgKD8iwdiYdwU4rMWRWyl/W9/0nA4ihVpq5pyALiHB2veBJ0292pw==}
engines: {node: ^14 || ^16 || >=18}
@@ -3299,6 +3394,13 @@ packages:
type-fest: 4.7.1
dev: true
+ /readdirp@3.6.0:
+ resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
+ engines: {node: '>=8.10.0'}
+ dependencies:
+ picomatch: 2.3.1
+ dev: true
+
/redent@4.0.0:
resolution: {integrity: sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==}
engines: {node: '>=12'}
@@ -3605,19 +3707,6 @@ packages:
resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==}
dev: true
- /svgo@3.0.3:
- resolution: {integrity: sha512-X4UZvLhOglD5Xrp834HzGHf8RKUW0Ahigg/08yRO1no9t2NxffOkMiQ0WmaMIbaGlVTlSst2zWANsdhz5ybXgA==}
- engines: {node: '>=14.0.0'}
- hasBin: true
- dependencies:
- '@trysound/sax': 0.2.0
- commander: 7.2.0
- css-select: 5.1.0
- css-tree: 2.3.1
- csso: 5.0.5
- picocolors: 1.0.0
- dev: true
-
/synckit@0.8.5:
resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==}
engines: {node: ^14.18.0 || >=16.0.0}
@@ -3707,9 +3796,53 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
+ /ufo@1.3.2:
+ resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==}
+ dev: true
+
/undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
+ /unplugin-icons@0.17.4:
+ resolution: {integrity: sha512-PHLxjBx3ZV8RUBvfMafFl8uWH88jHeZgOijcRpkwgne7y2Ovx7WI0Ltzzw3fjZQ7dGaDhB8udyKVdm9N2S6BIw==}
+ peerDependencies:
+ '@svgr/core': '>=7.0.0'
+ '@svgx/core': ^1.0.1
+ '@vue/compiler-sfc': ^3.0.2 || ^2.7.0
+ vue-template-compiler: ^2.6.12
+ vue-template-es2015-compiler: ^1.9.0
+ peerDependenciesMeta:
+ '@svgr/core':
+ optional: true
+ '@svgx/core':
+ optional: true
+ '@vue/compiler-sfc':
+ optional: true
+ vue-template-compiler:
+ optional: true
+ vue-template-es2015-compiler:
+ optional: true
+ dependencies:
+ '@antfu/install-pkg': 0.1.1
+ '@antfu/utils': 0.7.6
+ '@iconify/utils': 2.1.11
+ debug: 4.3.4
+ kolorist: 1.8.0
+ local-pkg: 0.5.0
+ unplugin: 1.5.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ /unplugin@1.5.0:
+ resolution: {integrity: sha512-9ZdRwbh/4gcm1JTOkp9lAkIDrtOyOxgHmY7cjuwI8L/2RTikMcVG25GsZwNAgRuap3iDw2jeq7eoqtAsz5rW3A==}
+ dependencies:
+ acorn: 8.11.2
+ chokidar: 3.5.3
+ webpack-sources: 3.2.3
+ webpack-virtual-modules: 0.5.0
+ dev: true
+
/untildify@4.0.0:
resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==}
engines: {node: '>=8'}
@@ -3747,29 +3880,22 @@ packages:
spdx-expression-parse: 3.0.1
dev: true
- /vite-plugin-vuetify@1.0.2(vite@5.0.0)(vue@3.3.8)(vuetify@3.4.1):
+ /vite-plugin-vuetify@1.0.2(vite@5.0.0)(vue@3.3.8)(vuetify@3.4.2):
resolution: {integrity: sha512-MubIcKD33O8wtgQXlbEXE7ccTEpHZ8nPpe77y9Wy3my2MWw/PgehP9VqTp92BLqr0R1dSL970Lynvisx3UxBFw==}
engines: {node: '>=12'}
peerDependencies:
vite: ^2.7.0 || ^3.0.0 || ^4.0.0
vuetify: ^3.0.0-beta.4
dependencies:
- '@vuetify/loader-shared': 1.7.1(vue@3.3.8)(vuetify@3.4.1)
+ '@vuetify/loader-shared': 1.7.1(vue@3.3.8)(vuetify@3.4.2)
debug: 4.3.4
upath: 2.0.1
vite: 5.0.0(@types/node@20.9.0)
- vuetify: 3.4.1(typescript@5.2.2)(vite-plugin-vuetify@1.0.2)(vue@3.3.8)
+ vuetify: 3.4.2(typescript@5.2.2)(vite-plugin-vuetify@1.0.2)(vue@3.3.8)
transitivePeerDependencies:
- supports-color
- vue
- /vite-svg-loader@4.0.0:
- resolution: {integrity: sha512-0MMf1yzzSYlV4MGePsLVAOqXsbF5IVxbn4EEzqRnWxTQl8BJg/cfwIzfQNmNQxZp5XXwd4kyRKF1LytuHZTnqA==}
- dependencies:
- '@vue/compiler-sfc': 3.3.8
- svgo: 3.0.3
- dev: true
-
/vite@5.0.0(@types/node@20.9.0):
resolution: {integrity: sha512-ESJVM59mdyGpsiNAeHQOR/0fqNoOyWPYesFto8FFZugfmhdHx8Fzd8sF3Q/xkVhZsyOxHfdM7ieiVAorI9RjFw==}
engines: {node: ^18.0.0 || >=20.0.0}
@@ -3805,6 +3931,21 @@ packages:
optionalDependencies:
fsevents: 2.3.3
+ /vue-demi@0.14.6(vue@3.3.8):
+ resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==}
+ engines: {node: '>=12'}
+ hasBin: true
+ requiresBuild: true
+ peerDependencies:
+ '@vue/composition-api': ^1.0.0-rc.1
+ vue: ^3.0.0-0 || ^2.6.0
+ peerDependenciesMeta:
+ '@vue/composition-api':
+ optional: true
+ dependencies:
+ vue: 3.3.8(typescript@5.2.2)
+ dev: false
+
/vue-eslint-parser@9.3.2(eslint@8.53.0):
resolution: {integrity: sha512-q7tWyCVaV9f8iQyIA5Mkj/S6AoJ9KBN8IeUSf3XEmBrOtxOZnfTg5s4KClbZBCK3GtnT/+RyCLZyDHuZwTuBjg==}
engines: {node: ^14.17.0 || >=16.0.0}
@@ -3857,8 +3998,8 @@ packages:
'@vue/shared': 3.3.8
typescript: 5.2.2
- /vuetify@3.4.1(typescript@5.2.2)(vite-plugin-vuetify@1.0.2)(vue@3.3.8):
- resolution: {integrity: sha512-mF/vKa923F/90JVZnF6xZVoEY5aWbtDt0feh6CFOh6PFmZ7fRUVWIvhlQcH4zwHMXF+HpTL9Mer1CwOpi4D4oQ==}
+ /vuetify@3.4.2(typescript@5.2.2)(vite-plugin-vuetify@1.0.2)(vue@3.3.8):
+ resolution: {integrity: sha512-WvfVmES1SkhrCfYcfzPp8jpfIM+L+OcN9EYiBM+4bpmsIXLNJyMv42QhoDDWihSO6/zbE8RqCtyHawpu4ApyzA==}
engines: {node: ^12.20 || >=14.13}
peerDependencies:
typescript: '>=4.7'
@@ -3877,9 +4018,18 @@ packages:
optional: true
dependencies:
typescript: 5.2.2
- vite-plugin-vuetify: 1.0.2(vite@5.0.0)(vue@3.3.8)(vuetify@3.4.1)
+ vite-plugin-vuetify: 1.0.2(vite@5.0.0)(vue@3.3.8)(vuetify@3.4.2)
vue: 3.3.8(typescript@5.2.2)
+ /webpack-sources@3.2.3:
+ resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==}
+ engines: {node: '>=10.13.0'}
+ dev: true
+
+ /webpack-virtual-modules@0.5.0:
+ resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==}
+ dev: true
+
/which@1.3.1:
resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==}
hasBin: true
diff --git a/src/App.vue b/src/App.vue
index 896cf52..d74f0b8 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,6 +1,8 @@
-
-
-
- 签名
- 校验
- 密钥管理
-
-
-
+
+
+
+
+
+ 签名
+ 校验
+
+ 密钥管理
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/FileSelector.vue b/src/components/FileSelector.vue
index 7dd08fe..41b3cd0 100644
--- a/src/components/FileSelector.vue
+++ b/src/components/FileSelector.vue
@@ -3,9 +3,10 @@ import { computed, onMounted, onUnmounted, ref } from "vue";
import { message, open } from "@tauri-apps/api/dialog";
import { listen, TauriEvent, type UnlistenFn } from "@tauri-apps/api/event";
-import { VBtn, VCard, VDialog, VImg } from "vuetify/components";
-import { mdiFolderOpen } from "@mdi/js";
-import UploadFile from "@material-design-icons/svg/two-tone/upload_file.svg?url";
+import { VBtn, VCard, VDialog, VIcon } from "vuetify/components";
+
+import UploadFile from "~icons/ic/twotone-upload-file";
+import FolderOpen from "~icons/ic/twotone-folder-open";
const props = defineProps<{ modelValue: string | undefined }>();
@@ -27,83 +28,49 @@ const SelectFile = async () => {
const hover = ref(false);
-let unlistenFileDrop: UnlistenFn | undefined;
-let unlistenFileDropHover: UnlistenFn | undefined;
-let unlistenFileDropCanceled: UnlistenFn | undefined;
-let unlistenBlur: UnlistenFn | undefined;
+let listeners: UnlistenFn[];
onMounted(async () => {
- unlistenFileDrop = await listen(
- TauriEvent.WINDOW_FILE_DROP,
- async (e) => {
+ listeners = await Promise.all([
+ listen(TauriEvent.WINDOW_FILE_DROP_HOVER, () => {
+ hover.value = true;
+ }),
+ listen(TauriEvent.WINDOW_FILE_DROP, async (e) => {
console.log(e.payload);
- if (e.payload.length > 1) {
+ if (e.payload.length != 1) {
await message(
- `You can only drop one file here.\nYou have selected: ${JSON.stringify(
- e.payload,
- )}`,
+ "You can only drop one file here.\n" +
+ "You have selected:\n" +
+ e.payload.join("\n"),
);
- return;
- }
- files.value = e.payload[0];
+ } else files.value = e.payload[0];
hover.value = false;
- },
- );
- unlistenFileDropHover = await listen(
- TauriEvent.WINDOW_FILE_DROP_HOVER,
- (e) => {
- console.log(e.payload);
- hover.value = true;
- },
- );
- unlistenFileDropCanceled = await listen(
- TauriEvent.WINDOW_FILE_DROP_CANCELLED,
- () => {
+ }),
+ listen(TauriEvent.WINDOW_FILE_DROP_CANCELLED, () => {
hover.value = false;
- },
- );
- unlistenBlur = await listen(TauriEvent.WINDOW_BLUR, () => {
- console.log("Blur");
- hover.value = false;
- });
+ }),
+ listen(TauriEvent.WINDOW_BLUR, () => {
+ hover.value = false;
+ }),
+ ]);
});
onUnmounted(() => {
- [
- unlistenFileDrop,
- unlistenFileDropHover,
- unlistenFileDropCanceled,
- unlistenBlur,
- ].forEach((unlisten) => {
- if (unlisten) {
- unlisten();
- }
- });
+ listeners.forEach((unlisten) => unlisten());
});
- 选择文件
+ 选择文件
-
+
拖拽至此处
-