Compare commits
2 Commits
49a8ec9286
...
86972287b4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86972287b4 | ||
| c196ffc265 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
target/
|
target/
|
||||||
cache/
|
cache/
|
||||||
|
tokens.bin
|
||||||
|
.auth_key
|
||||||
@ -29,11 +29,11 @@
|
|||||||
"ts-proto": "^2.8.3",
|
"ts-proto": "^2.8.3",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
"typescript-eslint": "^8.48.1",
|
"typescript-eslint": "^8.48.1",
|
||||||
"vite": "npm:rolldown-vite@7.2.5"
|
"vite": "npm:rolldown-vite@7.3.1"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"vite": "npm:rolldown-vite@7.2.5"
|
"vite": "npm:rolldown-vite@7.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
167
frontend/pnpm-lock.yaml
generated
167
frontend/pnpm-lock.yaml
generated
@ -5,7 +5,7 @@ settings:
|
|||||||
excludeLinksFromLockfile: false
|
excludeLinksFromLockfile: false
|
||||||
|
|
||||||
overrides:
|
overrides:
|
||||||
vite: npm:rolldown-vite@7.2.5
|
vite: npm:rolldown-vite@7.3.1
|
||||||
|
|
||||||
importers:
|
importers:
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ importers:
|
|||||||
version: 19.2.3(@types/react@19.2.7)
|
version: 19.2.3(@types/react@19.2.7)
|
||||||
'@vitejs/plugin-react':
|
'@vitejs/plugin-react':
|
||||||
specifier: ^5.1.2
|
specifier: ^5.1.2
|
||||||
version: 5.1.2(rolldown-vite@7.2.5(@types/node@24.10.1))
|
version: 5.1.2(rolldown-vite@7.3.1(@types/node@24.10.1))
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^9.39.1
|
specifier: ^9.39.1
|
||||||
version: 9.39.1
|
version: 9.39.1
|
||||||
@ -61,8 +61,8 @@ importers:
|
|||||||
specifier: ^8.48.1
|
specifier: ^8.48.1
|
||||||
version: 8.48.1(eslint@9.39.1)(typescript@5.9.3)
|
version: 8.48.1(eslint@9.39.1)(typescript@5.9.3)
|
||||||
vite:
|
vite:
|
||||||
specifier: npm:rolldown-vite@7.2.5
|
specifier: npm:rolldown-vite@7.3.1
|
||||||
version: rolldown-vite@7.2.5(@types/node@24.10.1)
|
version: rolldown-vite@7.3.1(@types/node@24.10.1)
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
@ -234,99 +234,90 @@ packages:
|
|||||||
'@napi-rs/wasm-runtime@1.1.0':
|
'@napi-rs/wasm-runtime@1.1.0':
|
||||||
resolution: {integrity: sha512-Fq6DJW+Bb5jaWE69/qOE0D1TUN9+6uWhCeZpdnSBk14pjLcCWR7Q8n49PTSPHazM37JqrsdpEthXy2xn6jWWiA==}
|
resolution: {integrity: sha512-Fq6DJW+Bb5jaWE69/qOE0D1TUN9+6uWhCeZpdnSBk14pjLcCWR7Q8n49PTSPHazM37JqrsdpEthXy2xn6jWWiA==}
|
||||||
|
|
||||||
'@oxc-project/runtime@0.97.0':
|
'@oxc-project/runtime@0.101.0':
|
||||||
resolution: {integrity: sha512-yH0zw7z+jEws4dZ4IUKoix5Lh3yhqIJWF9Dc8PWvhpo7U7O+lJrv7ZZL4BeRO0la8LBQFwcCewtLBnVV7hPe/w==}
|
resolution: {integrity: sha512-t3qpfVZIqSiLQ5Kqt/MC4Ge/WCOGrrcagAdzTcDaggupjiGxUx4nJF2v6wUCXWSzWHn5Ns7XLv13fCJEwCOERQ==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
|
|
||||||
'@oxc-project/types@0.97.0':
|
'@oxc-project/types@0.101.0':
|
||||||
resolution: {integrity: sha512-lxmZK4xFrdvU0yZiDwgVQTCvh2gHWBJCBk5ALsrtsBWhs0uDIi+FTOnXRQeQfs304imdvTdaakT/lqwQ8hkOXQ==}
|
resolution: {integrity: sha512-nuFhqlUzJX+gVIPPfuE6xurd4lST3mdcWOhyK/rZO0B9XWMKm79SuszIQEnSMmmDhq1DC8WWVYGVd+6F93o1gQ==}
|
||||||
|
|
||||||
'@rolldown/binding-android-arm64@1.0.0-beta.50':
|
'@rolldown/binding-android-arm64@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-XlEkrOIHLyGT3avOgzfTFSjG+f+dZMw+/qd+Y3HLN86wlndrB/gSimrJCk4gOhr1XtRtEKfszpadI3Md4Z4/Ag==}
|
resolution: {integrity: sha512-Ok9V8o7o6YfSdTTYA/uHH30r3YtOxLD6G3wih/U9DO0ucBBFq8WPt/DslU53OgfteLRHITZny9N/qCUxMf9kjQ==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [android]
|
os: [android]
|
||||||
|
|
||||||
'@rolldown/binding-darwin-arm64@1.0.0-beta.50':
|
'@rolldown/binding-darwin-arm64@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-+JRqKJhoFlt5r9q+DecAGPLZ5PxeLva+wCMtAuoFMWPoZzgcYrr599KQ+Ix0jwll4B4HGP43avu9My8KtSOR+w==}
|
resolution: {integrity: sha512-yIsKqMz0CtRnVa6x3Pa+mzTihr4Ty+Z6HfPbZ7RVbk1Uxnco4+CUn7Qbm/5SBol1JD/7nvY8rphAgyAi7Lj6Vg==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@rolldown/binding-darwin-x64@1.0.0-beta.50':
|
'@rolldown/binding-darwin-x64@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-fFXDjXnuX7/gQZQm/1FoivVtRcyAzdjSik7Eo+9iwPQ9EgtA5/nB2+jmbzaKtMGG3q+BnZbdKHCtOacmNrkIDA==}
|
resolution: {integrity: sha512-GTXe+mxsCGUnJOFMhfGWmefP7Q9TpYUseHvhAhr21nCTgdS8jPsvirb0tJwM3lN0/u/cg7bpFNa16fQrjKrCjQ==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [darwin]
|
os: [darwin]
|
||||||
|
|
||||||
'@rolldown/binding-freebsd-x64@1.0.0-beta.50':
|
'@rolldown/binding-freebsd-x64@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-F1b6vARy49tjmT/hbloplzgJS7GIvwWZqt+tAHEstCh0JIh9sa8FAMVqEmYxDviqKBaAI8iVvUREm/Kh/PD26Q==}
|
resolution: {integrity: sha512-9Tmp7bBvKqyDkMcL4e089pH3RsjD3SUungjmqWtyhNOxoQMh0fSmINTyYV8KXtE+JkxYMPWvnEt+/mfpVCkk8w==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [freebsd]
|
os: [freebsd]
|
||||||
|
|
||||||
'@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.50':
|
'@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-U6cR76N8T8M6lHj7EZrQ3xunLPxSvYYxA8vJsBKZiFZkT8YV4kjgCO3KwMJL0NOjQCPGKyiXO07U+KmJzdPGRw==}
|
resolution: {integrity: sha512-a1y5fiB0iovuzdbjUxa7+Zcvgv+mTmlGGC4XydVIsyl48eoxgaYkA3l9079hyTyhECsPq+mbr0gVQsFU11OJAQ==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [arm]
|
cpu: [arm]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rolldown/binding-linux-arm64-gnu@1.0.0-beta.50':
|
'@rolldown/binding-linux-arm64-gnu@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-ONgyjofCrrE3bnh5GZb8EINSFyR/hmwTzZ7oVuyUB170lboza1VMCnb8jgE6MsyyRgHYmN8Lb59i3NKGrxrYjw==}
|
resolution: {integrity: sha512-bpIGX+ov9PhJYV+wHNXl9rzq4F0QvILiURn0y0oepbQx+7stmQsKA0DhPGwmhfvF856wq+gbM8L92SAa/CBcLg==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rolldown/binding-linux-arm64-musl@1.0.0-beta.50':
|
'@rolldown/binding-linux-arm64-musl@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-L0zRdH2oDPkmB+wvuTl+dJbXCsx62SkqcEqdM+79LOcB+PxbAxxjzHU14BuZIQdXcAVDzfpMfaHWzZuwhhBTcw==}
|
resolution: {integrity: sha512-bGe5EBB8FVjHBR1mOLOPEFg1Lp3//7geqWkU5NIhxe+yH0W8FVrQ6WRYOap4SUTKdklD/dC4qPLREkMMQ855FA==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rolldown/binding-linux-x64-gnu@1.0.0-beta.50':
|
'@rolldown/binding-linux-x64-gnu@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-gyoI8o/TGpQd3OzkJnh1M2kxy1Bisg8qJ5Gci0sXm9yLFzEXIFdtc4EAzepxGvrT2ri99ar5rdsmNG0zP0SbIg==}
|
resolution: {integrity: sha512-qL+63WKVQs1CMvFedlPt0U9PiEKJOAL/bsHMKUDS6Vp2Q+YAv/QLPu8rcvkfIMvQ0FPU2WL0aX4eWwF6e/GAnA==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rolldown/binding-linux-x64-musl@1.0.0-beta.50':
|
'@rolldown/binding-linux-x64-musl@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-zti8A7M+xFDpKlghpcCAzyOi+e5nfUl3QhU023ce5NCgUxRG5zGP2GR9LTydQ1rnIPwZUVBWd4o7NjZDaQxaXA==}
|
resolution: {integrity: sha512-VGl9JIGjoJh3H8Mb+7xnVqODajBmrdOOb9lxWXdcmxyI+zjB2sux69br0hZJDTyLJfvBoYm439zPACYbCjGRmw==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [linux]
|
os: [linux]
|
||||||
|
|
||||||
'@rolldown/binding-openharmony-arm64@1.0.0-beta.50':
|
'@rolldown/binding-openharmony-arm64@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-eZUssog7qljrrRU9Mi0eqYEPm3Ch0UwB+qlWPMKSUXHNqhm3TvDZarJQdTevGEfu3EHAXJvBIe0YFYr0TPVaMA==}
|
resolution: {integrity: sha512-B4iIserJXuSnNzA5xBLFUIjTfhNy7d9sq4FUMQY3GhQWGVhS2RWWzzDnkSU6MUt7/aHUrep0CdQfXUJI9D3W7A==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [openharmony]
|
os: [openharmony]
|
||||||
|
|
||||||
'@rolldown/binding-wasm32-wasi@1.0.0-beta.50':
|
'@rolldown/binding-wasm32-wasi@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-nmCN0nIdeUnmgeDXiQ+2HU6FT162o+rxnF7WMkBm4M5Ds8qTU7Dzv2Wrf22bo4ftnlrb2hKK6FSwAJSAe2FWLg==}
|
resolution: {integrity: sha512-BUjAEgpABEJXilGq/BPh7jeU3WAJ5o15c1ZEgHaDWSz3LB881LQZnbNJHmUiM4d1JQWMYYyR1Y490IBHi2FPJg==}
|
||||||
engines: {node: '>=14.0.0'}
|
engines: {node: '>=14.0.0'}
|
||||||
cpu: [wasm32]
|
cpu: [wasm32]
|
||||||
|
|
||||||
'@rolldown/binding-win32-arm64-msvc@1.0.0-beta.50':
|
'@rolldown/binding-win32-arm64-msvc@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-7kcNLi7Ua59JTTLvbe1dYb028QEPaJPJQHqkmSZ5q3tJueUeb6yjRtx8mw4uIqgWZcnQHAR3PrLN4XRJxvgIkA==}
|
resolution: {integrity: sha512-s27uU7tpCWSjHBnxyVXHt3rMrQdJq5MHNv3BzsewCIroIw3DJFjMH1dzCPPMUFxnh1r52Nf9IJ/eWp6LDoyGcw==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [arm64]
|
cpu: [arm64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@rolldown/binding-win32-ia32-msvc@1.0.0-beta.50':
|
'@rolldown/binding-win32-x64-msvc@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-lL70VTNvSCdSZkDPPVMwWn/M2yQiYvSoXw9hTLgdIWdUfC3g72UaruezusR6ceRuwHCY1Ayu2LtKqXkBO5LIwg==}
|
resolution: {integrity: sha512-cjWL/USPJ1g0en2htb4ssMjIycc36RvdQAx1WlXnS6DpULswiUTVXPDesTifSKYSyvx24E0YqQkEm0K/M2Z/AA==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
|
||||||
cpu: [ia32]
|
|
||||||
os: [win32]
|
|
||||||
|
|
||||||
'@rolldown/binding-win32-x64-msvc@1.0.0-beta.50':
|
|
||||||
resolution: {integrity: sha512-4qU4x5DXWB4JPjyTne/wBNPqkbQU8J45bl21geERBKtEittleonioACBL1R0PsBu0Aq21SwMK5a9zdBkWSlQtQ==}
|
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@rolldown/pluginutils@1.0.0-beta.50':
|
|
||||||
resolution: {integrity: sha512-5e76wQiQVeL1ICOZVUg4LSOVYg9jyhGCin+icYozhsUzM+fHE7kddi1bdiE0jwVqTfkjba3jUFbEkoC9WkdvyA==}
|
|
||||||
|
|
||||||
'@rolldown/pluginutils@1.0.0-beta.53':
|
'@rolldown/pluginutils@1.0.0-beta.53':
|
||||||
resolution: {integrity: sha512-vENRlFU4YbrwVqNDZ7fLvy+JR1CRkyr01jhSiDpE1u6py3OMzQfztQU2jxykW3ALNxO4kSlqIDeYyD0Y9RcQeQ==}
|
resolution: {integrity: sha512-vENRlFU4YbrwVqNDZ7fLvy+JR1CRkyr01jhSiDpE1u6py3OMzQfztQU2jxykW3ALNxO4kSlqIDeYyD0Y9RcQeQ==}
|
||||||
|
|
||||||
@ -425,7 +416,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-EcA07pHJouywpzsoTUqNh5NwGayl2PPVEJKUSinGGSxFGYn+shYbqMGBg6FXDqgXum9Ou/ecb+411ssw8HImJQ==}
|
resolution: {integrity: sha512-EcA07pHJouywpzsoTUqNh5NwGayl2PPVEJKUSinGGSxFGYn+shYbqMGBg6FXDqgXum9Ou/ecb+411ssw8HImJQ==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vite: ^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0
|
vite: npm:rolldown-vite@7.3.1
|
||||||
|
|
||||||
acorn-jsx@5.3.2:
|
acorn-jsx@5.3.2:
|
||||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||||
@ -897,13 +888,13 @@ packages:
|
|||||||
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
|
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
|
|
||||||
rolldown-vite@7.2.5:
|
rolldown-vite@7.3.1:
|
||||||
resolution: {integrity: sha512-u09tdk/huMiN8xwoiBbig197jKdCamQTtOruSalOzbqGje3jdHiV0njQlAW0YvzoahkirFePNQ4RYlfnRQpXZA==}
|
resolution: {integrity: sha512-LYzdNAjRHhF2yA4JUQm/QyARyi216N2rpJ0lJZb8E9FU2y5v6Vk+xq/U4XBOxMefpWixT5H3TslmAHm1rqIq2w==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@types/node': ^20.19.0 || >=22.12.0
|
'@types/node': ^20.19.0 || >=22.12.0
|
||||||
esbuild: ^0.25.0
|
esbuild: ^0.27.0
|
||||||
jiti: '>=1.21.0'
|
jiti: '>=1.21.0'
|
||||||
less: ^4.0.0
|
less: ^4.0.0
|
||||||
sass: ^1.70.0
|
sass: ^1.70.0
|
||||||
@ -937,8 +928,8 @@ packages:
|
|||||||
yaml:
|
yaml:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
rolldown@1.0.0-beta.50:
|
rolldown@1.0.0-beta.53:
|
||||||
resolution: {integrity: sha512-JFULvCNl/anKn99eKjOSEubi0lLmNqQDAjyEMME2T4CwezUDL0i6t1O9xZsu2OMehPnV2caNefWpGF+8TnzB6A==}
|
resolution: {integrity: sha512-Qd9c2p0XKZdgT5AYd+KgAMggJ8ZmCs3JnS9PTMWkyUfteKlfmKtxJbWTHkVakxwXs1Ub7jrRYVeFeF7N0sQxyw==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
@ -1268,56 +1259,51 @@ snapshots:
|
|||||||
'@tybys/wasm-util': 0.10.1
|
'@tybys/wasm-util': 0.10.1
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@oxc-project/runtime@0.97.0': {}
|
'@oxc-project/runtime@0.101.0': {}
|
||||||
|
|
||||||
'@oxc-project/types@0.97.0': {}
|
'@oxc-project/types@0.101.0': {}
|
||||||
|
|
||||||
'@rolldown/binding-android-arm64@1.0.0-beta.50':
|
'@rolldown/binding-android-arm64@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-darwin-arm64@1.0.0-beta.50':
|
'@rolldown/binding-darwin-arm64@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-darwin-x64@1.0.0-beta.50':
|
'@rolldown/binding-darwin-x64@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-freebsd-x64@1.0.0-beta.50':
|
'@rolldown/binding-freebsd-x64@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.50':
|
'@rolldown/binding-linux-arm-gnueabihf@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-linux-arm64-gnu@1.0.0-beta.50':
|
'@rolldown/binding-linux-arm64-gnu@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-linux-arm64-musl@1.0.0-beta.50':
|
'@rolldown/binding-linux-arm64-musl@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-linux-x64-gnu@1.0.0-beta.50':
|
'@rolldown/binding-linux-x64-gnu@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-linux-x64-musl@1.0.0-beta.50':
|
'@rolldown/binding-linux-x64-musl@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-openharmony-arm64@1.0.0-beta.50':
|
'@rolldown/binding-openharmony-arm64@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-wasm32-wasi@1.0.0-beta.50':
|
'@rolldown/binding-wasm32-wasi@1.0.0-beta.53':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@napi-rs/wasm-runtime': 1.1.0
|
'@napi-rs/wasm-runtime': 1.1.0
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-win32-arm64-msvc@1.0.0-beta.50':
|
'@rolldown/binding-win32-arm64-msvc@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-win32-ia32-msvc@1.0.0-beta.50':
|
'@rolldown/binding-win32-x64-msvc@1.0.0-beta.53':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@rolldown/binding-win32-x64-msvc@1.0.0-beta.50':
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
'@rolldown/pluginutils@1.0.0-beta.50': {}
|
|
||||||
|
|
||||||
'@rolldown/pluginutils@1.0.0-beta.53': {}
|
'@rolldown/pluginutils@1.0.0-beta.53': {}
|
||||||
|
|
||||||
'@tybys/wasm-util@0.10.1':
|
'@tybys/wasm-util@0.10.1':
|
||||||
@ -1454,7 +1440,7 @@ snapshots:
|
|||||||
'@typescript-eslint/types': 8.48.1
|
'@typescript-eslint/types': 8.48.1
|
||||||
eslint-visitor-keys: 4.2.1
|
eslint-visitor-keys: 4.2.1
|
||||||
|
|
||||||
'@vitejs/plugin-react@5.1.2(rolldown-vite@7.2.5(@types/node@24.10.1))':
|
'@vitejs/plugin-react@5.1.2(rolldown-vite@7.3.1(@types/node@24.10.1))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/core': 7.28.5
|
'@babel/core': 7.28.5
|
||||||
'@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5)
|
'@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/core@7.28.5)
|
||||||
@ -1462,7 +1448,7 @@ snapshots:
|
|||||||
'@rolldown/pluginutils': 1.0.0-beta.53
|
'@rolldown/pluginutils': 1.0.0-beta.53
|
||||||
'@types/babel__core': 7.20.5
|
'@types/babel__core': 7.20.5
|
||||||
react-refresh: 0.18.0
|
react-refresh: 0.18.0
|
||||||
vite: rolldown-vite@7.2.5(@types/node@24.10.1)
|
vite: rolldown-vite@7.3.1(@types/node@24.10.1)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@ -1870,38 +1856,37 @@ snapshots:
|
|||||||
|
|
||||||
resolve-from@4.0.0: {}
|
resolve-from@4.0.0: {}
|
||||||
|
|
||||||
rolldown-vite@7.2.5(@types/node@24.10.1):
|
rolldown-vite@7.3.1(@types/node@24.10.1):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@oxc-project/runtime': 0.97.0
|
'@oxc-project/runtime': 0.101.0
|
||||||
fdir: 6.5.0(picomatch@4.0.3)
|
fdir: 6.5.0(picomatch@4.0.3)
|
||||||
lightningcss: 1.30.2
|
lightningcss: 1.30.2
|
||||||
picomatch: 4.0.3
|
picomatch: 4.0.3
|
||||||
postcss: 8.5.6
|
postcss: 8.5.6
|
||||||
rolldown: 1.0.0-beta.50
|
rolldown: 1.0.0-beta.53
|
||||||
tinyglobby: 0.2.15
|
tinyglobby: 0.2.15
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@types/node': 24.10.1
|
'@types/node': 24.10.1
|
||||||
fsevents: 2.3.3
|
fsevents: 2.3.3
|
||||||
|
|
||||||
rolldown@1.0.0-beta.50:
|
rolldown@1.0.0-beta.53:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@oxc-project/types': 0.97.0
|
'@oxc-project/types': 0.101.0
|
||||||
'@rolldown/pluginutils': 1.0.0-beta.50
|
'@rolldown/pluginutils': 1.0.0-beta.53
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@rolldown/binding-android-arm64': 1.0.0-beta.50
|
'@rolldown/binding-android-arm64': 1.0.0-beta.53
|
||||||
'@rolldown/binding-darwin-arm64': 1.0.0-beta.50
|
'@rolldown/binding-darwin-arm64': 1.0.0-beta.53
|
||||||
'@rolldown/binding-darwin-x64': 1.0.0-beta.50
|
'@rolldown/binding-darwin-x64': 1.0.0-beta.53
|
||||||
'@rolldown/binding-freebsd-x64': 1.0.0-beta.50
|
'@rolldown/binding-freebsd-x64': 1.0.0-beta.53
|
||||||
'@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.50
|
'@rolldown/binding-linux-arm-gnueabihf': 1.0.0-beta.53
|
||||||
'@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.50
|
'@rolldown/binding-linux-arm64-gnu': 1.0.0-beta.53
|
||||||
'@rolldown/binding-linux-arm64-musl': 1.0.0-beta.50
|
'@rolldown/binding-linux-arm64-musl': 1.0.0-beta.53
|
||||||
'@rolldown/binding-linux-x64-gnu': 1.0.0-beta.50
|
'@rolldown/binding-linux-x64-gnu': 1.0.0-beta.53
|
||||||
'@rolldown/binding-linux-x64-musl': 1.0.0-beta.50
|
'@rolldown/binding-linux-x64-musl': 1.0.0-beta.53
|
||||||
'@rolldown/binding-openharmony-arm64': 1.0.0-beta.50
|
'@rolldown/binding-openharmony-arm64': 1.0.0-beta.53
|
||||||
'@rolldown/binding-wasm32-wasi': 1.0.0-beta.50
|
'@rolldown/binding-wasm32-wasi': 1.0.0-beta.53
|
||||||
'@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.50
|
'@rolldown/binding-win32-arm64-msvc': 1.0.0-beta.53
|
||||||
'@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.50
|
'@rolldown/binding-win32-x64-msvc': 1.0.0-beta.53
|
||||||
'@rolldown/binding-win32-x64-msvc': 1.0.0-beta.50
|
|
||||||
|
|
||||||
scheduler@0.27.0: {}
|
scheduler@0.27.0: {}
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,15 @@ function App() {
|
|||||||
_setTheme(ev.data as string);
|
_setTheme(ev.data as string);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const addToast = useCallback((message: string, type: ToastType = "info") => {
|
||||||
|
const id = Date.now();
|
||||||
|
setToasts((prev) => [...prev, { id, message, type }]);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const removeToast = (id: number) => {
|
||||||
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (theme !== "default" && theme !== "sakura") {
|
if (theme !== "default" && theme !== "sakura") {
|
||||||
document.body.classList.remove("sakura-theme");
|
document.body.classList.remove("sakura-theme");
|
||||||
@ -73,15 +82,6 @@ function App() {
|
|||||||
return () => window.removeEventListener("unauthorized", handleUnauthorized);
|
return () => window.removeEventListener("unauthorized", handleUnauthorized);
|
||||||
}, [addToast]);
|
}, [addToast]);
|
||||||
|
|
||||||
const addToast = useCallback((message: string, type: ToastType = "info") => {
|
|
||||||
const id = Date.now();
|
|
||||||
setToasts((prev) => [...prev, { id, message, type }]);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const removeToast = (id: number) => {
|
|
||||||
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
||||||
};
|
|
||||||
|
|
||||||
const fetchPeople = () => {
|
const fetchPeople = () => {
|
||||||
if (!token) return;
|
if (!token) return;
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { useState } from "react";
|
import { useState, useRef, useEffect } from "react";
|
||||||
import { LoginRequest, LoginResponse } from "../items";
|
import { LoginRequest, LoginResponse } from "../items";
|
||||||
|
|
||||||
interface LoginProps {
|
interface LoginProps {
|
||||||
@ -6,11 +6,18 @@ interface LoginProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function Login({ onLogin }: LoginProps) {
|
export function Login({ onLogin }: LoginProps) {
|
||||||
|
const usernameInputRef = useRef<HTMLInputElement>(null);
|
||||||
const [username, setUsername] = useState("");
|
const [username, setUsername] = useState("");
|
||||||
const [password, setPassword] = useState("");
|
const [password, setPassword] = useState("");
|
||||||
const [error, setError] = useState("");
|
const [error, setError] = useState("");
|
||||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||||
const [fieldErrors, setFieldErrors] = useState<{ username?: string, password?: string }>({});
|
const [fieldErrors, setFieldErrors] = useState<{ username?: string, password?: string }>({});
|
||||||
|
const [isSuccess, setIsSuccess] = useState(false);
|
||||||
|
const [shakeCard, setShakeCard] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
usernameInputRef.current?.focus();
|
||||||
|
}, []);
|
||||||
|
|
||||||
const validateForm = () => {
|
const validateForm = () => {
|
||||||
const errors: { username?: string, password?: string } = {};
|
const errors: { username?: string, password?: string } = {};
|
||||||
@ -24,7 +31,11 @@ export function Login({ onLogin }: LoginProps) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setError("");
|
setError("");
|
||||||
|
|
||||||
if (!validateForm()) return;
|
if (!validateForm()) {
|
||||||
|
setShakeCard(true);
|
||||||
|
setTimeout(() => setShakeCard(false), 500);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setIsSubmitting(true);
|
setIsSubmitting(true);
|
||||||
|
|
||||||
@ -44,45 +55,232 @@ export function Login({ onLogin }: LoginProps) {
|
|||||||
const response = LoginResponse.decode(new Uint8Array(buffer));
|
const response = LoginResponse.decode(new Uint8Array(buffer));
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
|
setIsSuccess(true);
|
||||||
onLogin(response.token);
|
onLogin(response.token);
|
||||||
} else {
|
} else {
|
||||||
setError(response.message || "Login failed");
|
setError(response.message || "Login failed");
|
||||||
|
setShakeCard(true);
|
||||||
|
setTimeout(() => setShakeCard(false), 500);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error("Login error:", err);
|
console.error("Login error:", err);
|
||||||
setError("An unexpected error occurred. Please try again.");
|
setError("An unexpected error occurred. Please try again.");
|
||||||
|
setShakeCard(true);
|
||||||
|
setTimeout(() => setShakeCard(false), 500);
|
||||||
} finally {
|
} finally {
|
||||||
setIsSubmitting(false);
|
setIsSubmitting(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleKeyDown = (e: React.KeyboardEvent) => {
|
||||||
|
if (e.key === "Enter") {
|
||||||
|
handleSubmit(e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="card" style={{ maxWidth: "400px", margin: "4rem auto" }}>
|
<div
|
||||||
<h2 style={{ textAlign: "center", marginBottom: "2rem" }}>🎮 Login</h2>
|
className="card login-card"
|
||||||
|
style={{
|
||||||
|
maxWidth: "420px",
|
||||||
|
margin: "6rem auto",
|
||||||
|
padding: "2.5rem",
|
||||||
|
background: "linear-gradient(135deg, var(--secondary-bg) 0%, var(--secondary-alt-bg) 100%)",
|
||||||
|
position: "relative"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{isSubmitting && (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
||||||
|
borderRadius: "16px",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
zIndex: 10,
|
||||||
|
backdropFilter: "blur(2px)"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: "48px",
|
||||||
|
height: "48px",
|
||||||
|
border: "4px solid rgba(255, 255, 255, 0.2)",
|
||||||
|
borderTopColor: "white",
|
||||||
|
borderRadius: "50%",
|
||||||
|
animation: "spin 0.8s linear infinite"
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{isSuccess && (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
top: "50%",
|
||||||
|
left: "50%",
|
||||||
|
transform: "translate(-50%, -50%)",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
alignItems: "center",
|
||||||
|
gap: "1rem",
|
||||||
|
animation: "fadeInScale 0.5s ease forwards",
|
||||||
|
zIndex: 10
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: "64px",
|
||||||
|
height: "64px",
|
||||||
|
borderRadius: "50%",
|
||||||
|
backgroundColor: "#4caf50",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
fontSize: "2rem",
|
||||||
|
color: "white",
|
||||||
|
boxShadow: "0 0 20px rgba(76, 175, 80, 0.5)"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
✓
|
||||||
|
</div>
|
||||||
|
<span style={{ color: "#4caf50", fontWeight: 600, fontSize: "1.1rem" }}>
|
||||||
|
Success!
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<h2
|
||||||
|
style={{
|
||||||
|
textAlign: "center",
|
||||||
|
marginBottom: "0.5rem",
|
||||||
|
fontSize: "2rem",
|
||||||
|
fontWeight: 700
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
🎮 Login
|
||||||
|
</h2>
|
||||||
|
<p
|
||||||
|
style={{
|
||||||
|
textAlign: "center",
|
||||||
|
color: "var(--text-muted)",
|
||||||
|
marginBottom: "2rem",
|
||||||
|
fontSize: "0.95rem"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Welcome back! Please sign in to continue.
|
||||||
|
</p>
|
||||||
|
|
||||||
<form onSubmit={handleSubmit} className="form-group">
|
<form onSubmit={handleSubmit} className="form-group">
|
||||||
<div className="form-group">
|
<div className="form-group" style={{ marginBottom: "1.5rem" }}>
|
||||||
<label>Username</label>
|
<label
|
||||||
|
style={{
|
||||||
|
display: "block",
|
||||||
|
marginBottom: "0.5rem",
|
||||||
|
fontWeight: 500,
|
||||||
|
color: "var(--text-color)",
|
||||||
|
fontSize: "0.95rem"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Username
|
||||||
|
</label>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: "relative",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
left: "0.75rem",
|
||||||
|
color: "var(--text-muted)",
|
||||||
|
pointerEvents: "none",
|
||||||
|
fontSize: "1.1rem"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
👤
|
||||||
|
</span>
|
||||||
<input
|
<input
|
||||||
|
ref={usernameInputRef}
|
||||||
type="text"
|
type="text"
|
||||||
value={username}
|
value={username}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setUsername(e.target.value);
|
setUsername(e.target.value);
|
||||||
if (fieldErrors.username) setFieldErrors({ ...fieldErrors, username: undefined });
|
if (fieldErrors.username) setFieldErrors({ ...fieldErrors, username: undefined });
|
||||||
}}
|
}}
|
||||||
|
onKeyDown={handleKeyDown}
|
||||||
placeholder="Enter your username"
|
placeholder="Enter your username"
|
||||||
|
aria-label="Username"
|
||||||
|
aria-invalid={!!fieldErrors.username}
|
||||||
|
aria-describedby={fieldErrors.username ? "username-error" : undefined}
|
||||||
style={{
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
paddingLeft: "2.75rem",
|
||||||
|
paddingRight: "0.75rem",
|
||||||
|
paddingTop: "0.75rem",
|
||||||
|
paddingBottom: "0.75rem",
|
||||||
borderColor: fieldErrors.username ? "#f44336" : undefined,
|
borderColor: fieldErrors.username ? "#f44336" : undefined,
|
||||||
borderWidth: fieldErrors.username ? "2px" : undefined
|
borderWidth: fieldErrors.username ? "2px" : "1px",
|
||||||
|
fontSize: "1rem"
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
{fieldErrors.username && (
|
{fieldErrors.username && (
|
||||||
<span style={{ color: "#f44336", fontSize: "0.85rem", marginTop: "0.25rem", display: "block" }}>
|
<span
|
||||||
{fieldErrors.username}
|
id="username-error"
|
||||||
|
role="alert"
|
||||||
|
style={{
|
||||||
|
color: "#ff6b6b",
|
||||||
|
fontSize: "0.85rem",
|
||||||
|
marginTop: "0.5rem",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
gap: "0.25rem"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
⚠️ {fieldErrors.username}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="form-group">
|
|
||||||
<label>Password</label>
|
<div className="form-group" style={{ marginBottom: "2rem" }}>
|
||||||
|
<label
|
||||||
|
style={{
|
||||||
|
display: "block",
|
||||||
|
marginBottom: "0.5rem",
|
||||||
|
fontWeight: 500,
|
||||||
|
color: "var(--text-color)",
|
||||||
|
fontSize: "0.95rem"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Password
|
||||||
|
</label>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: "relative",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
left: "0.75rem",
|
||||||
|
color: "var(--text-muted)",
|
||||||
|
pointerEvents: "none",
|
||||||
|
fontSize: "1.1rem"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
🔒
|
||||||
|
</span>
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
value={password}
|
value={password}
|
||||||
@ -90,64 +288,131 @@ export function Login({ onLogin }: LoginProps) {
|
|||||||
setPassword(e.target.value);
|
setPassword(e.target.value);
|
||||||
if (fieldErrors.password) setFieldErrors({ ...fieldErrors, password: undefined });
|
if (fieldErrors.password) setFieldErrors({ ...fieldErrors, password: undefined });
|
||||||
}}
|
}}
|
||||||
|
onKeyDown={handleKeyDown}
|
||||||
placeholder="Enter your password"
|
placeholder="Enter your password"
|
||||||
|
aria-label="Password"
|
||||||
|
aria-invalid={!!fieldErrors.password}
|
||||||
|
aria-describedby={fieldErrors.password ? "password-error" : undefined}
|
||||||
style={{
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
paddingLeft: "2.75rem",
|
||||||
|
paddingRight: "0.75rem",
|
||||||
|
paddingTop: "0.75rem",
|
||||||
|
paddingBottom: "0.75rem",
|
||||||
borderColor: fieldErrors.password ? "#f44336" : undefined,
|
borderColor: fieldErrors.password ? "#f44336" : undefined,
|
||||||
borderWidth: fieldErrors.password ? "2px" : undefined
|
borderWidth: fieldErrors.password ? "2px" : "1px",
|
||||||
|
fontSize: "1rem"
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
{fieldErrors.password && (
|
{fieldErrors.password && (
|
||||||
<span style={{ color: "#f44336", fontSize: "0.85rem", marginTop: "0.25rem", display: "block" }}>
|
<span
|
||||||
{fieldErrors.password}
|
id="password-error"
|
||||||
|
role="alert"
|
||||||
|
style={{
|
||||||
|
color: "#ff6b6b",
|
||||||
|
fontSize: "0.85rem",
|
||||||
|
marginTop: "0.5rem",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
gap: "0.25rem"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
⚠️ {fieldErrors.password}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
style={{ marginTop: "1rem", width: "100%", opacity: isSubmitting ? 0.7 : 1, cursor: isSubmitting ? "not-allowed" : "pointer" }}
|
|
||||||
disabled={isSubmitting}
|
|
||||||
>
|
|
||||||
{isSubmitting ? (
|
|
||||||
<>
|
|
||||||
<span
|
|
||||||
style={{
|
style={{
|
||||||
width: "14px",
|
marginTop: "0.5rem",
|
||||||
height: "14px",
|
width: "100%",
|
||||||
border: "2px solid rgba(255,255,255,0.3)",
|
padding: "0.875rem",
|
||||||
borderTopColor: "white",
|
fontSize: "1rem",
|
||||||
borderRadius: "50%",
|
fontWeight: 600,
|
||||||
animation: "spin 0.8s linear infinite",
|
opacity: isSubmitting ? 0.7 : 1,
|
||||||
display: "inline-block",
|
cursor: isSubmitting ? "not-allowed" : "pointer",
|
||||||
marginRight: "0.5rem"
|
background: "linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-accent) 100%)",
|
||||||
|
border: "none",
|
||||||
|
transition: "transform 0.1s, box-shadow 0.2s"
|
||||||
}}
|
}}
|
||||||
></span>
|
disabled={isSubmitting}
|
||||||
Logging in...
|
onMouseEnter={(e) => {
|
||||||
</>
|
if (!isSubmitting) {
|
||||||
) : (
|
e.currentTarget.style.transform = "translateY(-1px)";
|
||||||
"Login"
|
e.currentTarget.style.boxShadow = "0 4px 12px rgba(9, 109, 192, 0.4)";
|
||||||
)}
|
}
|
||||||
|
}}
|
||||||
|
onMouseLeave={(e) => {
|
||||||
|
if (!isSubmitting) {
|
||||||
|
e.currentTarget.style.transform = "translateY(0)";
|
||||||
|
e.currentTarget.style.boxShadow = "none";
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
onMouseDown={(e) => {
|
||||||
|
if (!isSubmitting) {
|
||||||
|
e.currentTarget.style.transform = "translateY(0)";
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Login
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{error && (
|
{error && (
|
||||||
<div
|
<div
|
||||||
|
role="alert"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: "rgba(244, 67, 54, 0.1)",
|
backgroundColor: "rgba(244, 67, 54, 0.15)",
|
||||||
border: "1px solid rgba(244, 67, 54, 0.3)",
|
border: "1px solid rgba(244, 67, 54, 0.4)",
|
||||||
color: "#ff6b6b",
|
color: "#ff6b6b",
|
||||||
padding: "1rem",
|
padding: "0.875rem 1rem",
|
||||||
borderRadius: "8px",
|
borderRadius: "8px",
|
||||||
marginTop: "1rem",
|
marginTop: "1.5rem",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
fontSize: "0.9rem"
|
fontSize: "0.9rem",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
gap: "0.5rem"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
⚠️ {error}
|
⚠️ {error}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<style>{`
|
<style>{`
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
to { transform: rotate(360deg); }
|
to { transform: rotate(360deg); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes fadeInScale {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translate(-50%, -40%) scale(0.8);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translate(-50%, -50%) scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-card {
|
||||||
|
animation: ${shakeCard ? "shake 0.5s ease" : "none"};
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes shake {
|
||||||
|
0%, 100% {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
20%, 60% {
|
||||||
|
transform: translateX(-8px);
|
||||||
|
}
|
||||||
|
40%, 80% {
|
||||||
|
transform: translateX(8px);
|
||||||
|
}
|
||||||
|
}
|
||||||
`}</style>
|
`}</style>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user