diff --git a/.github/release-body.md b/.github/release-body.md index ca3e4a5..1e827ca 100644 --- a/.github/release-body.md +++ b/.github/release-body.md @@ -1,10 +1,12 @@ -### 2024-07-27 +### 2024-08-08 -### CHores -+ .devcontainer updated, [31872e437377bf006ada8e8e7af6a91cba877025] -+ dependencies updated, [5bc229fdc73213a7991fb08958b78a45cc0965d7] +### Chores ++ dependencies updated, [a31908bc5f049c8f660aeb3a3ca77eba7ec3fe80] + +### Features ++ Enable frontend cache management, [2e790779c4f39a67f53421b1e10c5ec401dc6e5a] ### Fixes -+ emit typing, [85392e00f6cb85ef7305048df4f38f1f4f1186f0] ++ SwitchRow isComponent ternary, [0bdbf77685894b413f2c6c1df76926cc88b74da4] see <a href='https://github.com/mrjackwills/staticpi_vue/blob/main/CHANGELOG.md'>CHANGELOG.md</a> for more details diff --git a/CHANGELOG.md b/CHANGELOG.md index b5e7024..4edf9ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,19 @@ +# <a href='https://github.com/mrjackwills/staticpi_vue/releases/tag/v0.1.14'>v0.1.14</a> +### 2024-08-08 + +### Chores ++ dependencies updated, [a31908bc](https://github.com/mrjackwills/staticpi_vue/commit/a31908bc5f049c8f660aeb3a3ca77eba7ec3fe80) + +### Features ++ Enable frontend cache management, [2e790779](https://github.com/mrjackwills/staticpi_vue/commit/2e790779c4f39a67f53421b1e10c5ec401dc6e5a) + +### Fixes ++ SwitchRow isComponent ternary, [0bdbf776](https://github.com/mrjackwills/staticpi_vue/commit/0bdbf77685894b413f2c6c1df76926cc88b74da4) + # <a href='https://github.com/mrjackwills/staticpi_vue/releases/tag/v0.1.13'>v0.1.13</a> ### 2024-07-27 -### CHores +### Chores + .devcontainer updated, [31872e43](https://github.com/mrjackwills/staticpi_vue/commit/31872e437377bf006ada8e8e7af6a91cba877025) + dependencies updated, [5bc229fd](https://github.com/mrjackwills/staticpi_vue/commit/5bc229fdc73213a7991fb08958b78a45cc0965d7) diff --git a/components.d.ts b/components.d.ts index b395052..9f60d0c 100644 --- a/components.d.ts +++ b/components.d.ts @@ -61,6 +61,7 @@ declare module 'vue' { ExtraBandwidthCell: typeof import('./src/components/Devices/AllDeviceTable/ExtraInformation/ExtraBandwidthCell.vue')['default'] ExtraBandwidthDetailed: typeof import('./src/components/Devices/AllDeviceTable/ExtraInformation/ExtraBandwidthDetailed.vue')['default'] ExtraBandwidthSimple: typeof import('./src/components/Devices/AllDeviceTable/ExtraInformation/ExtraBandwidthSimple.vue')['default'] + ExtraCache: typeof import('./src/components/Devices/AllDeviceTable/ExtraInformation/ExtraCache.vue')['default'] ExtraConnectedTable: typeof import('./src/components/Devices/AllDeviceTable/ExtraInformation/ExtraConnectedTable.vue')['default'] ExtraInfo: typeof import('./src/components/Devices/AllDeviceTable/ExtraInformation/ExtraInfo.vue')['default'] ExtraIp: typeof import('./src/components/Devices/AllDeviceTable/ExtraInformation/ExtraIp.vue')['default'] diff --git a/package-lock.json b/package-lock.json index f254e99..b83decc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,35 @@ { "name": "staticpi-vue", - "version": "0.1.12", + "version": "0.1.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "staticpi-vue", - "version": "0.1.12", + "version": "0.1.13", "dependencies": { "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", - "@vueuse/core": "^10.11.0", + "@vueuse/core": "^10.11.1", "@vueuse/head": "^2.0.0", - "axios": "^1.7.2", + "axios": "^1.7.3", "hibp": "^14.1.2", - "pinia": "^2.2.0", + "pinia": "^2.2.1", "pinia-plugin-persistedstate": "^3.2.1", "prismjs": "^1.29.0", "qrcode.vue": "^3.4.1", "secure-json-parse": "^2.7.0", - "vue": "^3.4.34", - "vue-router": "^4.4.0", - "vuetify": "^3.6.13" + "vue": "^3.4.37", + "vue-router": "^4.4.3", + "vuetify": "^3.6.14" }, "devDependencies": { "@mdi/js": "^7.4.47", - "@types/node": "^20.14.12", + "@types/node": "^22.1.0", "@types/prismjs": "^1.26.4", "@types/secure-json-parse": "^1.0.5", "@typescript-eslint/eslint-plugin": "^7.17.0", - "@vitejs/plugin-vue": "^5.1.1", + "@vitejs/plugin-vue": "^5.1.2", "@vue/eslint-config-typescript": "^13.0.0", "@vue/tsconfig": "^0.5.1", "eslint": "^8.57.0", @@ -39,10 +39,10 @@ "typescript-eslint": "^7.17.0", "unplugin-auto-import": "^0.18.2", "unplugin-vue-components": "^0.27.3", - "vite": "^5.3.5", + "vite": "^5.4.0", "vite-plugin-compression": "^0.5.1", "vite-plugin-pwa": "^0.20.1", - "vite-plugin-vuetify": "^2.0.3", + "vite-plugin-vuetify": "^2.0.4", "vue-tsc": "^2.0.29" } }, @@ -2436,9 +2436,10 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -2930,13 +2931,13 @@ "devOptional": true }, "node_modules/@types/node": { - "version": "20.14.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.12.tgz", - "integrity": "sha512-r7wNXakLeSsGT0H1AU863vS2wa5wBOK4bWMjZz2wj+8nBx+m5PeIn0k8AloSLpRuiwdRQZwarZqHE4FNArPuJQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", "devOptional": true, "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.13.0" } }, "node_modules/@types/prismjs": { @@ -3306,9 +3307,9 @@ } }, "node_modules/@vitejs/plugin-vue": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.1.tgz", - "integrity": "sha512-sDckXxlHpMsjRQbAH9WanangrfrblsOd3pNifePs+FOHjJg1jfWq5L/P0PsBRndEt3nmdUnmvieP8ULDeX5AvA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.2.tgz", + "integrity": "sha512-nY9IwH12qeiJqumTCLJLE7IiNx7HZ39cbHaysEUd+Myvbz9KAqd2yq+U01Kab1R/H1BmiyM2ShTYlNH32Fzo3A==", "dev": true, "license": "MIT", "engines": { @@ -3349,62 +3350,62 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.34.tgz", - "integrity": "sha512-Z0izUf32+wAnQewjHu+pQf1yw00EGOmevl1kE+ljjjMe7oEfpQ+BI3/JNK7yMB4IrUsqLDmPecUrpj3mCP+yJQ==", + "version": "3.4.37", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.37.tgz", + "integrity": "sha512-ZDDT/KiLKuCRXyzWecNzC5vTcubGz4LECAtfGPENpo0nrmqJHwuWtRLxk/Sb9RAKtR9iFflFycbkjkY+W/PZUQ==", "license": "MIT", "dependencies": { "@babel/parser": "^7.24.7", - "@vue/shared": "3.4.34", - "entities": "^4.5.0", + "@vue/shared": "3.4.37", + "entities": "^5.0.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-dom": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.34.tgz", - "integrity": "sha512-3PUOTS1h5cskdOJMExCu2TInXuM0j60DRPpSCJDqOCupCfUZCJoyQmKtRmA8EgDNZ5kcEE7vketamRZfrEuVDw==", + "version": "3.4.37", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.37.tgz", + "integrity": "sha512-rIiSmL3YrntvgYV84rekAtU/xfogMUJIclUMeIKEtVBFngOL3IeZHhsH3UaFEgB5iFGpj6IW+8YuM/2Up+vVag==", "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.4.34", - "@vue/shared": "3.4.34" + "@vue/compiler-core": "3.4.37", + "@vue/shared": "3.4.37" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.34.tgz", - "integrity": "sha512-x6lm0UrM03jjDXTPZgD9Ad8bIVD1ifWNit2EaWQIZB5CULr46+FbLQ5RpK7AXtDHGjx9rmvC7QRCTjsiGkAwRw==", + "version": "3.4.37", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.37.tgz", + "integrity": "sha512-vCfetdas40Wk9aK/WWf8XcVESffsbNkBQwS5t13Y/PcfqKfIwJX2gF+82th6dOpnpbptNMlMjAny80li7TaCIg==", "license": "MIT", "dependencies": { "@babel/parser": "^7.24.7", - "@vue/compiler-core": "3.4.34", - "@vue/compiler-dom": "3.4.34", - "@vue/compiler-ssr": "3.4.34", - "@vue/shared": "3.4.34", + "@vue/compiler-core": "3.4.37", + "@vue/compiler-dom": "3.4.37", + "@vue/compiler-ssr": "3.4.37", + "@vue/shared": "3.4.37", "estree-walker": "^2.0.2", "magic-string": "^0.30.10", - "postcss": "^8.4.39", + "postcss": "^8.4.40", "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-sfc/node_modules/magic-string": { - "version": "0.30.10", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", - "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "version": "0.30.11", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", + "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.34.tgz", - "integrity": "sha512-8TDBcLaTrFm5rnF+Qm4BlliaopJgqJ28Nsrc80qazynm5aJO+Emu7y0RWw34L8dNnTRdcVBpWzJxhGYzsoVu4g==", + "version": "3.4.37", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.37.tgz", + "integrity": "sha512-TyAgYBWrHlFrt4qpdACh8e9Ms6C/AZQ6A6xLJaWrCL8GCX5DxMzxyeFAEMfU/VFr4tylHm+a2NpfJpcd7+20XA==", "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.4.34", - "@vue/shared": "3.4.34" + "@vue/compiler-dom": "3.4.37", + "@vue/shared": "3.4.37" } }, "node_modules/@vue/compiler-vue2": { @@ -3500,53 +3501,53 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.34.tgz", - "integrity": "sha512-ua+Lo+wBRlBEX9TtgPOShE2JwIO7p6BTZ7t1KZVPoaBRfqbC7N3c8Mpzicx173fXxx5VXeU6ykiHo7WgLzJQDA==", + "version": "3.4.37", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.37.tgz", + "integrity": "sha512-UmdKXGx0BZ5kkxPqQr3PK3tElz6adTey4307NzZ3whZu19i5VavYal7u2FfOmAzlcDVgE8+X0HZ2LxLb/jgbYw==", "license": "MIT", "dependencies": { - "@vue/shared": "3.4.34" + "@vue/shared": "3.4.37" } }, "node_modules/@vue/runtime-core": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.34.tgz", - "integrity": "sha512-PXhkiRPwcPGJ1BnyBZFI96GfInCVskd0HPNIAZn7i3YOmLbtbTZpB7/kDTwC1W7IqdGPkTVC63IS7J2nZs4Ebg==", + "version": "3.4.37", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.37.tgz", + "integrity": "sha512-MNjrVoLV/sirHZoD7QAilU1Ifs7m/KJv4/84QVbE6nyAZGQNVOa1HGxaOzp9YqCG+GpLt1hNDC4RbH+KtanV7w==", "license": "MIT", "dependencies": { - "@vue/reactivity": "3.4.34", - "@vue/shared": "3.4.34" + "@vue/reactivity": "3.4.37", + "@vue/shared": "3.4.37" } }, "node_modules/@vue/runtime-dom": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.34.tgz", - "integrity": "sha512-dXqIe+RqFAK2Euak4UsvbIupalrhc67OuQKpD7HJ3W2fv8jlqvI7szfBCsAEcE8o/wyNpkloxB6J8viuF/E3gw==", + "version": "3.4.37", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.37.tgz", + "integrity": "sha512-Mg2EwgGZqtwKrqdL/FKMF2NEaOHuH+Ks9TQn3DHKyX//hQTYOun+7Tqp1eo0P4Ds+SjltZshOSRq6VsU0baaNg==", "license": "MIT", "dependencies": { - "@vue/reactivity": "3.4.34", - "@vue/runtime-core": "3.4.34", - "@vue/shared": "3.4.34", + "@vue/reactivity": "3.4.37", + "@vue/runtime-core": "3.4.37", + "@vue/shared": "3.4.37", "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.34.tgz", - "integrity": "sha512-GeyEUfMVRZMD/mZcNONEqg7MiU10QQ1DB3O/Qr6+8uXpbwdlmVgQ5Qs1/ZUAFX1X2UUtqMoGrDRbxdWfOJFT7Q==", + "version": "3.4.37", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.37.tgz", + "integrity": "sha512-jZ5FAHDR2KBq2FsRUJW6GKDOAG9lUTX8aBEGq4Vf6B/35I9fPce66BornuwmqmKgfiSlecwuOb6oeoamYMohkg==", "license": "MIT", "dependencies": { - "@vue/compiler-ssr": "3.4.34", - "@vue/shared": "3.4.34" + "@vue/compiler-ssr": "3.4.37", + "@vue/shared": "3.4.37" }, "peerDependencies": { - "vue": "3.4.34" + "vue": "3.4.37" } }, "node_modules/@vue/shared": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.34.tgz", - "integrity": "sha512-x5LmiRLpRsd9KTjAB8MPKf0CDPMcuItjP0gbNqFCIgL1I8iYp4zglhj9w9FPCdIbHG2M91RVeIbArFfFTz9I3A==", + "version": "3.4.37", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.37.tgz", + "integrity": "sha512-nIh8P2fc3DflG8+5Uw8PT/1i17ccFn0xxN/5oE9RfV5SVnd7G0XEFRwakrnNFE/jlS95fpGXDVG5zDETS26nmg==", "license": "MIT" }, "node_modules/@vue/tsconfig": { @@ -3653,14 +3654,14 @@ } }, "node_modules/@vueuse/core": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.0.tgz", - "integrity": "sha512-x3sD4Mkm7PJ+pcq3HX8PLPBadXCAlSDR/waK87dz0gQE+qJnaaFhc/dZVfJz+IUYzTMVGum2QlR7ImiJQN4s6g==", + "version": "10.11.1", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.1.tgz", + "integrity": "sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==", "license": "MIT", "dependencies": { "@types/web-bluetooth": "^0.0.20", - "@vueuse/metadata": "10.11.0", - "@vueuse/shared": "10.11.0", + "@vueuse/metadata": "10.11.1", + "@vueuse/shared": "10.11.1", "vue-demi": ">=0.14.8" }, "funding": { @@ -3708,18 +3709,18 @@ } }, "node_modules/@vueuse/metadata": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.0.tgz", - "integrity": "sha512-kQX7l6l8dVWNqlqyN3ePW3KmjCQO3ZMgXuBMddIu83CmucrsBfXlH+JoviYyRBws/yLTQO8g3Pbw+bdIoVm4oQ==", + "version": "10.11.1", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.1.tgz", + "integrity": "sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/shared": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.0.tgz", - "integrity": "sha512-fyNoIXEq3PfX1L3NkNhtVQUSRtqYwJtJg+Bp9rIzculIZWHTkKSysujrOk2J+NrRulLTQH9+3gGSfYLWSEWU1A==", + "version": "10.11.1", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.1.tgz", + "integrity": "sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==", "license": "MIT", "dependencies": { "vue-demi": ">=0.14.8" @@ -3729,9 +3730,9 @@ } }, "node_modules/@vueuse/shared/node_modules/vue-demi": { - "version": "0.14.8", - "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", - "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", + "version": "0.14.10", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.10.tgz", + "integrity": "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==", "hasInstallScript": true, "license": "MIT", "bin": { @@ -3932,9 +3933,9 @@ } }, "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz", + "integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -4590,9 +4591,9 @@ } }, "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-5.0.0.tgz", + "integrity": "sha512-BeJFvFRJddxobhvEdm5GqHzRV/X+ACeuw0/BuuxsCh1EUZcAIz8+kYmBp/LrQuloy6K1f3a0M7+IhmZ7QnkISA==", "license": "BSD-2-Clause", "engines": { "node": ">=0.12" @@ -6648,13 +6649,13 @@ } }, "node_modules/pinia": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.2.0.tgz", - "integrity": "sha512-iPrIh26GMqfpUlMOGyxuDowGmYousTecbTHFwT0xZ1zJvh23oQ+Cj99ZoPQA1TnUPhU6AuRPv6/drkTCJ0VHQA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.2.1.tgz", + "integrity": "sha512-ltEU3xwiz5ojVMizdP93AHi84Rtfz0+yKd8ud75hr9LVyWX2alxp7vLbY1kFm7MXFmHHr/9B08Xf8Jj6IHTEiQ==", "license": "MIT", "dependencies": { "@vue/devtools-api": "^6.6.3", - "vue-demi": "^0.14.8" + "vue-demi": "^0.14.10" }, "funding": { "url": "https://github.com/sponsors/posva" @@ -7925,10 +7926,11 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "devOptional": true + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", + "devOptional": true, + "license": "MIT" }, "node_modules/unhead": { "version": "1.7.4", @@ -8371,14 +8373,14 @@ "dev": true }, "node_modules/vite": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.5.tgz", - "integrity": "sha512-MdjglKR6AQXQb9JGiS7Rc2wC6uMjcm7Go/NHNO63EwiJXfuk9PgqiP/n5IDJCziMkfw9n4Ubp7lttNwz+8ZVKA==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.0.tgz", + "integrity": "sha512-5xokfMX0PIiwCMCMb9ZJcMyh5wbBun0zUzKib+L65vAZ8GY9ePZMXxFrHbr/Kyll2+LSCY7xtERPpxkBDKngwg==", "devOptional": true, "license": "MIT", "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.39", + "postcss": "^8.4.40", "rollup": "^4.13.0" }, "bin": { @@ -8398,6 +8400,7 @@ "less": "*", "lightningcss": "^1.21.0", "sass": "*", + "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" @@ -8415,6 +8418,9 @@ "sass": { "optional": true }, + "sass-embedded": { + "optional": true + }, "stylus": { "optional": true }, @@ -8472,10 +8478,11 @@ } }, "node_modules/vite-plugin-vuetify": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/vite-plugin-vuetify/-/vite-plugin-vuetify-2.0.3.tgz", - "integrity": "sha512-HbYajgGgb/noaVKNRhnnXIiQZrNXfNIeanUGAwXgOxL6h/KULS40Uf51Kyz8hNmdegF+DwjgXXI/8J1PNS83xw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vite-plugin-vuetify/-/vite-plugin-vuetify-2.0.4.tgz", + "integrity": "sha512-A4cliYUoP/u4AWSRVRvAPKgpgR987Pss7LpFa7s1GvOe8WjgDq92Rt3eVXrvgxGCWvZsPKziVqfHHdCMqeDhfw==", "devOptional": true, + "license": "MIT", "dependencies": { "@vuetify/loader-shared": "^2.0.3", "debug": "^4.3.3", @@ -8498,16 +8505,16 @@ "license": "MIT" }, "node_modules/vue": { - "version": "3.4.34", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.34.tgz", - "integrity": "sha512-VZze05HWlA3ItreQ/ka7Sx7PoD0/3St8FEiSlSTVgb6l4hL+RjtP2/8g5WQBzZgyf8WG2f+g1bXzC7zggLhAJA==", + "version": "3.4.37", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.37.tgz", + "integrity": "sha512-3vXvNfkKTBsSJ7JP+LyR7GBuwQuckbWvuwAid3xbqK9ppsKt/DUvfqgZ48fgOLEfpy1IacL5f8QhUVl77RaI7A==", "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.4.34", - "@vue/compiler-sfc": "3.4.34", - "@vue/runtime-dom": "3.4.34", - "@vue/server-renderer": "3.4.34", - "@vue/shared": "3.4.34" + "@vue/compiler-dom": "3.4.37", + "@vue/compiler-sfc": "3.4.37", + "@vue/runtime-dom": "3.4.37", + "@vue/server-renderer": "3.4.37", + "@vue/shared": "3.4.37" }, "peerDependencies": { "typescript": "*" @@ -8544,12 +8551,12 @@ } }, "node_modules/vue-router": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.4.0.tgz", - "integrity": "sha512-HB+t2p611aIZraV2aPSRNXf0Z/oLZFrlygJm+sZbdJaW6lcFqEDQwnzUBXn+DApw+/QzDU/I9TeWx9izEjTmsA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.4.3.tgz", + "integrity": "sha512-sv6wmNKx2j3aqJQDMxLFzs/u/mjA9Z5LCgy6BE0f7yFWMjrPLnS/sPNn8ARY/FXw6byV18EFutn5lTO6+UsV5A==", "license": "MIT", "dependencies": { - "@vue/devtools-api": "^6.5.1" + "@vue/devtools-api": "^6.6.3" }, "funding": { "url": "https://github.com/sponsors/posva" @@ -8577,9 +8584,9 @@ } }, "node_modules/vuetify": { - "version": "3.6.13", - "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-3.6.13.tgz", - "integrity": "sha512-Gz7jxXAkmff2m6CM0EUWOo/72TM322/3I6aDna++k1nPOW1/hNx4td1MZG4u75fzdn3r+uIe0dbF7SWuhu6DWA==", + "version": "3.6.14", + "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-3.6.14.tgz", + "integrity": "sha512-iSa3CgdTEt/7B0aGDmkBARe8rxDDycEYHu1zNtOf1Xpvs/Tv7Ql5yHGqM2XCY0h7SL8Dme39pJIovzg3q4JLbQ==", "license": "MIT", "engines": { "node": "^12.20 || >=14.13" diff --git a/package.json b/package.json index d0d21c8..542f3c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "staticpi-vue", - "version": "0.1.13", + "version": "0.1.14", "private": true, "type": "module", "scripts": { @@ -14,26 +14,26 @@ "dependencies": { "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", - "@vueuse/core": "^10.11.0", + "@vueuse/core": "^10.11.1", "@vueuse/head": "^2.0.0", - "axios": "^1.7.2", + "axios": "^1.7.3", "hibp": "^14.1.2", - "pinia": "^2.2.0", + "pinia": "^2.2.1", "pinia-plugin-persistedstate": "^3.2.1", "prismjs": "^1.29.0", "qrcode.vue": "^3.4.1", "secure-json-parse": "^2.7.0", - "vue": "^3.4.34", - "vue-router": "^4.4.0", - "vuetify": "^3.6.13" + "vue": "^3.4.37", + "vue-router": "^4.4.3", + "vuetify": "^3.6.14" }, "devDependencies": { "@mdi/js": "^7.4.47", - "@types/node": "^20.14.12", + "@types/node": "^22.1.0", "@types/prismjs": "^1.26.4", "@types/secure-json-parse": "^1.0.5", "@typescript-eslint/eslint-plugin": "^7.17.0", - "@vitejs/plugin-vue": "^5.1.1", + "@vitejs/plugin-vue": "^5.1.2", "@vue/eslint-config-typescript": "^13.0.0", "@vue/tsconfig": "^0.5.1", "eslint": "^8.57.0", @@ -43,12 +43,12 @@ "typescript-eslint": "^7.17.0", "unplugin-auto-import": "^0.18.2", "unplugin-vue-components": "^0.27.3", - "vite": "^5.3.5", + "vite": "^5.4.0", "vite-plugin-compression": "^0.5.1", "vite-plugin-pwa": "^0.20.1", - "vite-plugin-vuetify": "^2.0.3", + "vite-plugin-vuetify": "^2.0.4", "vue-tsc": "^2.0.29" }, - "buildDate": "Sat 27 2024 July 22:53:29 BST", + "buildDate": "Thu 08 2024 August 21:45:41 BST", "homepage": "https://github.com/mrjackwills/staticpi_vue" } diff --git a/src/components/Devices/AddDevice.vue b/src/components/Devices/AddDevice.vue index e42d1f5..f5ac591 100644 --- a/src/components/Devices/AddDevice.vue +++ b/src/components/Devices/AddDevice.vue @@ -63,7 +63,6 @@ /> </v-col> <v-col cols='12' class='mb-n4'> - <SwitchRow @client_passwordInput='client_passwordInput' @device_passwordInput='device_passwordInput' diff --git a/src/components/Devices/AddDevice/SwitchRow.vue b/src/components/Devices/AddDevice/SwitchRow.vue index 3dea122..629f662 100644 --- a/src/components/Devices/AddDevice/SwitchRow.vue +++ b/src/components/Devices/AddDevice/SwitchRow.vue @@ -49,7 +49,7 @@ watch(switched, (i) => { }); const isComponent = computed(() => { - return props.component === 'DevicePassword' ? DevicePassword : MaxClients; + return props.component === 'DevicePassword' ? DevicePassword : props.component === 'MaxClients'? MaxClients : null; }); const props = defineProps<{ diff --git a/src/components/Devices/AllDeviceTable/ExtraInformation/ExtraCache.vue b/src/components/Devices/AllDeviceTable/ExtraInformation/ExtraCache.vue new file mode 100644 index 0000000..d6cbdff --- /dev/null +++ b/src/components/Devices/AllDeviceTable/ExtraInformation/ExtraCache.vue @@ -0,0 +1,107 @@ +<template> + + <v-row class='ma-0 pa-0 no gutters' align='center'> + <v-col cols='12' class='ma-0 pa-0 my-2'> + <ActionButton + @click='check_cache' + :block='true' + :disabled='isFreeUser || local_loading' + :icon='mdiRefresh' + :small='true' + text='check cache' + color='secondary' + /> + </v-col> + </v-row> + + <v-row class='ma-0 pa-0 no gutters' align='center' v-if='cache && !hide'> + + <v-col cols='12' class='ma-0 pa-0 mb-3'> + <span class='text-pi'>cache:</span> {{ cache }} + </v-col> + + <v-col cols='12' class='ma-0 pa-0'> + <ActionButton + @click='delete_cache' + :block='true' + :disabled='isFreeUser || local_loading || !cache' + :icon='mdiDelete' + :small='true' + text='delete cache' + color='pi' + /> + </v-col> + + </v-row> + + <v-row class='ma-0 pa-0 no gutters' align='center' v-if='!cache && !hide'> + <v-col cols='12' class='ma-0 pa-0 text-center'> + no cache found + </v-col> + + </v-row> + +</template> + +<script setup lang='ts'> +import { axios_device } from '@/services/axios'; +import { dialoger } from '@/services/dialog'; +import { snackSuccess } from '@/services/snack'; +import type { TAuthObject, TDeviceInfo } from '@/types'; +import { mdiDelete, mdiRefresh } from '@mdi/js'; + +const loading = computed({ + get (): boolean { + return loadingModule().loading; + }, + set (b: boolean): void { + loadingModule().set_loading(b); + } +}); +const cache = ref(''); +const props = defineProps<{device: TDeviceInfo}>(); +const local_loading = ref(false); + +const hide = ref(true); + +const check_cache = async (): Promise<void>=> { + if (hide.value) { + hide.value = false; + } + local_loading.value = true; + loading.value = true; + cache.value = await axios_device.cache_get(props.device.name_of_device); + local_loading.value = false; + loading.value = false; + +}; + +const delete_cache = (): void => { + dialoger({ + message: `Delete the message cache for "${props.device.name_of_device}"`, + icon: mdiDelete, + buttonText: 'delete', + title: 'Delete message cache', + confirmMethod: delete_cache_confirm, + passwordrequired: true, + twoFABackup: false, + twoFARequired: false, + }); +}; + +const delete_cache_confirm = async (authentication: TAuthObject): Promise<void> => { + loading.value = true; + local_loading.value = true; + const response = await axios_device.cache_delete({ authentication, name: props.device.name_of_device }); + loading.value = false; + local_loading.value = false; + if (response) { + snackSuccess({ message: `"${props.device.name_of_device}" message cache deleted`, icon: mdiDelete }); + await check_cache(); + } +}; + +const isFreeUser = computed((): boolean => { + return userModule().isFreeUser; +}); +</script> \ No newline at end of file diff --git a/src/components/Devices/AllDeviceTable/ExtraInformation/ExtraInfo.vue b/src/components/Devices/AllDeviceTable/ExtraInformation/ExtraInfo.vue index 34e34bd..4089659 100644 --- a/src/components/Devices/AllDeviceTable/ExtraInformation/ExtraInfo.vue +++ b/src/components/Devices/AllDeviceTable/ExtraInformation/ExtraInfo.vue @@ -21,6 +21,12 @@ </v-col> </v-row> + <v-row align='center' justify='center' class='ma-0 pa-0 no-gutters'> + <v-col cols='11' class='ma-0 pa-0 text-center ma-1'> + <ExtraCache :device='device' /> + </v-col> + </v-row> + <v-row align='start' justify='center' class='ma-0 pa-0 no-gutters' > <v-col cols='11' class='ma-0 pa-0'> <v-row align='start' justify='center' class='ma-0 pa-0 no-gutters'> diff --git a/src/services/axios.ts b/src/services/axios.ts index fb981fb..3c1e46a 100644 --- a/src/services/axios.ts +++ b/src/services/axios.ts @@ -601,6 +601,21 @@ class Device extends BaseAxios { await this.baseAxios.patch(`/${input.name}/api_key`, { ...input.authentication }); return true; } + + @wrap<Required<types.TBaseDevicePatch>>() + @isAuthenticated<Required<types.TBaseDevicePatch>>() + async cache_delete (input: Required<types.TBaseDevicePatch>): Promise<boolean> { + await this.baseAxios.delete(`/${input.name}/cache`, { data: { ...input.authentication } }); + return true; + } + + @wrap<types.TDeviceNamedGet>() + @isAuthenticated<types.TDeviceNamedGet>() + async cache_get (name: string): Promise<string> { + if (!name) throw Error('No device name given'); + const response = await this.baseAxios.get(`/${name}/cache`); + return response?.data?.response.cache; + } }