From 96466b9199dc56481e5df30c7ef3b2e480477f6c Mon Sep 17 00:00:00 2001
From: neobooru <50623835+neobooru@users.noreply.github.com>
Date: Tue, 13 Jun 2023 23:45:55 +0200
Subject: [PATCH] Add experimental post filetype and (byte)size display
---
package.json | 2 ++
pnpm-lock.yaml | 13 ++++++++
src/components/PostInfoSummary.vue | 29 ++++++++++++++++++
src/models/index.ts | 15 +++++----
src/popup/pages/PopupMain.vue | 49 +++++++++++++++++++++---------
src/stores/index.ts | 1 +
src/utils.ts | 24 ++++++++++++++-
7 files changed, 111 insertions(+), 22 deletions(-)
create mode 100644 src/components/PostInfoSummary.vue
diff --git a/package.json b/package.json
index 8c7aad1..62f144f 100644
--- a/package.json
+++ b/package.json
@@ -28,6 +28,7 @@
"dependencies": {
"axios": "^1.2.2",
"basscss": "^8.1.0",
+ "byte-size": "^8.1.1",
"deepmerge": "^4.3.1",
"lodash": "^4.17.21",
"markdown-it": "^13.0.1",
@@ -41,6 +42,7 @@
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.2.1",
"@fortawesome/vue-fontawesome": "^3.0.3",
+ "@types/byte-size": "^8.1.0",
"@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.14.194",
"@types/markdown-it": "^12.2.3",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index af9abe4..06fb67b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -5,6 +5,7 @@ specifiers:
'@fortawesome/fontawesome-svg-core': ^6.2.1
'@fortawesome/free-solid-svg-icons': ^6.2.1
'@fortawesome/vue-fontawesome': ^3.0.3
+ '@types/byte-size': ^8.1.0
'@types/fs-extra': ^9.0.13
'@types/lodash': ^4.14.194
'@types/markdown-it': ^12.2.3
@@ -17,6 +18,7 @@ specifiers:
'@vueuse/core': ^9.6.0
axios: ^1.2.2
basscss: ^8.1.0
+ byte-size: ^8.1.1
chokidar: ^3.5.3
cross-env: ^7.0.3
crx: ^5.0.1
@@ -49,6 +51,7 @@ specifiers:
dependencies:
axios: 1.4.0
basscss: 8.1.0
+ byte-size: 8.1.1
deepmerge: 4.3.1
lodash: 4.17.21
markdown-it: 13.0.1
@@ -62,6 +65,7 @@ devDependencies:
'@fortawesome/fontawesome-svg-core': 6.4.0
'@fortawesome/free-solid-svg-icons': 6.4.0
'@fortawesome/vue-fontawesome': 3.0.3_5vq7vkrflr3ckmegqnktogj5ty
+ '@types/byte-size': 8.1.0
'@types/fs-extra': 9.0.13
'@types/lodash': 4.14.194
'@types/markdown-it': 12.2.3
@@ -872,6 +876,10 @@ packages:
engines: {node: '>= 10'}
dev: true
+ /@types/byte-size/8.1.0:
+ resolution: {integrity: sha512-LCIlZh8vyx+I2fgRycE1D34c33QDppYY6quBYYoaOpQ1nGhJ/avSP2VlrAefVotjJxgSk6WkKo0rTcCJwGG7vA==}
+ dev: true
+
/@types/chai-subset/1.3.3:
resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==}
dependencies:
@@ -1687,6 +1695,11 @@ packages:
safe-json-stringify: 1.2.0
dev: true
+ /byte-size/8.1.1:
+ resolution: {integrity: sha512-tUkzZWK0M/qdoLEqikxBWe4kumyuwjl3HO6zHTr4yEI23EojPtLYXdG1+AQY7MN0cGyNDvEaJ8wiYQm6P2bPxg==}
+ engines: {node: '>=12.17'}
+ dev: false
+
/c12/1.4.1:
resolution: {integrity: sha512-0x7pWfLZpZsgtyotXtuepJc0rZYE0Aw8PwNAXs0jSG9zq6Sl5xmbWnFqfmRY01ieZLHNbvneSFm9/x88CvzAuw==}
dependencies:
diff --git a/src/components/PostInfoSummary.vue b/src/components/PostInfoSummary.vue
new file mode 100644
index 0000000..f3472e1
--- /dev/null
+++ b/src/components/PostInfoSummary.vue
@@ -0,0 +1,29 @@
+
+
+
+