refactor(nav): clean up file statistics display logic and fix bgColor property type (#121)

This commit is contained in:
huancun _-
2025-07-25 15:15:52 +08:00
committed by GitHub
parent 02bd860a9b
commit 95cb0b2696
4 changed files with 3 additions and 342 deletions

View File

@@ -1,89 +0,0 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_iii_18590_1991)">
<rect x="1.87933" y="2.3125" width="27.875" height="27.875" rx="3.6" fill="url(#paint0_linear_18590_1991)"/>
<rect x="1.87933" y="2.3125" width="27.875" height="27.875" rx="3.6" fill="url(#paint1_radial_18590_1991)"/>
</g>
<g filter="url(#filter1_f_18590_1991)">
<path d="M28.0668 4.8125V27.6875" stroke="url(#paint2_linear_18590_1991)" stroke-width="1.5" stroke-linecap="round"/>
</g>
<g filter="url(#filter2_f_18590_1991)">
<path d="M5.3432 4.125H27.1245" stroke="url(#paint3_linear_18590_1991)" stroke-width="1.5" stroke-linecap="round"/>
</g>
<g filter="url(#filter3_f_18590_1991)">
<path d="M13.4758 23.25C13.0926 23.25 12.7095 23.1066 12.4168 22.8192L6.67238 17.1778C6.08764 16.6035 6.08764 15.672 6.67238 15.0977C7.25712 14.5235 8.20568 14.5235 8.79042 15.0977L13.4758 19.6991L23.6772 9.68069C24.262 9.10644 25.2105 9.10644 25.7953 9.68069C26.38 10.2549 26.38 11.1865 25.7953 11.7607L14.5348 22.8192C14.2428 23.1066 13.859 23.25 13.4758 23.25Z" fill="#53BB7D"/>
</g>
<g filter="url(#filter4_ii_18590_1991)">
<path d="M13.4758 23.25C13.0926 23.25 12.7095 23.1066 12.4168 22.8192L6.67238 17.1778C6.08764 16.6035 6.08764 15.672 6.67238 15.0977C7.25712 14.5235 8.20568 14.5235 8.79042 15.0977L13.4058 19.6303C13.4447 19.6685 13.507 19.6685 13.5459 19.6303L23.6772 9.68069C24.262 9.10644 25.2105 9.10644 25.7953 9.68069C26.38 10.2549 26.38 11.1865 25.7953 11.7607L14.5348 22.8192C14.2428 23.1066 13.859 23.25 13.4758 23.25Z" fill="#FCF2FF"/>
</g>
<defs>
<filter id="filter0_iii_18590_1991" x="1.37933" y="1.3125" width="30.375" height="29.375" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="2" dy="-1"/>
<feGaussianBlur stdDeviation="1.5"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.176471 0 0 0 0 0.521569 0 0 0 0 0.309804 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_18590_1991"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="-1"/>
<feGaussianBlur stdDeviation="1.5"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.25098 0 0 0 0 0.490196 0 0 0 0 0.462745 0 0 0 1 0"/>
<feBlend mode="normal" in2="effect1_innerShadow_18590_1991" result="effect2_innerShadow_18590_1991"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="-0.5" dy="0.5"/>
<feGaussianBlur stdDeviation="0.5"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.356863 0 0 0 0 0.905882 0 0 0 0 0.560784 0 0 0 1 0"/>
<feBlend mode="normal" in2="effect2_innerShadow_18590_1991" result="effect3_innerShadow_18590_1991"/>
</filter>
<filter id="filter1_f_18590_1991" x="25.3168" y="2.0625" width="5.5" height="28.375" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="1" result="effect1_foregroundBlur_18590_1991"/>
</filter>
<filter id="filter2_f_18590_1991" x="2.5932" y="1.375" width="27.2812" height="5.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="1" result="effect1_foregroundBlur_18590_1991"/>
</filter>
<filter id="filter3_f_18590_1991" x="5.23383" y="8.25" width="22" height="16" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="0.5" result="effect1_foregroundBlur_18590_1991"/>
</filter>
<filter id="filter4_ii_18590_1991" x="5.83383" y="8.85" width="20.8" height="14.8" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="-0.4" dy="0.4"/>
<feGaussianBlur stdDeviation="0.375"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.913725 0 0 0 0 0.886275 0 0 0 0 0.968627 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_18590_1991"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="0.4" dy="-0.4"/>
<feGaussianBlur stdDeviation="0.2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 0.988235 0 0 0 0 1 0 0 0 1 0"/>
<feBlend mode="normal" in2="effect1_innerShadow_18590_1991" result="effect2_innerShadow_18590_1991"/>
</filter>
<linearGradient id="paint0_linear_18590_1991" x1="15.8168" y1="5.88701" x2="15.8168" y2="39.1397" gradientUnits="userSpaceOnUse">
<stop stop-color="#5AD98F"/>
<stop offset="1" stop-color="#51C685"/>
</linearGradient>
<radialGradient id="paint1_radial_18590_1991" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(27.5356 4.40625) rotate(136.771) scale(2.14444 2.50466)">
<stop stop-color="#80FFB3"/>
<stop offset="1" stop-color="#80FFB3" stop-opacity="0"/>
</radialGradient>
<linearGradient id="paint2_linear_18590_1991" x1="28.5668" y1="4.8125" x2="28.5668" y2="27.6875" gradientUnits="userSpaceOnUse">
<stop stop-color="#74FCA8"/>
<stop offset="1" stop-color="#61DB90"/>
</linearGradient>
<linearGradient id="paint3_linear_18590_1991" x1="28.2807" y1="4.37502" x2="2.74945" y2="4.37502" gradientUnits="userSpaceOnUse">
<stop stop-color="#66F39D"/>
<stop offset="1" stop-color="#60E496"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -1,60 +0,0 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_ii_18_22534)">
<path d="M3.82416 4.125C2.85767 4.125 2.07416 4.90851 2.07416 5.875V10.9375C2.07416 10.9941 2.07684 11.05 2.08209 11.1052V25.1875C2.08209 26.154 2.8656 26.9375 3.83209 26.9375H28.1758C29.1423 26.9375 29.9258 26.154 29.9258 25.1875V9.78125C29.9258 8.81476 29.1423 8.03125 28.1758 8.03125H17.3109C16.7965 8.03125 16.3019 7.83305 15.9298 7.47784L12.9976 4.67841C12.6255 4.3232 12.1309 4.125 11.6165 4.125H3.82416Z" fill="url(#paint0_linear_18_22534)"/>
<path d="M3.82416 4.125C2.85767 4.125 2.07416 4.90851 2.07416 5.875V10.9375C2.07416 10.9941 2.07684 11.05 2.08209 11.1052V25.1875C2.08209 26.154 2.8656 26.9375 3.83209 26.9375H28.1758C29.1423 26.9375 29.9258 26.154 29.9258 25.1875V9.78125C29.9258 8.81476 29.1423 8.03125 28.1758 8.03125H17.3109C16.7965 8.03125 16.3019 7.83305 15.9298 7.47784L12.9976 4.67841C12.6255 4.3232 12.1309 4.125 11.6165 4.125H3.82416Z" fill="url(#paint1_linear_18_22534)"/>
</g>
<g filter="url(#filter1_ii_18_22534)">
<rect x="2.07416" y="11.0625" width="27.8438" height="18.9062" rx="1.75" fill="url(#paint2_linear_18_22534)"/>
</g>
<rect x="2.07416" y="11.0625" width="27.8438" height="18.9062" rx="1.75" fill="url(#paint3_linear_18_22534)"/>
<defs>
<filter id="filter0_ii_18_22534" x="1.77416" y="4.125" width="28.2517" height="23.1125" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="-0.3" dy="0.3"/>
<feGaussianBlur stdDeviation="0.375"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 0.862745 0 0 0 0 0.337255 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_18_22534"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="0.1" dy="0.1"/>
<feGaussianBlur stdDeviation="0.3"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.937255 0 0 0 0 0.67451 0 0 0 0 0.294118 0 0 0 1 0"/>
<feBlend mode="normal" in2="effect1_innerShadow_18_22534" result="effect2_innerShadow_18_22534"/>
</filter>
<filter id="filter1_ii_18_22534" x="1.97416" y="10.9625" width="28.0438" height="19.3063" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="-0.1" dy="0.3"/>
<feGaussianBlur stdDeviation="0.375"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 0.94902 0 0 0 0 0.32549 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_18_22534"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="0.1" dy="-0.1"/>
<feGaussianBlur stdDeviation="0.15"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.941176 0 0 0 0 0.690196 0 0 0 0 0.364706 0 0 0 1 0"/>
<feBlend mode="normal" in2="effect1_innerShadow_18_22534" result="effect2_innerShadow_18_22534"/>
</filter>
<linearGradient id="paint0_linear_18_22534" x1="16" y1="4.75" x2="16" y2="11.75" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFD152"/>
<stop offset="1" stop-color="#FFB83D"/>
</linearGradient>
<linearGradient id="paint1_linear_18_22534" x1="16.7475" y1="11.3155" x2="16.7475" y2="10.3434" gradientUnits="userSpaceOnUse">
<stop stop-color="#FEB63B"/>
<stop offset="1" stop-color="#FEB63B" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint2_linear_18_22534" x1="15.996" y1="11.0625" x2="15.996" y2="29.9688" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFE155"/>
<stop offset="1" stop-color="#FFB45F"/>
</linearGradient>
<linearGradient id="paint3_linear_18_22534" x1="19.882" y1="30.1827" x2="19.882" y2="28.2458" gradientUnits="userSpaceOnUse">
<stop stop-color="#F9928A"/>
<stop offset="1" stop-color="#FFAD5F" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -1,95 +0,0 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_iiii_18_21074)">
<path d="M20.4148 2.33586C20.2272 2.14833 19.9729 2.04297 19.7077 2.04297H6.43906C5.66586 2.04297 5.03906 2.66977 5.03906 3.44296V28.557C5.03906 29.3302 5.66586 29.957 6.43906 29.957H25.5609C26.3341 29.957 26.9609 29.3302 26.9609 28.557V9.29623C26.9609 9.03102 26.8556 8.77666 26.668 8.58913L20.4148 2.33586Z" fill="url(#paint0_linear_18_21074)"/>
</g>
<g filter="url(#filter1_f_18_21074)">
<path d="M19.751 2.45703C19.751 2.25563 19.8088 2.127 19.6992 2.10547C19.8034 2.11211 19.9549 2.14986 20.0508 2.1875C20.174 2.23589 20.0219 2.34273 20.1183 2.43694C20.1212 2.43968 20.124 2.44244 20.1267 2.44524L26.38 8.6985C26.399 8.71757 26.4173 8.73732 26.4346 8.75771C26.52 8.85806 26.5842 8.97371 26.6243 9.09766C26.6562 9.19624 26.6729 9.30006 26.6729 9.40561V9.46875C26.6729 9.23655 26.5049 9.09766 26.38 9.09766H20.951C20.2883 9.09766 19.751 8.56039 19.751 7.89766V2.45703Z" fill="#D2C5DF"/>
</g>
<g filter="url(#filter2_ii_18_21074)">
<path d="M20.0391 2.3477C20.0391 2.1463 19.881 2.06657 19.7714 2.04504C19.8756 2.05168 19.9773 2.07454 20.0732 2.11218C20.1964 2.16057 20.3099 2.2334 20.4064 2.32761C20.4092 2.33035 20.412 2.33311 20.4148 2.33591L26.668 8.58917C26.6871 8.60824 26.7053 8.62799 26.7227 8.64838C26.808 8.74873 26.8722 8.86438 26.9124 8.98833C26.9443 9.08691 26.9609 9.19073 26.9609 9.29628V9.35942C26.9609 9.12722 26.793 8.98833 26.668 8.98833H21.2391C20.5763 8.98833 20.0391 8.45107 20.0391 7.78833V2.3477Z" fill="url(#paint1_linear_18_21074)"/>
</g>
<path d="M20.0391 2.3477C20.0391 2.1463 19.881 2.06657 19.7714 2.04504C19.8756 2.05168 19.9773 2.07454 20.0732 2.11218C20.1964 2.16057 20.3099 2.2334 20.4064 2.32761C20.4092 2.33035 20.412 2.33311 20.4148 2.33591L26.668 8.58917C26.6871 8.60824 26.7053 8.62799 26.7227 8.64838C26.808 8.74873 26.8722 8.86438 26.9124 8.98833C26.9443 9.08691 26.9609 9.19073 26.9609 9.29628V9.35942C26.9609 9.12722 26.793 8.98833 26.668 8.98833H21.2391C20.5763 8.98833 20.0391 8.45107 20.0391 7.78833V2.3477Z" fill="url(#paint2_linear_18_21074)"/>
<rect x="9.03906" y="11.9961" width="13.9141" height="0.992188" rx="0.496094" fill="url(#paint3_linear_18_21074)"/>
<rect x="9.03906" y="14.9961" width="13.9141" height="0.992188" rx="0.496094" fill="url(#paint4_linear_18_21074)"/>
<rect x="9.03906" y="17.9961" width="13.9141" height="0.992188" rx="0.496094" fill="url(#paint5_linear_18_21074)"/>
<rect x="9.03906" y="20.9961" width="8.98438" height="0.992188" rx="0.496094" fill="url(#paint6_linear_18_21074)"/>
<defs>
<filter id="filter0_iiii_18_21074" x="4.93906" y="1.74297" width="22.3219" height="28.3141" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="0.3" dy="-0.3"/>
<feGaussianBlur stdDeviation="0.3"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.807843 0 0 0 0 0.768627 0 0 0 0 0.85098 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_18_21074"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="0.1" dy="-0.1"/>
<feGaussianBlur stdDeviation="0.1"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.709804 0 0 0 0 0.690196 0 0 0 0 0.733333 0 0 0 1 0"/>
<feBlend mode="normal" in2="effect1_innerShadow_18_21074" result="effect2_innerShadow_18_21074"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="-0.1"/>
<feGaussianBlur stdDeviation="0.1"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.72549 0 0 0 0 0.65098 0 0 0 0 0.8 0 0 0 1 0"/>
<feBlend mode="normal" in2="effect2_innerShadow_18_21074" result="effect3_innerShadow_18_21074"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="-0.15" dy="0.15"/>
<feGaussianBlur stdDeviation="0.05"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.952941 0 0 0 0 0.941176 0 0 0 0 0.964706 0 0 0 1 0"/>
<feBlend mode="normal" in2="effect3_innerShadow_18_21074" result="effect4_innerShadow_18_21074"/>
</filter>
<filter id="filter1_f_18_21074" x="19.1992" y="1.60547" width="7.97363" height="8.36328" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="0.25" result="effect1_foregroundBlur_18_21074"/>
</filter>
<filter id="filter2_ii_18_21074" x="19.7714" y="1.94504" width="7.28951" height="7.41433" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="0.1"/>
<feGaussianBlur stdDeviation="0.075"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.631373 0 0 0 0 0.611765 0 0 0 0 0.654902 0 0 0 1 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_18_21074"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="-0.1"/>
<feGaussianBlur stdDeviation="0.075"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.752941 0 0 0 0 0.67451 0 0 0 0 0.835294 0 0 0 1 0"/>
<feBlend mode="normal" in2="effect1_innerShadow_18_21074" result="effect2_innerShadow_18_21074"/>
</filter>
<linearGradient id="paint0_linear_18_21074" x1="16" y1="2.04297" x2="16" y2="29.957" gradientUnits="userSpaceOnUse">
<stop stop-color="#EBE4F3"/>
<stop offset="1" stop-color="#E4DAF0"/>
</linearGradient>
<linearGradient id="paint1_linear_18_21074" x1="20.5391" y1="8.70708" x2="23.1797" y2="6.06645" gradientUnits="userSpaceOnUse">
<stop stop-color="#D9D3E1"/>
<stop offset="1" stop-color="#CCC7D1"/>
</linearGradient>
<linearGradient id="paint2_linear_18_21074" x1="23.7734" y1="5.55083" x2="23.1328" y2="6.17583" gradientUnits="userSpaceOnUse">
<stop offset="0.119171" stop-color="#DBDADC"/>
<stop offset="0.577307" stop-color="#CBC7D0" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint3_linear_18_21074" x1="9.03906" y1="12.4922" x2="22.9531" y2="12.4922" gradientUnits="userSpaceOnUse">
<stop stop-color="#9C96A2"/>
<stop offset="1" stop-color="#9A95A1"/>
</linearGradient>
<linearGradient id="paint4_linear_18_21074" x1="9.03906" y1="15.4922" x2="22.9531" y2="15.4922" gradientUnits="userSpaceOnUse">
<stop stop-color="#9C96A2"/>
<stop offset="1" stop-color="#9A95A1"/>
</linearGradient>
<linearGradient id="paint5_linear_18_21074" x1="9.03906" y1="18.4922" x2="22.9531" y2="18.4922" gradientUnits="userSpaceOnUse">
<stop stop-color="#9C96A2"/>
<stop offset="1" stop-color="#9A95A1"/>
</linearGradient>
<linearGradient id="paint6_linear_18_21074" x1="9.03906" y1="21.4922" x2="18.0234" y2="21.4922" gradientUnits="userSpaceOnUse">
<stop stop-color="#9C96A2"/>
<stop offset="1" stop-color="#9A95A1"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -5,16 +5,12 @@ import {
BreadcrumbProps,
BreadcrumbSeparator,
HStack,
Text,
} from "@hope-ui/solid"
import { Link } from "@solidjs/router"
import { createMemo, For, Show } from "solid-js"
import { usePath, useRouter, useT } from "~/hooks"
import { getSetting, local, objStore, State } from "~/store"
import { getSetting, local } from "~/store"
import { encodePath, hoverColor, joinBase } from "~/utils"
import CheckMarkIcon from "/images/check_mark_button_color.svg"
import FolderIcon from "/images/file_folder_color.svg"
import FileIcon from "/images/page_facing_up_color.svg"
export const Nav = () => {
const { pathname } = useRouter()
@@ -22,87 +18,11 @@ export const Nav = () => {
const t = useT()
const { setPathAs } = usePath()
const folderInfo = createMemo(() => {
const { dir, file } = objStore.objs.reduce(
(acc, item) => {
if (item.is_dir) {
acc.dir++
} else {
acc.file++
}
return acc
},
{ dir: 0, file: 0 },
)
const parts: JSX.Element[] = []
if (dir) {
parts.push(
<span style="display: inline-flex; align-items: center;">
<img
src={FolderIcon}
alt="folder"
style="width: 1em; height: 1em; margin-right: 0.25em; vertical-align: middle;"
/>
{dir}
</span>,
)
}
if (file) {
parts.push(
<span style="display: inline-flex; align-items: center;">
<img
src={FileIcon}
alt="file"
style="width: 1em; height: 1em; margin-right: 0.25em; vertical-align: middle;"
/>
{file}
</span>,
)
}
if (parts.length === 0) return null
return (
<>
{parts.map((part, index) => (
<>
{part}
{index < parts.length - 1 && <span style="margin: 0 0.3em;"></span>}
</>
))}
</>
)
})
const selectInfo = createMemo(() => {
const { selected } = objStore.objs.reduce(
(acc, item) => {
if (item.selected) acc.selected++
return acc
},
{ selected: 0 },
)
if (!selected) {
return null
}
// return `✅ ${selected} `
return (
<span style="display: inline-flex; align-items: center;">
<img
src={CheckMarkIcon}
alt="check"
style="width: 1em; height: 1em; margin-right: 0.25em; vertical-align: middle;"
/>
{selected}
</span>
)
})
const stickyProps = createMemo<BreadcrumbProps>(() => {
const mask: BreadcrumbProps = {
_after: {
content: "",
bgColor: "$background",
backgroundColor: "$background",
position: "absolute",
height: "100%",
width: "99vw",
@@ -150,7 +70,7 @@ export const Nav = () => {
wordBreak: "break-all",
}}
color="unset"
_hover={{ bgColor: hoverColor(), color: "unset" }}
_hover={{ backgroundColor: hoverColor(), color: "unset" }}
_active={{ transform: "scale(.95)", transition: "0.1s" }}
cursor="pointer"
p="$1"
@@ -170,21 +90,6 @@ export const Nav = () => {
}}
</For>
</Breadcrumb>
<Show when={objStore.state == State.Folder}>
<Text
css={{
whiteSpace: "nowrap",
userSelect: "none",
display: "flex",
alignItems: "center",
}}
p="$1"
>
{selectInfo()}
{selectInfo() && <span style="margin-right: 0.5em;"></span>}
{folderInfo()}
</Text>
</Show>
</HStack>
)
}