feat: align projects page with Figma design

This commit is contained in:
quanganh2k4 2026-10-30 23:26:57 +07:00
parent 78848dd7d1
commit 9de99c833b
42 changed files with 347 additions and 384 deletions

View file

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="32" height="32" rx="8" fill="#C75C4A"/>
<path d="M7.75 11.4167V9.58333C7.75 9.0971 7.94315 8.63079 8.28697 8.28697C8.63079 7.94315 9.0971 7.75 9.58333 7.75H11.4167M20.5833 7.75H22.4167C22.9029 7.75 23.3692 7.94315 23.713 8.28697C24.0568 8.63079 24.25 9.0971 24.25 9.58333V11.4167M24.25 20.5833V22.4167C24.25 22.9029 24.0568 23.3692 23.713 23.713C23.3692 24.0568 22.9029 24.25 22.4167 24.25H20.5833M11.4167 24.25H9.58333C9.0971 24.25 8.63079 24.0568 8.28697 23.713C7.94315 23.3692 7.75 22.9029 7.75 22.4167V20.5833M11.4167 16H20.5833" stroke-width="1.7" stroke-linecap="round" stroke="white"/>
</svg>

After

Width:  |  Height:  |  Size: 709 B

View file

@ -0,0 +1,10 @@
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_13_14399)">
<path d="M13.7505 7.50001H12.2004C11.9272 7.49943 11.6614 7.58833 11.4435 7.75314C11.2257 7.91794 11.0678 8.14956 10.994 8.41258L9.52517 13.638C9.51571 13.6705 9.49597 13.699 9.46892 13.7193C9.44187 13.7395 9.40897 13.7505 9.37516 13.7505C9.34135 13.7505 9.30845 13.7395 9.2814 13.7193C9.25436 13.699 9.23462 13.6705 9.22515 13.638L5.77487 1.36202C5.76541 1.32956 5.74567 1.30105 5.71862 1.28076C5.69157 1.26048 5.65867 1.24951 5.62486 1.24951C5.59105 1.24951 5.55815 1.26048 5.5311 1.28076C5.50406 1.30105 5.48432 1.32956 5.47485 1.36202L4.00598 6.58744C3.93252 6.84943 3.77558 7.0803 3.55899 7.245C3.3424 7.4097 3.07798 7.49923 2.80589 7.50001H1.24951" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</g>
<defs>
<clipPath id="clip0_13_14399">
<rect width="15" height="15" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 963 B

View file

@ -0,0 +1,3 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.70006 15.7506C7.83172 15.9786 8.02108 16.168 8.24911 16.2996C8.47713 16.4313 8.73579 16.5006 8.99909 16.5006C9.26239 16.5006 9.52105 16.4313 9.74907 16.2996C9.9771 16.168 10.1665 15.9786 10.2981 15.7506M2.44596 11.4947C2.34798 11.6021 2.28332 11.7357 2.25984 11.8792C2.23637 12.0226 2.25509 12.1698 2.31373 12.3029C2.37237 12.4359 2.46841 12.549 2.59015 12.6284C2.71189 12.7079 2.8541 12.7502 2.99947 12.7503H14.9997C15.1451 12.7504 15.2873 12.7082 15.4091 12.6289C15.5309 12.5496 15.6271 12.4366 15.6859 12.3037C15.7447 12.1707 15.7636 12.0236 15.7403 11.8801C15.717 11.7366 15.6525 11.603 15.5547 11.4955C14.5572 10.4671 13.4997 9.3743 13.4997 5.99977C13.4997 4.80619 13.0256 3.66151 12.1816 2.81752C11.3377 1.97354 10.1931 1.49939 8.99959 1.49939C7.80609 1.49939 6.66148 1.97354 5.81755 2.81752C4.97361 3.66151 4.4995 4.80619 4.4995 5.99977C4.4995 9.3743 3.44123 10.4671 2.44596 11.4947Z" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,4 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="32" height="32" rx="8" fill="#C75C4A"/>
<path d="M7.75 11.4167V9.58333C7.75 9.0971 7.94315 8.63079 8.28697 8.28697C8.63079 7.94315 9.0971 7.75 9.58333 7.75H11.4167M20.5833 7.75H22.4167C22.9029 7.75 23.3692 7.94315 23.713 8.28697C24.0568 8.63079 24.25 9.0971 24.25 9.58333V11.4167M24.25 20.5833V22.4167C24.25 22.9029 24.0568 23.3692 23.713 23.713C23.3692 24.0568 22.9029 24.25 22.4167 24.25H20.5833M11.4167 24.25H9.58333C9.0971 24.25 8.63079 24.0568 8.28697 23.713C7.94315 23.3692 7.75 22.9029 7.75 22.4167V20.5833M11.4167 16H20.5833" stroke-width="1.7" stroke-linecap="round" stroke="white"/>
</svg>

After

Width:  |  Height:  |  Size: 709 B

View file

@ -0,0 +1,3 @@
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.25 4.875L6.5 8.125L9.75 4.875" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</svg>

After

Width:  |  Height:  |  Size: 207 B

View file

@ -0,0 +1,3 @@
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.25 4.875L6.5 8.125L9.75 4.875" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</svg>

After

Width:  |  Height:  |  Size: 207 B

View file

@ -0,0 +1,3 @@
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.79199 8.12485L6.49989 10.8329L9.20779 8.12485M3.79199 4.87518L6.49989 2.16711L9.20779 4.87518" stroke-width="1.7" stroke-linecap="round" stroke="#9DA8BF"/>
</svg>

After

Width:  |  Height:  |  Size: 271 B

View file

@ -0,0 +1,10 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_13_13988)">
<path d="M6.05995 5.99956C6.2167 5.55397 6.52609 5.17824 6.93332 4.9389C7.34056 4.69956 7.81935 4.61208 8.28491 4.69193C8.75047 4.77179 9.17274 5.01383 9.47694 5.3752C9.78114 5.73656 9.94763 6.19393 9.94693 6.66628C9.94693 7.99972 7.94677 8.66644 7.94677 8.66644M8.00021 11.3336H8.00688M14.6674 7.99999C14.6674 11.6822 11.6824 14.6672 8.00021 14.6672C4.31801 14.6672 1.33301 11.6822 1.33301 7.99999C1.33301 4.3178 4.31801 1.33279 8.00021 1.33279C11.6824 1.33279 14.6674 4.3178 14.6674 7.99999Z" stroke-width="1.7" stroke-linecap="round" stroke="#9DA8BF"/>
</g>
<defs>
<clipPath id="clip0_13_13988">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 803 B

View file

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.66639 7.99999C8.66639 8.36848 8.36795 8.66719 7.99979 8.66719C7.63164 8.66719 7.33319 8.36848 7.33319 7.99999C7.33319 7.63151 7.63164 7.33279 7.99979 7.33279C8.36795 7.33279 8.66639 7.63151 8.66639 7.99999ZM13.3326 7.99999C13.3326 8.36848 13.0341 8.66719 12.666 8.66719C12.2978 8.66719 11.9994 8.36848 11.9994 7.99999C11.9994 7.63151 12.2978 7.33279 12.666 7.33279C13.0341 7.33279 13.3326 7.63151 13.3326 7.99999ZM4.00019 7.99999C4.00019 8.36848 3.70175 8.66719 3.33359 8.66719C2.96544 8.66719 2.66699 8.36848 2.66699 7.99999C2.66699 7.63151 2.96544 7.33279 3.33359 7.33279C3.70175 7.33279 4.00019 7.63151 4.00019 7.99999Z" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</svg>

After

Width:  |  Height:  |  Size: 800 B

View file

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.66639 7.99999C8.66639 8.36848 8.36795 8.66719 7.99979 8.66719C7.63164 8.66719 7.33319 8.36848 7.33319 7.99999C7.33319 7.63151 7.63164 7.33279 7.99979 7.33279C8.36795 7.33279 8.66639 7.63151 8.66639 7.99999ZM13.3326 7.99999C13.3326 8.36848 13.0341 8.66719 12.666 8.66719C12.2978 8.66719 11.9994 8.36848 11.9994 7.99999C11.9994 7.63151 12.2978 7.33279 12.666 7.33279C13.0341 7.33279 13.3326 7.63151 13.3326 7.99999ZM4.00019 7.99999C4.00019 8.36848 3.70175 8.66719 3.33359 8.66719C2.96544 8.66719 2.66699 8.36848 2.66699 7.99999C2.66699 7.63151 2.96544 7.33279 3.33359 7.33279C3.70175 7.33279 4.00019 7.63151 4.00019 7.99999Z" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</svg>

After

Width:  |  Height:  |  Size: 800 B

View file

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.66639 7.99999C8.66639 8.36848 8.36795 8.66719 7.99979 8.66719C7.63164 8.66719 7.33319 8.36848 7.33319 7.99999C7.33319 7.63151 7.63164 7.33279 7.99979 7.33279C8.36795 7.33279 8.66639 7.63151 8.66639 7.99999ZM13.3326 7.99999C13.3326 8.36848 13.0341 8.66719 12.666 8.66719C12.2978 8.66719 11.9994 8.36848 11.9994 7.99999C11.9994 7.63151 12.2978 7.33279 12.666 7.33279C13.0341 7.33279 13.3326 7.63151 13.3326 7.99999ZM4.00019 7.99999C4.00019 8.36848 3.70175 8.66719 3.33359 8.66719C2.96544 8.66719 2.66699 8.36848 2.66699 7.99999C2.66699 7.63151 2.96544 7.33279 3.33359 7.33279C3.70175 7.33279 4.00019 7.63151 4.00019 7.99999Z" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</svg>

After

Width:  |  Height:  |  Size: 800 B

View file

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.99967 9.3334L4.99967 7.40006C5.10839 7.18416 5.27376 7.00187 5.47808 6.8727C5.68241 6.74352 5.91801 6.67233 6.15967 6.66673H13.333M13.333 6.66673C13.5367 6.66637 13.7378 6.71269 13.9208 6.80212C14.1038 6.89155 14.2639 7.02172 14.3887 7.18264C14.5136 7.34356 14.5999 7.53095 14.6411 7.73043C14.6823 7.92991 14.6773 8.13618 14.6263 8.3334L13.5997 12.3334C13.5254 12.6211 13.3571 12.8758 13.1216 13.0569C12.8861 13.2381 12.5968 13.3354 12.2997 13.3334H2.66634C2.31272 13.3334 1.97358 13.1929 1.72353 12.9429C1.47348 12.6928 1.33301 12.3537 1.33301 12.0001V3.3334C1.33301 2.97978 1.47348 2.64064 1.72353 2.39059C1.97358 2.14054 2.31272 2.00006 2.66634 2.00006H5.26634C5.48933 1.99788 5.70931 2.05166 5.90614 2.15648C6.10297 2.2613 6.27037 2.41381 6.39301 2.60006L6.93301 3.40006C7.05441 3.58442 7.21969 3.73574 7.41401 3.84047C7.60833 3.94519 7.8256 4.00003 8.04634 4.00006H11.9997C12.3533 4.00006 12.6924 4.14054 12.9425 4.39059C13.1925 4.64064 13.333 4.97978 13.333 5.3334V6.66673Z" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.66667 2H6C6.36819 2 6.66667 2.29848 6.66667 2.66667V6C6.66667 6.36819 6.36819 6.66667 6 6.66667H2.66667C2.29848 6.66667 2 6.36819 2 6V2.66667C2 2.29848 2.29848 2 2.66667 2ZM10 2H13.3333C13.7015 2 14 2.29848 14 2.66667V6C14 6.36819 13.7015 6.66667 13.3333 6.66667H10C9.63181 6.66667 9.33333 6.36819 9.33333 6V2.66667C9.33333 2.29848 9.63181 2 10 2ZM10 9.33333H13.3333C13.7015 9.33333 14 9.63181 14 10V13.3333C14 13.7015 13.7015 14 13.3333 14H10C9.63181 14 9.33333 13.7015 9.33333 13.3333V10C9.33333 9.63181 9.63181 9.33333 10 9.33333ZM2.66667 9.33333H6C6.36819 9.33333 6.66667 9.63181 6.66667 10V13.3333C6.66667 13.7015 6.36819 14 6 14H2.66667C2.29848 14 2 13.7015 2 13.3333V10C2 9.63181 2.29848 9.33333 2.66667 9.33333Z" stroke-width="1.7" stroke-linecap="round" stroke="#5451D6"/>
</svg>

After

Width:  |  Height:  |  Size: 897 B

View file

@ -0,0 +1,3 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 2.25H6.75C7.16421 2.25 7.5 2.58579 7.5 3V6.75C7.5 7.16421 7.16421 7.5 6.75 7.5H3C2.58579 7.5 2.25 7.16421 2.25 6.75V3C2.25 2.58579 2.58579 2.25 3 2.25ZM11.25 2.25H15C15.4142 2.25 15.75 2.58579 15.75 3V6.75C15.75 7.16421 15.4142 7.5 15 7.5H11.25C10.8358 7.5 10.5 7.16421 10.5 6.75V3C10.5 2.58579 10.8358 2.25 11.25 2.25ZM11.25 10.5H15C15.4142 10.5 15.75 10.8358 15.75 11.25V15C15.75 15.4142 15.4142 15.75 15 15.75H11.25C10.8358 15.75 10.5 15.4142 10.5 15V11.25C10.5 10.8358 10.8358 10.5 11.25 10.5ZM3 10.5H6.75C7.16421 10.5 7.5 10.8358 7.5 11.25V15C7.5 15.4142 7.16421 15.75 6.75 15.75H3C2.58579 15.75 2.25 15.4142 2.25 15V11.25C2.25 10.8358 2.58579 10.5 3 10.5Z" stroke-width="1.7" stroke-linecap="round" stroke="#C5C3FF"/>
</svg>

After

Width:  |  Height:  |  Size: 839 B

View file

@ -0,0 +1,10 @@
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_13_14024)">
<path d="M5.41497 1.18977C5.58529 1.06691 5.78996 1.0008 5.99997 1.0008C6.20997 1.0008 6.41465 1.06691 6.58497 1.18977L10.585 4.05977C10.7575 4.18409 10.886 4.36021 10.9516 4.56252C11.0173 4.76483 11.0167 4.9828 10.95 5.18477L9.42997 9.81477C9.36374 10.0143 9.23629 10.1879 9.06574 10.3109C8.8952 10.4339 8.69023 10.5 8.47997 10.4998H3.51997C3.30971 10.5 3.10474 10.4339 2.93419 10.3109C2.76365 10.1879 2.6362 10.0143 2.56997 9.81477L1.04997 5.18477C0.98326 4.9828 0.982683 4.76483 1.04832 4.56252C1.11396 4.36021 1.2424 4.18409 1.41497 4.05977L5.41497 1.18977Z" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</g>
<defs>
<clipPath id="clip0_13_14024">
<rect width="12" height="12" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 871 B

View file

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.33301 7.99999H8.00021M8.00021 7.99999H12.6674M8.00021 7.99999V3.33279M8.00021 7.99999V12.6672" stroke-width="1.7" stroke-linecap="round" stroke="white"/>
</svg>

After

Width:  |  Height:  |  Size: 269 B

View file

@ -0,0 +1,10 @@
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_13_14018)">
<path d="M1.5 3.5V2.5C1.5 2.23478 1.60536 1.98043 1.79289 1.79289C1.98043 1.60536 2.23478 1.5 2.5 1.5H3.5M8.5 1.5H9.5C9.76522 1.5 10.0196 1.60536 10.2071 1.79289C10.3946 1.98043 10.5 2.23478 10.5 2.5V3.5M10.5 8.5V9.5C10.5 9.76522 10.3946 10.0196 10.2071 10.2071C10.0196 10.3946 9.76522 10.5 9.5 10.5H8.5M3.5 10.5H2.5C2.23478 10.5 1.98043 10.3946 1.79289 10.2071C1.60536 10.0196 1.5 9.76522 1.5 9.5V8.5" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</g>
<defs>
<clipPath id="clip0_13_14018">
<rect width="12" height="12" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 711 B

View file

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.0001 14.0001L11.1068 11.1068M12.6667 7.33333C12.6667 10.2789 10.2789 12.6667 7.33333 12.6667C4.38781 12.6667 2 10.2789 2 7.33333C2 4.38781 4.38781 2 7.33333 2C10.2789 2 12.6667 4.38781 12.6667 7.33333Z" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</svg>

After

Width:  |  Height:  |  Size: 380 B

View file

@ -0,0 +1,10 @@
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_13_14012)">
<path d="M0.999512 3.4996V6.5856C0.999568 6.85079 1.10496 7.10511 1.29251 7.2926L4.64751 10.6476C4.85517 10.8569 5.13259 10.9824 5.42686 11.0002C5.72113 11.018 6.01165 10.9268 6.24301 10.7441M6.58551 0.999599C6.85071 0.999656 7.10502 1.10505 7.29251 1.2926L10.6475 4.6476C10.76 4.75915 10.8493 4.89188 10.9102 5.03811C10.9711 5.18434 11.0025 5.34119 11.0025 5.4996C11.0025 5.65801 10.9711 5.81486 10.9102 5.96109C10.8493 6.10732 10.76 6.24004 10.6475 6.3516L8.35151 8.6476C8.23996 8.76007 8.10723 8.84935 7.961 8.91027C7.81477 8.97119 7.65793 9.00256 7.49951 9.00256C7.3411 9.00256 7.18425 8.97119 7.03802 8.91027C6.89179 8.84935 6.75907 8.76007 6.64751 8.6476L3.29251 5.2926C3.10496 5.10511 2.99957 4.85079 2.99951 4.5856V1.4996C2.99951 1.36699 3.05219 1.23981 3.14596 1.14605C3.23973 1.05228 3.3669 0.999599 3.49951 0.999599H6.58551ZM5.49951 3.2496C5.49951 3.38767 5.38758 3.4996 5.24951 3.4996C5.11144 3.4996 4.99951 3.38767 4.99951 3.2496C4.99951 3.11153 5.11144 2.9996 5.24951 2.9996C5.38758 2.9996 5.49951 3.11153 5.49951 3.2496Z" stroke-width="1.7" stroke-linecap="round" stroke="#697386"/>
</g>
<defs>
<clipPath id="clip0_13_14012">
<rect width="12" height="12" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,3 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.0004 15.75V14.25C12.0004 13.4544 11.6843 12.6913 11.1216 12.1287C10.5589 11.5661 9.79582 11.25 9.00011 11.25H4.49975C3.70404 11.25 2.94092 11.5661 2.37826 12.1287C1.81561 12.6913 1.49951 13.4544 1.49951 14.25V15.75M12.0004 2.34595C12.6437 2.51272 13.2135 2.8884 13.6202 3.41399C14.027 3.93959 14.2477 4.58536 14.2477 5.24995C14.2477 5.91453 14.027 6.5603 13.6202 7.0859C13.2135 7.6115 12.6437 7.98717 12.0004 8.15395M16.5007 15.7499V14.2499C16.5002 13.5852 16.279 12.9395 15.8717 12.4141C15.4644 11.8888 14.8942 11.5136 14.2505 11.3474M9.75017 5.25C9.75017 6.90685 8.40692 8.25 6.74993 8.25C5.09294 8.25 3.74969 6.90685 3.74969 5.25C3.74969 3.59315 5.09294 2.25 6.74993 2.25C8.40692 2.25 9.75017 3.59315 9.75017 5.25Z" stroke-width="1.7" stroke-linecap="round" stroke="#9DA8BF"/>
</svg>

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

View file

@ -1,18 +1,21 @@
import React from 'react'
import { Outlet } from 'react-router-dom'
import { Outlet, useLocation } from 'react-router-dom'
import { Sidebar } from './components/Sidebar/Sidebar'
import { Header } from './components/Header/Header'
export const DashboardLayout: React.FC<{ children?: React.ReactNode }> = ({
children,
}) => {
const { pathname } = useLocation()
const isProjectList = pathname === '/projects'
return (
<div className="flex min-h-screen bg-[#F8FAFC] text-slate-900">
<Sidebar />
<div className={`flex text-slate-900 ${isProjectList ? 'h-screen min-h-0 overflow-hidden bg-[var(--project-canvas)]' : 'min-h-screen bg-[#F8FAFC]'}`}>
<Sidebar isProjectList={isProjectList} />
<div className="flex-1 flex flex-col min-w-0">
<Header />
<main className="flex-1 overflow-y-auto p-6 lg:p-8">
<div className="mx-auto max-w-7xl">{children || <Outlet />}</div>
<Header isProjectList={isProjectList} />
<main className={`flex-1 overflow-y-auto ${isProjectList ? 'project-list-main h-[calc(100vh-64px)] min-h-0 p-6' : 'p-6 lg:p-8'}`}>
<div className={isProjectList ? 'w-full' : 'mx-auto max-w-7xl'}>{children || <Outlet />}</div>
</main>
</div>
</div>

View file

@ -23,6 +23,7 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = ({ items }) => {
if (items && items.length > 0) return items
const path = location.pathname
if (path === '/projects') return [{ label: 'Dự án' }]
if (path.startsWith('/users')) {
return [
{ label: 'Không gian làm việc', to: '/projects' },
@ -52,8 +53,10 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = ({ items }) => {
return (
<nav className="flex items-center gap-2 text-xs text-slate-500">
<svg
className="h-4 w-4 text-slate-400 shrink-0"
{location.pathname === '/projects' ? (
<img className="h-4 w-4 shrink-0" src="/assets/projects-ui/folder-open.svg" alt="" />
) : <svg
className={`h-4 w-4 shrink-0 ${location.pathname === '/projects' ? 'text-[#697386]' : 'text-slate-400'}`}
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
@ -64,7 +67,7 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = ({ items }) => {
strokeLinejoin="round"
d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
/>
</svg>
</svg>}
{resolvedItems.map((item, idx) => {
const isLast = idx === resolvedItems.length - 1
return (

View file

@ -6,16 +6,17 @@ import { UserMenu } from './UserMenu'
export interface HeaderProps {
breadcrumbItems?: BreadcrumbItem[]
isProjectList?: boolean
}
export const Header: React.FC<HeaderProps> = ({ breadcrumbItems }) => {
export const Header: React.FC<HeaderProps> = ({ breadcrumbItems, isProjectList = false }) => {
return (
<header className="h-14 shrink-0 bg-white border-b border-slate-200/80 px-6 flex items-center justify-between sticky top-0 z-20">
<header className={`shrink-0 bg-white px-6 flex items-center justify-between sticky top-0 z-20 ${isProjectList ? 'h-16 shadow-[inset_0_-1px_0_0_var(--project-border)]' : 'h-14 border-b border-slate-200/80'}`}>
<Breadcrumb items={breadcrumbItems} />
<div className="flex items-center gap-4">
<SystemStatus />
<NotificationBell />
<UserMenu />
<div className={`flex items-center ${isProjectList ? 'gap-5' : 'gap-4'}`}>
<SystemStatus isProjectList={isProjectList} />
<NotificationBell isProjectList={isProjectList} />
<UserMenu isProjectList={isProjectList} />
</div>
</header>
)

View file

@ -28,7 +28,7 @@ const MOCK_NOTIFICATIONS: NotificationItem[] = [
},
]
export const NotificationBell: React.FC = () => {
export const NotificationBell: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
const [open, setOpen] = useState(false)
const [notifications, setNotifications] = useState(MOCK_NOTIFICATIONS)
const ref = useRef<HTMLDivElement>(null)
@ -54,10 +54,10 @@ export const NotificationBell: React.FC = () => {
<button
type="button"
onClick={() => setOpen((prev) => !prev)}
className="relative rounded-full p-2 text-slate-500 hover:bg-slate-100 hover:text-slate-800 transition-colors"
className={`relative rounded-full transition-colors ${isProjectList ? 'p-0 text-[#697386]' : 'p-2 text-slate-500 hover:bg-slate-100 hover:text-slate-800'}`}
aria-label="Thông báo"
>
<svg
{isProjectList ? <img className="h-[18px] w-[18px]" src="/assets/projects-ui/bell.svg" alt="" /> : <svg
className="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
@ -69,8 +69,8 @@ export const NotificationBell: React.FC = () => {
strokeLinejoin="round"
d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"
/>
</svg>
{unreadCount > 0 && (
</svg>}
{!isProjectList && unreadCount > 0 && (
<span className="absolute top-1.5 right-1.5 h-2 w-2 rounded-full bg-[#C95C3C] ring-2 ring-white" />
)}
</button>

View file

@ -1,9 +1,9 @@
import React from 'react'
export const SystemStatus: React.FC = () => {
export const SystemStatus: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
return (
<div className="hidden sm:flex items-center gap-2 text-xs text-slate-600">
<span className="h-2 w-2 rounded-full bg-emerald-600" />
<div className={`hidden items-center text-slate-600 sm:flex ${isProjectList ? 'gap-2 text-[10px] text-[#697386]' : 'gap-2 text-xs'}`}>
<span className={`rounded-full bg-[#168262] ${isProjectList ? 'h-1.5 w-1.5' : 'h-2 w-2 bg-emerald-600'}`} />
<span>Hệ thống ổn định</span>
</div>
)

View file

@ -3,14 +3,14 @@ import { useNavigate } from 'react-router-dom'
import { Dropdown } from '../../../components/ui/Dropdown'
import { showToast } from '../../../components/feedback/Toast'
export const UserMenu: React.FC = () => {
export const UserMenu: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
const navigate = useNavigate()
return (
<Dropdown
align="right"
trigger={
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-orange-100 text-xs font-bold text-slate-800 hover:ring-2 hover:ring-orange-200 transition-all">
<div className={`flex h-[30px] w-[30px] items-center justify-center rounded-full text-[11px] font-semibold text-[#5451d6] transition-all ${isProjectList ? 'bg-[#f5ded6]' : 'bg-orange-100 text-slate-800 hover:ring-2 hover:ring-orange-200'}`}>
MA
</div>
}

View file

@ -1,58 +1,39 @@
import React from 'react'
import React, { useEffect, useState } from 'react'
import { Link, useLocation } from 'react-router-dom'
import clsx from 'clsx'
import { getProjects, subscribeProjectsStore } from '@/pages/projects/projectData'
interface RecentProjectItem {
id: string
name: string
path: string
dotColor: string
}
const RECENT_PROJECTS: RecentProjectItem[] = [
{
id: 'proj-1',
name: 'Phương tiện đô thị',
path: '/projects/proj-1',
dotColor: 'bg-indigo-500',
},
{
id: 'proj-2',
name: 'Giao thông đô thị',
path: '/projects/proj-2',
dotColor: 'bg-blue-600',
},
{
id: 'proj-3',
name: 'Phân vùng đường phố',
path: '/projects/proj-3',
dotColor: 'bg-violet-500',
},
]
export const RecentProjects: React.FC = () => {
export const RecentProjects: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
const location = useLocation()
const [recentProjects, setRecentProjects] = useState(() => getProjects().slice(0, 3))
useEffect(() => subscribeProjectsStore(() => setRecentProjects(getProjects().slice(0, 3))), [])
return (
<div>
<div className="px-2 mb-2 text-[10px] font-bold uppercase tracking-wider text-slate-500">
<div className={`px-2 mb-2 text-[9px] font-semibold text-slate-500 ${isProjectList ? 'tracking-normal text-[#332926]' : 'uppercase tracking-wider'}`}>
DỰ ÁN GẦN ĐÂY
</div>
<div className="space-y-0.5">
{RECENT_PROJECTS.map((project) => {
const isCurrent = location.pathname.startsWith(project.path)
{recentProjects.map((project) => {
const projectPath = `/projects/${project.id}`
const dotColors = ['bg-[#a29fff]', 'bg-[#a29fff]', 'bg-[#a29fff]']
const isCurrent = location.pathname.startsWith(projectPath)
return (
<Link
key={project.id}
to={project.path}
to={projectPath}
className={clsx(
'flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-xs font-medium transition-colors',
'flex items-center transition-colors',
isProjectList
? 'gap-2 px-2.5 py-0.5 text-[11px] font-normal leading-[17px] text-[#332926]'
: 'gap-2.5 rounded-lg px-2.5 py-2 text-xs font-medium',
isCurrent
? 'bg-slate-100 text-slate-900 font-semibold'
: 'text-slate-600 hover:bg-slate-50 hover:text-slate-900'
)}
>
<span className={clsx('h-1.5 w-1.5 rounded-full shrink-0', project.dotColor)} />
<span className={`h-[5px] w-[5px] shrink-0 rounded-full ${isProjectList ? 'bg-[#a29fff]' : 'bg-indigo-500'}`} />
<span className="truncate">{project.name}</span>
</Link>
)

View file

@ -6,12 +6,15 @@ import { RecentProjects } from './RecentProjects'
import { StorageUsage } from './StorageUsage'
import { UserInfo } from './UserInfo'
export const Sidebar: React.FC = () => {
export const Sidebar: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
return (
<aside className="w-[240px] shrink-0 bg-white border-r border-slate-200/80 flex flex-col justify-between h-screen sticky top-0 px-3.5 py-4 select-none">
<div className="space-y-5">
<aside className={`shrink-0 bg-white flex flex-col justify-between h-screen sticky top-0 select-none ${isProjectList ? 'w-[216px] px-4 pt-7 pb-5' : 'w-[240px] border-r border-slate-200/80 px-3.5 py-4'}`}>
<div className={isProjectList ? 'space-y-7' : 'space-y-5'}>
{/* Brand Logo */}
<Link to="/projects" className="flex items-center gap-2.5 px-1">
{isProjectList ? (
<img className="h-8 w-8 shrink-0" src="/assets/bi-u-tr-ng.svg" alt="" />
) : (
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-[#C95C3C] text-white shadow-sm">
<svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2.2}>
<path
@ -21,24 +24,25 @@ export const Sidebar: React.FC = () => {
/>
</svg>
</div>
<span className="text-xl font-bold tracking-tight text-slate-900">
)}
<span className={isProjectList ? 'text-[25px] font-bold tracking-[-1px] text-[#332926]' : 'text-xl font-bold tracking-tight text-slate-900'}>
danable
</span>
</Link>
{/* Workspace Selector */}
<WorkspaceSelector />
<WorkspaceSelector isProjectList={isProjectList} />
{/* Navigation Links */}
<SidebarNav />
<SidebarNav isProjectList={isProjectList} />
{/* Recent Projects */}
<RecentProjects />
<RecentProjects isProjectList={isProjectList} />
</div>
<div className="space-y-4 pt-4">
<StorageUsage />
<UserInfo />
<div className={isProjectList ? 'space-y-2.5' : 'space-y-4 pt-4'}>
<StorageUsage isProjectList={isProjectList} />
<UserInfo isProjectList={isProjectList} />
</div>
</aside>
)

View file

@ -6,11 +6,11 @@ interface NavItem {
to: string
label: string
badge: number
icon: React.ReactNode
icon: string
matchPrefix: string
}
export const SidebarNav: React.FC = () => {
export const SidebarNav: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
const location = useLocation()
const navItems: NavItem[] = [
@ -19,36 +19,20 @@ export const SidebarNav: React.FC = () => {
label: 'Dự án',
badge: 3,
matchPrefix: '/projects',
icon: (
<svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"
/>
</svg>
),
icon: '/assets/projects-ui/layout-grid.svg',
},
{
to: '/users',
label: 'Người dùng',
badge: 8,
matchPrefix: '/users',
icon: (
<svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"
/>
</svg>
),
icon: '/assets/projects-ui/users.svg',
},
]
return (
<div>
<div className="px-2 mb-2 text-[10px] font-bold uppercase tracking-wider text-slate-500">
<div className={`px-2 mb-2 text-[9px] font-semibold text-slate-500 ${isProjectList ? 'tracking-normal text-[#332926]' : 'uppercase tracking-wider'}`}>
KHÔNG GIAN LÀM VIỆC
</div>
<nav className="space-y-1">
@ -63,16 +47,14 @@ export const SidebarNav: React.FC = () => {
key={item.to}
to={item.to}
className={clsx(
'flex items-center justify-between rounded-xl px-3 py-2.5 text-sm font-medium transition-colors',
`flex items-center justify-between transition-colors ${isProjectList ? 'h-[42px] rounded-[7px] px-3 text-[13px]' : 'rounded-xl px-3 py-2.5 text-sm'} font-medium`,
isActive
? 'bg-[#C95C3C] text-white shadow-sm'
? (isProjectList ? 'bg-[#c75c4a] text-white' : 'bg-[#C95C3C] text-white shadow-sm')
: 'text-slate-700 hover:bg-slate-100'
)}
>
<div className="flex items-center gap-2.5">
<span className={clsx(isActive ? 'text-white' : 'text-slate-500')}>
{item.icon}
</span>
<img className="h-[18px] w-[18px] shrink-0" src={item.icon} alt="" />
<span>{item.label}</span>
</div>
<span

View file

@ -1,19 +1,19 @@
import React from 'react'
export const StorageUsage: React.FC = () => {
export const StorageUsage: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
return (
<div className="rounded-xl bg-slate-100/80 border border-slate-200/60 p-3.5">
<div className="flex items-center justify-between text-xs font-medium text-slate-700 mb-2">
<div className={`rounded-[8px] p-3 ${isProjectList ? 'bg-[#f1f3fe]' : 'rounded-xl border border-slate-200/60 bg-slate-100/80 p-3.5'}`}>
<div className={`mb-2 flex items-center justify-between font-medium text-slate-700 ${isProjectList ? 'text-[10px] text-[#332926]' : 'text-xs'}`}>
<span>Dung lượng dữ liệu</span>
<span className="font-semibold text-slate-900">24%</span>
</div>
<div className="h-1.5 w-full overflow-hidden rounded-full bg-slate-200">
<div className="h-1 w-full overflow-hidden rounded-full bg-[#e5e8ed]">
<div
className="h-full rounded-full bg-[#3B5BDB]"
className={`h-full rounded-full ${isProjectList ? 'bg-[#8a87f4]' : 'bg-[#3B5BDB]'}`}
style={{ width: '24%' }}
/>
</div>
<div className="mt-2 text-[11px] text-slate-500">
<div className={`mt-2 text-slate-500 ${isProjectList ? 'text-[9px] text-[#332926]' : 'text-[11px]'}`}>
12 GB / 50 GB đã sử dụng
</div>
</div>

View file

@ -2,7 +2,7 @@ import React from 'react'
import { useNavigate } from 'react-router-dom'
import { showToast } from '../../../components/feedback/Toast'
export const UserInfo: React.FC = () => {
export const UserInfo: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
const navigate = useNavigate()
const handleLogout = () => {
@ -15,10 +15,10 @@ export const UserInfo: React.FC = () => {
<button
type="button"
onClick={() => showToast.info('Tài liệu hướng dẫn sử dụng danable v1.0')}
className="flex w-full items-center gap-2 px-2 py-1.5 text-xs font-medium text-slate-600 hover:text-slate-900 transition-colors"
className={`flex w-full items-center gap-2 text-xs font-medium text-slate-600 transition-colors hover:text-slate-900 ${isProjectList ? 'px-2.5 py-2 text-[11px]' : 'px-2 py-1.5'}`}
>
<svg
className="h-4 w-4 text-slate-400"
{isProjectList ? <img className="h-4 w-4" src="/assets/projects-ui/circle-help.svg" alt="" /> : <svg
className={`h-4 w-4 ${isProjectList ? 'text-[#697386]' : 'text-slate-400'}`}
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
@ -29,25 +29,25 @@ export const UserInfo: React.FC = () => {
strokeLinejoin="round"
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
</svg>}
<span>Tài liệu & hỗ trợ</span>
</button>
<div className="border-t border-slate-200 pt-3 flex items-center justify-between">
<div className={`flex items-center justify-between ${isProjectList ? 'border-t border-[#2d374d] pt-[18px]' : 'border-t border-slate-200 pt-3'}`}>
<div className="flex items-center gap-2.5 min-w-0">
<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-orange-100 text-xs font-bold text-slate-800">
<div className={`flex shrink-0 items-center justify-center rounded-full font-semibold ${isProjectList ? 'h-[34px] w-[34px] bg-[#f5ded6] text-[11px] text-[#332926]' : 'h-8 w-8 bg-orange-100 text-xs text-slate-800'}`}>
MA
</div>
<div className="min-w-0">
<div className="truncate text-xs font-semibold text-slate-900">
<div className={`truncate font-semibold ${isProjectList ? 'text-[12px] text-[#332926]' : 'text-xs text-slate-900'}`}>
Minh Anh
</div>
<div className="truncate text-[11px] text-slate-500">
<div className={`truncate ${isProjectList ? 'text-[10px] text-[#332926]' : 'text-[11px] text-slate-500'}`}>
Quản trị viên
</div>
</div>
</div>
<button
{!isProjectList && <button
type="button"
onClick={handleLogout}
title="Đăng xuất"
@ -66,7 +66,7 @@ export const UserInfo: React.FC = () => {
d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
/>
</svg>
</button>
</button>}
</div>
</div>
)

View file

@ -1,7 +1,7 @@
import React, { useState } from 'react'
import { showToast } from '../../../components/feedback/Toast'
export const WorkspaceSelector: React.FC = () => {
export const WorkspaceSelector: React.FC<{ isProjectList?: boolean }> = ({ isProjectList = false }) => {
const [open, setOpen] = useState(false)
return (
@ -9,34 +9,28 @@ export const WorkspaceSelector: React.FC = () => {
<button
type="button"
onClick={() => setOpen((prev) => !prev)}
className="w-full flex items-center justify-between rounded-xl border border-slate-300/90 bg-white px-3 py-2.5 text-left hover:border-slate-400 transition-colors"
className={`w-full flex items-center justify-between bg-white text-left transition-colors ${isProjectList ? 'gap-[9px] rounded-[8px] border border-[#344057] p-2.5 hover:border-[#344057]' : 'rounded-xl border border-slate-300/90 px-3 py-2.5 hover:border-slate-400'}`}
>
<div className="flex items-center gap-2.5 min-w-0">
<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-indigo-50 text-xs font-bold text-slate-700">
<div className={`flex h-8 w-8 shrink-0 items-center justify-center text-[11px] font-semibold text-[#332926] ${isProjectList ? 'h-7 w-7 rounded-[6px] bg-[#d6dae6]' : 'rounded-full bg-indigo-50 text-slate-700'}`}>
VL
</div>
<div className="min-w-0">
<div className="truncate text-sm font-semibold text-slate-900 leading-tight">
<div className={`truncate font-semibold leading-tight ${isProjectList ? 'text-[13px] text-[#332926]' : 'text-sm text-slate-900'}`}>
danable
</div>
<div className="truncate text-[11px] text-slate-500 mt-0.5">
<div className={`truncate mt-0.5 ${isProjectList ? 'text-[10px] text-[#332926]' : 'text-[11px] text-slate-500'}`}>
Không gian nhóm
</div>
</div>
</div>
<svg
className="h-4 w-4 text-slate-400 shrink-0"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={1.8}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M8 9l4-4 4 4m0 6l-4 4-4-4"
/>
{isProjectList ? (
<img className="h-[13px] w-[13px] shrink-0" src="/assets/projects-ui/chevrons-up-down.svg" alt="" />
) : (
<svg className="h-4 w-4 shrink-0 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.8}>
<path strokeLinecap="round" strokeLinejoin="round" d="M8 9l4-4 4 4m0 6l-4 4-4-4" />
</svg>
)}
</button>
{open && (

View file

@ -77,14 +77,14 @@ export const ProjectListPage: React.FC = () => {
}
return (
<div className="space-y-5">
<div className="project-dashboard space-y-5">
{/* Page Header matching MVP · Quản lý dự án.png */}
<div className="flex flex-wrap items-start justify-between gap-4">
<div className="flex flex-wrap items-center justify-between gap-4">
<div>
<h1 className="text-[28px] font-bold leading-tight tracking-tight text-slate-900">
<h1 className="text-[27px] font-medium leading-[40.5px] tracking-[-1px] text-[var(--project-heading)]">
Dự án của bạn
</h1>
<p className="mt-1 text-xs text-slate-500">
<p className="mt-1.5 text-xs leading-[18px] text-[var(--project-body)]">
Quản lý dữ liệu, phân công gán nhãn và kiểm soát chất lượng trong một nơi.
</p>
</div>
@ -92,9 +92,9 @@ export const ProjectListPage: React.FC = () => {
<button
type="button"
onClick={() => setIsCreateModalOpen(true)}
className="inline-flex items-center gap-2 rounded-xl bg-[#C95C3C] px-4 py-2.5 text-xs font-semibold text-white shadow-sm transition hover:bg-[#B5492B]"
className="inline-flex h-10 items-center gap-2 rounded-lg bg-[var(--color-brand-orange-red)] px-4 text-[13px] font-semibold text-white [outline:1px_solid_var(--project-accent)] [outline-offset:-1px] transition hover:bg-[var(--brand-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--project-accent)]"
>
<span className="text-base leading-none">+</span>
<img className="h-4 w-4" src="/assets/projects-ui/plus.svg" alt="" />
<span>Tạo dự án</span>
</button>
</div>

View file

@ -16,24 +16,12 @@ export const ActivityFeed: React.FC<ActivityFeedProps> = ({
const displayed = expanded ? activities : activities.slice(0, 2)
return (
<div className="space-y-3">
<div className="space-y-5">
{/* Main Activity Bar matching wireframe */}
<div className="flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-slate-200/80 bg-white px-5 py-3 shadow-[0_1px_2px_rgba(15,23,42,0.02)]">
<div className="flex flex-wrap items-center justify-between gap-3 px-3 py-2">
<div className="flex flex-wrap items-center gap-6 text-xs text-slate-500">
{/* Pulse / Waveform icon */}
<svg
className="h-4 w-4 text-slate-400 shrink-0"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth={2}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M3 12h4l3-8 4 16 3-8h4"
/>
</svg>
<img className="h-[15px] w-[15px] shrink-0" src="/assets/projects-ui/activity.svg" alt="" />
{displayed.map((act) => (
<span key={act.id} className="inline-flex items-center gap-1 text-slate-500">
@ -48,7 +36,7 @@ export const ActivityFeed: React.FC<ActivityFeedProps> = ({
<button
type="button"
onClick={() => setExpanded((prev) => !prev)}
className="text-xs font-semibold text-indigo-600 hover:text-indigo-700 transition"
className="text-[11px] font-semibold text-[var(--project-accent)] transition hover:opacity-80"
>
{expanded ? 'Thu gọn ↑' : 'Xem tất cả →'}
</button>

View file

@ -1,39 +1,45 @@
import React, { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { Project, TaskType } from '@/types'
import { Project, ProjectStatus, TaskType } from '@/types'
interface ProjectCardProps {
project: Project
onDelete?: (projectId: string) => void
}
const TASK_BADGE_CONFIG: Record<
TaskType,
{ label: string; icon: React.ReactNode }
const TASK_BADGE_CONFIG: Record<TaskType, { label: string; iconSrc: string }> = {
classification: { label: 'Classification', iconSrc: '/assets/projects-ui/tags.svg' },
object_detection: { label: 'Object Detection', iconSrc: '/assets/projects-ui/scan.svg' },
segmentation: { label: 'Segmentation', iconSrc: '/assets/projects-ui/pentagon.svg' },
}
const PROJECT_STATUS_PRESENTATION: Record<
ProjectStatus,
{ label: string; background: string; text: string; dot: string }
> = {
classification: {
label: 'Classification',
icon: (
<svg className="h-3.5 w-3.5 text-slate-600" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2}>
<path strokeLinecap="round" strokeLinejoin="round" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z" />
</svg>
),
annotating: {
label: 'Đang gán nhãn',
background: 'var(--project-status-active-bg)',
text: 'var(--project-status-active-text)',
dot: 'var(--color-brand-orange-red)',
},
object_detection: {
label: 'Object Detection',
icon: (
<svg className="h-3.5 w-3.5 text-slate-600" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2}>
<path strokeLinecap="round" strokeLinejoin="round" d="M4 8V5a1 1 0 011-1h3M16 4h3a1 1 0 011 1v3M20 16v3a1 1 0 01-1 1h-3M8 20H5a1 1 0 01-1-1v-3" />
</svg>
),
pending_review: {
label: 'Chờ duyệt',
background: 'var(--project-status-review-bg)',
text: 'var(--project-status-review-text)',
dot: 'var(--project-status-review-dot)',
},
segmentation: {
label: 'Segmentation',
icon: (
<svg className="h-3.5 w-3.5 text-slate-600" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2}>
<polygon points="12 3 20 8.5 17 19 7 19 4 8.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
),
completed: {
label: 'Hoàn thành',
background: 'var(--project-status-complete-bg)',
text: 'var(--project-status-complete-text)',
dot: 'var(--project-status-complete-text)',
},
draft: {
label: 'Bản nháp',
background: 'var(--project-status-draft-bg)',
text: 'var(--project-status-draft-text)',
dot: 'var(--project-status-draft-text)',
},
}
@ -48,10 +54,11 @@ export const ProjectCard: React.FC<ProjectCardProps> = ({ project, onDelete }) =
? Math.round((annotatedCount / project.stats.totalImages) * 100)
: 0
const formatNum = (n: number) => n.toLocaleString('vi-VN')
const formatProjectNumber = (value: number) => value.toLocaleString('vi-VN')
const isPendingReviewHighlight =
project.status === 'pending_review' && project.stats.pendingReview > 0
const statusPresentation = PROJECT_STATUS_PRESENTATION[project.status]
const displayMembers = project.members.slice(0, 3)
@ -62,128 +69,28 @@ export const ProjectCard: React.FC<ProjectCardProps> = ({ project, onDelete }) =
return (
<div
onClick={handleOpenOverview}
className="group relative flex cursor-pointer flex-col overflow-hidden rounded-2xl border border-slate-200/80 bg-white shadow-[0_1px_3px_rgba(15,23,42,0.04)] transition-all duration-200 hover:-translate-y-0.5 hover:border-slate-300 hover:shadow-md"
className="group relative flex cursor-pointer flex-col overflow-hidden rounded-[12px] border border-[var(--project-border)] bg-[var(--project-surface)] shadow-none transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md"
>
{/* Top Thumbnail with decorative overlays */}
<div className="relative h-44 w-full overflow-hidden bg-slate-100">
<div className="relative h-[174px] w-full overflow-hidden bg-slate-100">
<img
src={project.thumbnailUrl}
alt={project.name}
className="h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.02]"
/>
{/* Decorative Bounding Box overlay for Object Detection */}
{project.taskType === 'object_detection' && (
<svg
className="pointer-events-none absolute inset-0 h-full w-full"
viewBox="0 0 400 180"
preserveAspectRatio="none"
>
{/* Cyan bbox around car */}
<rect
x="105"
y="72"
width="66"
height="48"
fill="rgba(6, 182, 212, 0.14)"
stroke="#06B6D4"
strokeWidth="2"
rx="2"
/>
<rect x="105" y="61" width="32" height="11" fill="#06B6D4" rx="1.5" />
<text x="109" y="69" fill="#ffffff" fontSize="7.5" fontWeight="600">
Ô tô
</text>
{/* Red/Orange bbox around bus */}
<rect
x="212"
y="34"
width="124"
height="84"
fill="rgba(239, 68, 68, 0.14)"
stroke="#EF4444"
strokeWidth="2"
rx="2"
/>
<rect x="212" y="23" width="44" height="11" fill="#EF4444" rx="1.5" />
<text x="216" y="31" fill="#ffffff" fontSize="7.5" fontWeight="600">
Xe buýt
</text>
{/* Amber bbox around motorbike */}
<rect
x="248"
y="112"
width="34"
height="52"
fill="rgba(245, 158, 11, 0.16)"
stroke="#F59E0B"
strokeWidth="1.8"
rx="2"
/>
<rect
x="298"
y="108"
width="36"
height="56"
fill="rgba(34, 197, 94, 0.16)"
stroke="#22C55E"
strokeWidth="1.8"
rx="2"
/>
</svg>
)}
{/* Decorative Polygon Mask overlay for Segmentation */}
{project.taskType === 'segmentation' && (
<svg
className="pointer-events-none absolute inset-0 h-full w-full"
viewBox="0 0 400 180"
preserveAspectRatio="none"
>
{/* Cyan polygon mask on car */}
<polygon
points="110,94 122,74 156,74 168,92 166,118 108,118"
fill="rgba(6, 182, 212, 0.36)"
stroke="#22D3EE"
strokeWidth="2"
/>
{/* Red/Coral polygon mask on bus */}
<polygon
points="216,42 292,35 334,54 334,114 276,118 216,96"
fill="rgba(239, 68, 68, 0.35)"
stroke="#F87171"
strokeWidth="2"
/>
{/* Green polygon masks on motorbikes */}
<polygon
points="254,124 268,112 280,128 276,162 252,160"
fill="rgba(34, 197, 94, 0.38)"
stroke="#4ADE80"
strokeWidth="1.8"
/>
<polygon
points="304,118 318,108 332,126 328,162 302,160"
fill="rgba(168, 85, 247, 0.38)"
stroke="#C084FC"
strokeWidth="1.8"
/>
</svg>
)}
{/* Top-left Task Badge */}
<div className="absolute left-3.5 top-3.5 inline-flex items-center gap-1.5 rounded-lg bg-white/95 px-2.5 py-1 text-xs font-semibold text-slate-800 shadow-sm backdrop-blur-sm">
{badge.icon}
<div className="absolute left-3 top-3 inline-flex items-center gap-1.5 rounded-[5px] bg-white/95 px-[9px] py-[5px] text-[10px] font-semibold text-[var(--project-heading)] shadow-sm backdrop-blur-sm">
<img className="h-3 w-3" src={badge.iconSrc} alt="" />
<span>{badge.label}</span>
</div>
</div>
{/* Card Content */}
<div className="flex flex-1 flex-col p-5">
<div className="flex flex-1 flex-col gap-[13px] p-[18px]">
{/* Title + 3-dots menu */}
<div className="flex items-start justify-between gap-2">
<h3 className="text-lg font-bold text-slate-900 group-hover:text-[#C95C3C] transition-colors">
<h3 className="text-[17px] font-semibold leading-[26px] text-[var(--project-heading)] group-hover:text-[var(--project-accent)] transition-colors">
{project.name}
</h3>
<div className="relative" onClick={(e) => e.stopPropagation()}>
@ -193,9 +100,7 @@ export const ProjectCard: React.FC<ProjectCardProps> = ({ project, onDelete }) =
className="flex h-7 w-7 items-center justify-center rounded-lg text-slate-400 hover:bg-slate-100 hover:text-slate-600"
aria-label="Tùy chọn dự án"
>
<svg className="h-4 w-4" fill="currentColor" viewBox="0 0 20 20">
<path d="M6 10a2 2 0 11-4 0 2 2 0 014 0zm6 0a2 2 0 11-4 0 2 2 0 014 0zm6 0a2 2 0 11-4 0 2 2 0 014 0z" />
</svg>
<img className="h-4 w-4" src="/assets/projects-ui/ellipsis.svg" alt="" />
</button>
{menuOpen && (
<div className="absolute right-0 top-8 z-20 w-44 rounded-xl border border-slate-200 bg-white py-1.5 shadow-lg">
@ -237,50 +142,47 @@ export const ProjectCard: React.FC<ProjectCardProps> = ({ project, onDelete }) =
</div>
{/* Description & Monospace Slug */}
<p className="mt-1 text-xs text-slate-500">{project.description}</p>
<p className="mt-2 font-mono text-[11px] text-slate-400">{project.slug}</p>
<p className="text-[11px] leading-[17px] text-[var(--project-body)]">{project.description}</p>
<p className="font-mono text-[10px] leading-[15px] text-[var(--project-muted)]">{project.slug}</p>
{/* Image count & class count */}
<div className="mt-3.5 flex items-center gap-3 text-xs font-medium text-slate-600">
<span>{formatNum(project.stats.totalImages)} ảnh</span>
<div className="flex items-center gap-4 text-[11px] leading-[17px] text-[var(--project-body)]">
<span>{formatProjectNumber(project.stats.totalImages)} ảnh</span>
<span>{project.classes.length} lớp</span>
</div>
{/* Progress text & bar */}
<div className="mt-3">
<div className="flex items-center justify-between text-xs">
<span className="text-slate-500">{formatNum(annotatedCount)} đã gán nhãn</span>
<span className="font-bold text-indigo-600">{progressPercent}%</span>
<div>
<div className="flex items-center justify-between text-[11px]">
<span className="text-[var(--project-body)]">{formatProjectNumber(annotatedCount)} đã gán nhãn</span>
<span className="font-semibold text-[var(--project-accent)]">{progressPercent}%</span>
</div>
<div className="mt-2 h-1.5 w-full overflow-hidden rounded-full bg-slate-100">
<div className="mt-1.5 h-[5px] w-full overflow-hidden rounded-full bg-[var(--project-border)]">
<div
className="h-full rounded-full bg-[#C95C3C] transition-all duration-300"
className="h-full rounded-full bg-[var(--color-brand-orange-red)] transition-all duration-300"
style={{ width: `${Math.min(100, Math.max(0, progressPercent))}%` }}
/>
</div>
</div>
{/* Status Pill & Member Avatar Stack */}
<div className="mt-4 flex items-center justify-between">
{isPendingReviewHighlight ? (
<span className="inline-flex items-center gap-1.5 rounded-full bg-[#FEF3C7] px-3 py-1 text-xs font-semibold text-[#B45309]">
<span className="h-1.5 w-1.5 rounded-full bg-[#F59E0B]" />
{formatNum(project.stats.pendingReview)} ảnh chờ duyệt
<div className="flex items-center justify-between">
<span
className="inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-[11px] font-medium"
style={{ backgroundColor: statusPresentation.background, color: statusPresentation.text }}
>
<span className="h-1.5 w-1.5 rounded-full" style={{ backgroundColor: statusPresentation.dot }} />
{isPendingReviewHighlight
? `${formatProjectNumber(project.stats.pendingReview)} ảnh chờ duyệt`
: statusPresentation.label}
</span>
) : (
<span className="inline-flex items-center gap-1.5 rounded-full bg-[#FEE2E2]/80 px-3 py-1 text-xs font-semibold text-[#B91C1C]">
<span className="h-1.5 w-1.5 rounded-full bg-[#EF4444]" />
Đang gán nhãn
</span>
)}
<div className="flex items-center -space-x-1.5">
{displayMembers.map((member) => (
<div
key={member.id}
title={member.name}
style={{ backgroundColor: member.color }}
className="flex h-6 w-6 items-center justify-center rounded-full border-2 border-white text-[10px] font-bold text-slate-700"
className="flex h-6 w-6 items-center justify-center rounded-full border-2 border-white bg-[var(--project-avatar-background)] text-[11px] font-semibold text-[var(--project-accent)]"
>
{member.initials}
</div>
@ -289,9 +191,9 @@ export const ProjectCard: React.FC<ProjectCardProps> = ({ project, onDelete }) =
</div>
{/* Divider + Footer */}
<div className="mt-4 flex items-center justify-between border-t border-slate-100 pt-3.5 text-xs">
<span className="text-slate-400">{project.updatedAt}</span>
<span className="inline-flex items-center gap-1 font-semibold text-indigo-600 group-hover:translate-x-0.5 transition-transform">
<div className="flex items-center justify-between border-t border-[var(--project-border)] pt-3 text-[10px]">
<span className="text-[var(--project-muted)]">{project.updatedAt}</span>
<span className="inline-flex items-center gap-1 text-[11px] font-semibold text-[var(--project-accent)] group-hover:translate-x-0.5 transition-transform">
Mở tổng quan →
</span>
</div>

View file

@ -31,25 +31,13 @@ export const ProjectFilters: React.FC<ProjectFiltersProps> = ({
<div className="flex flex-wrap items-center gap-3">
{/* Search Input */}
<div className="relative w-full sm:w-80">
<svg
className="pointer-events-none absolute left-3.5 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M21 21l-4.35-4.35m0 0A7.5 7.5 0 104.5 4.5a7.5 7.5 0 0012.15 12.15z"
/>
</svg>
<img className="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2" src="/assets/projects-ui/search.svg" alt="" />
<input
type="text"
value={searchQuery}
onChange={(e) => onSearchChange(e.target.value)}
placeholder="Tìm theo tên dự án..."
className="h-10 w-full rounded-xl border border-slate-200 bg-white pl-10 pr-4 text-sm text-slate-800 placeholder:text-slate-400 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/15"
className="h-10 w-full rounded-lg border border-[var(--project-border)] bg-white pl-10 pr-4 text-xs text-[var(--project-heading)] placeholder:text-[var(--project-muted)] focus:border-[var(--project-accent)] focus:outline-none focus:ring-2 focus:ring-[var(--project-accent)]/15"
/>
</div>
@ -58,22 +46,14 @@ export const ProjectFilters: React.FC<ProjectFiltersProps> = ({
<select
value={selectedTaskType}
onChange={(e) => onTaskTypeChange(e.target.value as 'all' | TaskType)}
className="h-10 appearance-none rounded-xl border border-slate-200 bg-white pl-3.5 pr-9 text-sm font-medium text-slate-700 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/15"
className="h-10 appearance-none rounded-lg border border-[var(--project-border)] bg-white pl-3.5 pr-9 text-xs font-normal text-[var(--project-heading)] focus:border-[var(--project-accent)] focus:outline-none focus:ring-2 focus:ring-[var(--project-accent)]/15"
>
<option value="all">Tất cả bài toán</option>
<option value="classification">Classification</option>
<option value="object_detection">Object Detection</option>
<option value="segmentation">Segmentation</option>
</select>
<svg
className="pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-500"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<path strokeLinecap="round" strokeLinejoin="round" d="M19 9l-7 7-7-7" />
</svg>
<img className="pointer-events-none absolute right-3 top-1/2 h-[13px] w-[13px] -translate-y-1/2" src="/assets/projects-ui/chevron-down.svg" alt="" />
</div>
{/* Status Filter */}
@ -81,22 +61,14 @@ export const ProjectFilters: React.FC<ProjectFiltersProps> = ({
<select
value={selectedStatus}
onChange={(e) => onStatusChange(e.target.value as 'all' | ProjectStatus)}
className="h-10 appearance-none rounded-xl border border-slate-200 bg-white pl-3.5 pr-9 text-sm font-medium text-slate-700 focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/15"
className="h-10 appearance-none rounded-lg border border-[var(--project-border)] bg-white pl-3.5 pr-9 text-xs font-normal text-[var(--project-heading)] focus:border-[var(--project-accent)] focus:outline-none focus:ring-2 focus:ring-[var(--project-accent)]/15"
>
<option value="all">Tất cả trạng thái</option>
<option value="annotating">Đang gán nhãn</option>
<option value="pending_review">Chờ duyệt</option>
<option value="completed">Hoàn thành</option>
</select>
<svg
className="pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-500"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<path strokeLinecap="round" strokeLinejoin="round" d="M19 9l-7 7-7-7" />
</svg>
<img className="pointer-events-none absolute right-3 top-1/2 h-[13px] w-[13px] -translate-y-1/2" src="/assets/projects-ui/chevron-down-2.svg" alt="" />
</div>
</div>
@ -106,38 +78,25 @@ export const ProjectFilters: React.FC<ProjectFiltersProps> = ({
<select
value={sortBy}
onChange={(e) => onSortChange(e.target.value as 'updated' | 'name' | 'progress')}
className="appearance-none bg-transparent pr-5 text-xs font-medium text-slate-500 hover:text-slate-800 focus:outline-none cursor-pointer"
className="appearance-none bg-transparent pr-5 text-[11px] font-normal text-[var(--project-body)] hover:text-[var(--project-heading)] focus:outline-none cursor-pointer"
>
<option value="updated">Mới cập nhật</option>
<option value="name">Tên dự án (A-Z)</option>
<option value="progress">Tiến độ gán nhãn</option>
</select>
<svg
className="pointer-events-none absolute right-0.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<path strokeLinecap="round" strokeLinejoin="round" d="M19 9l-7 7-7-7" />
</svg>
<img className="pointer-events-none absolute right-0.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2" src="/assets/projects-ui/chevron-down.svg" alt="" />
</div>
<button
type="button"
onClick={() => onViewModeChange(viewMode === 'grid' ? 'list' : 'grid')}
title={viewMode === 'grid' ? 'Chuyển sang dạng danh sách' : 'Chuyển sang dạng lưới'}
className="flex h-8 w-8 items-center justify-center rounded-lg text-indigo-600 transition hover:bg-indigo-50"
className="flex h-8 w-8 items-center justify-center rounded-lg text-[var(--project-accent)] transition hover:bg-[var(--project-accent-soft)]"
>
{viewMode === 'grid' ? (
<svg className="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2}>
<rect x="3" y="3" width="7" height="7" rx="1.5" />
<rect x="14" y="3" width="7" height="7" rx="1.5" />
<rect x="3" y="14" width="7" height="7" rx="1.5" />
<rect x="14" y="14" width="7" height="7" rx="1.5" />
</svg>
<img className="h-4 w-4" src="/assets/projects-ui/layout-grid-2.svg" alt="" />
) : (
<svg className="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2}>
<svg className="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} aria-hidden="true">
<path strokeLinecap="round" strokeLinejoin="round" d="M4 6h16M4 12h16M4 18h16" />
</svg>
)}

View file

@ -52,13 +52,13 @@ export const ProjectStatsCards: React.FC<ProjectStatsCardsProps> = ({ projects }
{cards.map((card) => (
<div
key={card.label}
className="rounded-2xl border border-slate-200/80 bg-white px-5 py-4 shadow-[0_1px_2px_rgba(15,23,42,0.03)]"
className="flex flex-col gap-[5px] rounded-[10px] border border-[var(--project-border)] bg-[var(--project-surface)] p-[18px] shadow-none"
>
<p className="text-xs font-medium text-slate-500">{card.label}</p>
<p className="mt-2 text-[28px] font-bold leading-tight tracking-tight text-slate-900">
<p className="text-[11px] font-normal text-[var(--project-body)]">{card.label}</p>
<p className="text-[28px] font-normal leading-[42px] text-[var(--project-heading)]">
{card.value}
</p>
<p className="mt-2 text-xs text-slate-500">{card.subtext}</p>
<p className="text-[10px] leading-[15px] text-[var(--project-body)]">{card.subtext}</p>
</div>
))}
</div>

View file

@ -1,14 +1,9 @@
import { Project, ImageItem, ActivityLog, CreateProjectInput, LabelClass, ProjectMemberSummary } from '@/types'
// SVG Data URLs for realistic street/vehicle thumbnails matching the wireframes
export const THUMBNAIL_CAR_SEDAN =
'https://images.unsplash.com/photo-1549399542-7e3f8b79c341?auto=format&fit=crop&w=900&q=80'
export const THUMBNAIL_TRAFFIC_STREET =
'https://images.unsplash.com/photo-1519003722824-194d4455a60c?auto=format&fit=crop&w=900&q=80'
export const THUMBNAIL_STREET_SEGMENTATION =
'https://images.unsplash.com/photo-1506521781263-d8422e82f27a?auto=format&fit=crop&w=900&q=80'
// Card thumbnails from the Figma project management screen.
export const THUMBNAIL_CAR_SEDAN = '/assets/projects/classification.jpg'
export const THUMBNAIL_TRAFFIC_STREET = '/assets/projects/object-detection.jpg'
export const THUMBNAIL_STREET_SEGMENTATION = '/assets/projects/segmentation.jpg'
export const INITIAL_PROJECTS: Project[] = [
{

View file

@ -4,17 +4,72 @@
@layer base {
:root {
--brand-primary: #c95c3c;
/* Danable project dashboard palette. Keep names tied to UI roles. */
--color-brand-orange-red: #c75c4a;
--brand-primary: #c75c4a;
--brand-primary-hover: #b5492b;
--project-accent: #5451d6;
--project-accent-soft: #f1f3fe;
--project-canvas: #f5f6fa;
--project-surface: #ffffff;
--project-heading: #172033;
--project-body: #697386;
--project-muted: #939bad;
--project-border: #e4e7ef;
--project-status-active-bg: #f5ded6;
--project-status-active-text: #5451d6;
--project-status-review-bg: #fff5df;
--project-status-review-text: #b57916;
--project-status-complete-bg: #e4f5ed;
--project-status-complete-text: #168262;
--project-status-draft-bg: #eef0f4;
--project-status-draft-text: #697386;
--project-status-review-dot: #b57916;
--project-label-car: #16b9c9;
--project-label-bus: #ae7cff;
--project-label-motorbike: #10b981;
--project-label-truck: #3b82f6;
--project-avatar-background: #f5ded6;
/* Màu chữ (Typography) */
--color-text-heading-left: #141c2a;
--color-text-heading-right: #172033;
--color-text-secondary: #697386;
--color-text-muted: #939bad;
--color-text-accent: #5451d6;
/* Màu nền & đường viền (Surfaces & Borders) */
--color-surface-card: #f8f9fa;
--color-border-card: #3b465e;
--color-border-input: #e4e7ef;
/* Màu nhãn Bounding Box minh họa (Annotation Labels) */
--color-label-car: #16b9c9;
--color-label-bus: #ae7cff;
}
body {
font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
background-color: #f8fafc;
background-color: var(--project-canvas);
color: #0f172a;
}
}
.project-list-main {
scrollbar-width: none;
overflow-y: visible;
}
.project-list-main::-webkit-scrollbar {
display: none;
}
@media (max-width: 767px) {
.project-list-main {
overflow-y: auto;
}
}
/* Custom thin scrollbars */
::-webkit-scrollbar {
width: 6px;
@ -33,4 +88,3 @@
::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}