diff --git a/docker-compose.yml b/docker-compose.yml index 518a257..f9396dd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,4 +19,4 @@ services: networks: pfcontrol-network: - driver: bridge + driver: bridge \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d8baad0..7d93a66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -146,474 +146,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", - "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz", - "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", - "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz", - "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", - "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", - "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", - "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", - "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", - "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", - "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", - "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", - "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", - "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", - "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", - "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", - "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", - "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", - "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", - "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", - "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", - "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", - "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", - "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", - "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", - "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", - "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">=18" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.9.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", @@ -1088,6 +620,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1105,6 +640,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1122,6 +660,9 @@ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1139,6 +680,9 @@ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1156,6 +700,9 @@ "riscv64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1173,6 +720,9 @@ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1190,6 +740,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1207,6 +760,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1495,6 +1051,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1512,6 +1071,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1529,6 +1091,9 @@ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1546,6 +1111,9 @@ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1563,6 +1131,9 @@ "riscv64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1580,6 +1151,9 @@ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1597,6 +1171,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1614,6 +1191,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -3612,6 +3192,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -3629,6 +3212,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -3646,6 +3232,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -3663,6 +3252,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -4844,49 +4436,6 @@ "node": ">= 0.4" } }, - "node_modules/esbuild": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz", - "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.28.0", - "@esbuild/android-arm": "0.28.0", - "@esbuild/android-arm64": "0.28.0", - "@esbuild/android-x64": "0.28.0", - "@esbuild/darwin-arm64": "0.28.0", - "@esbuild/darwin-x64": "0.28.0", - "@esbuild/freebsd-arm64": "0.28.0", - "@esbuild/freebsd-x64": "0.28.0", - "@esbuild/linux-arm": "0.28.0", - "@esbuild/linux-arm64": "0.28.0", - "@esbuild/linux-ia32": "0.28.0", - "@esbuild/linux-loong64": "0.28.0", - "@esbuild/linux-mips64el": "0.28.0", - "@esbuild/linux-ppc64": "0.28.0", - "@esbuild/linux-riscv64": "0.28.0", - "@esbuild/linux-s390x": "0.28.0", - "@esbuild/linux-x64": "0.28.0", - "@esbuild/netbsd-arm64": "0.28.0", - "@esbuild/netbsd-x64": "0.28.0", - "@esbuild/openbsd-arm64": "0.28.0", - "@esbuild/openbsd-x64": "0.28.0", - "@esbuild/openharmony-arm64": "0.28.0", - "@esbuild/sunos-x64": "0.28.0", - "@esbuild/win32-arm64": "0.28.0", - "@esbuild/win32-ia32": "0.28.0", - "@esbuild/win32-x64": "0.28.0" - } - }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -10333,7 +9882,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10350,7 +9898,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10367,7 +9914,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10384,7 +9930,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10401,7 +9946,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10418,7 +9962,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10435,7 +9978,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10452,7 +9994,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10469,7 +10010,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10486,7 +10026,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10503,7 +10042,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10520,7 +10058,6 @@ "cpu": [ "loong64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10537,7 +10074,6 @@ "cpu": [ "mips64el" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10554,7 +10090,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10571,7 +10106,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10588,7 +10122,6 @@ "cpu": [ "s390x" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10605,7 +10138,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10622,7 +10154,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10639,7 +10170,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10656,7 +10186,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10673,7 +10202,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10690,7 +10218,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10707,7 +10234,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10724,7 +10250,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10741,7 +10266,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -10758,7 +10282,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ diff --git a/src/components/Settings/AcarsSettings.tsx b/src/components/Settings/AcarsSettings.tsx index 218ca05..3ea09a9 100644 --- a/src/components/Settings/AcarsSettings.tsx +++ b/src/components/Settings/AcarsSettings.tsx @@ -1,501 +1,256 @@ -import { - Terminal, - StickyNote, - LayoutDashboard, - Eye, - ChevronDown, - ChevronUp, -} from 'lucide-react'; +import { Terminal, StickyNote, LayoutDashboard, Eye, ChevronDown, ChevronUp } from 'lucide-react'; import { useState, useEffect, useMemo, useRef } from 'react'; import type { Settings } from '../../types/settings'; import Button from '../common/Button'; +import Toggle from './Toggle'; +import { S } from './settingsTokens'; interface AcarsSettingsProps { settings: Settings | null; onChange: (updatedSettings: Settings) => void; } -export default function AcarsSettings({ - settings, - onChange, -}: AcarsSettingsProps) { +export default function AcarsSettings({ settings, onChange }: AcarsSettingsProps) { const [isExpanded, setIsExpanded] = useState(false); - const [isDragging, setIsDragging] = useState< - 'sidebar' | 'terminal' | 'notes' | null - >(null); - const [previewWidths, setPreviewWidths] = useState({ - sidebar: 30, - terminal: 50, - notes: 20, - }); - + const [isDragging, setIsDragging] = useState<'sidebar' | 'terminal' | 'notes' | null>(null); + const [previewWidths, setPreviewWidths] = useState({ sidebar: 30, terminal: 50, notes: 20 }); const containerRef = useRef(null); - const minSidebar = 10, - maxSidebar = 40; - const minTerminal = 20, - maxTerminal = 80; - const minNotes = 10, - maxNotes = 60; - - const calculatedWidths = useMemo(() => { - if (!settings) return { sidebar: 30, terminal: 50, notes: 20 }; - - let sidebarWidth = settings.acars.sidebarWidth ?? 30; - let terminalWidth = settings.acars.terminalWidth ?? 50; - let notesWidth = settings.acars.notesWidth ?? 20; - const notesEnabled = settings.acars.notesEnabled; - - sidebarWidth = Math.max(minSidebar, Math.min(maxSidebar, sidebarWidth)); - if (notesEnabled) { - notesWidth = Math.max(minNotes, Math.min(maxNotes, notesWidth)); - terminalWidth = 100 - sidebarWidth - notesWidth; - terminalWidth = Math.max(minTerminal, terminalWidth); - if (sidebarWidth + terminalWidth + notesWidth > 100) { - notesWidth = 100 - sidebarWidth - terminalWidth; - notesWidth = Math.max(minNotes, notesWidth); - } - } else { - notesWidth = 0; - terminalWidth = 100 - sidebarWidth; - terminalWidth = Math.max(minTerminal, terminalWidth); + const minSidebar = 10, maxSidebar = 40; + const minTerminal = 20, maxTerminal = 80; + const minNotes = 10, maxNotes = 60; + + const calculatedWidths = useMemo(() => { + if (!settings) return { sidebar: 30, terminal: 50, notes: 20 }; + const sidebarWidth = Math.max(minSidebar, Math.min(maxSidebar, settings.acars.sidebarWidth ?? 30)); + let terminalWidth = settings.acars.terminalWidth ?? 50; + let notesWidth = settings.acars.notesWidth ?? 20; + const notesEnabled = settings.acars.notesEnabled; + if (notesEnabled) { + notesWidth = Math.max(minNotes, Math.min(maxNotes, notesWidth)); + terminalWidth = 100 - sidebarWidth - notesWidth; + terminalWidth = Math.max(minTerminal, terminalWidth); + if (sidebarWidth + terminalWidth + notesWidth > 100) { + notesWidth = Math.max(minNotes, 100 - sidebarWidth - terminalWidth); } - - return { - sidebar: sidebarWidth, - terminal: terminalWidth, - notes: notesWidth, - }; - }, [settings]); + } else { + notesWidth = 0; + terminalWidth = Math.max(minTerminal, 100 - sidebarWidth); + } + return { sidebar: sidebarWidth, terminal: terminalWidth, notes: notesWidth }; +}, [settings]); useEffect(() => { - setPreviewWidths(calculatedWidths); - }, [calculatedWidths]); - - const handleNotesToggle = () => { - if (!settings) return; - const updatedSettings = { - ...settings, - acars: { - ...settings.acars, - notesEnabled: !settings.acars.notesEnabled, - }, - }; - onChange(updatedSettings); - }; - - const handleAutoRedirectToggle = () => { - if (!settings) return; - const updatedSettings = { - ...settings, - acars: { - ...settings.acars, - autoRedirectToAcars: !settings.acars.autoRedirectToAcars, - }, - }; - onChange(updatedSettings); - }; + if (!isDragging) setPreviewWidths(calculatedWidths); + }, [calculatedWidths, isDragging]); useEffect(() => { - if (!isDragging) { - setPreviewWidths(calculatedWidths); + if (isDragging) { + document.body.style.cursor = 'col-resize'; + document.body.style.userSelect = 'none'; + } else { + document.body.style.cursor = ''; + document.body.style.userSelect = ''; } - }, [calculatedWidths, isDragging]); - - const handleSidebarWidthChange = (width: number) => { - if (!settings) return; - console.log('Saving sidebarWidth', width); - const updatedSettings = { - ...settings, - acars: { - ...settings.acars, - sidebarWidth: width, - }, - }; - onChange(updatedSettings); - }; - - const handleTerminalWidthChange = (width: number) => { - if (!settings) return; - const updatedSettings = { - ...settings, - acars: { - ...settings.acars, - terminalWidth: width, - }, - }; - onChange(updatedSettings); - }; + }, [isDragging]); - const handleNotesWidthChange = (width: number) => { + const commitWidths = () => { if (!settings) return; - const updatedSettings = { + onChange({ ...settings, acars: { ...settings.acars, - notesWidth: width, + sidebarWidth: previewWidths.sidebar, + terminalWidth: previewWidths.terminal, + notesWidth: settings.acars.notesEnabled ? previewWidths.notes : settings.acars.notesWidth, }, - }; - onChange(updatedSettings); - }; - - const handleMouseDown = (divider: 'sidebar' | 'terminal' | 'notes') => { - setIsDragging(divider); + }); }; - const handleMouseMove = ( - e: MouseEvent | React.MouseEvent - ) => { + const handleMouseMove = (e: MouseEvent) => { if (!isDragging || !settings) return; - const container = containerRef.current; if (!container) return; const rect = container.getBoundingClientRect(); const x = e.clientX - rect.left; - let tempSidebar = previewWidths.sidebar; let tempTerminal = previewWidths.terminal; let tempNotes = previewWidths.notes; if (isDragging === 'sidebar') { const mouseSidebar = (x / rect.width) * 100; - tempSidebar = - Math.round( - Math.max(minSidebar, Math.min(maxSidebar, mouseSidebar)) / 5 - ) * 5; - + tempSidebar = Math.round(Math.max(minSidebar, Math.min(maxSidebar, mouseSidebar)) / 5) * 5; if (settings.acars.notesEnabled) { tempNotes = Math.max(minNotes, Math.min(maxNotes, previewWidths.notes)); - tempTerminal = 100 - tempSidebar - tempNotes; - tempTerminal = Math.max(minTerminal, tempTerminal); + tempTerminal = Math.max(minTerminal, 100 - tempSidebar - tempNotes); if (tempSidebar + tempTerminal + tempNotes > 100) { - tempNotes = 100 - tempSidebar - tempTerminal; - tempNotes = Math.max(minNotes, tempNotes); + tempNotes = Math.max(minNotes, 100 - tempSidebar - tempTerminal); } } else { tempNotes = 0; - tempTerminal = 100 - tempSidebar; - tempTerminal = Math.max(minTerminal, tempTerminal); + tempTerminal = Math.max(minTerminal, 100 - tempSidebar); } } else if (isDragging === 'terminal' && settings.acars.notesEnabled) { - const sidebar = previewWidths.sidebar; - const mouseTerminal = (x / rect.width) * 100 - sidebar; - tempTerminal = - Math.round( - Math.max(minTerminal, Math.min(maxTerminal, mouseTerminal)) / 5 - ) * 5; + const mouseTerminal = (x / rect.width) * 100 - previewWidths.sidebar; + tempTerminal = Math.round(Math.max(minTerminal, Math.min(maxTerminal, mouseTerminal)) / 5) * 5; tempSidebar = previewWidths.sidebar; - tempNotes = 100 - tempSidebar - tempTerminal; - tempNotes = Math.max(minNotes, tempNotes); - tempTerminal = 100 - tempSidebar - tempNotes; - tempTerminal = Math.max(minTerminal, tempTerminal); - } - - setPreviewWidths({ - sidebar: tempSidebar, - terminal: tempTerminal, - notes: tempNotes, - }); - }; - - const commitWidths = () => { - if (!settings) return; - onChange({ - ...settings, - acars: { - ...settings.acars, - sidebarWidth: previewWidths.sidebar, - terminalWidth: previewWidths.terminal, - notesWidth: settings.acars.notesEnabled - ? previewWidths.notes - : settings.acars.notesWidth, - }, - }); - }; - - const handleMouseUp = () => { - if (isDragging) { - commitWidths(); + tempNotes = Math.max(minNotes, 100 - tempSidebar - tempTerminal); + tempTerminal = Math.max(minTerminal, 100 - tempSidebar - tempNotes); } - setIsDragging(null); + setPreviewWidths({ sidebar: tempSidebar, terminal: tempTerminal, notes: tempNotes }); }; - useEffect(() => { - if (isDragging) { - document.body.style.cursor = 'col-resize'; - document.body.style.userSelect = 'none'; - } else { - document.body.style.cursor = ''; - document.body.style.userSelect = ''; - } - }, [isDragging]); - useEffect(() => { if (!isDragging) return; - - const handleGlobalMouseMove = (e: MouseEvent) => { - handleMouseMove(e); - }; - - const handleGlobalMouseUp = () => { - handleMouseUp(); - }; - - document.addEventListener('mousemove', handleGlobalMouseMove); - document.addEventListener('mouseup', handleGlobalMouseUp); - - return () => { - document.removeEventListener('mousemove', handleGlobalMouseMove); - document.removeEventListener('mouseup', handleGlobalMouseUp); - }; + const onMove = (e: MouseEvent) => handleMouseMove(e); + const onUp = () => { commitWidths(); setIsDragging(null); }; + document.addEventListener('mousemove', onMove); + document.addEventListener('mouseup', onUp); + return () => { document.removeEventListener('mousemove', onMove); document.removeEventListener('mouseup', onUp); }; }, [isDragging, previewWidths, settings]); - useEffect(() => { - console.log( - 'Rendered with settings.sidebarWidth', - settings?.acars.sidebarWidth - ); - }, [settings]); - if (!settings) return null; return ( -
- {/* Header */} -
-
-
setIsExpanded(!isExpanded)} - > -
- +
+
+
+
setIsExpanded(!isExpanded)}> +
+
-

- ACARS Settings -

-

- Configure ACARS terminal panels and default layout -

+

ACARS Settings

+

Configure ACARS terminal panels and default layout

-
- {/* Content */} -
-
+
+
+ {/* Panel Toggles */} -
-
-
- +
+
+
+
-

- Panel Visibility -

-

- Choose which panels are enabled in the ACARS terminal -

+

Panel Visibility

+

Choose which panels are enabled in the ACARS terminal

-
- {/* Notes Toggle */} -
-
- +
+
+
+
-

- Notes Panel -

-

- Flight notes and planning -

+

Notes Panel

+

Flight notes and planning

- + onChange({ ...settings, acars: { ...settings.acars, notesEnabled: !settings.acars.notesEnabled } })} + activeColor="bg-blue-600" + />
- - {/* Auto Redirect to ACARS Toggle */} -
-
- +
+
+
-

- Auto Redirect to ACARS -

-

- Automatically open ACARS after submitting flight plan - (PFATC sessions only) -

+

Auto Redirect to ACARS

+

Automatically open ACARS after submitting flight plan (PFATC sessions only)

- + onChange({ ...settings, acars: { ...settings.acars, autoRedirectToAcars: !(settings.acars.autoRedirectToAcars ?? true) } })} + activeColor="bg-green-600" + />
- {/* Interactive Visual Preview */} -
-
-
- + {/* Interactive Preview */} +
+
+
+
-

Preview

-

- Drag the divider to adjust default panel widths -

+

Preview

+

Drag the divider to adjust default panel widths

-
- {/* Sidebar */} -
+
- - Sidebar - + Sidebar
-
-
+
+
-
handleMouseDown('sidebar')} - > +
setIsDragging('sidebar')}>
- {/* Terminal */} -
+
- - Terminal - + Terminal
-
-
+
+
- {/* Terminal Divider */} - {settings.acars.notesEnabled && ( -
handleMouseDown('terminal')} - > -
-
- )} - {/* Notes */} {settings.acars.notesEnabled && ( -
-
- - - Notes - + <> +
setIsDragging('terminal')}> +
-
-
-
+
+
+ + Notes +
+
+
+
+
-
+ )}

- Sidebar: {previewWidths.sidebar}% • Terminal:{' '} - {previewWidths.terminal}% - {settings.acars.notesEnabled ? ( - <> • Notes: {previewWidths.notes}% - ) : null} + Sidebar: {previewWidths.sidebar}% • Terminal: {previewWidths.terminal}% + {settings.acars.notesEnabled && <> • Notes: {previewWidths.notes}%}

- {/* Info Section */} -
+
-
+
-

- ACARS Information -

+

ACARS Information

- Panel visibility and width settings apply to the ACARS - terminal interface on desktop. The Terminal panel cannot be - disabled. Changes take effect the next time you open an ACARS - terminal. + Panel visibility and width settings apply to the ACARS terminal interface on desktop. The Terminal + panel cannot be disabled. Changes take effect the next time you open an ACARS terminal.

@@ -504,4 +259,4 @@ export default function AcarsSettings({
); -} +} \ No newline at end of file diff --git a/src/components/Settings/AccountSettings.tsx b/src/components/Settings/AccountSettings.tsx index fb2f1f3..27bf6bc 100644 --- a/src/components/Settings/AccountSettings.tsx +++ b/src/components/Settings/AccountSettings.tsx @@ -10,7 +10,6 @@ import { Shield, AlertTriangle, FileText, - MessageSquare, } from 'lucide-react'; import { SiRoblox, SiDiscord } from 'react-icons/si'; import { updateTutorialStatus } from '../../utils/fetch/auth'; @@ -19,16 +18,14 @@ import { useNavigate } from 'react-router-dom'; import type { Settings } from '../../types/settings'; import PrivacySettings from './PrivacySettings'; import ConfirmationDialog from '../common/ConfirmationDialog'; +import { S } from './settingsTokens'; interface AccountSettingsProps { settings: Settings | null; onChange: (updatedSettings: Settings) => void; } -export default function AccountSettings({ - settings, - onChange, -}: AccountSettingsProps) { +export default function AccountSettings({ settings, onChange }: AccountSettingsProps) { const { user, refreshUser } = useAuth(); const navigate = useNavigate(); const [isPrivacyExpanded, setIsPrivacyExpanded] = useState(false); @@ -36,35 +33,18 @@ export default function AccountSettings({ const [showRobloxConfirm, setShowRobloxConfirm] = useState(false); const [showDeleteConfirm, setShowDeleteConfirm] = useState(false); const [deleteInProgress, setDeleteInProgress] = useState(false); - const isVatsimLinked = !!( - user?.vatsimCid || - user?.vatsimRatingShort || - user?.vatsimRatingLong - ); - const handleLinkRoblox = () => { - window.location.href = `${import.meta.env.VITE_SERVER_URL}/api/auth/roblox`; - }; + const isVatsimLinked = !!(user?.vatsimCid || user?.vatsimRatingShort || user?.vatsimRatingLong); - const handleLinkVatsim = () => { - window.location.href = `${import.meta.env.VITE_SERVER_URL}/api/auth/vatsim?force=1`; - }; + const handleLinkRoblox = () => { window.location.href = `${import.meta.env.VITE_SERVER_URL}/api/auth/roblox`; }; + const handleLinkVatsim = () => { window.location.href = `${import.meta.env.VITE_SERVER_URL}/api/auth/vatsim?force=1`; }; const handleUnlinkVatsim = async () => { setShowVatsimConfirm(false); try { - const res = await fetch( - `${import.meta.env.VITE_SERVER_URL}/api/auth/vatsim/unlink`, - { - method: 'POST', - credentials: 'include', - } - ); - if (res.ok) { - await refreshUser(); - } else { - alert('Failed to unlink VATSIM account'); - } + const res = await fetch(`${import.meta.env.VITE_SERVER_URL}/api/auth/vatsim/unlink`, { method: 'POST', credentials: 'include' }); + if (res.ok) await refreshUser(); + else alert('Failed to unlink VATSIM account'); } catch (e) { console.error('Unlink VATSIM error:', e); alert('Failed to unlink VATSIM account'); @@ -74,19 +54,9 @@ export default function AccountSettings({ const handleUnlinkRoblox = async () => { setShowRobloxConfirm(false); try { - const res = await fetch( - `${import.meta.env.VITE_SERVER_URL}/api/auth/roblox/unlink`, - { - method: 'POST', - credentials: 'include', - } - ); - - if (res.ok) { - await refreshUser(); - } else { - alert('Failed to unlink Roblox account'); - } + const res = await fetch(`${import.meta.env.VITE_SERVER_URL}/api/auth/roblox/unlink`, { method: 'POST', credentials: 'include' }); + if (res.ok) await refreshUser(); + else alert('Failed to unlink Roblox account'); } catch (error) { console.error('Error unlinking Roblox:', error); alert('Failed to unlink Roblox account'); @@ -96,12 +66,8 @@ export default function AccountSettings({ const handleRestartTutorial = async () => { try { const success = await updateTutorialStatus(false); - if (success) { - await refreshUser(); - navigate('/?tutorial=true'); - } else { - console.error('Failed to reset tutorial.'); - } + if (success) { await refreshUser(); navigate('/?tutorial=true'); } + else console.error('Failed to reset tutorial.'); } catch (error) { console.error('Error resetting tutorial:', error); } @@ -109,26 +75,14 @@ export default function AccountSettings({ const handleBioChange = (bio: string) => { if (!settings) return; - const updatedSettings = { - ...settings, - bio, - }; - onChange(updatedSettings); + onChange({ ...settings, bio }); }; const handleDeleteAccount = async () => { setShowDeleteConfirm(false); setDeleteInProgress(true); - try { - const res = await fetch( - `${import.meta.env.VITE_SERVER_URL}/api/auth/delete-account`, - { - method: 'DELETE', - credentials: 'include', - } - ); - + const res = await fetch(`${import.meta.env.VITE_SERVER_URL}/api/auth/delete-account`, { method: 'DELETE', credentials: 'include' }); if (res.ok) { localStorage.clear(); sessionStorage.clear(); @@ -145,359 +99,246 @@ export default function AccountSettings({ } }; - const handleJoinDiscord = () => { - window.open('https://cephie.app/discord', '_blank'); - }; + const handleJoinDiscord = () => { window.open('https://cephie.app/discord', '_blank'); }; return ( -
-
-
- -
-
-

- Account Settings -

-

- Manage your account preferences and connections -

+
+ {/* Header */} +
+
+
+ +
+
+

Account Settings

+

Manage your account preferences and connections

+
-
- {/* Settings Section */} -
-
-

- Settings -

-
- {/* Restart Tutorial */} -
-
-
-
- -
-
-

- Restart Tutorial -

-

- Restart the guided tutorial to learn PFControl features - again. -

+
+
+ + {/* Settings Section */} +
+

Settings

+
+
+
+
+ +
+
+

Restart Tutorial

+

Restart the guided tutorial to learn PFControl features again.

+
+
-
-
- {/* Bio Section */} -
-
-
- + {/* Bio Section */} +
+
+
+ +
+
+

Biography

+

Add a personal description to your profile (max 500 characters).

+
-
-

- Biography -

-

- Add a personal description to your profile (max 500 characters). -

+