diff --git a/package.json b/package.json index 1a017b4b..f8310c33 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@nanostores/vue": "1.0.0", "@tailwindcss/vite": "4.1.10", "@vueuse/core": "13.4.0", - "astro": "5.10.0", + "astro": "5.10.1", "class-variance-authority": "0.7.1", "clsx": "2.1.1", "lucide-vue-next": "0.523.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a9dd0f1b..39090b8e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: '@astrojs/vue': specifier: 5.1.0 - version: 5.1.0(@types/node@22.15.21)(astro@5.10.0(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(typescript@5.8.3)(yaml@2.8.0))(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(vue@3.5.17(typescript@5.8.3))(yaml@2.8.0) + version: 5.1.0(@types/node@22.15.21)(astro@5.10.1(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(typescript@5.8.3)(yaml@2.8.0))(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(vue@3.5.17(typescript@5.8.3))(yaml@2.8.0) '@nanostores/persistent': specifier: 1.0.0 version: 1.0.0(nanostores@1.0.1) @@ -24,8 +24,8 @@ importers: specifier: 13.4.0 version: 13.4.0(vue@3.5.17(typescript@5.8.3)) astro: - specifier: 5.10.0 - version: 5.10.0(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(typescript@5.8.3)(yaml@2.8.0) + specifier: 5.10.1 + version: 5.10.1(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(typescript@5.8.3)(yaml@2.8.0) class-variance-authority: specifier: 0.7.1 version: 0.7.1 @@ -1575,8 +1575,8 @@ packages: resolution: {integrity: sha512-JepyLROIad6f44uyqMF6HKE2QbunNzp3mYKRcPoDGt0QkxXmH222FAFC64WTyQu2Kg8NNEXHTN/sWuUId9sSxw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - astro@5.10.0: - resolution: {integrity: sha512-g/t54kVzQnFVijs+GbbbX/NBAFTl/3yNAEA/AQYq4FumLLVv7n4BIF+jKhcPGn9iFGyT1Cjvr7KB/qYyNvHEIg==} + astro@5.10.1: + resolution: {integrity: sha512-DJVmt+51jU1xmgmAHCDwuUgcG/5aVFSU+tcX694acAZqPVt8EMUAmUZcJDX36Z7/EztnPph9HR3pm72jS2EgHQ==} engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true @@ -4226,12 +4226,12 @@ snapshots: semver: 7.7.2 vscode-languageserver-textdocument: 1.0.12 - '@astrojs/vue@5.1.0(@types/node@22.15.21)(astro@5.10.0(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(typescript@5.8.3)(yaml@2.8.0))(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(vue@3.5.17(typescript@5.8.3))(yaml@2.8.0)': + '@astrojs/vue@5.1.0(@types/node@22.15.21)(astro@5.10.1(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(typescript@5.8.3)(yaml@2.8.0))(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(vue@3.5.17(typescript@5.8.3))(yaml@2.8.0)': dependencies: '@vitejs/plugin-vue': 5.2.1(vite@6.3.5(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) '@vitejs/plugin-vue-jsx': 4.2.0(vite@6.3.5(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) '@vue/compiler-sfc': 3.5.14 - astro: 5.10.0(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(typescript@5.8.3)(yaml@2.8.0) + astro: 5.10.1(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(typescript@5.8.3)(yaml@2.8.0) vite: 6.3.5(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(yaml@2.8.0) vite-plugin-vue-devtools: 7.7.6(rollup@4.41.0)(vite@6.3.5(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(yaml@2.8.0))(vue@3.5.17(typescript@5.8.3)) vue: 3.5.17(typescript@5.8.3) @@ -5622,7 +5622,7 @@ snapshots: transitivePeerDependencies: - supports-color - astro@5.10.0(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(typescript@5.8.3)(yaml@2.8.0): + astro@5.10.1(@types/node@22.15.21)(jiti@2.4.2)(lightningcss@1.30.1)(rollup@4.41.0)(typescript@5.8.3)(yaml@2.8.0): dependencies: '@astrojs/compiler': 2.12.2 '@astrojs/internal-helpers': 0.6.1 diff --git a/src/components/WaymarkBox.astro b/src/components/WaymarkBox.astro index 50b283d1..db154ad7 100644 --- a/src/components/WaymarkBox.astro +++ b/src/components/WaymarkBox.astro @@ -78,7 +78,7 @@ const { href, img, downloadLabel = '下载标点文件' }: Props = Astro.props #confirmOpen = false get disabled() { - return this.hasAttribute('disabled') + return this.hasAttribute('disabled') && this.getAttribute('disabled') !== 'false' } connectedCallback() { @@ -174,11 +174,6 @@ const { href, img, downloadLabel = '下载标点文件' }: Props = Astro.props cursor: pointer; } - :host([disabled]) { - cursor: not-allowed; - opacity: 0.6; - } - .container { position: relative; width: 100%; diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 39395a2c..1ba2361c 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -71,9 +71,7 @@ export function isValidURL(str: string): boolean { try { new URL(str) return true - } catch ( - _ // eslint-disable-line unused-imports/no-unused-vars - ) { + } catch { return false } }