From e13267a8682d59c0128268dc5d2a24c8163ecb2e Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 18 Aug 2025 20:23:25 +0300 Subject: [PATCH] panel-linter-fix --- biome.json | 2 +- package-lock.json | 176 +++++++++++++-------------- package.json | 6 +- panel/modals/CommunityRolesModal.tsx | 2 +- panel/modals/InviteEditModal.tsx | 6 +- panel/modals/TopicEditModal.tsx | 2 +- panel/modals/TopicHierarchyModal.tsx | 2 +- panel/modals/TopicMergeModal.tsx | 2 +- panel/routes/authors.tsx | 7 +- panel/routes/communities.tsx | 111 +++++++++++------ panel/routes/permissions.tsx | 8 +- panel/routes/reactions.tsx | 2 +- panel/ui/Button.tsx | 2 +- panel/ui/CommunitySelector.tsx | 5 +- 14 files changed, 188 insertions(+), 145 deletions(-) diff --git a/biome.json b/biome.json index c594ce14..13860838 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.1.2/schema.json", + "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json", "files": { "includes": [ "**/*.tsx", diff --git a/package-lock.json b/package-lock.json index 3d962b29..ea99c1e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "publy-panel", - "version": "0.9.5", + "version": "0.9.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "publy-panel", - "version": "0.9.5", + "version": "0.9.7", "devDependencies": { - "@biomejs/biome": "^2.1.2", + "@biomejs/biome": "^2.2.0", "@graphql-codegen/cli": "^5.0.7", "@graphql-codegen/client-preset": "^4.8.3", "@graphql-codegen/typescript": "^4.1.6", @@ -21,9 +21,9 @@ "graphql-tag": "^2.12.6", "lightningcss": "^1.30.1", "prismjs": "^1.30.0", - "solid-js": "^1.9.7", + "solid-js": "^1.9.9", "terser": "^5.43.0", - "typescript": "^5.8.3", + "typescript": "^5.9.2", "vite": "^7.1.2", "vite-plugin-solid": "^2.11.7" } @@ -2059,9 +2059,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.2.tgz", - "integrity": "sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.3.tgz", + "integrity": "sha512-UmTdvXnLlqQNOCJnyksjPs1G4GqXNGW1LrzCe8+8QoaLhhDeTXYBgJ3k6x61WIhlHX2U+VzEJ55TtIjR/HTySA==", "cpu": [ "arm" ], @@ -2073,9 +2073,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.2.tgz", - "integrity": "sha512-nTeCWY83kN64oQ5MGz3CgtPx8NSOhC5lWtsjTs+8JAJNLcP3QbLCtDDgUKQc/Ro/frpMq4SHUaHN6AMltcEoLQ==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.3.tgz", + "integrity": "sha512-8NoxqLpXm7VyeI0ocidh335D6OKT0UJ6fHdnIxf3+6oOerZZc+O7r+UhvROji6OspyPm+rrIdb1gTXtVIqn+Sg==", "cpu": [ "arm64" ], @@ -2087,9 +2087,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.2.tgz", - "integrity": "sha512-HV7bW2Fb/F5KPdM/9bApunQh68YVDU8sO8BvcW9OngQVN3HHHkw99wFupuUJfGR9pYLLAjcAOA6iO+evsbBaPQ==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.3.tgz", + "integrity": "sha512-csnNavqZVs1+7/hUKtgjMECsNG2cdB8F7XBHP6FfQjqhjF8rzMzb3SLyy/1BG7YSfQ+bG75Ph7DyedbUqwq1rA==", "cpu": [ "arm64" ], @@ -2101,9 +2101,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.2.tgz", - "integrity": "sha512-SSj8TlYV5nJixSsm/y3QXfhspSiLYP11zpfwp6G/YDXctf3Xkdnk4woJIF5VQe0of2OjzTt8EsxnJDCdHd2xMA==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.3.tgz", + "integrity": "sha512-r2MXNjbuYabSIX5yQqnT8SGSQ26XQc8fmp6UhlYJd95PZJkQD1u82fWP7HqvGUf33IsOC6qsiV+vcuD4SDP6iw==", "cpu": [ "x64" ], @@ -2115,9 +2115,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.2.tgz", - "integrity": "sha512-ZyrsG4TIT9xnOlLsSSi9w/X29tCbK1yegE49RYm3tu3wF1L/B6LVMqnEWyDB26d9Ecx9zrmXCiPmIabVuLmNSg==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.3.tgz", + "integrity": "sha512-uluObTmgPJDuJh9xqxyr7MV61Imq+0IvVsAlWyvxAaBSNzCcmZlhfYcRhCdMaCsy46ccZa7vtDDripgs9Jkqsw==", "cpu": [ "arm64" ], @@ -2129,9 +2129,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.2.tgz", - "integrity": "sha512-pCgHFoOECwVCJ5GFq8+gR8SBKnMO+xe5UEqbemxBpCKYQddRQMgomv1104RnLSg7nNvgKy05sLsY51+OVRyiVw==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.3.tgz", + "integrity": "sha512-AVJXEq9RVHQnejdbFvh1eWEoobohUYN3nqJIPI4mNTMpsyYN01VvcAClxflyk2HIxvLpRcRggpX1m9hkXkpC/A==", "cpu": [ "x64" ], @@ -2143,9 +2143,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.2.tgz", - "integrity": "sha512-EtP8aquZ0xQg0ETFcxUbU71MZlHaw9MChwrQzatiE8U/bvi5uv/oChExXC4mWhjiqK7azGJBqU0tt5H123SzVA==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.3.tgz", + "integrity": "sha512-byyflM+huiwHlKi7VHLAYTKr67X199+V+mt1iRgJenAI594vcmGGddWlu6eHujmcdl6TqSNnvqaXJqZdnEWRGA==", "cpu": [ "arm" ], @@ -2157,9 +2157,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.2.tgz", - "integrity": "sha512-qO7F7U3u1nfxYRPM8HqFtLd+raev2K137dsV08q/LRKRLEc7RsiDWihUnrINdsWQxPR9jqZ8DIIZ1zJJAm5PjQ==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.3.tgz", + "integrity": "sha512-aLm3NMIjr4Y9LklrH5cu7yybBqoVCdr4Nvnm8WB7PKCn34fMCGypVNpGK0JQWdPAzR/FnoEoFtlRqZbBBLhVoQ==", "cpu": [ "arm" ], @@ -2171,9 +2171,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.2.tgz", - "integrity": "sha512-3dRaqLfcOXYsfvw5xMrxAk9Lb1f395gkoBYzSFcc/scgRFptRXL9DOaDpMiehf9CO8ZDRJW2z45b6fpU5nwjng==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.3.tgz", + "integrity": "sha512-VtilE6eznJRDIoFOzaagQodUksTEfLIsvXymS+UdJiSXrPW7Ai+WG4uapAc3F7Hgs791TwdGh4xyOzbuzIZrnw==", "cpu": [ "arm64" ], @@ -2185,9 +2185,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.2.tgz", - "integrity": "sha512-fhHFTutA7SM+IrR6lIfiHskxmpmPTJUXpWIsBXpeEwNgZzZZSg/q4i6FU4J8qOGyJ0TR+wXBwx/L7Ho9z0+uDg==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.3.tgz", + "integrity": "sha512-dG3JuS6+cRAL0GQ925Vppafi0qwZnkHdPeuZIxIPXqkCLP02l7ka+OCyBoDEv8S+nKHxfjvjW4OZ7hTdHkx8/w==", "cpu": [ "arm64" ], @@ -2199,9 +2199,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.2.tgz", - "integrity": "sha512-i7wfGFXu8x4+FRqPymzjD+Hyav8l95UIZ773j7J7zRYc3Xsxy2wIn4x+llpunexXe6laaO72iEjeeGyUFmjKeA==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.3.tgz", + "integrity": "sha512-iU8DxnxEKJptf8Vcx4XvAUdpkZfaz0KWfRrnIRrOndL0SvzEte+MTM7nDH4A2Now4FvTZ01yFAgj6TX/mZl8hQ==", "cpu": [ "loong64" ], @@ -2213,9 +2213,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.2.tgz", - "integrity": "sha512-B/l0dFcHVUnqcGZWKcWBSV2PF01YUt0Rvlurci5P+neqY/yMKchGU8ullZvIv5e8Y1C6wOn+U03mrDylP5q9Yw==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.3.tgz", + "integrity": "sha512-VrQZp9tkk0yozJoQvQcqlWiqaPnLM6uY1qPYXvukKePb0fqaiQtOdMJSxNFUZFsGw5oA5vvVokjHrx8a9Qsz2A==", "cpu": [ "ppc64" ], @@ -2227,9 +2227,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.2.tgz", - "integrity": "sha512-32k4ENb5ygtkMwPMucAb8MtV8olkPT03oiTxJbgkJa7lJ7dZMr0GCFJlyvy+K8iq7F/iuOr41ZdUHaOiqyR3iQ==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.3.tgz", + "integrity": "sha512-uf2eucWSUb+M7b0poZ/08LsbcRgaDYL8NCGjUeFMwCWFwOuFcZ8D9ayPl25P3pl+D2FH45EbHdfyUesQ2Lt9wA==", "cpu": [ "riscv64" ], @@ -2241,9 +2241,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.2.tgz", - "integrity": "sha512-t5B2loThlFEauloaQkZg9gxV05BYeITLvLkWOkRXogP4qHXLkWSbSHKM9S6H1schf/0YGP/qNKtiISlxvfmmZw==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.3.tgz", + "integrity": "sha512-7tnUcDvN8DHm/9ra+/nF7lLzYHDeODKKKrh6JmZejbh1FnCNZS8zMkZY5J4sEipy2OW1d1Ncc4gNHUd0DLqkSg==", "cpu": [ "riscv64" ], @@ -2255,9 +2255,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.2.tgz", - "integrity": "sha512-YKjekwTEKgbB7n17gmODSmJVUIvj8CX7q5442/CK80L8nqOUbMtf8b01QkG3jOqyr1rotrAnW6B/qiHwfcuWQA==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.3.tgz", + "integrity": "sha512-MUpAOallJim8CsJK+4Lc9tQzlfPbHxWDrGXZm2z6biaadNpvh3a5ewcdat478W+tXDoUiHwErX/dOql7ETcLqg==", "cpu": [ "s390x" ], @@ -2269,9 +2269,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.2.tgz", - "integrity": "sha512-Jj5a9RUoe5ra+MEyERkDKLwTXVu6s3aACP51nkfnK9wJTraCC8IMe3snOfALkrjTYd2G1ViE1hICj0fZ7ALBPA==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.3.tgz", + "integrity": "sha512-F42IgZI4JicE2vM2PWCe0N5mR5vR0gIdORPqhGQ32/u1S1v3kLtbZ0C/mi9FFk7C5T0PgdeyWEPajPjaUpyoKg==", "cpu": [ "x64" ], @@ -2283,9 +2283,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.2.tgz", - "integrity": "sha512-7kX69DIrBeD7yNp4A5b81izs8BqoZkCIaxQaOpumcJ1S/kmqNFjPhDu1LHeVXv0SexfHQv5cqHsxLOjETuqDuA==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.3.tgz", + "integrity": "sha512-oLc+JrwwvbimJUInzx56Q3ujL3Kkhxehg7O1gWAYzm8hImCd5ld1F2Gry5YDjR21MNb5WCKhC9hXgU7rRlyegQ==", "cpu": [ "x64" ], @@ -2297,9 +2297,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.2.tgz", - "integrity": "sha512-wiJWMIpeaak/jsbaq2HMh/rzZxHVW1rU6coyeNNpMwk5isiPjSTx0a4YLSlYDwBH/WBvLz+EtsNqQScZTLJy3g==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.3.tgz", + "integrity": "sha512-lOrQ+BVRstruD1fkWg9yjmumhowR0oLAAzavB7yFSaGltY8klttmZtCLvOXCmGE9mLIn8IBV/IFrQOWz5xbFPg==", "cpu": [ "arm64" ], @@ -2311,9 +2311,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.2.tgz", - "integrity": "sha512-gBgaUDESVzMgWZhcyjfs9QFK16D8K6QZpwAaVNJxYDLHWayOta4ZMjGm/vsAEy3hvlS2GosVFlBlP9/Wb85DqQ==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.3.tgz", + "integrity": "sha512-vvrVKPRS4GduGR7VMH8EylCBqsDcw6U+/0nPDuIjXQRbHJc6xOBj+frx8ksfZAh6+Fptw5wHrN7etlMmQnPQVg==", "cpu": [ "ia32" ], @@ -2325,9 +2325,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.2.tgz", - "integrity": "sha512-CvUo2ixeIQGtF6WvuB87XWqPQkoFAFqW+HUo/WzHwuHDvIwZCtjdWXoYCcr06iKGydiqTclC4jU/TNObC/xKZg==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.3.tgz", + "integrity": "sha512-fi3cPxCnu3ZeM3EwKZPgXbWoGzm2XHgB/WShKI81uj8wG0+laobmqy5wbgEwzstlbLu4MyO8C19FyhhWseYKNQ==", "cpu": [ "x64" ], @@ -5183,9 +5183,9 @@ "license": "MIT" }, "node_modules/rollup": { - "version": "4.46.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.46.2.tgz", - "integrity": "sha512-WMmLFI+Boh6xbop+OAGo9cQ3OgX9MIg7xOQjn+pTCwOkk+FNDAeAemXkJ3HzDJrVXleLOFVa1ipuc1AmEx1Dwg==", + "version": "4.46.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.46.3.tgz", + "integrity": "sha512-RZn2XTjXb8t5g13f5YclGoilU/kwT696DIkY3sywjdZidNSi3+vseaQov7D7BZXVJCPv3pDWUN69C78GGbXsKw==", "dev": true, "license": "MIT", "dependencies": { @@ -5199,26 +5199,26 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.46.2", - "@rollup/rollup-android-arm64": "4.46.2", - "@rollup/rollup-darwin-arm64": "4.46.2", - "@rollup/rollup-darwin-x64": "4.46.2", - "@rollup/rollup-freebsd-arm64": "4.46.2", - "@rollup/rollup-freebsd-x64": "4.46.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.46.2", - "@rollup/rollup-linux-arm-musleabihf": "4.46.2", - "@rollup/rollup-linux-arm64-gnu": "4.46.2", - "@rollup/rollup-linux-arm64-musl": "4.46.2", - "@rollup/rollup-linux-loongarch64-gnu": "4.46.2", - "@rollup/rollup-linux-ppc64-gnu": "4.46.2", - "@rollup/rollup-linux-riscv64-gnu": "4.46.2", - "@rollup/rollup-linux-riscv64-musl": "4.46.2", - "@rollup/rollup-linux-s390x-gnu": "4.46.2", - "@rollup/rollup-linux-x64-gnu": "4.46.2", - "@rollup/rollup-linux-x64-musl": "4.46.2", - "@rollup/rollup-win32-arm64-msvc": "4.46.2", - "@rollup/rollup-win32-ia32-msvc": "4.46.2", - "@rollup/rollup-win32-x64-msvc": "4.46.2", + "@rollup/rollup-android-arm-eabi": "4.46.3", + "@rollup/rollup-android-arm64": "4.46.3", + "@rollup/rollup-darwin-arm64": "4.46.3", + "@rollup/rollup-darwin-x64": "4.46.3", + "@rollup/rollup-freebsd-arm64": "4.46.3", + "@rollup/rollup-freebsd-x64": "4.46.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.46.3", + "@rollup/rollup-linux-arm-musleabihf": "4.46.3", + "@rollup/rollup-linux-arm64-gnu": "4.46.3", + "@rollup/rollup-linux-arm64-musl": "4.46.3", + "@rollup/rollup-linux-loongarch64-gnu": "4.46.3", + "@rollup/rollup-linux-ppc64-gnu": "4.46.3", + "@rollup/rollup-linux-riscv64-gnu": "4.46.3", + "@rollup/rollup-linux-riscv64-musl": "4.46.3", + "@rollup/rollup-linux-s390x-gnu": "4.46.3", + "@rollup/rollup-linux-x64-gnu": "4.46.3", + "@rollup/rollup-linux-x64-musl": "4.46.3", + "@rollup/rollup-win32-arm64-msvc": "4.46.3", + "@rollup/rollup-win32-ia32-msvc": "4.46.3", + "@rollup/rollup-win32-x64-msvc": "4.46.3", "fsevents": "~2.3.2" } }, diff --git a/package.json b/package.json index e53faf6d..ba59dbcb 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "codegen": "graphql-codegen --config codegen.ts" }, "devDependencies": { - "@biomejs/biome": "^2.1.2", + "@biomejs/biome": "^2.2.0", "@graphql-codegen/cli": "^5.0.7", "@graphql-codegen/client-preset": "^4.8.3", "@graphql-codegen/typescript": "^4.1.6", @@ -26,9 +26,9 @@ "graphql-tag": "^2.12.6", "lightningcss": "^1.30.1", "prismjs": "^1.30.0", - "solid-js": "^1.9.7", + "solid-js": "^1.9.9", "terser": "^5.43.0", - "typescript": "^5.8.3", + "typescript": "^5.9.2", "vite": "^7.1.2", "vite-plugin-solid": "^2.11.7" }, diff --git a/panel/modals/CommunityRolesModal.tsx b/panel/modals/CommunityRolesModal.tsx index a6c668c7..4d819c02 100644 --- a/panel/modals/CommunityRolesModal.tsx +++ b/panel/modals/CommunityRolesModal.tsx @@ -96,7 +96,7 @@ const CommunityRolesModal: Component = (props) => { const handleRoleToggle = (roleId: string) => { const currentRoles = userRoles() if (currentRoles.includes(roleId)) { - setUserRoles(currentRoles.filter((r) => r !== roleId)) + setUserRoles(currentRoles.filter((r) => r !== roleId)) } else { setUserRoles([...currentRoles, roleId]) } diff --git a/panel/modals/InviteEditModal.tsx b/panel/modals/InviteEditModal.tsx index fd401fb1..82fc1ba5 100644 --- a/panel/modals/InviteEditModal.tsx +++ b/panel/modals/InviteEditModal.tsx @@ -136,7 +136,7 @@ const InviteEditModal: Component = (props) => { updateField('inviter_id', Number.parseInt(e.target.value) || 0)} + onInput={(e) => updateField('inviter_id', Number.parseInt(e.target.value, 10) || 0)} class={`${formStyles.input} ${errors().inviter_id ? formStyles.error : ''} ${!isCreating() ? formStyles.disabled : ''}`} placeholder="1" required @@ -165,7 +165,7 @@ const InviteEditModal: Component = (props) => { updateField('author_id', Number.parseInt(e.target.value) || 0)} + onInput={(e) => updateField('author_id', Number.parseInt(e.target.value, 10) || 0)} class={`${formStyles.input} ${errors().author_id ? formStyles.error : ''} ${!isCreating() ? formStyles.disabled : ''}`} placeholder="2" required @@ -194,7 +194,7 @@ const InviteEditModal: Component = (props) => { updateField('shout_id', Number.parseInt(e.target.value) || 0)} + onInput={(e) => updateField('shout_id', Number.parseInt(e.target.value, 10) || 0)} class={`${formStyles.input} ${errors().shout_id ? formStyles.error : ''} ${!isCreating() ? formStyles.disabled : ''}`} placeholder="123" required diff --git a/panel/modals/TopicEditModal.tsx b/panel/modals/TopicEditModal.tsx index 5bd13c36..5156cfb5 100644 --- a/panel/modals/TopicEditModal.tsx +++ b/panel/modals/TopicEditModal.tsx @@ -91,7 +91,7 @@ export default function TopicEditModal(props: TopicEditModalProps) { * Обработка изменения выбора родительских топиков из таблеточек */ const handleParentSelectionChange = (selectedIds: string[]) => { - const parentIds = selectedIds.map((id) => Number.parseInt(id)) + const parentIds = selectedIds.map((id) => Number.parseInt(id, 10)) setFormData((prev) => ({ ...prev, parent_ids: parentIds diff --git a/panel/modals/TopicHierarchyModal.tsx b/panel/modals/TopicHierarchyModal.tsx index ce8184a1..97e0e3b5 100644 --- a/panel/modals/TopicHierarchyModal.tsx +++ b/panel/modals/TopicHierarchyModal.tsx @@ -204,7 +204,7 @@ const TopicHierarchyModal = (props: TopicHierarchyModalProps) => { // Добавляем в список изменений setChanges((prev) => [ - ...prev.filter((c) => c.topicId !== selectedId), + ...prev.filter((c) => c.topicId !== selectedId), { topicId: selectedId, newParentIds, diff --git a/panel/modals/TopicMergeModal.tsx b/panel/modals/TopicMergeModal.tsx index 673b8ec3..c2167198 100644 --- a/panel/modals/TopicMergeModal.tsx +++ b/panel/modals/TopicMergeModal.tsx @@ -130,7 +130,7 @@ const TopicMergeModal: Component = (props) => { */ const handleTargetTopicChange = (e: Event) => { const target = e.target as HTMLSelectElement - const topicId = target.value ? Number.parseInt(target.value) : null + const topicId = target.value ? Number.parseInt(target.value, 10) : null setTargetTopicId(topicId) // Убираем выбранную целевую тему из исходных тем diff --git a/panel/routes/authors.tsx b/panel/routes/authors.tsx index fc6a0bd5..a3f0f0e7 100644 --- a/panel/routes/authors.tsx +++ b/panel/routes/authors.tsx @@ -3,8 +3,8 @@ import type { AuthorsSortField } from '../context/sort' import { AUTHORS_SORT_CONFIG } from '../context/sortConfig' import { query } from '../graphql' import type { Query, AdminUserInfo as User } from '../graphql/generated/schema' -import { ADMIN_GET_USERS_QUERY } from '../graphql/queries' import { ADMIN_UPDATE_USER_MUTATION } from '../graphql/mutations' +import { ADMIN_GET_USERS_QUERY } from '../graphql/queries' import UserEditModal from '../modals/RolesModal' import styles from '../styles/Admin.module.css' import Pagination from '../ui/Pagination' @@ -84,7 +84,10 @@ const AuthorsRoute: Component = (props) => { email: userData.email, name: userData.name, slug: userData.slug, - roles: userData.roles.split(',').map(role => role.trim()).filter(role => role.length > 0) + roles: userData.roles + .split(',') + .map((role) => role.trim()) + .filter((role) => role.length > 0) } }) diff --git a/panel/routes/communities.tsx b/panel/routes/communities.tsx index 6392572c..89c2dd9b 100644 --- a/panel/routes/communities.tsx +++ b/panel/routes/communities.tsx @@ -1,13 +1,13 @@ import { Component, createEffect, createSignal, For, on, onMount, Show, untrack } from 'solid-js' import { useTableSort } from '../context/sort' import { COMMUNITIES_SORT_CONFIG } from '../context/sortConfig' +import { query } from '../graphql' import { CREATE_COMMUNITY_MUTATION, DELETE_COMMUNITY_MUTATION, UPDATE_COMMUNITY_MUTATION } from '../graphql/mutations' import { GET_COMMUNITIES_QUERY } from '../graphql/queries' -import { query } from '../graphql' import CommunityEditModal from '../modals/CommunityEditModal' import styles from '../styles/Table.module.css' import Button from '../ui/Button' @@ -22,19 +22,13 @@ interface Community { id: number slug: string name: string - desc?: string - pic: string - created_at: number - created_by?: { // Делаем created_by необязательным - id: number - name: string - email: string - } | null - stat: { - shouts: number - followers: number - authors: number - } + description: string + created_at: string + updated_at: string + creator_id: number + creator_name: string + followers_count: number + shouts_count: number } interface CommunitiesRouteProps { @@ -42,6 +36,53 @@ interface CommunitiesRouteProps { onSuccess: (message: string) => void } +// Types for GraphQL responses +interface CommunitiesResponse { + get_communities_all: Array<{ + id: number + name: string + slug: string + description: string + created_at: string + updated_at: string + creator_id: number + creator_name: string + followers_count: number + shouts_count: number + }> +} + +interface CreateCommunityResponse { + create_community: { + success: boolean + error?: string + community?: { + id: number + name: string + slug: string + } + } +} + +interface UpdateCommunityResponse { + update_community: { + success: boolean + error?: string + community?: { + id: number + name: string + slug: string + } + } +} + +interface DeleteCommunityResponse { + delete_community: { + success: boolean + error?: string + } +} + /** * Компонент для управления сообществами */ @@ -78,7 +119,7 @@ const CommunitiesRoute: Component = (props) => { const result = await query('/graphql', GET_COMMUNITIES_QUERY) // Получаем данные и сортируем их на клиенте - const communitiesData = (result as any)?.get_communities_all || [] + const communitiesData = (result as CommunitiesResponse)?.get_communities_all || [] const sortedCommunities = sortCommunities(communitiesData) setCommunities(sortedCommunities) } catch (error) { @@ -91,8 +132,8 @@ const CommunitiesRoute: Component = (props) => { /** * Форматирует дату */ - const formatDate = (timestamp: number): string => { - return new Date(timestamp * 1000).toLocaleDateString('ru-RU') + const formatDate = (dateString: string): string => { + return new Date(dateString).toLocaleDateString('ru-RU') } /** @@ -115,22 +156,22 @@ const CommunitiesRoute: Component = (props) => { comparison = (a.slug || '').localeCompare(b.slug || '', 'ru') break case 'created_at': - comparison = a.created_at - b.created_at + comparison = a.created_at.localeCompare(b.created_at, 'ru') break case 'created_by': { - const aName = a.created_by?.name || a.created_by?.email || '' - const bName = b.created_by?.name || b.created_by?.email || '' + const aName = a.creator_name || '' + const bName = b.creator_name || '' comparison = aName.localeCompare(bName, 'ru') break } case 'shouts': - comparison = (a.stat?.shouts || 0) - (b.stat?.shouts || 0) + comparison = (a.shouts_count || 0) - (b.shouts_count || 0) break case 'followers': - comparison = (a.stat?.followers || 0) - (b.stat?.followers || 0) + comparison = (a.followers_count || 0) - (b.followers_count || 0) break case 'authors': - comparison = (a.stat?.authors || 0) - (b.stat?.authors || 0) + comparison = (a.creator_id || 0) - (b.creator_id || 0) break default: comparison = a.id - b.id @@ -163,13 +204,15 @@ const CommunitiesRoute: Component = (props) => { const mutation = isCreating ? CREATE_COMMUNITY_MUTATION : UPDATE_COMMUNITY_MUTATION // Удаляем created_by, если он null или undefined - if (communityData.created_by === null || communityData.created_by === undefined) { - delete communityData.created_by + if (communityData.creator_id === null || communityData.creator_id === undefined) { + delete communityData.creator_id } const result = await query('/graphql', mutation, { community_input: communityData }) - const resultData = isCreating ? (result as any).create_community : (result as any).update_community + const resultData = isCreating + ? (result as CreateCommunityResponse).create_community + : (result as UpdateCommunityResponse).update_community if (resultData.error) { throw new Error(resultData.error) } @@ -191,7 +234,7 @@ const CommunitiesRoute: Component = (props) => { const deleteCommunity = async (slug: string) => { try { const result = await query('/graphql', DELETE_COMMUNITY_MUTATION, { slug }) - const deleteResult = (result as any).delete_community + const deleteResult = (result as DeleteCommunityResponse).delete_community if (deleteResult.error) { throw new Error(deleteResult.error) @@ -303,19 +346,17 @@ const CommunitiesRoute: Component = (props) => { 'text-overflow': 'ellipsis', 'white-space': 'nowrap' }} - title={community.desc} + title={community.description} > - {community.desc || '—'} + {community.description || '—'} - —}> - {community.created_by?.name || community.created_by?.email || ''} - + {community.creator_name || ''} - {community.stat.shouts} - {community.stat.followers} - {community.stat.authors} + {community.shouts_count} + {community.followers_count} + {community.creator_id} {formatDate(community.created_at)} e.stopPropagation()}>