menu
1
.gitignore
vendored
@@ -16,6 +16,7 @@ dist-ssr
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.vite
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
|
||||
@@ -8,12 +8,9 @@ import Home from "./pages/Home";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="flex py-[100px] w-full h-full">
|
||||
<div className="flex w-full h-full">
|
||||
<Routes>
|
||||
<Route path="/home/*" element={<Home/>}/>
|
||||
|
||||
|
||||
|
||||
<Route path="*" element={<Home/>}/>
|
||||
</Routes>
|
||||
|
||||
|
||||
19
src/assets/icons/auth/balloon.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<svg width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M189.632 295.254C262.104 295.254 320.855 229.159 320.855 147.627C320.855 66.0948 262.104 0 189.632 0C117.16 0 58.4092 66.0948 58.4092 147.627C58.4092 229.159 117.16 295.254 189.632 295.254Z" fill="#00DBD9"/>
|
||||
<path d="M222.556 31.5877C219.074 24.0591 211.159 7.20146 201.029 0.654817C197.23 0.327485 193.431 0.163818 189.632 0.163818C186.941 0.163818 184.408 0.327486 181.717 0.491152C163.356 8.01979 148.793 36.1704 148.951 117.185C148.951 117.185 146.894 157.611 156.233 202.455C159.082 216.203 163.039 230.115 163.039 230.115C170.004 254.501 176.177 273.323 185.358 295.254C186.783 295.254 188.207 295.418 189.632 295.418C191.531 295.418 193.431 295.418 195.33 295.254C215.592 249.264 250.574 91.6532 222.556 31.5877Z" fill="#CBE7E8"/>
|
||||
<path d="M104.314 142.554C99.7231 107.693 95.1327 72.9954 115.552 41.4078C129.64 19.6403 149.743 8.51097 162.406 3.10999C114.919 14.4029 76.771 54.6648 63.4746 106.711C64.7409 182.652 101.939 250.246 141.037 283.961C141.037 283.961 141.037 283.961 142.936 285.434C151.801 289.198 160.982 291.981 170.637 293.454C164.622 285.434 157.974 276.105 151.484 265.467C137.396 242.881 112.07 201.31 104.314 142.554Z" fill="#CBE7E8"/>
|
||||
<path d="M236.011 9.49255C236.802 9.98355 261.179 26.5138 275.742 62.684C293.312 106.71 272.259 195.745 212.584 292.799C227.622 289.853 241.868 283.797 254.848 275.614C281.44 240.589 313.098 186.088 318.164 117.676C308.983 67.9214 277.641 27.1685 236.011 9.49255Z" fill="#CBE7E8"/>
|
||||
<path d="M165.255 353.846H157.183V392.308C157.183 396.563 160.507 400 164.622 400H210.527H211.318H211.476C215.592 400 218.916 396.563 218.916 392.308V353.846H165.255Z" fill="#7A472D"/>
|
||||
<path d="M261.021 271.359L213.376 322.586H166.205L121.409 273.814C140.404 277.251 164.148 280.033 191.215 279.542C218.441 279.051 242.185 275.45 261.021 271.359Z" fill="#0C8092"/>
|
||||
<path d="M175.86 336.17H171.428L165.255 353.846H170.637L177.76 341.08V336.17H179.343L182.825 322.586H172.695L175.86 336.17Z" fill="#878787"/>
|
||||
<path d="M204.828 336.17H201.82L205.461 322.586H194.697L198.496 336.17H200.079V341.08L206.411 353.846H211.318L204.828 336.17Z" fill="#878787"/>
|
||||
<path d="M177.76 336.17V341.08H200.079V336.17H177.76Z" fill="#B1804A"/>
|
||||
<path d="M160.981 361.702C160.823 362.193 167.471 367.922 175.861 367.431C182.825 366.94 188.049 362.193 187.891 361.702C187.732 361.211 182.667 365.139 175.069 365.303C166.838 365.467 161.14 361.211 160.981 361.702Z" fill="#B3B2B2"/>
|
||||
<path d="M187.89 361.702C187.732 362.193 194.697 367.922 203.403 367.431C210.684 366.94 216.066 362.193 215.908 361.702C215.749 361.211 210.526 365.139 202.611 365.303C193.905 365.467 188.049 361.211 187.89 361.702Z" fill="#C7C6C6"/>
|
||||
<path d="M168.579 373.322C168.579 371.195 168.104 368.74 165.571 365.63C163.514 363.011 162.247 361.538 160.981 361.538C158.923 361.375 157.34 364.157 156.074 366.285C154.491 369.067 152.908 371.522 153.541 374.795C154.175 378.069 157.024 381.997 160.981 381.997C165.413 381.833 168.421 376.923 168.579 373.322Z" fill="#16A7C6"/>
|
||||
<path d="M195.647 373.322C195.647 371.195 195.172 368.74 192.64 365.63C190.582 363.011 189.316 361.538 188.049 361.538C185.992 361.375 184.409 364.157 183.142 366.285C181.559 369.067 179.977 371.522 180.61 374.795C181.243 378.069 184.092 381.997 188.049 381.997C192.482 381.833 195.489 376.923 195.647 373.322Z" fill="#16A7C6"/>
|
||||
<path d="M223.348 373.322C223.348 371.195 222.873 368.74 220.34 365.63C218.282 363.011 217.016 361.538 215.75 361.538C213.692 361.375 212.109 364.157 210.843 366.285C209.26 369.067 207.677 371.522 208.31 374.795C208.943 378.069 211.792 381.997 215.75 381.997C220.182 381.833 223.348 376.923 223.348 373.322Z" fill="#16A7C6"/>
|
||||
<path d="M134.389 283.797C132.806 283.797 131.223 284.124 129.64 284.452C131.381 281.015 132.331 277.087 132.331 272.995C132.331 259.084 121.409 247.954 108.112 247.954C100.04 247.954 92.9165 252.046 88.4844 258.265C83.1025 244.517 69.9644 234.697 54.6102 234.697C34.5073 234.697 18.2034 251.555 18.2034 272.34C18.2034 276.759 18.9949 280.851 20.2612 284.779C18.8366 284.452 17.412 284.124 15.9873 284.124C7.12307 284.124 0 291.489 0 300.655C0 309.82 7.12307 317.185 15.9873 317.185H16.1456H134.389C143.411 317.185 150.693 309.656 150.693 300.327C150.693 290.998 143.411 283.797 134.389 283.797Z" fill="#EFEFEF"/>
|
||||
<path d="M238.861 109.656C240.443 109.656 242.026 109.984 243.609 110.311C241.868 106.874 240.918 102.946 240.918 98.8545C240.918 84.9429 251.84 73.8136 265.137 73.8136C273.21 73.8136 280.333 77.9052 284.765 84.1246C290.147 70.3766 303.285 60.5566 318.639 60.5566C338.742 60.5566 355.046 77.4143 355.046 98.1999C355.046 102.619 354.254 106.71 352.988 110.638C354.413 110.311 355.837 109.984 357.262 109.984C366.126 109.984 373.249 117.349 373.249 126.514C373.249 135.679 366.126 143.044 357.262 143.044H357.104H238.861C229.838 143.044 222.557 135.516 222.557 126.187C222.557 116.858 229.838 109.656 238.861 109.656Z" fill="#EFEFEF"/>
|
||||
<path d="M383.696 330.114C382.113 330.114 380.53 330.442 378.948 330.769C380.689 327.332 381.638 323.404 381.638 319.313C381.638 305.401 370.716 294.272 357.42 294.272C349.347 294.272 342.224 298.363 337.792 304.583C332.41 290.835 319.272 281.015 303.918 281.015C283.815 281.015 267.511 297.872 267.511 318.658C267.511 323.077 268.302 327.169 269.569 331.096C268.144 330.769 266.72 330.442 265.295 330.442C256.431 330.442 249.308 337.807 249.308 346.972C249.308 356.137 256.431 363.502 265.295 363.502H265.453H383.696C392.719 363.502 400 355.974 400 346.645C400 337.316 392.719 330.114 383.696 330.114Z" fill="#EFEFEF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.5 KiB |
3
src/assets/icons/auth/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import Balloon from "./balloon.svg";
|
||||
|
||||
export {Balloon};
|
||||
3
src/assets/icons/menu/account.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.81 12.28C15.443 11.6002 15.7996 10.7088 15.81 9.78C15.81 8.77748 15.4118 7.81602 14.7029 7.10714C13.994 6.39825 13.0325 6 12.03 6C11.0275 6 10.066 6.39825 9.35714 7.10714C8.64825 7.81602 8.25 8.77748 8.25 9.78C8.26044 10.7088 8.61702 11.6002 9.25 12.28C8.36865 12.7189 7.61022 13.3699 7.04292 14.1746C6.47561 14.9793 6.11723 15.9124 6 16.89C5.97083 17.1552 6.0482 17.4212 6.21511 17.6293C6.38202 17.8375 6.62478 17.9708 6.89 18C7.15522 18.0292 7.42116 17.9518 7.62932 17.7849C7.83749 17.618 7.97083 17.3752 8 17.11C8.11933 16.1411 8.58885 15.2494 9.32009 14.6027C10.0513 13.956 10.9938 13.599 11.97 13.599C12.9462 13.599 13.8887 13.956 14.6199 14.6027C15.3512 15.2494 15.8207 16.1411 15.94 17.11C15.9678 17.3664 16.0936 17.6022 16.2911 17.768C16.4887 17.9339 16.7426 18.017 17 18H17.11C17.3721 17.9698 17.6117 17.8373 17.7766 17.6313C17.9414 17.4252 18.0181 17.1624 17.99 16.9C17.8815 15.9276 17.5344 14.997 16.9796 14.191C16.4248 13.3851 15.6796 12.7286 14.81 12.28ZM12 11.56C11.6479 11.56 11.3038 11.4556 11.0111 11.26C10.7184 11.0644 10.4902 10.7864 10.3555 10.4612C10.2208 10.1359 10.1855 9.77803 10.2542 9.43274C10.3229 9.08745 10.4924 8.77029 10.7414 8.52135C10.9903 8.27241 11.3075 8.10288 11.6527 8.0342C11.998 7.96552 12.3559 8.00077 12.6812 8.13549C13.0064 8.27022 13.2844 8.49837 13.48 8.79109C13.6756 9.0838 13.78 9.42795 13.78 9.78C13.78 10.2521 13.5925 10.7048 13.2586 11.0387C12.9248 11.3725 12.4721 11.56 12 11.56ZM19 2H5C4.20435 2 3.44129 2.31607 2.87868 2.87868C2.31607 3.44129 2 4.20435 2 5V19C2 19.7956 2.31607 20.5587 2.87868 21.1213C3.44129 21.6839 4.20435 22 5 22H19C19.7956 22 20.5587 21.6839 21.1213 21.1213C21.6839 20.5587 22 19.7956 22 19V5C22 4.20435 21.6839 3.44129 21.1213 2.87868C20.5587 2.31607 19.7956 2 19 2ZM20 19C20 19.2652 19.8946 19.5196 19.7071 19.7071C19.5196 19.8946 19.2652 20 19 20H5C4.73478 20 4.48043 19.8946 4.29289 19.7071C4.10536 19.5196 4 19.2652 4 19V5C4 4.73478 4.10536 4.48043 4.29289 4.29289C4.48043 4.10536 4.73478 4 5 4H19C19.2652 4 19.5196 4.10536 19.7071 4.29289C19.8946 4.48043 20 4.73478 20 5V19Z" fill="#EDF6F7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
3
src/assets/icons/menu/clipboard.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13 14H9C8.73478 14 8.48043 14.1054 8.29289 14.2929C8.10536 14.4804 8 14.7348 8 15C8 15.2652 8.10536 15.5196 8.29289 15.7071C8.48043 15.8946 8.73478 16 9 16H13C13.2652 16 13.5196 15.8946 13.7071 15.7071C13.8946 15.5196 14 15.2652 14 15C14 14.7348 13.8946 14.4804 13.7071 14.2929C13.5196 14.1054 13.2652 14 13 14ZM17 4H15.82C15.6137 3.41645 15.2319 2.911 14.7271 2.55294C14.2222 2.19488 13.6189 2.00174 13 2H11C10.3811 2.00174 9.7778 2.19488 9.27293 2.55294C8.76807 2.911 8.38631 3.41645 8.18 4H7C6.20435 4 5.44129 4.31607 4.87868 4.87868C4.31607 5.44129 4 6.20435 4 7V19C4 19.7956 4.31607 20.5587 4.87868 21.1213C5.44129 21.6839 6.20435 22 7 22H17C17.7956 22 18.5587 21.6839 19.1213 21.1213C19.6839 20.5587 20 19.7956 20 19V7C20 6.20435 19.6839 5.44129 19.1213 4.87868C18.5587 4.31607 17.7956 4 17 4ZM10 5C10 4.73478 10.1054 4.48043 10.2929 4.29289C10.4804 4.10536 10.7348 4 11 4H13C13.2652 4 13.5196 4.10536 13.7071 4.29289C13.8946 4.48043 14 4.73478 14 5V6H10V5ZM18 19C18 19.2652 17.8946 19.5196 17.7071 19.7071C17.5196 19.8946 17.2652 20 17 20H7C6.73478 20 6.48043 19.8946 6.29289 19.7071C6.10536 19.5196 6 19.2652 6 19V7C6 6.73478 6.10536 6.48043 6.29289 6.29289C6.48043 6.10536 6.73478 6 7 6H8V7C8 7.26522 8.10536 7.51957 8.29289 7.70711C8.48043 7.89464 8.73478 8 9 8H15C15.2652 8 15.5196 7.89464 15.7071 7.70711C15.8946 7.51957 16 7.26522 16 7V6H17C17.2652 6 17.5196 6.10536 17.7071 6.29289C17.8946 6.48043 18 6.73478 18 7V19ZM15 10H9C8.73478 10 8.48043 10.1054 8.29289 10.2929C8.10536 10.4804 8 10.7348 8 11C8 11.2652 8.10536 11.5196 8.29289 11.7071C8.48043 11.8946 8.73478 12 9 12H15C15.2652 12 15.5196 11.8946 15.7071 11.7071C15.8946 11.5196 16 11.2652 16 11C16 10.7348 15.8946 10.4804 15.7071 10.2929C15.5196 10.1054 15.2652 10 15 10Z" fill="#EDF6F7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
3
src/assets/icons/menu/cup.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M21 4H18V3C18 2.73478 17.8946 2.48043 17.7071 2.29289C17.5196 2.10536 17.2652 2 17 2H7C6.73478 2 6.48043 2.10536 6.29289 2.29289C6.10536 2.48043 6 2.73478 6 3V4H3C2.73478 4 2.48043 4.10536 2.29289 4.29289C2.10536 4.48043 2 4.73478 2 5V8C2 9.06087 2.42143 10.0783 3.17157 10.8284C3.92172 11.5786 4.93913 12 6 12H7.54C8.44453 13.0091 9.66406 13.6824 11 13.91V16H10C9.20435 16 8.44129 16.3161 7.87868 16.8787C7.31607 17.4413 7 18.2044 7 19V21C7 21.2652 7.10536 21.5196 7.29289 21.7071C7.48043 21.8946 7.73478 22 8 22H16C16.2652 22 16.5196 21.8946 16.7071 21.7071C16.8946 21.5196 17 21.2652 17 21V19C17 18.2044 16.6839 17.4413 16.1213 16.8787C15.5587 16.3161 14.7956 16 14 16H13V13.91C14.3359 13.6824 15.5555 13.0091 16.46 12H18C19.0609 12 20.0783 11.5786 20.8284 10.8284C21.5786 10.0783 22 9.06087 22 8V5C22 4.73478 21.8946 4.48043 21.7071 4.29289C21.5196 4.10536 21.2652 4 21 4ZM6 10C5.46957 10 4.96086 9.78929 4.58579 9.41421C4.21071 9.03914 4 8.53043 4 8V6H6V8C6.0022 8.68171 6.12056 9.35806 6.35 10H6ZM14 18C14.2652 18 14.5196 18.1054 14.7071 18.2929C14.8946 18.4804 15 18.7348 15 19V20H9V19C9 18.7348 9.10536 18.4804 9.29289 18.2929C9.48043 18.1054 9.73478 18 10 18H14ZM16 8C16 9.06087 15.5786 10.0783 14.8284 10.8284C14.0783 11.5786 13.0609 12 12 12C10.9391 12 9.92172 11.5786 9.17157 10.8284C8.42143 10.0783 8 9.06087 8 8V4H16V8ZM20 8C20 8.53043 19.7893 9.03914 19.4142 9.41421C19.0391 9.78929 18.5304 10 18 10H17.65C17.8794 9.35806 17.9978 8.68171 18 8V6H20V8Z" fill="#EDF6F7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
3
src/assets/icons/menu/home.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.5 17.0625H16.5M11.3046 3.21117L3.50457 8.48603C3.18802 8.7001 3 9.04666 3 9.41605V19.2882C3 20.2336 3.80589 21 4.8 21H19.2C20.1941 21 21 20.2336 21 19.2882V9.41605C21 9.04665 20.812 8.7001 20.4954 8.48603L12.6954 3.21117C12.2791 2.92961 11.7209 2.92961 11.3046 3.21117Z" stroke="#EDF6F7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 469 B |
8
src/assets/icons/menu/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import Account from "./account.svg";
|
||||
import Clipboard from "./clipboard.svg";
|
||||
import Cup from "./cup.svg";
|
||||
import Home from "./home.svg";
|
||||
import Openbook from "./openbook.svg";
|
||||
import Users from "./users.svg";
|
||||
|
||||
export {Account, Clipboard, Cup, Home, Openbook, Users};
|
||||
3
src/assets/icons/menu/openbook.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M21.1696 2.06C20.4528 1.93653 19.7269 1.87298 18.9996 1.87C16.518 1.86796 14.0881 2.57957 11.9996 3.92C9.90574 2.59717 7.47625 1.90303 4.9996 1.92C4.27224 1.92298 3.5464 1.98653 2.8296 2.11C2.5948 2.15048 2.38218 2.27346 2.23001 2.45679C2.07784 2.64013 1.99613 2.87177 1.9996 3.11V15.11C1.99745 15.2569 2.02772 15.4025 2.08825 15.5364C2.14877 15.6703 2.23806 15.7893 2.34977 15.8847C2.46148 15.9802 2.59285 16.0499 2.73455 16.0888C2.87625 16.1278 3.02479 16.135 3.1696 16.11C4.60262 15.8619 6.0708 15.9031 7.48766 16.2311C8.90453 16.5591 10.2414 17.1674 11.4196 18.02L11.5396 18.09H11.6496C11.7605 18.1362 11.8795 18.16 11.9996 18.16C12.1197 18.16 12.2387 18.1362 12.3496 18.09H12.4596L12.5796 18.02C13.7496 17.1483 15.0826 16.5203 16.4997 16.1734C17.9169 15.8264 19.3893 15.7674 20.8296 16C20.9744 16.025 21.1229 16.0178 21.2646 15.9788C21.4063 15.9399 21.5377 15.8702 21.6494 15.7747C21.7611 15.6793 21.8504 15.5603 21.9109 15.4264C21.9715 15.2925 22.0017 15.1469 21.9996 15V3C21.9892 2.77215 21.9012 2.55471 21.7502 2.38374C21.5993 2.21276 21.3944 2.09854 21.1696 2.06ZM10.9996 15.35C9.14948 14.3767 7.09011 13.8687 4.9996 13.87C4.6696 13.87 4.3396 13.87 3.9996 13.87V3.87C4.33265 3.8508 4.66654 3.8508 4.9996 3.87C7.13298 3.86764 9.21981 4.49369 10.9996 5.67V15.35ZM19.9996 13.91C19.6596 13.91 19.3296 13.91 18.9996 13.91C16.9091 13.9087 14.8497 14.4167 12.9996 15.39V5.67C14.7794 4.49369 16.8662 3.86764 18.9996 3.87C19.3327 3.8508 19.6665 3.8508 19.9996 3.87V13.91ZM21.1696 18.06C20.4528 17.9365 19.7269 17.873 18.9996 17.87C16.518 17.868 14.0881 18.5796 11.9996 19.92C9.91111 18.5796 7.48123 17.868 4.9996 17.87C4.27224 17.873 3.5464 17.9365 2.8296 18.06C2.69942 18.0807 2.57462 18.1268 2.46236 18.1959C2.3501 18.265 2.2526 18.3555 2.17546 18.4624C2.09833 18.5693 2.04308 18.6903 2.0129 18.8186C1.98272 18.9469 1.9782 19.0799 1.9996 19.21C2.05042 19.4697 2.20209 19.6986 2.42139 19.8467C2.64069 19.9948 2.90974 20.0499 3.1696 20C4.60262 19.7519 6.0708 19.7931 7.48766 20.1211C8.90453 20.4491 10.2414 21.0574 11.4196 21.91C11.589 22.0306 11.7917 22.0954 11.9996 22.0954C12.2075 22.0954 12.4102 22.0306 12.5796 21.91C13.7578 21.0574 15.0947 20.4491 16.5115 20.1211C17.9284 19.7931 19.3966 19.7519 20.8296 20C21.0895 20.0499 21.3585 19.9948 21.5778 19.8467C21.7971 19.6986 21.9488 19.4697 21.9996 19.21C22.021 19.0799 22.0165 18.9469 21.9863 18.8186C21.9561 18.6903 21.9009 18.5693 21.8237 18.4624C21.7466 18.3555 21.6491 18.265 21.5368 18.1959C21.4246 18.1268 21.2998 18.0807 21.1696 18.06Z" fill="#EDF6F7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
3
src/assets/icons/menu/users.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.3 12.22C12.8336 11.7581 13.2616 11.1869 13.5549 10.545C13.8482 9.90316 14 9.20571 14 8.5C14 7.17392 13.4732 5.90215 12.5355 4.96447C11.5979 4.02678 10.3261 3.5 9 3.5C7.67392 3.5 6.40215 4.02678 5.46447 4.96447C4.52678 5.90215 4 7.17392 4 8.5C3.99999 9.20571 4.1518 9.90316 4.44513 10.545C4.73845 11.1869 5.16642 11.7581 5.7 12.22C4.30014 12.8539 3.11247 13.8775 2.27898 15.1685C1.4455 16.4596 1.00147 17.9633 1 19.5C1 19.7652 1.10536 20.0196 1.29289 20.2071C1.48043 20.3946 1.73478 20.5 2 20.5C2.26522 20.5 2.51957 20.3946 2.70711 20.2071C2.89464 20.0196 3 19.7652 3 19.5C3 17.9087 3.63214 16.3826 4.75736 15.2574C5.88258 14.1321 7.4087 13.5 9 13.5C10.5913 13.5 12.1174 14.1321 13.2426 15.2574C14.3679 16.3826 15 17.9087 15 19.5C15 19.7652 15.1054 20.0196 15.2929 20.2071C15.4804 20.3946 15.7348 20.5 16 20.5C16.2652 20.5 16.5196 20.3946 16.7071 20.2071C16.8946 20.0196 17 19.7652 17 19.5C16.9985 17.9633 16.5545 16.4596 15.721 15.1685C14.8875 13.8775 13.6999 12.8539 12.3 12.22ZM9 11.5C8.40666 11.5 7.82664 11.3241 7.33329 10.9944C6.83994 10.6648 6.45542 10.1962 6.22836 9.64805C6.0013 9.09987 5.94189 8.49667 6.05764 7.91473C6.1734 7.33279 6.45912 6.79824 6.87868 6.37868C7.29824 5.95912 7.83279 5.6734 8.41473 5.55764C8.99667 5.44189 9.59987 5.5013 10.1481 5.72836C10.6962 5.95542 11.1648 6.33994 11.4944 6.83329C11.8241 7.32664 12 7.90666 12 8.5C12 9.29565 11.6839 10.0587 11.1213 10.6213C10.5587 11.1839 9.79565 11.5 9 11.5ZM18.74 11.82C19.38 11.0993 19.798 10.2091 19.9438 9.25634C20.0896 8.30362 19.9569 7.32907 19.5618 6.45C19.1666 5.57093 18.5258 4.8248 17.7165 4.30142C16.9071 3.77805 15.9638 3.49974 15 3.5C14.7348 3.5 14.4804 3.60536 14.2929 3.79289C14.1054 3.98043 14 4.23478 14 4.5C14 4.76522 14.1054 5.01957 14.2929 5.20711C14.4804 5.39464 14.7348 5.5 15 5.5C15.7956 5.5 16.5587 5.81607 17.1213 6.37868C17.6839 6.94129 18 7.70435 18 8.5C17.9986 9.02524 17.8593 9.5409 17.5961 9.99542C17.3328 10.4499 16.9549 10.8274 16.5 11.09C16.3517 11.1755 16.2279 11.2977 16.1404 11.4447C16.0528 11.5918 16.0045 11.7589 16 11.93C15.9958 12.0998 16.0349 12.2678 16.1137 12.4183C16.1924 12.5687 16.3081 12.6967 16.45 12.79L16.84 13.05L16.97 13.12C18.1754 13.6917 19.1923 14.596 19.901 15.7263C20.6096 16.8566 20.9805 18.1659 20.97 19.5C20.97 19.7652 21.0754 20.0196 21.2629 20.2071C21.4504 20.3946 21.7048 20.5 21.97 20.5C22.2352 20.5 22.4896 20.3946 22.6771 20.2071C22.8646 20.0196 22.97 19.7652 22.97 19.5C22.9782 17.9654 22.5938 16.4543 21.8535 15.1101C21.1131 13.7659 20.0413 12.6333 18.74 11.82Z" fill="#EDF6F7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
15
src/assets/logos/Logo.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<svg width="173" height="28" viewBox="0 0 173 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M36.5844 18.1613H42.1103V21.4244H32.3659V4.07063H36.5844V18.1613Z" fill="#0C8092"/>
|
||||
<path d="M46.2439 6.19658C45.5038 6.19658 44.8953 5.98234 44.4184 5.55385C43.9579 5.10889 43.7276 4.56504 43.7276 3.92231C43.7276 3.2631 43.9579 2.71925 44.4184 2.29076C44.8953 1.84579 45.5038 1.62331 46.2439 1.62331C46.9675 1.62331 47.5596 1.84579 48.0201 2.29076C48.497 2.71925 48.7355 3.2631 48.7355 3.92231C48.7355 4.56504 48.497 5.10889 48.0201 5.55385C47.5596 5.98234 46.9675 6.19658 46.2439 6.19658ZM48.3408 7.63037V21.4244H44.1223V7.63037H48.3408Z" fill="#0C8092"/>
|
||||
<path d="M50.5591 14.5521C50.5591 13.1842 50.8386 11.9647 51.3978 10.8935C51.9734 9.82225 52.7382 8.98999 53.692 8.3967C54.6624 7.78693 55.7149 7.48205 56.8497 7.48205C57.7213 7.48205 58.5025 7.63861 59.1933 7.95174C59.884 8.24838 60.4432 8.66863 60.8708 9.21248V7.63037H65.0892V28H60.8708V19.6939C60.3938 20.2707 59.81 20.7322 59.1193 21.0783C58.445 21.4244 57.672 21.5974 56.8004 21.5974C55.682 21.5974 54.6459 21.3008 53.692 20.7075C52.7382 20.1142 51.9734 19.2819 51.3978 18.2107C50.8386 17.1395 50.5591 15.92 50.5591 14.5521ZM60.8708 14.5274C60.8708 13.7858 60.7228 13.1677 60.4267 12.6733C60.1471 12.1624 59.7771 11.7834 59.3166 11.5362C58.8561 11.2725 58.371 11.1407 57.8611 11.1407C57.3677 11.1407 56.8908 11.2725 56.4303 11.5362C55.9698 11.7834 55.5916 12.1624 55.2955 12.6733C54.9995 13.1842 54.8515 13.8105 54.8515 14.5521C54.8515 15.2937 54.9995 15.92 55.2955 16.4308C55.5916 16.9252 55.9698 17.3043 56.4303 17.568C56.8908 17.8152 57.3677 17.9388 57.8611 17.9388C58.3545 17.9388 58.8314 17.8152 59.2919 17.568C59.7689 17.3043 60.1471 16.917 60.4267 16.4061C60.7228 15.8952 60.8708 15.269 60.8708 14.5274Z" fill="#0C8092"/>
|
||||
<path d="M81.7337 7.63037V21.4244H77.5153V19.5456C77.0877 20.1554 76.5039 20.6498 75.7638 21.0288C75.0402 21.3914 74.2343 21.5727 73.3462 21.5727C72.2937 21.5727 71.3645 21.342 70.5586 20.8805C69.7528 20.4026 69.1278 19.7187 68.6838 18.8287C68.2397 17.9388 68.0177 16.8923 68.0177 15.6892V7.63037H72.2114V15.1207C72.2114 16.0436 72.4499 16.7604 72.9269 17.2713C73.4038 17.7822 74.0452 18.0377 74.8511 18.0377C75.6734 18.0377 76.323 17.7822 76.7999 17.2713C77.2768 16.7604 77.5153 16.0436 77.5153 15.1207V7.63037H81.7337Z" fill="#0C8092"/>
|
||||
<path d="M86.8854 6.19658C86.1453 6.19658 85.5368 5.98234 85.0598 5.55385C84.5993 5.10889 84.3691 4.56504 84.3691 3.92231C84.3691 3.2631 84.5993 2.71925 85.0598 2.29076C85.5368 1.84579 86.1453 1.62331 86.8854 1.62331C87.609 1.62331 88.201 1.84579 88.6615 2.29076C89.1385 2.71925 89.3769 3.2631 89.3769 3.92231C89.3769 4.56504 89.1385 5.10889 88.6615 5.55385C88.201 5.98234 87.609 6.19658 86.8854 6.19658ZM88.9822 7.63037V21.4244H84.7638V7.63037H88.9822Z" fill="#0C8092"/>
|
||||
<path d="M91.2005 14.5026C91.2005 13.0853 91.4637 11.8411 91.99 10.7699C92.5327 9.69865 93.2645 8.87463 94.1855 8.29782C95.1065 7.72101 96.1344 7.43261 97.2691 7.43261C98.1737 7.43261 98.996 7.62213 99.7361 8.00117C100.493 8.38022 101.085 8.89111 101.512 9.53384V3.13125H105.731V21.4244H101.512V19.4467C101.118 20.1059 100.55 20.6333 99.8101 21.0288C99.0864 21.4244 98.2395 21.6221 97.2691 21.6221C96.1344 21.6221 95.1065 21.3337 94.1855 20.7569C93.2645 20.1636 92.5327 19.3314 91.99 18.2602C91.4637 17.1725 91.2005 15.92 91.2005 14.5026ZM101.512 14.5274C101.512 13.4726 101.216 12.6404 100.624 12.0306C100.049 11.4208 99.3414 11.1159 98.5026 11.1159C97.6639 11.1159 96.9484 11.4208 96.3564 12.0306C95.7808 12.6239 95.493 13.4479 95.493 14.5026C95.493 15.5574 95.7808 16.3979 96.3564 17.0241C96.9484 17.6339 97.6639 17.9388 98.5026 17.9388C99.3414 17.9388 100.049 17.6339 100.624 17.0241C101.216 16.4144 101.512 15.5821 101.512 14.5274Z" fill="#0C8092"/>
|
||||
<path d="M108.067 12.7228C108.067 11.0088 108.437 9.4844 109.177 8.1495C109.917 6.79812 110.945 5.75162 112.261 5.01C113.593 4.25191 115.098 3.87287 116.775 3.87287C118.831 3.87287 120.591 4.41671 122.055 5.50441C123.518 6.59211 124.497 8.07534 124.99 9.95409H120.352C120.007 9.22896 119.514 8.67687 118.872 8.29782C118.247 7.91877 117.532 7.72925 116.726 7.72925C115.427 7.72925 114.374 8.18246 113.568 9.08887C112.762 9.99529 112.36 11.2066 112.36 12.7228C112.36 14.239 112.762 15.4503 113.568 16.3567C114.374 17.2631 115.427 17.7163 116.726 17.7163C117.532 17.7163 118.247 17.5268 118.872 17.1477C119.514 16.7687 120.007 16.2166 120.352 15.4915H124.99C124.497 17.3702 123.518 18.8534 122.055 19.9411C120.591 21.0124 118.831 21.548 116.775 21.548C115.098 21.548 113.593 21.1772 112.261 20.4355C110.945 19.6775 109.917 18.631 109.177 17.2961C108.437 15.9612 108.067 14.4367 108.067 12.7228Z" fill="#00DBD9"/>
|
||||
<path d="M133.839 21.6221C132.491 21.6221 131.274 21.3337 130.188 20.7569C129.119 20.1801 128.272 19.3561 127.647 18.2849C127.039 17.2137 126.735 15.9612 126.735 14.5274C126.735 13.1101 127.047 11.8658 127.672 10.7946C128.297 9.70689 129.152 8.87463 130.238 8.29782C131.323 7.72101 132.54 7.43261 133.889 7.43261C135.237 7.43261 136.454 7.72101 137.54 8.29782C138.625 8.87463 139.48 9.70689 140.105 10.7946C140.73 11.8658 141.043 13.1101 141.043 14.5274C141.043 15.9447 140.722 17.1972 140.081 18.2849C139.456 19.3561 138.592 20.1801 137.49 20.7569C136.405 21.3337 135.188 21.6221 133.839 21.6221ZM133.839 17.9635C134.645 17.9635 135.328 17.6669 135.887 17.0736C136.463 16.4803 136.75 15.6315 136.75 14.5274C136.75 13.4232 136.471 12.5745 135.912 11.9812C135.369 11.3879 134.695 11.0912 133.889 11.0912C133.066 11.0912 132.384 11.3879 131.841 11.9812C131.299 12.558 131.027 13.4067 131.027 14.5274C131.027 15.6315 131.29 16.4803 131.817 17.0736C132.359 17.6669 133.034 17.9635 133.839 17.9635Z" fill="#00DBD9"/>
|
||||
<path d="M142.442 14.5026C142.442 13.0853 142.705 11.8411 143.231 10.7699C143.774 9.69865 144.506 8.87463 145.427 8.29782C146.348 7.72101 147.376 7.43261 148.511 7.43261C149.415 7.43261 150.237 7.62213 150.978 8.00117C151.734 8.38022 152.326 8.89111 152.754 9.53384V3.13125H156.972V21.4244H152.754V19.4467C152.359 20.1059 151.792 20.6333 151.052 21.0288C150.328 21.4244 149.481 21.6221 148.511 21.6221C147.376 21.6221 146.348 21.3337 145.427 20.7569C144.506 20.1636 143.774 19.3314 143.231 18.2602C142.705 17.1725 142.442 15.92 142.442 14.5026ZM152.754 14.5274C152.754 13.4726 152.458 12.6404 151.866 12.0306C151.29 11.4208 150.583 11.1159 149.744 11.1159C148.905 11.1159 148.19 11.4208 147.598 12.0306C147.022 12.6239 146.734 13.4479 146.734 14.5026C146.734 15.5574 147.022 16.3979 147.598 17.0241C148.19 17.6339 148.905 17.9388 149.744 17.9388C150.583 17.9388 151.29 17.6339 151.866 17.0241C152.458 16.4144 152.754 15.5821 152.754 14.5274Z" fill="#00DBD9"/>
|
||||
<path d="M173 14.3049C173 14.7004 172.975 15.1124 172.926 15.5409H163.379C163.445 16.3979 163.716 17.0571 164.193 17.5185C164.686 17.9635 165.287 18.186 165.994 18.186C167.047 18.186 167.778 17.741 168.19 16.8511H172.679C172.449 17.7575 172.03 18.5733 171.421 19.2984C170.829 20.0235 170.081 20.5921 169.176 21.0041C168.272 21.4161 167.26 21.6221 166.142 21.6221C164.793 21.6221 163.593 21.3337 162.54 20.7569C161.488 20.1801 160.665 19.3561 160.073 18.2849C159.481 17.2137 159.185 15.9612 159.185 14.5274C159.185 13.0936 159.473 11.8411 160.049 10.7699C160.641 9.69865 161.463 8.87463 162.516 8.29782C163.568 7.72101 164.777 7.43261 166.142 7.43261C167.474 7.43261 168.658 7.71277 169.694 8.2731C170.73 8.83343 171.536 9.63272 172.112 10.671C172.704 11.7092 173 12.9205 173 14.3049ZM168.683 13.1925C168.683 12.4673 168.436 11.8905 167.943 11.462C167.449 11.0335 166.833 10.8193 166.093 10.8193C165.385 10.8193 164.785 11.0253 164.292 11.4373C163.815 11.8493 163.519 12.4344 163.404 13.1925H168.683Z" fill="#00DBD9"/>
|
||||
<path d="M6.67518 17.9143V6.64562C6.67518 2.97608 3.68586 0 0 0V17.9143C0.00290225 18.3246 0.0609474 20.1131 1.45113 21.3816C1.95902 21.8468 2.49594 22.1039 2.90225 22.2484H9.28721C8.92153 22.1039 8.43975 21.8468 7.9812 21.3816C6.73033 20.1131 6.67809 18.3246 6.67518 17.9143Z" fill="#0C8092"/>
|
||||
<path d="M14.221 17.9143V10.9797C14.221 7.31018 11.2317 4.3341 7.54586 4.3341V17.9143C7.54876 18.3246 7.60681 20.1131 8.99699 21.3816C9.50488 21.8468 10.0418 22.1039 10.4481 22.2484H16.8331C16.4674 22.1039 15.9856 21.8468 15.5271 21.3816C14.2762 20.1131 14.2239 18.3246 14.221 17.9143Z" fill="#16A7C6"/>
|
||||
<path d="M23.218 21.3816C21.8279 20.1131 21.7698 18.3246 21.7669 17.9143V15.6028C21.7669 11.9332 18.7776 8.95714 15.0917 8.95714V17.9143C15.0946 18.3246 15.1527 20.1131 16.5428 21.3816C17.0507 21.8468 17.5877 22.1039 17.994 22.2484H24.6692C24.2628 22.1039 23.7259 21.8468 23.218 21.3816Z" fill="#00DBD9"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.4 KiB |
3
src/assets/logos/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import Logo from "./Logo.svg"
|
||||
|
||||
export {Logo}
|
||||
@@ -2,7 +2,9 @@ import axios from "axios";
|
||||
|
||||
const instance = axios.create({
|
||||
baseURL: import.meta.env.VITE_API_URL,
|
||||
withCredentials: true,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
});
|
||||
|
||||
export default instance;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import App from "./App.tsx";
|
||||
import "./styles/index.css";
|
||||
@@ -9,12 +8,9 @@ import { Provider } from "react-redux";
|
||||
import { store } from "./redux/store";
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<BrowserRouter>
|
||||
<Provider store={store}>
|
||||
<App />
|
||||
|
||||
</Provider>
|
||||
</BrowserRouter>
|
||||
</StrictMode>
|
||||
);
|
||||
|
||||
@@ -2,16 +2,22 @@
|
||||
import { Route, Routes } from "react-router-dom";
|
||||
import Login from "../views/home/auth/Login";
|
||||
import Register from "../views/home/auth/Register";
|
||||
import Menu from "../views/home/menu/Menu";
|
||||
|
||||
const Home = () => {
|
||||
return (
|
||||
<div className="h-full w-full bg-default-100 flex items-center justify-center">
|
||||
<div className=" bg-layout-background w-[25rem] h-[34.375rem] rounded-[15px] box-border p-[25px] relative">
|
||||
<div className="h-full w-full bg-liquid-background grid grid-cols-[250px,1fr] divide-x-[1px] divide-liquid-lighter">
|
||||
<div className="">
|
||||
<Menu />
|
||||
</div>
|
||||
<div className="">
|
||||
<Routes>
|
||||
<Route path="login" element={<Login />} />
|
||||
<Route path="account" element={<Login />} />
|
||||
<Route path="register" element={<Register />} />
|
||||
<Route path="*" element={"123"} />
|
||||
</Routes>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
30
src/redux/slices/store.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { createSlice, PayloadAction} from "@reduxjs/toolkit";
|
||||
|
||||
// Типы данных
|
||||
interface StorState {
|
||||
menu: {
|
||||
activePage: string;
|
||||
}
|
||||
}
|
||||
|
||||
// Инициализация состояния
|
||||
const initialState: StorState = {
|
||||
menu: {
|
||||
activePage: "",
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Slice
|
||||
const storeSlice = createSlice({
|
||||
name: "store",
|
||||
initialState,
|
||||
reducers: {
|
||||
setMenuActivePage: (state, activePage: PayloadAction<string>) => {
|
||||
state.menu.activePage = activePage.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setMenuActivePage } = storeSlice.actions;
|
||||
export const storeReducer = storeSlice.reducer;
|
||||
@@ -1,5 +1,6 @@
|
||||
import { configureStore } from "@reduxjs/toolkit";
|
||||
import { authReducer } from "./slices/auth";
|
||||
import { storeReducer } from "./slices/store";
|
||||
|
||||
|
||||
// использование
|
||||
@@ -15,6 +16,7 @@ export const store = configureStore({
|
||||
reducer: {
|
||||
//user: userReducer,
|
||||
auth: authReducer,
|
||||
store: storeReducer,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
width: 100%;
|
||||
height: 100svh;
|
||||
/* @apply bg-layout-background; */
|
||||
transition: all linear 200ms;
|
||||
/* transition: all linear 200ms; */
|
||||
|
||||
font-family: 'Source Code Pro', monospace;
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import { useAppDispatch, useAppSelector } from "../../../redux/hooks";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { loginUser } from "../../../redux/slices/auth";
|
||||
import { cn } from "../../../lib/cn";
|
||||
import { setMenuActivePage } from "../../../redux/slices/store";
|
||||
import { Balloon } from "../../../assets/icons/auth";
|
||||
|
||||
const Login = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
@@ -18,6 +20,7 @@ const Login = () => {
|
||||
|
||||
// После успешного логина
|
||||
useEffect(() => {
|
||||
dispatch(setMenuActivePage("account"))
|
||||
if (jwt) {
|
||||
navigate("/home/offices"); // или другая страница после входа
|
||||
}
|
||||
@@ -36,8 +39,12 @@ const Login = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="h-full w-full bg-default-100 flex items-center justify-center">
|
||||
<div className="bg-layout-background w-[25rem] rounded-[15px] box-border p-[25px] relative">
|
||||
<div className="h-full w-full flex items-center justify-center">
|
||||
<div className="bg-layout-background grid gap-[80px] grid-cols-[400px,400px] box-border relative ">
|
||||
<div className="flex items-center justify-center">
|
||||
<img src={Balloon} />
|
||||
</div>
|
||||
<div >
|
||||
<div className="text-content-1 w-full text-[28px] font-bold text-center">
|
||||
Вход в аккаунт
|
||||
</div>
|
||||
@@ -94,6 +101,8 @@ const Login = () => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,108 +1,26 @@
|
||||
// import React from "react";
|
||||
// import { Button } from "../../components/button/Button";
|
||||
// import { Input } from "../../components/input/Input";
|
||||
// import { useDispatch, useSelector } from "react-redux";
|
||||
// import { useNavigate } from "react-router-dom";
|
||||
// import { loginUser } from "../../redux/slices/user";
|
||||
// import { setUsername, setPassword } from "../../redux/slices/user";
|
||||
// import { cn } from "../../lib/cn";
|
||||
import { Logo } from "../../../assets/logos";
|
||||
import {Account, Clipboard, Cup, Home, Openbook, Users} from "../../../assets/icons/menu";
|
||||
import MenuItem from "./MenuItem";
|
||||
import { useAppSelector } from "../../../redux/hooks";
|
||||
|
||||
const Menu = () => {
|
||||
// const dispatch = useDispatch();
|
||||
// const navigate = useNavigate();
|
||||
const menuItems = [
|
||||
{text: "Главная", href: "/home", icon: Home, page: "home" },
|
||||
{text: "Задачи", href: "/home", icon: Clipboard, page: "clipboard" },
|
||||
{text: "Статьи", href: "/home", icon: Openbook, page: "openbool" },
|
||||
{text: "Группы", href: "/home", icon: Users, page: "users" },
|
||||
{text: "Контесты", href: "/home", icon: Cup, page: "cup" },
|
||||
{text: "Аккаунт", href: "/home/account", icon: Account, page: "account" },
|
||||
];
|
||||
const activePage = useAppSelector((state) => state.store.menu.activePage);
|
||||
|
||||
// const [inputUsername, setInputUsername] = React.useState<string>("");
|
||||
// const [inputPassword, setInputPassword] = React.useState<string>("");
|
||||
// const [inputClickLogin, setInputClickLogin] = React.useState<boolean>(false);
|
||||
|
||||
// const changeUsername = (s: string) => {
|
||||
// dispatch(setUsername(s));
|
||||
// setInputUsername(s);
|
||||
// };
|
||||
// const changePassword = (s: string) => {
|
||||
// dispatch(setPassword(s));
|
||||
// setInputPassword(s);
|
||||
// };
|
||||
|
||||
// const isAuthorised = useSelector((state: any) => state.user.isAuthorized);
|
||||
|
||||
// React.useEffect(() => {
|
||||
// if (isAuthorised) navigate("/home/offices");
|
||||
// }, [isAuthorised]);
|
||||
|
||||
// const clickLogin = () => {
|
||||
// setInputClickLogin(true);
|
||||
// if (inputUsername == "" || inputPassword == "") return;
|
||||
// setInputClickLogin(false);
|
||||
// dispatch(loginUser());
|
||||
|
||||
// if (isAuthorised) navigate("/home/offices");
|
||||
// };
|
||||
// const clickNavigateRegister = () => {
|
||||
// navigate("/auth/register");
|
||||
// };
|
||||
return (
|
||||
<div className="h-full w-full bg-default-100 flex items-center justify-center">
|
||||
<div className=" bg-layout-background w-[25rem] h-[34.375rem] rounded-[15px] box-border p-[25px] relative">
|
||||
<div className="text-content-1 w-full h-[3.125rem] text-[28px] font-bold text-center">
|
||||
Вход в аккаунт
|
||||
</div>
|
||||
<div className="text-content-1 w-full h-[3.4375rem] text-[12px] text-center mt-[15px]">
|
||||
Для начала работы вам необходимо войти в аккаунт. Заполните поля ниже
|
||||
и нажмите кнопку войти
|
||||
</div>
|
||||
|
||||
{/* <div className="mt-[15px]">
|
||||
<div
|
||||
className={cn(
|
||||
"text-[14px] text-danger font-medium h-0 transition-all mt-[20px] overflow-hidden",
|
||||
inputClickLogin && inputUsername == "" && "h-[21px]"
|
||||
)}
|
||||
>
|
||||
Поле не может быть пустым
|
||||
</div>
|
||||
<Input
|
||||
color="danger"
|
||||
required
|
||||
label="Логин"
|
||||
radius="sm"
|
||||
className="w-[22rem]"
|
||||
onChange={changeUsername}
|
||||
/>
|
||||
<div
|
||||
className={cn(
|
||||
"text-[14px] text-danger font-medium h-0 transition-all mt-[15px] overflow-hidden",
|
||||
inputClickLogin && inputPassword == "" && "h-[21px]"
|
||||
)}
|
||||
>
|
||||
Поле не может быть пустым
|
||||
</div>
|
||||
<Input
|
||||
required
|
||||
label="Пароль"
|
||||
type="password"
|
||||
radius="sm"
|
||||
className="w-[22rem]"
|
||||
onChange={changePassword}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="w-[calc(100%-50px)] absolute bottom-0">
|
||||
<Button
|
||||
className="w-full mb-[8px]"
|
||||
size="lg"
|
||||
onClick={clickLogin}
|
||||
text="Войти"
|
||||
/>
|
||||
<Button
|
||||
variant="bordered"
|
||||
color="default"
|
||||
className="w-full mb-[25px]"
|
||||
size="lg"
|
||||
onClick={clickNavigateRegister}
|
||||
text="Зарегистрироваться"
|
||||
/>
|
||||
</div> */}
|
||||
<div className="h-full w-full items-center box-border p-[20px] pt-[35px]">
|
||||
<img src={Logo} className="w-full" />
|
||||
<div className="">
|
||||
{menuItems.map((v, i) => (
|
||||
<MenuItem key={i} icon={v.icon} text={v.text} href={v.href} active={v.page == activePage} page={v.page}/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
36
src/views/home/menu/MenuItem.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useAppDispatch } from "../../../redux/hooks";
|
||||
import { setMenuActivePage } from "../../../redux/slices/store";
|
||||
|
||||
interface MenuItemProps {
|
||||
icon: string; // SVG или любой JSX
|
||||
text: string;
|
||||
href: string;
|
||||
page: string;
|
||||
active?: boolean; // необязательный, по умолчанию false
|
||||
}
|
||||
|
||||
const MenuItem: React.FC<MenuItemProps> = ({ icon, text = "", href = "", active = false, page = "" }) => {
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
return (
|
||||
<Link
|
||||
to={href}
|
||||
className={`
|
||||
flex items-center gap-3 p-[16px] rounded-[10px\] h-[40px] text-[18px] font-bold
|
||||
transition-colors duration-300 text-liquid-white mt-[20px]
|
||||
${active ? "bg-liquid-darkmain hover:bg-liquid-lighter hover:ring-[1px] hover:ring-liquid-darkmain hover:ring-inset"
|
||||
: " hover:bg-liquid-lighter"}
|
||||
`}
|
||||
onClick={
|
||||
() => dispatch(setMenuActivePage(page))
|
||||
}
|
||||
>
|
||||
<img src={icon} />
|
||||
<span>{text}</span>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
export default MenuItem;
|
||||
@@ -3,5 +3,8 @@ import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
plugins: [
|
||||
react()
|
||||
],
|
||||
|
||||
})
|
||||
|
||||