Fix: bug fixes and icon replacement #10703 (#10814)

### What problem does this PR solve?

Fix: bug fixes and icon replacement #10703

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-10-27 19:02:18 +08:00
committed by GitHub
parent b7cb4d3e35
commit 0089e2b30c
22 changed files with 165 additions and 25 deletions

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 5V18H18C18.5304 18 19.0391 18.2107 19.4142 18.5858C19.7893 18.9609 20 19.4696 20 20V21M12 13H16M12 8H20M16 8V5C16 4.46957 16.2107 3.96086 16.5858 3.58579C16.9609 3.21071 17.4696 3 18 3M16.5 13C16.5 13.2761 16.2761 13.5 16 13.5C15.7239 13.5 15.5 13.2761 15.5 13C15.5 12.7239 15.7239 12.5 16 12.5C16.2761 12.5 16.5 12.7239 16.5 13ZM18.5 3C18.5 3.27614 18.2761 3.5 18 3.5C17.7239 3.5 17.5 3.27614 17.5 3C17.5 2.72386 17.7239 2.5 18 2.5C18.2761 2.5 18.5 2.72386 18.5 3ZM20.5 21C20.5 21.2761 20.2761 21.5 20 21.5C19.7239 21.5 19.5 21.2761 19.5 21C19.5 20.7239 19.7239 20.5 20 20.5C20.2761 20.5 20.5 20.7239 20.5 21ZM20.5 8C20.5 8.27614 20.2761 8.5 20 8.5C19.7239 8.5 19.5 8.27614 19.5 8C19.5 7.72386 19.7239 7.5 20 7.5C20.2761 7.5 20.5 7.72386 20.5 8Z" stroke="#00BEB4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6.00307 5.12505C5.98523 4.72548 6.04747 4.32637 6.18613 3.9512C6.32478 3.57604 6.53706 3.23238 6.81048 2.94045C7.08389 2.64853 7.41292 2.41422 7.77821 2.25132C8.14351 2.08841 8.53769 2.0002 8.93757 1.99186C9.33745 1.98353 9.73497 2.05524 10.1067 2.20278C10.4785 2.35032 10.817 2.57072 11.1023 2.851C11.3877 3.13128 11.6141 3.46579 11.7683 3.83485C11.9224 4.20391 12.0013 4.60008 12.0001 5.00005V18.0001C11.9995 18.5468 11.8868 19.0876 11.669 19.5891C11.4512 20.0906 11.133 20.5421 10.7338 20.9158C10.3347 21.2895 9.86321 21.5774 9.34846 21.7617C8.83372 21.946 8.28665 22.0228 7.74105 21.9874C7.19545 21.952 6.6629 21.8051 6.17629 21.5558C5.68969 21.3065 5.25935 20.9601 4.91186 20.538C4.56437 20.1159 4.30711 19.627 4.15596 19.1016C4.00481 18.5761 3.96299 18.0253 4.03307 17.4831M6.00307 5.12505C5.41528 5.27619 4.86958 5.5591 4.40731 5.95236C3.94503 6.34562 3.57831 6.83892 3.33492 7.3949C3.09152 7.95087 2.97783 8.55495 3.00246 9.16136C3.02709 9.76778 3.18939 10.3606 3.47707 10.8951M6.00307 5.12505C6.02285 5.60878 6.1594 6.08055 6.40107 6.50005M3.47707 10.8951C2.97125 11.306 2.5735 11.8343 2.31841 12.434C2.06333 13.0337 1.95863 13.6866 2.01344 14.336C2.06824 14.9854 2.28089 15.6116 2.63288 16.1601C2.98487 16.7085 3.46554 17.1627 4.03307 17.4831M3.47707 10.8951C3.66001 10.7461 3.85578 10.6145 4.06207 10.5001M4.03307 17.4831C4.63334 17.8216 5.3109 18.0004 6.00007 18.0001M9.00007 13.0001C9.83963 12.7047 10.5728 12.167 11.1067 11.4551C11.6407 10.7431 11.9516 9.88872 12.0001 9.00005" stroke="url(#paint0_linear_508_48860)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_508_48860" x1="7.27748" y1="1.99121" x2="7.27748" y2="21.9958" gradientUnits="userSpaceOnUse">
<stop stop-color="#161618"/>
<stop offset="1" stop-color="#888888"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 5V18H18C18.5304 18 19.0391 18.2107 19.4142 18.5858C19.7893 18.9609 20 19.4696 20 20V21M12 13H16M12 8H20M16 8V5C16 4.46957 16.2107 3.96086 16.5858 3.58579C16.9609 3.21071 17.4696 3 18 3M16.5 13C16.5 13.2761 16.2761 13.5 16 13.5C15.7239 13.5 15.5 13.2761 15.5 13C15.5 12.7239 15.7239 12.5 16 12.5C16.2761 12.5 16.5 12.7239 16.5 13ZM18.5 3C18.5 3.27614 18.2761 3.5 18 3.5C17.7239 3.5 17.5 3.27614 17.5 3C17.5 2.72386 17.7239 2.5 18 2.5C18.2761 2.5 18.5 2.72386 18.5 3ZM20.5 21C20.5 21.2761 20.2761 21.5 20 21.5C19.7239 21.5 19.5 21.2761 19.5 21C19.5 20.7239 19.7239 20.5 20 20.5C20.2761 20.5 20.5 20.7239 20.5 21ZM20.5 8C20.5 8.27614 20.2761 8.5 20 8.5C19.7239 8.5 19.5 8.27614 19.5 8C19.5 7.72386 19.7239 7.5 20 7.5C20.2761 7.5 20.5 7.72386 20.5 8Z" stroke="#00BEB4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6.00307 5.12505C5.98523 4.72548 6.04747 4.32637 6.18613 3.9512C6.32478 3.57604 6.53706 3.23238 6.81048 2.94045C7.08389 2.64853 7.41292 2.41422 7.77821 2.25132C8.14351 2.08841 8.53769 2.0002 8.93757 1.99186C9.33745 1.98353 9.73497 2.05524 10.1067 2.20278C10.4785 2.35032 10.817 2.57072 11.1023 2.851C11.3877 3.13128 11.6141 3.46579 11.7683 3.83485C11.9224 4.20391 12.0013 4.60008 12.0001 5.00005V18.0001C11.9995 18.5468 11.8868 19.0876 11.669 19.5891C11.4512 20.0906 11.133 20.5421 10.7338 20.9158C10.3347 21.2895 9.86321 21.5774 9.34846 21.7617C8.83372 21.946 8.28665 22.0228 7.74105 21.9874C7.19545 21.952 6.6629 21.8051 6.17629 21.5558C5.68969 21.3065 5.25935 20.9601 4.91186 20.538C4.56437 20.1159 4.30711 19.627 4.15596 19.1016C4.00481 18.5761 3.96299 18.0253 4.03307 17.4831M6.00307 5.12505C5.41528 5.27619 4.86958 5.5591 4.40731 5.95236C3.94503 6.34562 3.57831 6.83892 3.33492 7.3949C3.09152 7.95087 2.97783 8.55495 3.00246 9.16136C3.02709 9.76778 3.18939 10.3606 3.47707 10.8951M6.00307 5.12505C6.02285 5.60878 6.1594 6.08055 6.40107 6.50005M3.47707 10.8951C2.97125 11.306 2.5735 11.8343 2.31841 12.434C2.06333 13.0337 1.95863 13.6866 2.01344 14.336C2.06824 14.9854 2.28089 15.6116 2.63288 16.1601C2.98487 16.7085 3.46554 17.1627 4.03307 17.4831M3.47707 10.8951C3.66001 10.7461 3.85578 10.6145 4.06207 10.5001M4.03307 17.4831C4.63334 17.8216 5.3109 18.0004 6.00007 18.0001M9.00007 13.0001C9.83963 12.7047 10.5728 12.167 11.1067 11.4551C11.6407 10.7431 11.9516 9.88872 12.0001 9.00005" stroke="url(#paint0_linear_503_48571)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_503_48571" x1="11.2497" y1="1.99121" x2="11.2497" y2="21.9958" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#666666"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.3096 9.16504C19.8021 9.16504 20.2745 9.35961 20.6228 9.70594C20.9711 10.0523 21.1667 10.522 21.1667 11.0118V20.5095C21.1667 20.6392 21.1281 20.7659 21.0556 20.8737C20.9832 20.9815 20.8802 21.0655 20.7597 21.1151C20.6393 21.1648 20.5067 21.1777 20.3789 21.1524C20.251 21.1272 20.1335 21.0647 20.0413 20.9731L17.9966 18.9398C17.6484 18.5935 17.1761 18.3988 16.6836 18.3987H10.0239C9.53135 18.3987 9.05897 18.2041 8.71069 17.8578C8.36241 17.5115 8.16675 17.0418 8.16675 16.552V15.6286" stroke="#00BEB4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M18.1667 11.7831C18.1667 12.3546 17.941 12.9026 17.5391 13.3066C17.1373 13.7107 16.5922 13.9377 16.0239 13.9377H8.3396C7.77133 13.9378 7.22637 14.1649 6.8246 14.5689L4.46532 16.9411C4.35893 17.048 4.22339 17.1208 4.07584 17.1503C3.92829 17.1799 3.77535 17.1647 3.63636 17.1068C3.49737 17.0489 3.37857 16.9509 3.29498 16.8252C3.21139 16.6994 3.16677 16.5515 3.16675 16.4003V5.31956C3.16675 4.74815 3.39251 4.20014 3.79438 3.79608C4.19624 3.39203 4.74128 3.16504 5.30961 3.16504H16.0239C16.5922 3.16504 17.1373 3.39203 17.5391 3.79608C17.941 4.20014 18.1667 4.74815 18.1667 5.31956V11.7831Z" stroke="url(#paint0_linear_508_48870)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_508_48870" x1="11.0834" y1="3.16504" x2="11.0834" y2="17.165" gradientUnits="userSpaceOnUse">
<stop stop-color="#161618"/>
<stop offset="1" stop-color="#888888"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.3096 9.16504C19.8021 9.16504 20.2745 9.35961 20.6228 9.70594C20.9711 10.0523 21.1667 10.522 21.1667 11.0118V20.5095C21.1667 20.6392 21.1281 20.7659 21.0556 20.8737C20.9832 20.9815 20.8802 21.0655 20.7597 21.1151C20.6393 21.1648 20.5067 21.1777 20.3789 21.1524C20.251 21.1272 20.1335 21.0647 20.0413 20.9731L17.9966 18.9398C17.6484 18.5935 17.1761 18.3988 16.6836 18.3987H10.0239C9.53135 18.3987 9.05897 18.2041 8.71069 17.8578C8.36241 17.5115 8.16675 17.0418 8.16675 16.552V15.6286" stroke="#00BEB4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M18.1667 11.7831C18.1667 12.3546 17.941 12.9026 17.5391 13.3066C17.1373 13.7107 16.5922 13.9377 16.0239 13.9377H8.3396C7.77133 13.9378 7.22637 14.1649 6.8246 14.5689L4.46532 16.9411C4.35893 17.048 4.22339 17.1208 4.07584 17.1503C3.92829 17.1799 3.77535 17.1647 3.63636 17.1068C3.49737 17.0489 3.37857 16.9509 3.29498 16.8252C3.21139 16.6994 3.16677 16.5515 3.16675 16.4003V5.31956C3.16675 4.74815 3.39251 4.20014 3.79438 3.79608C4.19624 3.39203 4.74128 3.16504 5.30961 3.16504H16.0239C16.5922 3.16504 17.1373 3.39203 17.5391 3.79608C17.941 4.20014 18.1667 4.74815 18.1667 5.31956V11.7831Z" stroke="url(#paint0_linear_503_48585)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_503_48585" x1="13.881" y1="3.16504" x2="13.881" y2="24.7059" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#666666"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21.0001 5C21.0001 6.65685 16.9706 8 12.0001 8C7.0295 8 3.00007 6.65685 3.00007 5M21.0001 5C21.0001 3.34315 16.9706 2 12.0001 2C7.0295 2 3.00007 3.34315 3.00007 5M21.0001 5V8M3.00007 5L3.00007 19C2.9945 19.4809 3.33587 19.9552 3.9954 20.383C4.65493 20.8107 5.61329 21.1793 6.7897 21.4577C7.96611 21.7361 9.32608 21.9162 10.755 21.9827C12.1839 22.0493 13.6398 22.0003 15.0001 21.84M3.00007 12C3.00151 12.4675 3.33075 12.9285 3.96152 13.3461C4.59229 13.7636 5.50712 14.1263 6.63303 14.4051C7.75894 14.6839 9.06475 14.8711 10.4463 14.9519C11.8278 15.0326 13.2468 15.0045 14.5901 14.87" stroke="url(#paint0_linear_508_48865)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 12L18 17H22L19 22" stroke="#00BEB4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_508_48865" x1="12.5" y1="2" x2="12.5" y2="22.0116" gradientUnits="userSpaceOnUse">
<stop stop-color="#161618"/>
<stop offset="1" stop-color="#888888"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21.0001 5C21.0001 6.65685 16.9706 8 12.0001 8C7.0295 8 3.00007 6.65685 3.00007 5M21.0001 5C21.0001 3.34315 16.9706 2 12.0001 2C7.0295 2 3.00007 3.34315 3.00007 5M21.0001 5V8M3.00007 5L3.00007 19C2.9945 19.4809 3.33587 19.9552 3.9954 20.383C4.65493 20.8107 5.61329 21.1793 6.7897 21.4577C7.96611 21.7361 9.32608 21.9162 10.755 21.9827C12.1839 22.0493 13.6398 22.0003 15.0001 21.84M3.00007 12C3.00151 12.4675 3.33075 12.9285 3.96152 13.3461C4.59229 13.7636 5.50712 14.1263 6.63303 14.4051C7.75894 14.6839 9.06475 14.8711 10.4463 14.9519C11.8278 15.0326 13.2468 15.0045 14.5901 14.87" stroke="url(#paint0_linear_510_2111)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 12L18 17H22L19 22" stroke="#00BEB4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_510_2111" x1="12.5" y1="2" x2="12.5" y2="22.0116" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#666666"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 14L7.45 11.1C7.61696 10.7687 7.87281 10.4903 8.18893 10.296C8.50504 10.1018 8.86897 9.99927 9.24 10H20M20 10C20.3055 9.99946 20.6071 10.0689 20.8816 10.2031C21.1561 10.3372 21.3963 10.5325 21.5836 10.7739C21.7709 11.0152 21.9004 11.2963 21.9622 11.5956C22.024 11.8948 22.0164 12.2042 21.94 12.5L20.39 18.5C20.279 18.9299 20.0281 19.3106 19.6769 19.5822C19.3256 19.8538 18.894 20.0008 18.45 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V5C2 3.9 2.9 3 4 3H7.93C8.25941 3.0017 8.58331 3.08475 8.8729 3.24176C9.1625 3.39877 9.40882 3.62488 9.59 3.9L10.41 5.1C10.5912 5.37512 10.8375 5.60123 11.1271 5.75824C11.4167 5.91525 11.7406 5.9983 12.07 6H18C18.5304 6 19.0391 6.21071 19.4142 6.58579C19.7893 6.96086 20 7.46957 20 8V10Z" stroke="url(#paint0_linear_508_49090)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 16C12.5523 16 13 15.5523 13 15C13 14.4477 12.5523 14 12 14C11.4477 14 11 14.4477 11 15C11 15.5523 11.4477 16 12 16Z" stroke="#00BEB4" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_508_49090" x1="12.5574" y1="3" x2="12.5574" y2="20" gradientUnits="userSpaceOnUse">
<stop stop-color="#161618"/>
<stop offset="1" stop-color="#888888"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 14L7.45 11.1C7.61696 10.7687 7.87281 10.4903 8.18893 10.296C8.50504 10.1018 8.86897 9.99927 9.24 10H20M20 10C20.3055 9.99946 20.6071 10.0689 20.8816 10.2031C21.1561 10.3372 21.3963 10.5325 21.5836 10.7739C21.7709 11.0152 21.9004 11.2963 21.9622 11.5956C22.024 11.8948 22.0164 12.2042 21.94 12.5L20.39 18.5C20.279 18.9299 20.0281 19.3106 19.6769 19.5822C19.3256 19.8538 18.894 20.0008 18.45 20H4C3.46957 20 2.96086 19.7893 2.58579 19.4142C2.21071 19.0391 2 18.5304 2 18V5C2 3.9 2.9 3 4 3H7.93C8.25941 3.0017 8.58331 3.08475 8.8729 3.24176C9.1625 3.39877 9.40882 3.62488 9.59 3.9L10.41 5.1C10.5912 5.37512 10.8375 5.60123 11.1271 5.75824C11.4167 5.91525 11.7406 5.9983 12.07 6H18C18.5304 6 19.0391 6.21071 19.4142 6.58579C19.7893 6.96086 20 7.46957 20 8V10Z" stroke="url(#paint0_linear_508_49095)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 16C12.5523 16 13 15.5523 13 15C13 14.4477 12.5523 14 12 14C11.4477 14 11 14.4477 11 15C11 15.5523 11.4477 16 12 16Z" stroke="#00BEB4" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_508_49095" x1="12.5574" y1="3" x2="12.5574" y2="20" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#666666"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.9999 21.0002L16.6599 16.6602" stroke="#00BEB4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M11 19C15.4183 19 19 15.4183 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19Z" stroke="url(#paint0_linear_508_48855)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_508_48855" x1="11.4444" y1="3" x2="11.4444" y2="19" gradientUnits="userSpaceOnUse">
<stop stop-color="#161618"/>
<stop offset="1" stop-color="#888888"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 682 B

View File

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.9999 21.0002L16.6599 16.6602" stroke="#00BEB4" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M11 19C15.4183 19 19 15.4183 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19Z" stroke="url(#paint0_linear_503_48578)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="paint0_linear_503_48578" x1="12" y1="3" x2="12" y2="21" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="1" stop-color="#666666"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 670 B

View File

@ -12,7 +12,6 @@ import { toast } from 'sonner';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { Progress } from '@/components/ui/progress'; import { Progress } from '@/components/ui/progress';
import { ScrollArea } from '@/components/ui/scroll-area';
import { useControllableState } from '@/hooks/use-controllable-state'; import { useControllableState } from '@/hooks/use-controllable-state';
import { cn, formatBytes } from '@/lib/utils'; import { cn, formatBytes } from '@/lib/utils';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@ -53,11 +52,13 @@ function FilePreview({ file }: FilePreviewProps) {
function FileCard({ file, progress, onRemove }: FileCardProps) { function FileCard({ file, progress, onRemove }: FileCardProps) {
return ( return (
<div className="relative flex items-center gap-2.5"> <div className="relative flex items-center gap-2.5">
<div className="flex flex-1 gap-2.5"> <div className="flex flex-1 gap-2.5 overflow-hidden">
<div className="w-8">
{isFileWithPreview(file) ? <FilePreview file={file} /> : null} {isFileWithPreview(file) ? <FilePreview file={file} /> : null}
<div className="flex w-full flex-col gap-2"> </div>
<div className="flex flex-col flex-1 gap-2 overflow-hidden">
<div className="flex flex-col gap-px"> <div className="flex flex-col gap-px">
<p className="line-clamp-1 text-sm font-medium text-foreground/80"> <p className="line-clamp-1 text-sm font-medium text-foreground/80 text-ellipsis">
{file.name} {file.name}
</p> </p>
<p className="text-xs text-muted-foreground"> <p className="text-xs text-muted-foreground">
@ -319,8 +320,8 @@ export function FileUploader(props: FileUploaderProps) {
)} )}
</Dropzone> </Dropzone>
{files?.length ? ( {files?.length ? (
<ScrollArea className="h-fit w-full px-3"> <div className="h-fit w-full px-3">
<div className="flex max-h-48 flex-col gap-4"> <div className="flex max-h-48 flex-col gap-4 overflow-auto scrollbar-auto">
{files?.map((file, index) => ( {files?.map((file, index) => (
<FileCard <FileCard
key={index} key={index}
@ -330,7 +331,7 @@ export function FileUploader(props: FileUploaderProps) {
/> />
))} ))}
</div> </div>
</ScrollArea> </div>
) : null} ) : null}
</div> </div>
); );

View File

@ -6,7 +6,7 @@ import React, {
ReactNode, ReactNode,
useMemo, useMemo,
} from 'react'; } from 'react';
import { IconFont } from '../icon-font'; import { HomeIcon } from '../svg-icon';
import { Button, ButtonProps } from '../ui/button'; import { Button, ButtonProps } from '../ui/button';
import { SearchInput } from '../ui/input'; import { SearchInput } from '../ui/input';
import { CheckboxFormMultipleProps, FilterPopover } from './filter-popover'; import { CheckboxFormMultipleProps, FilterPopover } from './filter-popover';
@ -72,7 +72,8 @@ export default function ListFilterBar({
<div className={cn('flex justify-between mb-5 items-center', className)}> <div className={cn('flex justify-between mb-5 items-center', className)}>
<div className="text-2xl font-semibold flex items-center gap-2.5"> <div className="text-2xl font-semibold flex items-center gap-2.5">
{typeof icon === 'string' ? ( {typeof icon === 'string' ? (
<IconFont name={icon} className="size-6"></IconFont> // <IconFont name={icon} className="size-6"></IconFont>
<HomeIcon name={`${icon}`} width={'32'} />
) : ( ) : (
icon icon
)} )}

View File

@ -4,6 +4,7 @@ import Icon, { UserOutlined } from '@ant-design/icons';
import { IconComponentProps } from '@ant-design/icons/lib/components/Icon'; import { IconComponentProps } from '@ant-design/icons/lib/components/Icon';
import { Avatar } from 'antd'; import { Avatar } from 'antd';
import { AvatarSize } from 'antd/es/avatar/AvatarContext'; import { AvatarSize } from 'antd/es/avatar/AvatarContext';
import { useIsDarkTheme } from './theme-provider';
const importAll = (requireContext: __WebpackModuleApi.RequireContext) => { const importAll = (requireContext: __WebpackModuleApi.RequireContext) => {
const list = requireContext.keys().map((key) => { const list = requireContext.keys().map((key) => {
@ -74,4 +75,32 @@ export const LlmIcon = ({
); );
}; };
export const HomeIcon = ({
name,
height = '32',
width = '32',
size = 'large',
imgClass,
}: {
name: string;
height?: string;
width?: string;
size?: AvatarSize;
imgClass?: string;
}) => {
const isDark = useIsDarkTheme();
const icon = isDark ? name : `${name}-bri`;
return icon ? (
<SvgIcon
name={`home-icon/${icon}`}
width={width}
height={height}
imgClass={imgClass}
></SvgIcon>
) : (
<Avatar shape="square" size={size} icon={<UserOutlined />} />
);
};
export default SvgIcon; export default SvgIcon;

View File

@ -75,7 +75,7 @@ export default function Agents() {
title={t('flow.agents')} title={t('flow.agents')}
searchString={searchString} searchString={searchString}
onSearchChange={handleInputChange} onSearchChange={handleInputChange}
icon="agent" icon="agents"
filters={filters} filters={filters}
onChange={handleFilterSubmit} onChange={handleFilterSubmit}
value={filterValue} value={filterValue}

View File

@ -41,7 +41,7 @@ export function UploadAgentForm({ hideModal, onOk }: IModalProps<any>) {
<Form {...form}> <Form {...form}>
<form <form
onSubmit={form.handleSubmit(onSubmit)} onSubmit={form.handleSubmit(onSubmit)}
className="space-y-6" className="space-y-6 w-full text-ellipsis overflow-hidden"
id={TagRenameId} id={TagRenameId}
> >
<NameFormField></NameFormField> <NameFormField></NameFormField>
@ -53,6 +53,7 @@ export function UploadAgentForm({ hideModal, onOk }: IModalProps<any>) {
<FormLabel required>DSL</FormLabel> <FormLabel required>DSL</FormLabel>
<FormControl> <FormControl>
<FileUploader <FileUploader
className="w-[calc(100%-40px)] text-ellipsis overflow-hidden"
value={field.value} value={field.value}
onValueChange={field.onChange} onValueChange={field.onChange}
maxFileCount={1} maxFileCount={1}

View File

@ -43,7 +43,10 @@ export function SeeAllCard() {
const { navigateToDatasetList } = useNavigatePage(); const { navigateToDatasetList } = useNavigatePage();
return ( return (
<Card className="w-full flex-none h-full" onClick={navigateToDatasetList}> <Card
className="w-full flex-none h-full cursor-pointer"
onClick={navigateToDatasetList}
>
<CardContent className="p-2.5 pt-1 w-full h-full flex items-center justify-center gap-1.5 text-text-secondary"> <CardContent className="p-2.5 pt-1 w-full h-full flex items-center justify-center gap-1.5 text-text-secondary">
See All <ChevronRight className="size-4" /> See All <ChevronRight className="size-4" />
</CardContent> </CardContent>

View File

@ -63,7 +63,7 @@ export default function Datasets() {
filters={owners} filters={owners}
onChange={handleFilterSubmit} onChange={handleFilterSubmit}
className="px-8" className="px-8"
icon={'data'} icon={'datasets'}
> >
<Button onClick={showModal}> <Button onClick={showModal}>
<Plus className=" size-2.5" /> <Plus className=" size-2.5" />

View File

@ -48,7 +48,7 @@ export type SeeAllAppCardProps = {
export function SeeAllAppCard({ click }: SeeAllAppCardProps) { export function SeeAllAppCard({ click }: SeeAllAppCardProps) {
return ( return (
<Card className="w-full min-h-[76px]" onClick={click}> <Card className="w-full min-h-[76px] cursor-pointer" onClick={click}>
<CardContent className="p-2.5 pt-1 w-full h-full flex items-center justify-center gap-1.5 text-text-secondary"> <CardContent className="p-2.5 pt-1 w-full h-full flex items-center justify-center gap-1.5 text-text-secondary">
See All <ChevronRight className="size-4" /> See All <ChevronRight className="size-4" />
</CardContent> </CardContent>

View File

@ -1,5 +1,5 @@
import { CardSineLineContainer } from '@/components/card-singleline-container'; import { CardSineLineContainer } from '@/components/card-singleline-container';
import { IconFont } from '@/components/icon-font'; import { HomeIcon } from '@/components/svg-icon';
import { Segmented, SegmentedValue } from '@/components/ui/segmented'; import { Segmented, SegmentedValue } from '@/components/ui/segmented';
import { Routes } from '@/routes'; import { Routes } from '@/routes';
import { useCallback, useMemo, useState } from 'react'; import { useCallback, useMemo, useState } from 'react';
@ -11,9 +11,9 @@ import { ChatList } from './chat-list';
import { SearchList } from './search-list'; import { SearchList } from './search-list';
const IconMap = { const IconMap = {
[Routes.Chats]: 'chat', [Routes.Chats]: 'chats',
[Routes.Searches]: 'search', [Routes.Searches]: 'searches',
[Routes.Agents]: 'agent', [Routes.Agents]: 'agents',
}; };
export function Applications() { export function Applications() {
@ -42,10 +42,14 @@ export function Applications() {
<section className="mt-12"> <section className="mt-12">
<div className="flex justify-between items-center mb-5"> <div className="flex justify-between items-center mb-5">
<h2 className="text-2xl font-bold flex gap-2.5"> <h2 className="text-2xl font-bold flex gap-2.5">
<IconFont {/* <IconFont
name={IconMap[val as keyof typeof IconMap]} name={IconMap[val as keyof typeof IconMap]}
className="size-8" className="size-8"
></IconFont> ></IconFont> */}
<HomeIcon
name={`${IconMap[val as keyof typeof IconMap]}`}
width={'32'}
/>
{options.find((x) => x.value === val)?.label} {options.find((x) => x.value === val)?.label}
</h2> </h2>
<Segmented <Segmented

View File

@ -1,6 +1,6 @@
import { CardSineLineContainer } from '@/components/card-singleline-container'; import { CardSineLineContainer } from '@/components/card-singleline-container';
import { IconFont } from '@/components/icon-font';
import { RenameDialog } from '@/components/rename-dialog'; import { RenameDialog } from '@/components/rename-dialog';
import { HomeIcon } from '@/components/svg-icon';
import { CardSkeleton } from '@/components/ui/skeleton'; import { CardSkeleton } from '@/components/ui/skeleton';
import { useFetchNextKnowledgeListByPage } from '@/hooks/use-knowledge-request'; import { useFetchNextKnowledgeListByPage } from '@/hooks/use-knowledge-request';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@ -22,7 +22,8 @@ export function Datasets() {
return ( return (
<section> <section>
<h2 className="text-2xl font-bold mb-6 flex gap-2.5 items-center"> <h2 className="text-2xl font-bold mb-6 flex gap-2.5 items-center">
<IconFont name="data" className="size-8"></IconFont> {/* <IconFont name="data" className="size-8"></IconFont> */}
<HomeIcon name="datasets" width={'32'} />
{t('header.dataset')} {t('header.dataset')}
</h2> </h2>
<div className="flex gap-6"> <div className="flex gap-6">

View File

@ -40,7 +40,7 @@ export default function ChatList() {
<div className="px-8 pt-8"> <div className="px-8 pt-8">
<ListFilterBar <ListFilterBar
title={t('chat.chatApps')} title={t('chat.chatApps')}
icon="chat" icon="chats"
onSearchChange={handleInputChange} onSearchChange={handleInputChange}
searchString={searchString} searchString={searchString}
> >

View File

@ -48,7 +48,7 @@ export default function SearchList() {
<section className="w-full h-full flex flex-col"> <section className="w-full h-full flex flex-col">
<div className="px-8 pt-8"> <div className="px-8 pt-8">
<ListFilterBar <ListFilterBar
icon="search" icon="searches"
title={t('searchApps')} title={t('searchApps')}
showFilter={false} showFilter={false}
onSearchChange={(e) => handleSearchChange(e.target.value)} onSearchChange={(e) => handleSearchChange(e.target.value)}