fix search filter
This commit is contained in:
parent
270066b91f
commit
66f4e4906b
|
|
@ -0,0 +1,7 @@
|
|||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.4999 11.8225C10.4222 11.9003 10.3444 11.978 10.2666 12.0558C8.47771 13.8447 6.68882 15.6336 4.89994 17.4225C4.04438 18.278 3.03327 18.278 2.17771 17.4225C1.8666 17.1114 1.47771 16.7225 1.1666 16.4114C0.466602 15.6336 0.466602 14.6225 1.1666 13.9225C3.88882 11.2003 6.53327 8.47805 9.25549 5.8336C9.95549 5.1336 11.0444 5.1336 11.8222 5.8336C12.911 6.84472 13.9222 7.9336 15.011 9.02249C15.0888 9.10027 15.0888 9.17805 15.1666 9.25583C16.3333 8.08916 17.4222 7.00027 18.5888 5.8336C18.1999 5.52249 17.811 5.1336 17.4999 4.74471C17.0333 4.27805 16.8777 3.65583 17.111 3.0336C17.3444 2.41138 17.7333 1.94471 18.4333 1.78916C18.9777 1.6336 19.5999 1.55583 20.2222 1.47805C21.9333 1.16694 23.6444 0.933604 25.2777 0.622492C26.5999 0.389159 27.611 1.40027 27.3777 2.72249C26.9888 4.97805 26.5999 7.2336 26.211 9.48916C26.0555 10.1892 25.7444 10.7336 24.9666 10.9669C24.2666 11.2003 23.6444 10.9669 23.1777 10.5003C22.8666 10.1892 22.4777 9.80027 22.0888 9.41138C22.011 9.48916 22.011 9.64472 21.9333 9.72249C20.1444 11.5114 18.3555 13.3003 16.5666 15.0892C15.7888 15.9447 14.6222 15.9447 13.7666 15.0892C12.7555 13.9225 11.6666 12.9114 10.4999 11.8225ZM19.9888 5.8336C19.8333 5.98916 19.7555 6.22249 19.6777 6.30027C18.3555 7.62249 17.0333 8.94472 15.711 10.2669C15.3222 10.6558 15.011 10.6558 14.6222 10.2669C13.4555 9.10027 12.211 7.85583 11.0444 6.68916C10.6555 6.30027 10.3444 6.30027 9.95549 6.68916C8.8666 7.77805 7.85549 8.78916 6.7666 9.87805C5.21105 11.4336 3.65549 12.9892 2.09993 14.5447C1.63327 15.0114 1.63327 15.2447 2.09993 15.7114C2.33327 15.9447 2.64438 16.2558 2.87771 16.4892C3.34438 16.9558 3.57771 16.9558 4.04438 16.4892C5.98882 14.5447 7.93327 12.6003 9.87771 10.6558C10.2666 10.2669 10.5777 10.2669 10.9666 10.6558C12.1333 11.8225 13.2999 12.9892 14.5444 14.2336C15.011 14.7003 15.2444 14.7003 15.6333 14.2336C17.5777 12.2892 19.5222 10.3447 21.5444 8.32249C21.9333 7.9336 22.2444 7.9336 22.6333 8.32249C23.0999 8.78916 23.4888 9.17805 23.9555 9.64472C24.111 9.87805 24.3444 9.95583 24.6555 9.80027C24.8888 9.72249 25.0444 9.48916 25.0444 9.25583C25.4333 7.00027 25.8222 4.66694 26.211 2.41138C26.2888 1.94471 25.9777 1.6336 25.511 1.71138C23.2555 2.10027 20.9222 2.48916 18.6666 2.87805C18.4333 2.95583 18.1999 3.0336 18.1222 3.26694C18.0444 3.50027 18.1222 3.7336 18.3555 3.96694C18.8222 4.4336 19.2888 4.90027 19.7555 5.36694C19.8333 5.44472 19.911 5.60027 19.9888 5.8336Z" fill="#007EA7"/>
|
||||
<path d="M27.3778 19.7554C27.3778 21.6998 27.3778 23.5665 27.3778 25.5109C27.3778 26.4443 26.8333 27.0665 26.0555 27.2998C25.9 27.2998 25.7444 27.3776 25.5889 27.3776C24.8889 27.3776 24.1889 27.3776 23.4111 27.3776C22.3222 27.3776 21.5444 26.6776 21.5444 25.5109C21.5444 21.6998 21.5444 17.8887 21.5444 14.0776C21.5444 12.9887 22.2444 12.2109 23.4111 12.2109C24.1111 12.2109 24.8111 12.2109 25.5889 12.2109C26.6778 12.2109 27.3778 12.9109 27.3778 13.9998C27.4555 15.9443 27.3778 17.8887 27.3778 19.7554ZM26.2889 19.8332C26.2889 17.8887 26.2889 16.022 26.2889 14.0776C26.2889 13.6109 26.0555 13.3776 25.5889 13.3776C24.8889 13.3776 24.1889 13.3776 23.4111 13.3776C22.9444 13.3776 22.7889 13.6109 22.7889 13.9998C22.7889 17.8109 22.7889 21.622 22.7889 25.5109C22.7889 25.9776 23.0222 26.2109 23.4889 26.2109C24.1889 26.2109 24.8889 26.2109 25.5889 26.2109C26.1333 26.2109 26.3667 25.9776 26.3667 25.5109C26.2889 23.5665 26.2889 21.6998 26.2889 19.8332Z" fill="#007EA7"/>
|
||||
<path d="M13.4555 21.5446C13.4555 22.8668 13.4555 24.1891 13.4555 25.5113C13.4555 26.678 12.7555 27.378 11.5888 27.378C10.8888 27.378 10.1888 27.378 9.48884 27.378C8.39995 27.378 7.69995 26.678 7.69995 25.5891C7.69995 22.9446 7.69995 20.2224 7.69995 17.578C7.69995 16.4891 8.39995 15.7891 9.56662 15.7891C10.2666 15.7891 10.9666 15.7891 11.7444 15.7891C12.8333 15.7891 13.5333 16.4891 13.5333 17.578C13.4555 18.8224 13.4555 20.2224 13.4555 21.5446ZM8.78884 21.5446C8.78884 22.8668 8.78884 24.1891 8.78884 25.5113C8.78884 26.0557 9.02217 26.2113 9.48884 26.2113C10.1888 26.2113 10.8888 26.2113 11.5111 26.2113C11.9777 26.2113 12.2111 25.978 12.2111 25.5113C12.2111 22.8668 12.2111 20.2224 12.2111 17.6557C12.2111 17.1113 11.9777 16.9557 11.5111 16.9557C10.8111 16.9557 10.1888 16.9557 9.48884 16.9557C8.9444 16.9557 8.71106 17.1891 8.71106 17.7335C8.78884 18.9002 8.78884 20.2224 8.78884 21.5446Z" fill="#007EA7"/>
|
||||
<path d="M20.4555 22.089C20.4555 23.2557 20.4555 24.3446 20.4555 25.5113C20.4555 26.6779 19.7555 27.3779 18.5888 27.3779C17.8888 27.3779 17.1888 27.3779 16.4888 27.3779C15.4 27.3779 14.7 26.6779 14.7 25.589C14.7 23.3335 14.7 21.0779 14.7 18.7446C14.7 17.6557 15.4 16.8779 16.5666 16.8779C17.2666 16.8779 17.9666 16.8779 18.6666 16.8779C19.7555 16.8779 20.5333 17.5779 20.5333 18.7446C20.4555 19.8335 20.4555 21.0002 20.4555 22.089ZM19.2888 22.1668C19.2888 21.0002 19.2888 19.9113 19.2888 18.7446C19.2888 18.2779 19.0555 18.0446 18.5888 18.0446C17.8888 18.0446 17.1888 18.0446 16.4888 18.0446C16.0222 18.0446 15.7888 18.2779 15.7888 18.7446C15.7888 21.0002 15.7888 23.2557 15.7888 25.5113C15.7888 25.9779 16.0222 26.2113 16.4888 26.2113C17.1888 26.2113 17.8888 26.2113 18.5888 26.2113C19.1333 26.2113 19.2888 25.9779 19.2888 25.5113C19.2888 24.3446 19.2888 23.2557 19.2888 22.1668Z" fill="#007EA7"/>
|
||||
<path d="M0.622314 23.2554C0.622314 22.4776 0.622314 21.7776 0.622314 20.9998C0.622314 19.9109 1.40009 19.2109 2.48898 19.2109C3.18898 19.2109 3.96676 19.2109 4.66676 19.2109C5.67787 19.2109 6.45565 19.9109 6.45565 20.9998C6.45565 22.5554 6.45565 24.1109 6.45565 25.6665C6.45565 26.6776 5.67787 27.3776 4.66676 27.4554C3.88898 27.4554 3.1112 27.4554 2.4112 27.4554C1.40009 27.4554 0.700092 26.6776 0.622314 25.6665C0.622314 24.8109 0.622314 24.0332 0.622314 23.2554ZM5.28898 23.3332C5.28898 22.5554 5.28898 21.8554 5.28898 21.0776C5.28898 20.6109 5.05565 20.3776 4.58898 20.3776C3.88898 20.3776 3.18898 20.3776 2.48898 20.3776C2.02231 20.3776 1.78898 20.6109 1.78898 21.0776C1.78898 22.5554 1.78898 24.0332 1.78898 25.5109C1.78898 25.9776 2.02231 26.2109 2.48898 26.2109C3.18898 26.2109 3.88898 26.2109 4.58898 26.2109C5.05565 26.2109 5.28898 25.9776 5.28898 25.5109C5.28898 24.8109 5.28898 24.0332 5.28898 23.3332Z" fill="#007EA7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
|
|
@ -0,0 +1,17 @@
|
|||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_12104_5819)">
|
||||
<path d="M0 23.7417C0 15.8302 0 7.91146 0 0C9.33333 0 18.6667 0 28 0C28 9.33333 28 18.6667 28 28C18.6667 28 9.33333 28 0 28C0 26.8187 0 25.6375 0 24.449C0.0802083 24.6677 0.13125 24.901 0.240625 25.1052C0.714583 26.024 1.47292 26.4323 2.50104 26.4323C10.15 26.425 17.799 26.4323 25.4479 26.4323C25.5573 26.4323 25.6667 26.4323 25.776 26.425C26.4177 26.3812 26.95 26.1187 27.3656 25.6302C28.0729 24.8062 28.1313 23.8 27.5406 22.7719C24.7771 17.9812 22.0062 13.1906 19.2427 8.39271C18.1781 6.54062 17.1062 4.69583 16.0417 2.84375C15.6333 2.13646 15.0354 1.69896 14.2115 1.63333C13.1469 1.54583 12.3885 2.01979 11.8562 2.93854C8.1375 9.37708 4.41875 15.8156 0.714583 22.2542C0.4375 22.7281 0.233333 23.2458 0 23.7417Z" fill="white"/>
|
||||
<path d="M1 23.5056C1.2171 23.0459 1.40707 22.566 1.66488 22.1266C5.11817 16.1576 8.57824 10.1886 12.0315 4.21956C12.52 3.36781 13.2256 2.92841 14.2229 3.00953C14.9895 3.07037 15.5459 3.47597 15.9258 4.13168C16.9163 5.8487 17.9136 7.55896 18.9042 9.27597C21.4755 13.7172 24.0536 18.1585 26.6249 22.6065C27.1744 23.5597 27.1202 24.4925 26.4621 25.2564C26.0753 25.7026 25.5801 25.9527 24.9831 25.9932C24.8813 26 24.7795 26 24.6778 26C17.5609 26 10.444 26 3.32707 26C2.37046 26 1.66488 25.6214 1.22389 24.7697C1.12212 24.5804 1.07463 24.3641 1 24.1613C1 23.945 1 23.7287 1 23.5056ZM13.999 25.2429C17.5202 25.2429 21.0413 25.2429 24.5624 25.2429C24.6778 25.2429 24.7999 25.2429 24.9152 25.2361C25.519 25.1888 25.9193 24.8779 26.1432 24.3235C26.3399 23.8436 26.211 23.4042 25.96 22.9783C23.1648 18.1585 20.3696 13.3319 17.5744 8.5121C16.8078 7.18716 16.0344 5.85546 15.2677 4.53051C14.976 4.03028 14.5553 3.75312 13.9651 3.75988C13.3681 3.7734 12.9813 4.09112 12.6964 4.58459C9.76552 9.64777 6.82785 14.7109 3.89696 19.7741C3.25922 20.876 2.6147 21.9779 1.98375 23.0797C1.62417 23.7084 1.71915 24.3911 2.21442 24.8576C2.54007 25.1618 2.92679 25.2429 3.36099 25.2429C6.90248 25.2429 10.4507 25.2429 13.999 25.2429Z" fill="#007EA7" stroke="#007EA7" stroke-width="0.3"/>
|
||||
<path d="M13.9709 6.16173C10.7261 11.7836 7.50322 17.3617 4.25843 22.9836C4.40426 22.9836 4.49905 22.9836 4.59384 22.9836C6.62093 22.9836 8.64801 22.9836 10.6751 22.9836C10.7991 22.9836 10.9303 22.9909 11.0543 23.0273C11.2511 23.093 11.3313 23.2534 11.3095 23.4576C11.2876 23.6544 11.1636 23.7638 10.9741 23.8003C10.8938 23.8148 10.8136 23.8076 10.7261 23.8076C8.40009 23.8076 6.06676 23.793 3.74072 23.8149C3.17926 23.8221 3.02614 23.4649 3.28864 23.0055C6.70843 17.1211 10.1136 11.2149 13.5188 5.31589C13.548 5.27214 13.5699 5.2211 13.5991 5.17735C13.8032 4.86381 14.1532 4.85652 14.3428 5.17735C14.6126 5.62943 14.8751 6.08881 15.1303 6.54819C15.2616 6.78881 15.2032 7.02214 14.9991 7.13881C14.7949 7.25548 14.5688 7.18256 14.423 6.94923C14.2772 6.70131 14.1386 6.46068 13.9709 6.16173Z" fill="#007EA7"/>
|
||||
<path d="M23.676 22.9908C23.6031 22.8522 23.552 22.7574 23.4937 22.6627C20.8249 18.0324 18.1489 13.4095 15.4802 8.77932C15.2614 8.39286 15.2687 8.16682 15.5166 8.02098C15.7645 7.87515 15.9614 7.98453 16.1874 8.37098C19.002 13.2491 21.8239 18.1272 24.6385 23.0054C24.6895 23.0929 24.7406 23.1804 24.777 23.2752C24.8572 23.5377 24.7041 23.771 24.427 23.8001C24.3614 23.8074 24.3031 23.8074 24.2374 23.8074C21.8895 23.8074 19.5416 23.8074 17.1937 23.8074C17.1281 23.8074 17.0624 23.8074 17.0041 23.8001C16.7854 23.7783 16.6541 23.6543 16.6322 23.4356C16.6104 23.2168 16.7197 23.0637 16.9312 23.0127C17.0333 22.9835 17.1499 22.9908 17.2593 22.9908C19.2864 22.9908 21.3135 22.9908 23.3479 22.9908C23.4427 22.9908 23.5302 22.9908 23.676 22.9908Z" fill="#007EA7"/>
|
||||
<path d="M15.4802 15.2903C15.4145 16.508 15.3489 17.7257 15.2906 18.9361C15.2614 19.5559 14.9406 19.8695 14.3281 19.8695C14.0729 19.8695 13.8177 19.8695 13.5624 19.8695C13.052 19.8622 12.6947 19.5413 12.6656 19.0382C12.5708 17.3393 12.4833 15.6403 12.3958 13.9486C12.3593 13.2049 12.3156 12.4611 12.2864 11.7174C12.2645 11.0976 12.5999 10.7549 13.2343 10.7549C13.7447 10.7549 14.2552 10.7549 14.7583 10.7549C15.3416 10.7549 15.6916 11.1049 15.6697 11.7028C15.6114 12.8913 15.5385 14.0872 15.4802 15.2903ZM13.0958 11.5788C13.227 14.0726 13.3583 16.5518 13.4895 19.0309C13.8249 19.0309 14.1385 19.0309 14.4666 19.0309C14.5979 16.5372 14.7291 14.0653 14.8604 11.5788C14.2624 11.5788 13.701 11.5788 13.0958 11.5788Z" fill="#007EA7" stroke="#007EA7" stroke-width="0.2"/>
|
||||
<path d="M13.9709 24.2445C13.023 24.2445 12.2573 23.4861 12.25 22.5382C12.2428 21.583 13.0375 20.7955 13.9855 20.8028C14.9261 20.8101 15.699 21.5903 15.6917 22.5309C15.6917 23.4861 14.9261 24.2445 13.9709 24.2445ZM13.9709 23.4278C14.474 23.4278 14.875 23.034 14.875 22.5382C14.875 22.0424 14.474 21.634 13.9782 21.6267C13.4896 21.6267 13.074 22.0351 13.074 22.5309C13.0667 23.0195 13.4678 23.4205 13.9709 23.4278Z" fill="#007EA7" stroke="#007EA7" stroke-width="0.2"/>
|
||||
<path d="M13.0959 11.5791C13.7012 11.5791 14.2626 11.5791 14.8532 11.5791C14.722 14.0656 14.5907 16.5447 14.4595 19.0312C14.1314 19.0312 13.8178 19.0312 13.4824 19.0312C13.3512 16.552 13.2272 14.0729 13.0959 11.5791Z" fill="white"/>
|
||||
<path d="M13.9709 23.4284C13.4678 23.4284 13.0668 23.0274 13.0741 22.5243C13.0741 22.0285 13.4897 21.6201 13.9782 21.6201C14.4741 21.6201 14.8751 22.0357 14.8751 22.5316C14.8751 23.0347 14.4741 23.4284 13.9709 23.4284Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_12104_5819">
|
||||
<rect width="28" height="28" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.4 KiB |
|
|
@ -0,0 +1,6 @@
|
|||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0 20.5772C0.473958 19.7897 0.991667 19.0387 1.6625 18.397C2.50833 17.5877 3.45625 16.9533 4.60104 16.6397C5.8625 16.297 7.07292 16.4356 8.21771 17.0627C9.37708 17.7043 10.2885 18.6085 10.8937 19.7824C11.7906 21.5179 11.5865 23.2095 10.6167 24.8429C9.85833 26.1116 8.79375 27.0741 7.51042 27.796C7.0875 28.0366 6.79583 27.8616 6.78854 27.3804C6.78125 26.8845 6.78854 26.3814 6.78854 25.8418C6.68646 25.8783 6.60625 25.9075 6.54062 25.9366C5.075 26.5783 3.5875 27.1689 2.0125 27.4679C1.61875 27.5408 1.21771 27.5772 0.823958 27.5991C0.444792 27.621 0.298958 27.4533 0.313542 27.0741C0.35 25.9439 0.648958 24.8647 1.02083 23.8147C1.30521 23.0127 1.64062 22.2252 1.96146 21.4304C1.99792 21.3356 2.03437 21.2481 2.09271 21.1168C1.56771 21.1168 1.07917 21.1095 0.583333 21.1241C0.328125 21.1314 0.138542 21.0658 0.0145833 20.8397C0 20.7595 0 20.6647 0 20.5772ZM10.3469 20.5408C10.3177 20.5991 10.2958 20.6283 10.2812 20.6647C9.52292 22.6262 7.34271 23.6616 5.34479 22.9981C5.13333 22.9252 5.00938 22.8085 4.94375 22.597C4.54271 21.2772 4.75417 20.0595 5.56354 18.9585C6.03021 18.3168 6.65729 17.8793 7.41562 17.6095C6.77396 17.2741 5.78958 17.1793 4.97292 17.3908C3.31771 17.8137 2.12917 18.871 1.18125 20.2345C1.17396 20.2418 1.18125 20.271 1.18854 20.3074C1.63333 20.3074 2.07812 20.3074 2.51562 20.3074C3.09896 20.3074 3.25208 20.5554 3.01146 21.0804C2.3625 22.4731 1.77187 23.8877 1.39271 25.3825C1.27604 25.8345 1.20312 26.2939 1.11563 26.7533C1.14479 26.7824 1.16667 26.8116 1.19583 26.8408C1.98333 26.6366 2.79271 26.4908 3.55104 26.221C4.68125 25.82 5.775 25.3387 6.88333 24.8793C7.35729 24.6825 7.59792 24.821 7.59792 25.3387C7.59792 25.7397 7.59792 26.1408 7.59792 26.5418C7.59792 26.6075 7.6125 26.6731 7.62708 26.7824C9.01979 25.7835 10.099 24.6022 10.5219 22.9397C10.7333 22.1304 10.675 21.3429 10.3469 20.5408ZM6.64271 22.3856C7.79479 22.3345 8.74271 21.8095 9.3625 20.7304C9.73437 20.0741 9.64687 19.3595 9.14375 18.8491C8.63333 18.3241 7.90417 18.2147 7.24062 18.5866C6.14687 19.1991 5.55625 20.1543 5.57812 21.3939C5.60729 22.3783 5.54896 22.3054 6.64271 22.3856Z" fill="#007EA7" stroke="#007EA7" stroke-width="0.3"/>
|
||||
<path d="M18.2656 1.91747C20.9052 4.55705 23.5229 7.17476 26.1771 9.82893C26.3739 9.14351 26.6 8.47997 26.7677 7.79455C27.2489 5.76747 27.2708 3.74768 26.6948 1.72788C26.6364 1.52372 26.5416 1.42893 26.3448 1.37788C24.6604 0.903926 22.9614 0.845593 21.2406 1.11538C21.1896 1.12268 21.1312 1.13726 21.0802 1.14455C20.8104 1.17372 20.6135 1.03518 20.5843 0.794551C20.5552 0.561218 20.701 0.364343 20.9781 0.335176C21.6927 0.26226 22.4073 0.160176 23.1218 0.145593C24.4125 0.116426 25.6739 0.298718 26.9062 0.69976C27.1687 0.78726 27.3073 0.933093 27.3875 1.19559C28.0875 3.40497 28.1093 5.62893 27.5989 7.87476C26.8989 10.9446 25.3823 13.5768 23.2093 15.8446C23.0271 16.0341 22.9906 16.1946 23.0416 16.4425C23.1875 17.1789 23.3989 17.9227 23.4062 18.6664C23.4354 20.2196 22.7062 21.4081 21.3573 22.181C20.4968 22.6696 19.6 23.0925 18.7177 23.5445C18.4552 23.6758 18.2218 23.6175 18.1052 23.3914C17.9885 23.1727 18.076 22.9539 18.3458 22.8154C19.1698 22.3925 20.001 21.9841 20.8177 21.5466C22.0791 20.8685 22.6843 19.7966 22.5823 18.3675C22.5458 17.8498 22.3927 17.3393 22.2833 16.7633C22.1593 16.8654 22.0864 16.9237 22.0135 16.9893C19.7166 18.98 17.1062 20.3435 14.1021 20.9195C14.0073 20.9341 13.8833 21.0289 13.8614 21.1164C13.475 22.6039 13.0958 24.0914 12.7166 25.5789C12.7093 25.6008 12.7166 25.63 12.7239 25.681C12.8333 25.63 12.9281 25.5862 13.0229 25.5352C14.2552 24.9081 15.4802 24.2737 16.7125 23.6539C16.8364 23.5883 17.0187 23.5518 17.1427 23.5883C17.4416 23.6685 17.5073 24.0623 17.2593 24.2664C17.1864 24.3321 17.0916 24.3685 17.0041 24.4195C15.4656 25.2071 13.9271 25.9873 12.3958 26.7748C12.1989 26.8768 12.0093 26.9571 11.8125 26.8039C11.6156 26.6508 11.6521 26.4466 11.7104 26.2279C12.1625 24.4487 12.6146 22.6696 13.0739 20.8977C13.125 20.7081 13.0958 20.5841 12.9573 20.4456C11.1562 18.6591 9.36247 16.8581 7.57601 15.0643C7.43747 14.9258 7.31351 14.8966 7.12393 14.9477C5.41039 15.3925 3.69685 15.8227 1.97601 16.2602C1.76455 16.3112 1.56039 16.3477 1.39997 16.1435C1.24684 15.9539 1.32705 15.7716 1.42184 15.5821C2.91664 12.6435 4.40414 9.72684 5.90622 6.81018C6.8031 5.06747 8.5531 4.23622 10.4635 4.62997C10.9156 4.72476 11.375 4.81226 11.8198 4.92163C12.0312 4.97268 12.1698 4.93622 12.3229 4.78309C14.0364 3.14976 15.9906 1.89559 18.2073 1.07163C18.5354 0.947676 18.8781 0.838301 19.2135 0.736218C19.4906 0.648718 19.7166 0.750801 19.7896 0.984135C19.8625 1.21018 19.7312 1.42163 19.4541 1.51643C19.0604 1.65497 18.6666 1.78622 18.2656 1.91747ZM7.91143 14.1748C7.99893 14.2841 8.05726 14.3789 8.13747 14.4518C9.83643 16.1508 11.5354 17.8498 13.2271 19.5487C13.8323 20.1539 13.8396 20.1685 14.6708 19.9425C19.7021 18.6081 23.2896 15.5164 25.6593 10.93C25.7687 10.7185 25.7323 10.6018 25.5718 10.4487C22.9177 7.80184 20.2635 5.15497 17.6239 2.5008C17.4489 2.3258 17.325 2.31851 17.1208 2.42059C13.0885 4.47684 10.2083 7.5758 8.60414 11.8268C8.31976 12.5852 8.14476 13.3727 7.91143 14.1748ZM2.5156 15.2466C2.64685 15.2175 2.73435 15.2029 2.82185 15.181C4.12705 14.8529 5.42497 14.5102 6.73018 14.1966C7.04372 14.1237 7.17497 13.9925 7.2406 13.6643C7.83122 10.7841 9.17289 8.28309 11.0833 6.06643C11.1854 5.94247 11.2948 5.8258 11.426 5.67268C11.0468 5.59247 10.7114 5.51955 10.376 5.44663C8.7208 5.08934 7.36455 5.7383 6.59164 7.24768C5.27914 9.81434 3.97393 12.3737 2.66143 14.9404C2.62497 15.0279 2.58122 15.1154 2.5156 15.2466Z" fill="#007EA7" stroke="#007EA7" stroke-width="0.3"/>
|
||||
<path d="M17.0478 16.2826C14.1822 16.2826 11.8853 13.9784 11.8926 11.1128C11.8999 8.26901 14.2113 5.96484 17.0551 5.96484C19.9061 5.96484 22.2249 8.29089 22.2176 11.1419C22.2103 13.9857 19.8988 16.2826 17.0478 16.2826ZM17.0405 15.4659C19.4395 15.4732 21.3863 13.5409 21.3936 11.1492C21.4009 8.74297 19.4613 6.78151 17.0551 6.78151C14.6634 6.77422 12.7166 8.7138 12.7093 11.1055C12.702 13.519 14.627 15.4586 17.0405 15.4659Z" fill="#007EA7" stroke="#007EA7" stroke-width="0.3"/>
|
||||
<path d="M17.0772 7.77312C18.9584 7.80958 20.4386 9.32625 20.4022 11.1783C20.3657 13.0596 18.8417 14.5106 16.9532 14.4742C15.1084 14.4377 13.6647 12.9065 13.7011 11.0398C13.7376 9.21687 15.2761 7.73666 17.0772 7.77312ZM17.0261 13.6502C18.4334 13.6575 19.5709 12.5419 19.5855 11.1492C19.6001 9.74916 18.448 8.58979 17.048 8.58979C15.6626 8.58979 14.5251 9.72 14.5178 11.0981C14.5105 12.5054 15.6261 13.6429 17.0261 13.6502Z" fill="#007EA7" stroke="#007EA7" stroke-width="0.3"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.4 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 7.6 KiB |
|
|
@ -0,0 +1,6 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.34997 2H12.25C12.99 2 13.6 2.61001 13.6 3.35001V4.82999C13.6 5.36999 13.26 6.04 12.93 6.38L10.03 8.94C9.63003 9.28 9.35998 9.94999 9.35998 10.49V13.39C9.35998 13.79 9.09 14.33 8.75 14.54L7.81 15.15C6.93 15.69 5.71997 15.08 5.71997 14V10.43C5.71997 9.95999 5.44999 9.35001 5.17999 9.01001L2.61999 6.31C2.27999 5.97 2.01001 5.36999 2.01001 4.95999V3.41C2.00001 2.61 2.60997 2 3.34997 2Z" stroke="#1B3C59" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M2 12.0002V15.0002C2 20.0002 4 22.0002 9 22.0002H15C20 22.0002 22 20.0002 22 15.0002V9.00024C22 5.88024 21.22 3.92024 19.41 2.90024C18.9 2.61024 17.88 2.39023 16.95 2.24023" stroke="#1B3C59" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M13 13H18" stroke="#1B3C59" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M11 17H18" stroke="#1B3C59" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
|
@ -571,4 +571,6 @@ class DidvanIcons {
|
|||
IconData(0xe90e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData font_size_solid =
|
||||
IconData(0xe90f, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData document_filter =
|
||||
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@ class NewsRequestArgs {
|
|||
final String? startDate;
|
||||
final String? endDate;
|
||||
final String? search;
|
||||
final List<int>? categories;
|
||||
|
||||
const NewsRequestArgs({
|
||||
required this.page,
|
||||
this.startDate,
|
||||
this.endDate,
|
||||
this.search,
|
||||
this.categories,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ class ActionSheetData {
|
|||
final String? title;
|
||||
final bool hasPadding;
|
||||
final IconData? titleIcon;
|
||||
final Widget? titleIconWidget;
|
||||
final Color? titleColor;
|
||||
final bool hasDismissButton;
|
||||
final bool hasConfirmButton;
|
||||
|
|
@ -28,6 +29,7 @@ class ActionSheetData {
|
|||
this.hasDismissButton = true,
|
||||
this.hasConfirmButton = true,
|
||||
this.titleIcon,
|
||||
this.titleIconWidget,
|
||||
this.dismissTitle,
|
||||
this.onDismissed,
|
||||
this.smallDismissButton = false,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// ignore_for_file: avoid_print
|
||||
// ignore_for_file: avoid_print, deprecated_member_use
|
||||
|
||||
import 'package:didvan/models/ai/ai_chat_args.dart';
|
||||
import 'package:didvan/models/requests/news.dart';
|
||||
|
|
@ -650,7 +650,6 @@ class RouteGenerator {
|
|||
transitionDuration: const Duration(milliseconds: 400),
|
||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
||||
switch (animationType) {
|
||||
// <<--- تغییر اصلی اینجاست
|
||||
case 'slide':
|
||||
const begin = Offset(1.0, 0.0);
|
||||
const end = Offset.zero;
|
||||
|
|
|
|||
|
|
@ -41,11 +41,15 @@ class RequestHelper {
|
|||
required int page,
|
||||
String? search,
|
||||
List<int>? types,
|
||||
String? startDate,
|
||||
String? endDate,
|
||||
}) =>
|
||||
'$_baseHomeUrl/mark/v2${_urlConcatGenerator([
|
||||
MapEntry('page', page),
|
||||
MapEntry('q', search),
|
||||
MapEntry('type', _urlListConcatGenerator(types)),
|
||||
MapEntry('start', startDate),
|
||||
MapEntry('end', endDate),
|
||||
])}';
|
||||
|
||||
static const String confirmUsername = '$_baseUserUrl/confirmUsername';
|
||||
|
|
|
|||
|
|
@ -129,13 +129,16 @@ class ActionSheetUtils {
|
|||
if (data.title != null)
|
||||
Row(
|
||||
children: [
|
||||
if (data.titleIcon != null)
|
||||
if (data.titleIconWidget != null)
|
||||
data.titleIconWidget!
|
||||
else if (data.titleIcon != null)
|
||||
Icon(
|
||||
data.titleIcon,
|
||||
color: data.titleColor ??
|
||||
Theme.of(context).colorScheme.title,
|
||||
),
|
||||
if (data.titleIcon != null) const SizedBox(width: 8),
|
||||
if (data.titleIcon != null || data.titleIconWidget != null)
|
||||
const SizedBox(width: 8),
|
||||
DidvanText(
|
||||
data.title!,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
|
|
@ -151,6 +154,19 @@ class ActionSheetUtils {
|
|||
Row(
|
||||
children: [
|
||||
if (data.hasDismissButton)
|
||||
if (data.hasConfirmButton)
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: DidvanButton(
|
||||
style: ButtonStyleMode.primary,
|
||||
onPressed: () {
|
||||
data.onConfirmed?.call();
|
||||
pop();
|
||||
},
|
||||
title: data.confrimTitle ?? 'تایید',
|
||||
),
|
||||
),
|
||||
if (data.hasDismissButton) const SizedBox(width: 20),
|
||||
Expanded(
|
||||
child: DidvanButton(
|
||||
onPressed: () {
|
||||
|
|
@ -161,19 +177,6 @@ class ActionSheetUtils {
|
|||
style: ButtonStyleMode.secondary,
|
||||
),
|
||||
),
|
||||
if (data.hasDismissButton) const SizedBox(width: 20),
|
||||
if (data.hasConfirmButton)
|
||||
Expanded(
|
||||
flex: data.smallDismissButton ? 2 : 1,
|
||||
child: DidvanButton(
|
||||
style: ButtonStyleMode.primary,
|
||||
onPressed: () {
|
||||
data.onConfirmed?.call();
|
||||
pop();
|
||||
},
|
||||
title: data.confrimTitle ?? 'تایید',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
|
@ -206,9 +209,7 @@ class ActionSheetUtils {
|
|||
data.backgroundColor ?? Theme.of(context).colorScheme.surface,
|
||||
),
|
||||
width: mediaQueryData.size.width * 0.8,
|
||||
// BEGIN: EDIT THIS LINE
|
||||
padding: const EdgeInsets.fromLTRB(24, 16, 24, 24), // پدینگ بالا از 24 به 16 تغییر کرد
|
||||
// END: EDIT THIS LINE
|
||||
padding: const EdgeInsets.fromLTRB(24, 16, 24, 24),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
|
@ -217,7 +218,12 @@ class ActionSheetUtils {
|
|||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (data.titleIcon != null)
|
||||
if (data.titleIconWidget != null)
|
||||
GestureDetector(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: data.titleIconWidget!,
|
||||
)
|
||||
else if (data.titleIcon != null)
|
||||
GestureDetector(
|
||||
onTap: () => Navigator.of(context).pop(),
|
||||
child: Icon(
|
||||
|
|
@ -226,7 +232,8 @@ class ActionSheetUtils {
|
|||
color: data.titleColor,
|
||||
),
|
||||
),
|
||||
if (data.titleIcon != null)
|
||||
if (data.titleIcon != null ||
|
||||
data.titleIconWidget != null)
|
||||
const SizedBox(
|
||||
width: 4,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ class HistoryAiChatPage extends StatefulWidget {
|
|||
|
||||
class _HistoryAiChatPageState extends State<HistoryAiChatPage> {
|
||||
final ScrollController scrollController = ScrollController();
|
||||
final GlobalKey<ScaffoldState> scaffKey =
|
||||
GlobalKey<ScaffoldState>();
|
||||
final GlobalKey<ScaffoldState> scaffKey = GlobalKey<ScaffoldState>();
|
||||
Timer? _timer;
|
||||
|
||||
late bool archived = widget.archived ?? false;
|
||||
|
|
@ -62,7 +61,6 @@ class _HistoryAiChatPageState extends State<HistoryAiChatPage> {
|
|||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
child: Scaffold(
|
||||
key: scaffKey,
|
||||
appBar: HoshanAppBar(
|
||||
|
|
@ -73,12 +71,12 @@ class _HistoryAiChatPageState extends State<HistoryAiChatPage> {
|
|||
}
|
||||
Navigator.pop(context);
|
||||
},
|
||||
withActions: false, // شبیه به صفحه چت
|
||||
withInfo: true, // برای نمایش دکمه بازگشت
|
||||
withActions: false,
|
||||
withInfo: true,
|
||||
),
|
||||
drawer: HoshanDrawer(
|
||||
scaffKey: scaffKey,
|
||||
), // <-- اضافه شد
|
||||
),
|
||||
body: CustomScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
controller: scrollController,
|
||||
|
|
@ -88,8 +86,7 @@ class _HistoryAiChatPageState extends State<HistoryAiChatPage> {
|
|||
scrolledUnderElevation: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
pinned: true,
|
||||
toolbarHeight:
|
||||
archived ? 50 : 110, // ارتفاع بر اساس آرشیو بودن تنظیم میشود
|
||||
toolbarHeight: archived ? 50 : 110,
|
||||
flexibleSpace: Container(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
|
||||
|
|
@ -190,10 +187,8 @@ class _HistoryAiChatPageState extends State<HistoryAiChatPage> {
|
|||
padding: const EdgeInsets.symmetric(horizontal: 20.0),
|
||||
child: Icon(
|
||||
archived
|
||||
? Icons
|
||||
.folder_delete // <-- آیکون کشیدن برای آرشیو
|
||||
: Icons
|
||||
.create_new_folder_rounded, // <-- آیکون کشیدن برای خروج از آرشیو
|
||||
? Icons.folder_delete
|
||||
: Icons.create_new_folder_rounded,
|
||||
color: Theme.of(context).colorScheme.white),
|
||||
),
|
||||
movementDuration: const Duration(milliseconds: 600),
|
||||
|
|
@ -426,7 +421,6 @@ class _HistoryAiChatPageState extends State<HistoryAiChatPage> {
|
|||
)
|
||||
],
|
||||
)
|
||||
// --- شروع بلاک تغییر یافته ---
|
||||
: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
|
|
@ -453,8 +447,6 @@ class _HistoryAiChatPageState extends State<HistoryAiChatPage> {
|
|||
.updatedAt
|
||||
.toString())
|
||||
.toPersianDateStr(),
|
||||
// DateTimeUtils.momentGenerator(
|
||||
// chat.updatedAt.toString()),
|
||||
style:
|
||||
const TextStyle(
|
||||
fontSize:
|
||||
|
|
@ -518,8 +510,8 @@ class _HistoryAiChatPageState extends State<HistoryAiChatPage> {
|
|||
archived);
|
||||
break;
|
||||
|
||||
case 'آرشیو': // برای آرشیو کردن
|
||||
case 'خارج کردن از آرشیو': // برای خارج کردن
|
||||
case 'آرشیو':
|
||||
case 'خارج کردن از آرشیو':
|
||||
await state
|
||||
.archivedChat(
|
||||
chat.id!,
|
||||
|
|
@ -632,7 +624,6 @@ class _HistoryAiChatPageState extends State<HistoryAiChatPage> {
|
|||
),
|
||||
],
|
||||
),
|
||||
// --- پایان بلاک تغییر یافته ---
|
||||
|
||||
// if (chat.prompts != null &&
|
||||
// chat.prompts!.isNotEmpty &&
|
||||
|
|
@ -664,7 +655,6 @@ class _HistoryAiChatPageState extends State<HistoryAiChatPage> {
|
|||
)
|
||||
],
|
||||
),
|
||||
// --- پایان تغییرات ---
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import 'package:flutter_svg/svg.dart';
|
|||
import 'package:provider/provider.dart';
|
||||
import 'package:persian_number_utility/persian_number_utility.dart';
|
||||
|
||||
class Message extends StatefulWidget { // 1. تبدیل به StatefulWidget
|
||||
class Message extends StatefulWidget {
|
||||
final MessageData message;
|
||||
const Message({Key? key, required this.message}) : super(key: key);
|
||||
|
||||
|
|
@ -20,9 +20,7 @@ class Message extends StatefulWidget { // 1. تبدیل به StatefulWidget
|
|||
State<Message> createState() => _MessageState();
|
||||
}
|
||||
|
||||
class _MessageState extends State<Message>
|
||||
with SingleTickerProviderStateMixin { // 2. اضافه کردن Mixin
|
||||
|
||||
class _MessageState extends State<Message> with SingleTickerProviderStateMixin {
|
||||
late AnimationController _controller;
|
||||
late Animation<Offset> _slideAnimation;
|
||||
late Animation<double> _opacityAnimation;
|
||||
|
|
@ -30,14 +28,13 @@ class _MessageState extends State<Message>
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// 3. مقداردهی اولیه کنترلر و انیمیشن ها
|
||||
_controller = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
);
|
||||
|
||||
_slideAnimation = Tween<Offset>(
|
||||
begin: const Offset(0, 0.5), // شروع از کمی پایین تر
|
||||
begin: const Offset(0, 0.5),
|
||||
end: Offset.zero,
|
||||
).animate(CurvedAnimation(
|
||||
parent: _controller,
|
||||
|
|
@ -45,19 +42,19 @@ class _MessageState extends State<Message>
|
|||
));
|
||||
|
||||
_opacityAnimation = Tween<double>(
|
||||
begin: 0.0, // شروع با شفافیت صفر
|
||||
begin: 0.0,
|
||||
end: 1.0,
|
||||
).animate(CurvedAnimation(
|
||||
parent: _controller,
|
||||
curve: Curves.easeIn,
|
||||
));
|
||||
|
||||
_controller.forward(); // 4. اجرای انیمیشن
|
||||
_controller.forward();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose(); // 5. آزاد کردن کنترلر
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
|
@ -69,14 +66,12 @@ class _MessageState extends State<Message>
|
|||
widget.message.createdAt.replaceAll('T', ' ').split(' ').first]!
|
||||
.last;
|
||||
|
||||
// 6. اعمال انیمیشن ها به ویجت
|
||||
return FadeTransition(
|
||||
opacity: _opacityAnimation,
|
||||
child: SlideTransition(
|
||||
position: _slideAnimation,
|
||||
child: GestureDetector(
|
||||
onLongPress: () {
|
||||
// 7. استفاده از widget.message
|
||||
if (state.deletionQueue.contains(widget.message.id) ||
|
||||
widget.message.writedByAdmin) {
|
||||
return;
|
||||
|
|
@ -85,7 +80,8 @@ class _MessageState extends State<Message>
|
|||
state.update();
|
||||
},
|
||||
onTap: () {
|
||||
if (state.deletionQueue.isEmpty || widget.message.writedByAdmin) return;
|
||||
if (state.deletionQueue.isEmpty || widget.message.writedByAdmin)
|
||||
return;
|
||||
if (!state.deletionQueue.contains(widget.message.id)) {
|
||||
state.deletionQueue.add(widget.message.id);
|
||||
} else {
|
||||
|
|
@ -149,7 +145,8 @@ class _MessageState extends State<Message>
|
|||
AudioWave(
|
||||
file: widget.message.audio!,
|
||||
totalDuration: widget.message.duration != null
|
||||
? Duration(seconds: widget.message.duration!)
|
||||
? Duration(
|
||||
seconds: widget.message.duration!)
|
||||
: null,
|
||||
),
|
||||
if (widget.message.radar != null ||
|
||||
|
|
@ -258,7 +255,8 @@ class _MessageState extends State<Message>
|
|||
),
|
||||
),
|
||||
DidvanText(
|
||||
DateTimeUtils.timeWithAmPm(widget.message.createdAt),
|
||||
DateTimeUtils.timeWithAmPm(
|
||||
widget.message.createdAt),
|
||||
style: Theme.of(context).textTheme.labelSmall,
|
||||
color: Theme.of(context).colorScheme.caption,
|
||||
),
|
||||
|
|
@ -284,7 +282,6 @@ class _MessageState extends State<Message>
|
|||
}
|
||||
}
|
||||
|
||||
// ویجت های کمکی پایین بدون تغییر باقی می مانند
|
||||
class _ReplyRadarOverview extends StatelessWidget {
|
||||
final MessageData message;
|
||||
const _ReplyRadarOverview({Key? key, required this.message})
|
||||
|
|
|
|||
|
|
@ -15,6 +15,11 @@ class BookmarksState extends CoreProvier {
|
|||
String lastSearch = '';
|
||||
int page = 1;
|
||||
int lastPage = 1;
|
||||
List<int> selectedTypes = [];
|
||||
DateTime? startDate;
|
||||
DateTime? endDate;
|
||||
bool get isFiltered =>
|
||||
selectedTypes.isNotEmpty || startDate != null || endDate != null;
|
||||
|
||||
bool _swotItemsLoading = false;
|
||||
bool get searching => search.isNotEmpty;
|
||||
|
|
@ -32,11 +37,12 @@ class BookmarksState extends CoreProvier {
|
|||
_fetchSwotBookmarks(),
|
||||
]);
|
||||
|
||||
|
||||
if (appState != AppState.failed && !searching) {
|
||||
appState = AppState.idle;
|
||||
} else if (appState != AppState.failed && searching && bookmarks.isEmpty && bookmarkedSwotItems.isEmpty) {
|
||||
|
||||
} else if (appState != AppState.failed &&
|
||||
searching &&
|
||||
bookmarks.isEmpty &&
|
||||
bookmarkedSwotItems.isEmpty) {
|
||||
appState = AppState.idle;
|
||||
}
|
||||
_swotItemsLoading = false;
|
||||
|
|
@ -49,7 +55,13 @@ class BookmarksState extends CoreProvier {
|
|||
if (!searching) lastSearch = search;
|
||||
|
||||
final service = RequestService(
|
||||
RequestHelper.searchMarks(page: page, search: search.isNotEmpty ? search : null),
|
||||
RequestHelper.searchMarks(
|
||||
page: page,
|
||||
search: search.isNotEmpty ? search : null,
|
||||
types: selectedTypes.isNotEmpty ? selectedTypes : null,
|
||||
startDate: startDate?.toIso8601String().split('T').first,
|
||||
endDate: endDate?.toIso8601String().split('T').first,
|
||||
),
|
||||
);
|
||||
await service.httpGet();
|
||||
if (service.isSuccess) {
|
||||
|
|
@ -81,9 +93,13 @@ class BookmarksState extends CoreProvier {
|
|||
notifyListeners();
|
||||
}
|
||||
|
||||
|
||||
Future<void> _fetchSwotBookmarks() async {
|
||||
try {
|
||||
if (selectedTypes.isNotEmpty && !selectedTypes.contains(8)) {
|
||||
bookmarkedSwotItems = [];
|
||||
return;
|
||||
}
|
||||
|
||||
final postIds = await BookmarkService.fetchBookmarks();
|
||||
if (postIds.isNotEmpty) {
|
||||
final allSwots = await SwotService.fetchSwotItems();
|
||||
|
|
@ -91,7 +107,8 @@ class BookmarksState extends CoreProvier {
|
|||
bookmarkedSwotItems = allSwots.where((swot) {
|
||||
final isBookmarked = postIds.contains(swot.id);
|
||||
if (search.isEmpty) return isBookmarked;
|
||||
return isBookmarked && swot.title.toLowerCase().contains(search.toLowerCase());
|
||||
return isBookmarked &&
|
||||
swot.title.toLowerCase().contains(search.toLowerCase());
|
||||
}).toList();
|
||||
} else {
|
||||
bookmarkedSwotItems = [];
|
||||
|
|
@ -110,4 +127,17 @@ class BookmarksState extends CoreProvier {
|
|||
bookmarkedSwotItems.removeWhere((element) => element.id == swotId);
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void resetFilters([bool notify = true]) {
|
||||
selectedTypes.clear();
|
||||
startDate = null;
|
||||
endDate = null;
|
||||
if (notify) {
|
||||
loadInitialData();
|
||||
}
|
||||
}
|
||||
|
||||
void update() {
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +1,20 @@
|
|||
// ignore_for_file: unused_element_parameter
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:didvan/config/design_config.dart';
|
||||
import 'package:didvan/config/theme_data.dart';
|
||||
import 'package:didvan/constants/assets.dart';
|
||||
import 'package:didvan/models/enums.dart';
|
||||
import 'package:didvan/models/view/action_sheet_data.dart';
|
||||
import 'package:didvan/routes/routes.dart';
|
||||
import 'package:didvan/utils/action_sheet.dart';
|
||||
import 'package:didvan/views/home/bookmarks/bookmark_state.dart';
|
||||
import 'package:didvan/views/home/main/widgets/swot_bookmark.dart';
|
||||
import 'package:didvan/views/widgets/didvan/checkbox.dart';
|
||||
import 'package:didvan/views/widgets/didvan/scaffold.dart';
|
||||
import 'package:didvan/views/widgets/didvan/text.dart';
|
||||
import 'package:didvan/views/widgets/date_picker_button.dart';
|
||||
import 'package:didvan/views/widgets/item_title.dart';
|
||||
import 'package:didvan/views/widgets/menu_item.dart';
|
||||
import 'package:didvan/views/widgets/overview/multitype.dart';
|
||||
|
|
@ -60,6 +66,108 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
});
|
||||
}
|
||||
|
||||
Future<void> _showFilterBottomSheet() async {
|
||||
final state = context.read<BookmarksState>();
|
||||
|
||||
final categories = [
|
||||
{'id': 1, 'label': 'پویش افق'},
|
||||
{'id': 2, 'label': 'دنیای فولاد'},
|
||||
{'id': 3, 'label': 'استودیو آینده'},
|
||||
{'id': 5, 'label': 'رادارهای استراتژیک'},
|
||||
{'id': 6, 'label': 'سها'},
|
||||
{'id': 7, 'label': 'اینفوگرافی'},
|
||||
];
|
||||
|
||||
await ActionSheetUtils(context).showBottomSheet(
|
||||
data: ActionSheetData(
|
||||
title: 'فیلتر جستجو',
|
||||
titleIconWidget: SvgPicture.asset(
|
||||
'lib/assets/icons/document-filter.svg',
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
dismissTitle: 'حذف فیلتر',
|
||||
confrimTitle: 'نمایش نتایج',
|
||||
onDismissed: () => state.resetFilters(false),
|
||||
onConfirmed: () => state.loadInitialData(),
|
||||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ItemTitle(
|
||||
title: 'تاریخ',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
iconWidget: 'lib/assets/icons/calendar.svg',
|
||||
color: const Color.fromARGB(255, 27, 60, 89),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
StatefulBuilder(
|
||||
builder: (context, setState) => Row(
|
||||
children: [
|
||||
DatePickerButton(
|
||||
initialValue:
|
||||
state.startDate?.toIso8601String().split('T').first,
|
||||
emptyText: 'از تاریخ',
|
||||
onPicked: (date) => setState(() {
|
||||
state.startDate =
|
||||
date != null ? DateTime.parse(date) : null;
|
||||
}),
|
||||
lastDate: state.endDate?.toIso8601String().split('T').first,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
DatePickerButton(
|
||||
initialValue:
|
||||
state.endDate?.toIso8601String().split('T').first,
|
||||
emptyText: 'تا تاریخ',
|
||||
onPicked: (date) => setState(() {
|
||||
state.endDate =
|
||||
date != null ? DateTime.parse(date) : null;
|
||||
}),
|
||||
firstDate:
|
||||
state.startDate?.toIso8601String().split('T').first,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 28),
|
||||
ItemTitle(
|
||||
title: 'دسته بندی',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
iconWidget: 'lib/assets/icons/ion_extension-puzzle-outline.svg',
|
||||
color: const Color.fromARGB(255, 27, 60, 89),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Wrap(
|
||||
children: [
|
||||
for (var category in categories)
|
||||
SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 40) / 2,
|
||||
child: DidvanCheckbox(
|
||||
title: category['label'] as String,
|
||||
value: state.selectedTypes.contains(category['id']),
|
||||
onChanged: (value) {
|
||||
if (value) {
|
||||
state.selectedTypes.add(category['id'] as int);
|
||||
} else {
|
||||
state.selectedTypes.remove(category['id']);
|
||||
}
|
||||
},
|
||||
color: const Color.fromARGB(255, 61, 61, 61),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final state = context.watch<BookmarksState>();
|
||||
|
|
@ -110,7 +218,7 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
),
|
||||
GestureDetector(
|
||||
onTap: () => Navigator.pop(context),
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 44,
|
||||
height: 44,
|
||||
child: Center(
|
||||
|
|
@ -135,12 +243,8 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
title: 'دیدوان',
|
||||
focusNode: _focuseNode,
|
||||
onChanged: _onSearchChanged,
|
||||
onFilterButtonPressed: () {
|
||||
//TODO:fix this
|
||||
// Filter functionality for bookmarks
|
||||
// Can be implemented later if needed
|
||||
},
|
||||
isFiltered: false,
|
||||
onFilterButtonPressed: _showFilterBottomSheet,
|
||||
isFiltered: state.isFiltered,
|
||||
extraIconPath: 'lib/assets/icons/live ai.svg',
|
||||
onExtraIconPressed: () {
|
||||
showDialog(
|
||||
|
|
@ -205,7 +309,9 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
),
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
MenuOption(
|
||||
_FadeInSlide(
|
||||
delay: const Duration(milliseconds: 100),
|
||||
child: MenuOption(
|
||||
onTap: () => _onCategorySelected(5),
|
||||
iconWidget: SvgPicture.asset(
|
||||
"lib/assets/icons/Stratzhic Radar.svg",
|
||||
|
|
@ -215,8 +321,14 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
style: TextStyle(
|
||||
color: Color.fromARGB(255, 102, 102, 102))),
|
||||
),
|
||||
const DidvanDivider(),
|
||||
MenuOption(
|
||||
),
|
||||
const _FadeInSlide(
|
||||
delay: Duration(milliseconds: 150),
|
||||
child: DidvanDivider(),
|
||||
),
|
||||
_FadeInSlide(
|
||||
delay: const Duration(milliseconds: 200),
|
||||
child: MenuOption(
|
||||
onTap: () => _onCategorySelected(2),
|
||||
iconWidget: SvgPicture.asset(
|
||||
"lib/assets/icons/Donye_Foolad.svg",
|
||||
|
|
@ -226,8 +338,14 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
style: TextStyle(
|
||||
color: Color.fromARGB(255, 102, 102, 102))),
|
||||
),
|
||||
const DidvanDivider(),
|
||||
MenuOption(
|
||||
),
|
||||
const _FadeInSlide(
|
||||
delay: Duration(milliseconds: 250),
|
||||
child: DidvanDivider(),
|
||||
),
|
||||
_FadeInSlide(
|
||||
delay: const Duration(milliseconds: 300),
|
||||
child: MenuOption(
|
||||
onTap: () => _onCategorySelected(1),
|
||||
iconWidget: SvgPicture.asset(
|
||||
"lib/assets/icons/Pouyesh_Ofogh_New.svg",
|
||||
|
|
@ -237,8 +355,14 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
style: TextStyle(
|
||||
color: Color.fromARGB(255, 102, 102, 102))),
|
||||
),
|
||||
const DidvanDivider(),
|
||||
MenuOption(
|
||||
),
|
||||
const _FadeInSlide(
|
||||
delay: Duration(milliseconds: 350),
|
||||
child: DidvanDivider(),
|
||||
),
|
||||
_FadeInSlide(
|
||||
delay: const Duration(milliseconds: 400),
|
||||
child: MenuOption(
|
||||
onTap: () => _onCategorySelected(3),
|
||||
iconWidget: SvgPicture.asset(
|
||||
"lib/assets/icons/video-play.svg",
|
||||
|
|
@ -249,8 +373,14 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
style: TextStyle(
|
||||
color: Color.fromARGB(255, 102, 102, 102))),
|
||||
),
|
||||
const DidvanDivider(),
|
||||
MenuOption(
|
||||
),
|
||||
const _FadeInSlide(
|
||||
delay: Duration(milliseconds: 450),
|
||||
child: DidvanDivider(),
|
||||
),
|
||||
_FadeInSlide(
|
||||
delay: const Duration(milliseconds: 500),
|
||||
child: MenuOption(
|
||||
onTap: () => _onCategorySelected(4),
|
||||
iconWidget: SvgPicture.asset(
|
||||
"lib/assets/icons/microphone-2.svg",
|
||||
|
|
@ -261,8 +391,14 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
style: TextStyle(
|
||||
color: Color.fromARGB(255, 102, 102, 102))),
|
||||
),
|
||||
const DidvanDivider(),
|
||||
MenuOption(
|
||||
),
|
||||
const _FadeInSlide(
|
||||
delay: Duration(milliseconds: 550),
|
||||
child: DidvanDivider(),
|
||||
),
|
||||
_FadeInSlide(
|
||||
delay: const Duration(milliseconds: 600),
|
||||
child: MenuOption(
|
||||
onTap: () => _onCategorySelected(6),
|
||||
iconWidget: SvgPicture.asset(
|
||||
"lib/assets/icons/Saha.svg",
|
||||
|
|
@ -272,8 +408,14 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
style: TextStyle(
|
||||
color: Color.fromARGB(255, 102, 102, 102))),
|
||||
),
|
||||
const DidvanDivider(),
|
||||
MenuOption(
|
||||
),
|
||||
const _FadeInSlide(
|
||||
delay: Duration(milliseconds: 650),
|
||||
child: DidvanDivider(),
|
||||
),
|
||||
_FadeInSlide(
|
||||
delay: const Duration(milliseconds: 700),
|
||||
child: MenuOption(
|
||||
onTap: () => _onCategorySelected(7),
|
||||
iconWidget: SvgPicture.asset(
|
||||
"lib/assets/icons/hugeicons_chart-02.svg",
|
||||
|
|
@ -284,8 +426,14 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
style: TextStyle(
|
||||
color: Color.fromARGB(255, 102, 102, 102))),
|
||||
),
|
||||
const DidvanDivider(),
|
||||
MenuOption(
|
||||
),
|
||||
const _FadeInSlide(
|
||||
delay: Duration(milliseconds: 750),
|
||||
child: DidvanDivider(),
|
||||
),
|
||||
_FadeInSlide(
|
||||
delay: const Duration(milliseconds: 800),
|
||||
child: MenuOption(
|
||||
onTap: () => _onCategorySelected(8),
|
||||
titleWidget: const DidvanText(
|
||||
'ماژول بایدها و نبایدها',
|
||||
|
|
@ -296,8 +444,14 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
width: 24),
|
||||
iconSize: 24,
|
||||
),
|
||||
const DidvanDivider(),
|
||||
MenuOption(
|
||||
),
|
||||
const _FadeInSlide(
|
||||
delay: Duration(milliseconds: 850),
|
||||
child: DidvanDivider(),
|
||||
),
|
||||
_FadeInSlide(
|
||||
delay: const Duration(milliseconds: 900),
|
||||
child: MenuOption(
|
||||
onTap: () => _onCategorySelected(9),
|
||||
titleWidget: const DidvanText('ماهنامه تحلیلی',
|
||||
style: TextStyle(
|
||||
|
|
@ -307,6 +461,7 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
width: 24),
|
||||
iconSize: 24,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 7),
|
||||
],
|
||||
),
|
||||
|
|
@ -350,7 +505,9 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
if (index >= state.bookmarks.length) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
return Padding(
|
||||
return _FadeInSlide(
|
||||
delay: Duration(milliseconds: (index % 10) * 100),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 5, 0, 5),
|
||||
child: Container(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
|
|
@ -373,6 +530,7 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
itemPadding: const EdgeInsets.only(bottom: 8, left: 16, right: 16),
|
||||
|
|
@ -388,7 +546,9 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
final item = state.bookmarkedSwotItems[index];
|
||||
return Padding(
|
||||
return _FadeInSlide(
|
||||
delay: Duration(milliseconds: (index % 10) * 100),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(bottom: 8, left: 16, right: 16),
|
||||
child: Container(
|
||||
|
|
@ -410,6 +570,7 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
childCount: state.bookmarkedSwotItems.length,
|
||||
|
|
@ -447,14 +608,66 @@ class _BookmarksState extends State<Bookmarks> {
|
|||
}
|
||||
}
|
||||
|
||||
// void _onChanged(String value) {
|
||||
// final state = context.read<BookmarksState>();
|
||||
// if (value.length < 3 && value.isNotEmpty || state.lastSearch == value) {
|
||||
// return;
|
||||
// }
|
||||
// _timer?.cancel();
|
||||
// _timer = Timer(const Duration(seconds: 1), () {
|
||||
// state.search = value;
|
||||
// state.getBookmarks(page: 1);
|
||||
// });
|
||||
// }
|
||||
// void _onChanged(String value) {
|
||||
// final state = context.read<BookmarksState>();
|
||||
// if (value.length < 3 && value.isNotEmpty || state.lastSearch == value) {
|
||||
// return;
|
||||
// }
|
||||
// _timer?.cancel();
|
||||
// _timer = Timer(const Duration(seconds: 1), () {
|
||||
// state.search = value;
|
||||
// state.getBookmarks(page: 1);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
class _FadeInSlide extends StatefulWidget {
|
||||
final Widget child;
|
||||
final Duration delay;
|
||||
final Duration duration;
|
||||
final double slideOffset;
|
||||
|
||||
const _FadeInSlide({
|
||||
Key? key,
|
||||
required this.child,
|
||||
this.delay = Duration.zero,
|
||||
// ignore: unused_element_parameter
|
||||
this.duration = const Duration(milliseconds: 400),
|
||||
this.slideOffset = 50.0, // میزانی که ویجت از پایین به بالا حرکت میکند
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<_FadeInSlide> createState() => _FadeInSlideState();
|
||||
}
|
||||
|
||||
class _FadeInSlideState extends State<_FadeInSlide> {
|
||||
bool _isVisible = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
Timer(widget.delay, () {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_isVisible = true;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedOpacity(
|
||||
opacity: _isVisible ? 1.0 : 0.0,
|
||||
duration: widget.duration,
|
||||
curve: Curves.easeOut,
|
||||
child: AnimatedContainer(
|
||||
duration: widget.duration,
|
||||
curve: Curves.easeOut,
|
||||
transform: Matrix4.translationValues(
|
||||
0, _isVisible ? 0 : widget.slideOffset, 0),
|
||||
child: widget.child,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import 'package:didvan/config/theme_data.dart';
|
||||
import 'package:didvan/constants/app_icons.dart';
|
||||
import 'package:didvan/main.dart';
|
||||
import 'package:didvan/models/home_page_content/home_page_list.dart';
|
||||
import 'package:didvan/models/home_page_content/swot.dart';
|
||||
|
|
@ -276,12 +274,12 @@ class SwotSection extends StatelessWidget {
|
|||
Row(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
"lib/assets/images/features/Saha Solid.svg",
|
||||
color: Theme.of(context).colorScheme.title,
|
||||
"lib/assets/icons/Swot_New.svg",
|
||||
color: const Color.fromARGB(255, 0, 126, 167),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
DidvanText(
|
||||
"بایدها و نبایدها",
|
||||
"ماژول بایدها و نبایدها",
|
||||
style: Theme.of(context).textTheme.titleSmall,
|
||||
color: const Color.fromARGB(255, 0, 89, 119),
|
||||
),
|
||||
|
|
@ -357,28 +355,28 @@ class MainPageSection extends StatelessWidget {
|
|||
Navigator.of(context).pushNamed(list.link);
|
||||
}
|
||||
|
||||
IconData? _generateIcon() {
|
||||
String? _generateIcon() {
|
||||
switch (list.type) {
|
||||
case 'monthly':
|
||||
return DidvanIcons.radar_solid;
|
||||
return 'lib/assets/icons/Monthly.svg';
|
||||
case 'news':
|
||||
return DidvanIcons.foolad_solid;
|
||||
return 'lib/assets/icons/Donye_Foolad.svg';
|
||||
case 'radar':
|
||||
return DidvanIcons.scanning_solid;
|
||||
return 'lib/assets/icons/Pouyesh_Ofogh_New.svg';
|
||||
case 'video':
|
||||
return DidvanIcons.video_solid;
|
||||
return 'lib/assets/icons/video-play.svg';
|
||||
case 'podcast':
|
||||
return DidvanIcons.podcast_solid;
|
||||
return 'lib/assets/icons/play-circle.svg';
|
||||
case 'trend':
|
||||
return DidvanIcons.chart_solid;
|
||||
return 'lib/assets/icons/Ravand.svg';
|
||||
case 'technology':
|
||||
return DidvanIcons.technology_solid;
|
||||
return 'lib/assets/icons/Technology.svg';
|
||||
case 'risk':
|
||||
return DidvanIcons.exclamation_triangle_solid;
|
||||
return 'lib/assets/icons/risk-radar.svg'; //TODO:FIX ICON
|
||||
case 'startup':
|
||||
return DidvanIcons.startup_solid;
|
||||
return 'lib/assets/icons/Startup.svg';
|
||||
case 'survey':
|
||||
return DidvanIcons.saha_solid;
|
||||
return 'lib/assets/icons/Saha.svg';
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
@ -445,7 +443,7 @@ class MainPageSection extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final icon = _generateIcon();
|
||||
final iconPath = _generateIcon();
|
||||
|
||||
if (list.contents.isEmpty) {
|
||||
return const SizedBox();
|
||||
|
|
@ -453,13 +451,13 @@ class MainPageSection extends StatelessWidget {
|
|||
|
||||
return Column(
|
||||
children: [
|
||||
_buildSectionHeader(context, icon),
|
||||
_buildSectionHeader(context, iconPath),
|
||||
_buildSectionSlider(context),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Padding _buildSectionHeader(BuildContext context, IconData? icon) {
|
||||
Padding _buildSectionHeader(BuildContext context, String? iconPath) {
|
||||
String headerText = list.header;
|
||||
if (list.type == 'news') {
|
||||
headerText = 'دنیای فولاد';
|
||||
|
|
@ -483,10 +481,12 @@ class MainPageSection extends StatelessWidget {
|
|||
children: [
|
||||
Row(
|
||||
children: [
|
||||
if (icon != null)
|
||||
Icon(
|
||||
icon,
|
||||
color: Theme.of(context).colorScheme.title,
|
||||
if (iconPath != null)
|
||||
SvgPicture.asset(
|
||||
iconPath,
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: const Color.fromRGBO(0, 126, 167, 1),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
DidvanText(
|
||||
|
|
|
|||
|
|
@ -1,12 +1,18 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:didvan/constants/app_icons.dart';
|
||||
import 'package:didvan/models/enums.dart';
|
||||
import 'package:didvan/models/view/action_sheet_data.dart';
|
||||
import 'package:didvan/routes/routes.dart';
|
||||
import 'package:didvan/services/network/request_helper.dart';
|
||||
import 'package:didvan/utils/action_sheet.dart';
|
||||
import 'package:didvan/views/monthly/monthly_list_state.dart';
|
||||
import 'package:didvan/views/widgets/date_picker_button.dart';
|
||||
import 'package:didvan/views/widgets/didvan/checkbox.dart';
|
||||
import 'package:didvan/views/widgets/didvan/scaffold.dart';
|
||||
import 'package:didvan/views/widgets/didvan/text.dart';
|
||||
import 'package:didvan/views/widgets/home_app_bar.dart';
|
||||
import 'package:didvan/views/widgets/item_title.dart';
|
||||
import 'package:didvan/views/widgets/skeleton_image.dart';
|
||||
import 'package:didvan/views/widgets/state_handlers/sliver_state_handler.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -29,7 +35,9 @@ class _MonthlyListPageState extends State<MonthlyListPage> {
|
|||
void initState() {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
context.read<MonthlyListState>().fetchMonthlyList();
|
||||
final state = context.read<MonthlyListState>();
|
||||
state.initCategories();
|
||||
state.fetchMonthlyList();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -42,6 +50,88 @@ class _MonthlyListPageState extends State<MonthlyListPage> {
|
|||
});
|
||||
}
|
||||
|
||||
Future<void> _showFilterBottomSheet() async {
|
||||
final state = context.read<MonthlyListState>();
|
||||
await ActionSheetUtils(context).showBottomSheet(
|
||||
data: ActionSheetData(
|
||||
title: 'فیلتر جستجو',
|
||||
smallDismissButton: true,
|
||||
titleIcon: DidvanIcons.filter_regular,
|
||||
dismissTitle: 'حذف فیلتر',
|
||||
confrimTitle: 'نمایش نتایج',
|
||||
onDismissed: () => state.resetFilters(false),
|
||||
onConfirmed: () {
|
||||
state.filtering = state.startDate != null ||
|
||||
state.endDate != null ||
|
||||
state.selectedCats.isNotEmpty;
|
||||
state.fetchMonthlyList();
|
||||
},
|
||||
content: StatefulBuilder(
|
||||
builder: (context, setState) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ItemTitle(
|
||||
title: 'تاریخ ایجاد',
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
icon: DidvanIcons.calendar_range_regular,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
DatePickerButton(
|
||||
initialValue: state.startDate,
|
||||
emptyText: 'از تاریخ',
|
||||
onPicked: (date) => setState(() => state.startDate = date),
|
||||
lastDate: state.endDate,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
DatePickerButton(
|
||||
initialValue: state.endDate,
|
||||
emptyText: 'تا تاریخ',
|
||||
onPicked: (date) => setState(() => state.endDate = date),
|
||||
firstDate: state.startDate,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 28),
|
||||
if (state.categories.isNotEmpty) ...[
|
||||
ItemTitle(
|
||||
title: 'دسته بندی',
|
||||
icon: DidvanIcons.category_regular,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Wrap(
|
||||
children: [
|
||||
for (var category in state.categories)
|
||||
SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 40) / 2,
|
||||
child: DidvanCheckbox(
|
||||
title: category.label,
|
||||
value: state.selectedCats
|
||||
.any((cat) => cat.id == category.id),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
if (value) {
|
||||
state.selectedCats.add(category);
|
||||
} else {
|
||||
state.selectedCats.removeWhere(
|
||||
(cat) => cat.id == category.id);
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_timer?.cancel();
|
||||
|
|
@ -67,7 +157,9 @@ class _MonthlyListPageState extends State<MonthlyListPage> {
|
|||
showBackButton: false,
|
||||
showSearchField: state.appState != AppState.failed,
|
||||
onSearchChanged: _onChanged,
|
||||
onFilterPressed: _showFilterBottomSheet,
|
||||
searchFocusNode: _focusNode,
|
||||
isFiltered: state.filtering,
|
||||
searchValue: state.searchQuery,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import 'dart:convert';
|
||||
import 'package:didvan/constants/assets.dart';
|
||||
import 'package:didvan/models/category.dart';
|
||||
import 'package:didvan/models/enums.dart';
|
||||
import 'package:didvan/models/monthly/monthly_model.dart';
|
||||
import 'package:didvan/providers/core.dart';
|
||||
|
|
@ -11,6 +13,48 @@ class MonthlyListState extends CoreProvier {
|
|||
List<MonthlyItem> monthlyItems = [];
|
||||
List<MonthlyItem> _allMonthlyItems = [];
|
||||
String searchQuery = '';
|
||||
String? startDate;
|
||||
String? endDate;
|
||||
final List<CategoryData> selectedCats = [];
|
||||
List<CategoryData> categories = [];
|
||||
bool filtering = false;
|
||||
|
||||
void initCategories() {
|
||||
categories = [
|
||||
CategoryData(
|
||||
id: 1,
|
||||
label: 'اقتصادی',
|
||||
asset: Assets.economicCategoryIcon,
|
||||
),
|
||||
CategoryData(
|
||||
id: 2,
|
||||
label: 'سیاسی',
|
||||
asset: Assets.politicalCategoryIcon,
|
||||
),
|
||||
CategoryData(
|
||||
id: 3,
|
||||
label: 'فناوری',
|
||||
asset: Assets.techCategoryIcon,
|
||||
),
|
||||
CategoryData(
|
||||
id: 4,
|
||||
label: 'کسب و کار',
|
||||
asset: Assets.businessCategoryIcon,
|
||||
),
|
||||
CategoryData(
|
||||
id: 5,
|
||||
label: 'زیستمحیطی',
|
||||
asset: Assets.enviromentalCategoryIcon,
|
||||
),
|
||||
CategoryData(
|
||||
id: 6,
|
||||
label: 'اجتماعی',
|
||||
asset: Assets.socialCategoryIcon,
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
bool get searching => searchQuery.isNotEmpty;
|
||||
|
||||
Future<void> fetchMonthlyList() async {
|
||||
appState = AppState.busy;
|
||||
|
|
@ -38,12 +82,13 @@ class MonthlyListState extends CoreProvier {
|
|||
final List<dynamic> resultList = jsonData['result'] as List;
|
||||
debugPrint('Found ${resultList.length} items');
|
||||
|
||||
monthlyItems =
|
||||
_allMonthlyItems =
|
||||
resultList.map((item) => MonthlyItem.fromJson(item)).toList();
|
||||
|
||||
_allMonthlyItems = List.from(monthlyItems);
|
||||
monthlyItems = _applyFilters(_allMonthlyItems);
|
||||
|
||||
debugPrint('Successfully parsed ${monthlyItems.length} monthly items');
|
||||
debugPrint(
|
||||
'Successfully parsed ${monthlyItems.length} monthly items after filters');
|
||||
appState = AppState.idle;
|
||||
} else {
|
||||
debugPrint('Request failed with status code: ${response.statusCode}');
|
||||
|
|
@ -59,15 +104,17 @@ class MonthlyListState extends CoreProvier {
|
|||
|
||||
void search(String query) {
|
||||
searchQuery = query;
|
||||
if (query.isEmpty) {
|
||||
monthlyItems = List.from(_allMonthlyItems);
|
||||
} else {
|
||||
monthlyItems = _allMonthlyItems
|
||||
var filtered = _allMonthlyItems;
|
||||
|
||||
if (query.isNotEmpty) {
|
||||
filtered = filtered
|
||||
.where((item) =>
|
||||
item.title.toLowerCase().contains(query.toLowerCase()) ||
|
||||
item.description.toLowerCase().contains(query.toLowerCase()))
|
||||
.toList();
|
||||
}
|
||||
|
||||
monthlyItems = _applyFilters(filtered);
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
|
@ -148,4 +195,45 @@ class MonthlyListState extends CoreProvier {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void resetFilters([bool notify = true]) {
|
||||
startDate = null;
|
||||
endDate = null;
|
||||
selectedCats.clear();
|
||||
filtering = false;
|
||||
if (notify) {
|
||||
fetchMonthlyList();
|
||||
}
|
||||
}
|
||||
|
||||
List<MonthlyItem> _applyFilters(List<MonthlyItem> items) {
|
||||
var filtered = items;
|
||||
|
||||
if (startDate != null || endDate != null) {
|
||||
filtered = filtered.where((item) {
|
||||
final itemDate = DateTime.parse(item.publishedAt);
|
||||
|
||||
if (startDate != null) {
|
||||
final start = DateTime.parse(startDate!);
|
||||
if (itemDate.isBefore(start)) return false;
|
||||
}
|
||||
|
||||
if (endDate != null) {
|
||||
final end = DateTime.parse(endDate!).add(const Duration(days: 1));
|
||||
if (itemDate.isAfter(end)) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
if (selectedCats.isNotEmpty) {
|
||||
filtered = filtered.where((item) {
|
||||
return item.tags
|
||||
.any((tag) => selectedCats.any((cat) => cat.id == tag.id));
|
||||
}).toList();
|
||||
}
|
||||
|
||||
return filtered;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import 'package:didvan/models/view/action_sheet_data.dart';
|
|||
import 'package:didvan/utils/action_sheet.dart';
|
||||
import 'package:didvan/views/news/news_state.dart';
|
||||
import 'package:didvan/views/widgets/date_picker_button.dart';
|
||||
import 'package:didvan/views/widgets/didvan/checkbox.dart';
|
||||
import 'package:didvan/views/widgets/didvan/scaffold.dart';
|
||||
import 'package:didvan/views/widgets/home_app_bar.dart';
|
||||
import 'package:didvan/views/widgets/item_title.dart';
|
||||
|
|
@ -70,8 +71,7 @@ class _NewsState extends State<News> {
|
|||
style: theme.textTheme.headlineSmall?.copyWith(
|
||||
color: const Color.fromARGB(255, 0, 53, 70),
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 19
|
||||
),
|
||||
fontSize: 19),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
|
|
@ -99,7 +99,8 @@ class _NewsState extends State<News> {
|
|||
childCount: min(state.visibleCount, state.news.length) +
|
||||
(_hasMoreItems(state) ? 1 : 0),
|
||||
builder: (context, state, index) {
|
||||
final currentDisplayCount = min(state.visibleCount, state.news.length);
|
||||
final currentDisplayCount =
|
||||
min(state.visibleCount, state.news.length);
|
||||
|
||||
if (index == currentDisplayCount && _hasMoreItems(state)) {
|
||||
return _buildLoadMoreButton(context, state);
|
||||
|
|
@ -122,7 +123,8 @@ class _NewsState extends State<News> {
|
|||
onLikedChanged: state.onLikedChanged,
|
||||
);
|
||||
},
|
||||
enableEmptyState: state.news.isEmpty && state.appState != AppState.busy,
|
||||
enableEmptyState:
|
||||
state.news.isEmpty && state.appState != AppState.busy,
|
||||
emptyState: EmptyResult(
|
||||
onNewSearch: () => _focusNode.requestFocus(),
|
||||
),
|
||||
|
|
@ -134,11 +136,13 @@ class _NewsState extends State<News> {
|
|||
}
|
||||
|
||||
bool _hasMoreItems(NewsState state) {
|
||||
return state.news.length > state.visibleCount || state.page < state.lastPage;
|
||||
return state.news.length > state.visibleCount ||
|
||||
state.page < state.lastPage;
|
||||
}
|
||||
|
||||
Widget _buildLoadMoreButton(BuildContext context, NewsState state) {
|
||||
if (state.appState == AppState.busy && state.news.length <= state.visibleCount) {
|
||||
if (state.appState == AppState.busy &&
|
||||
state.news.length <= state.visibleCount) {
|
||||
return const Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
|
|
@ -166,7 +170,8 @@ class _NewsState extends State<News> {
|
|||
children: [
|
||||
SvgPicture.asset(
|
||||
'lib/assets/icons/element-plus.svg',
|
||||
colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||
colorFilter:
|
||||
const ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||
width: 20,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
|
|
@ -209,7 +214,9 @@ class _NewsState extends State<News> {
|
|||
confrimTitle: 'نمایش نتایج',
|
||||
onDismissed: state.resetFilters,
|
||||
onConfirmed: () => state.getNews(page: 1),
|
||||
content: Column(
|
||||
content: StatefulBuilder(
|
||||
builder: (context, setState) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ItemTitle(
|
||||
|
|
@ -218,8 +225,7 @@ class _NewsState extends State<News> {
|
|||
icon: DidvanIcons.calendar_range_regular,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
StatefulBuilder(
|
||||
builder: (context, setState) => Row(
|
||||
Row(
|
||||
children: [
|
||||
DatePickerButton(
|
||||
initialValue: state.startDate,
|
||||
|
|
@ -238,9 +244,40 @@ class _NewsState extends State<News> {
|
|||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 28),
|
||||
ItemTitle(
|
||||
title: 'دسته بندی',
|
||||
icon: DidvanIcons.category_regular,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Wrap(
|
||||
children: [
|
||||
for (var i = 0; i < state.categories.length; i++)
|
||||
SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 40) / 2,
|
||||
child: DidvanCheckbox(
|
||||
title: state.categories[i].label,
|
||||
value: state.selectedCats
|
||||
.any((cat) => cat.id == state.categories[i].id),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
if (value) {
|
||||
state.selectedCats.add(state.categories[i]);
|
||||
} else {
|
||||
state.selectedCats.removeWhere(
|
||||
(cat) => cat.id == state.categories[i].id);
|
||||
}
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import 'package:didvan/constants/assets.dart';
|
||||
import 'package:didvan/models/category.dart';
|
||||
import 'package:didvan/models/enums.dart';
|
||||
import 'package:didvan/models/overview_data.dart';
|
||||
import 'package:didvan/models/requests/news.dart';
|
||||
|
|
@ -13,7 +15,8 @@ class NewsState extends CoreProvier {
|
|||
int page = 1;
|
||||
int lastPage = 0;
|
||||
int visibleCount = 4;
|
||||
|
||||
final List<CategoryData> selectedCats = [];
|
||||
List<CategoryData> categories = [];
|
||||
final List<OverviewData> news = [];
|
||||
|
||||
void init() {
|
||||
|
|
@ -25,6 +28,39 @@ class NewsState extends CoreProvier {
|
|||
getNews(page: 1);
|
||||
});
|
||||
visibleCount = 4;
|
||||
|
||||
categories = [
|
||||
CategoryData(
|
||||
id: 1,
|
||||
label: 'اقتصادی',
|
||||
asset: Assets.economicCategoryIcon,
|
||||
),
|
||||
CategoryData(
|
||||
id: 2,
|
||||
label: 'سیاسی',
|
||||
asset: Assets.politicalCategoryIcon,
|
||||
),
|
||||
CategoryData(
|
||||
id: 3,
|
||||
label: 'فناوری',
|
||||
asset: Assets.techCategoryIcon,
|
||||
),
|
||||
CategoryData(
|
||||
id: 4,
|
||||
label: 'کسب و کار',
|
||||
asset: Assets.businessCategoryIcon,
|
||||
),
|
||||
CategoryData(
|
||||
id: 5,
|
||||
label: 'زیستمحیطی',
|
||||
asset: Assets.enviromentalCategoryIcon,
|
||||
),
|
||||
CategoryData(
|
||||
id: 6,
|
||||
label: 'اجتماعی',
|
||||
asset: Assets.socialCategoryIcon,
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
void resetFilters() {
|
||||
|
|
@ -63,6 +99,7 @@ class NewsState extends CoreProvier {
|
|||
startDate: startDate?.split(' ').first,
|
||||
endDate: endDate?.split(' ').first,
|
||||
search: search == '' ? null : search,
|
||||
categories: selectedCats.map((e) => e.id).toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
@ -93,5 +130,6 @@ class NewsState extends CoreProvier {
|
|||
}
|
||||
}
|
||||
|
||||
bool get isFiltering => startDate != null || endDate != null;
|
||||
bool get isFiltering =>
|
||||
startDate != null || endDate != null || selectedCats.isNotEmpty;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -281,8 +281,7 @@ class _NotificationSettingsState extends State<NotificationSettings>
|
|||
isDisabled: state.isAnytime,
|
||||
onTimeChanged: (newTime) {
|
||||
state.selectedTime = newTime;
|
||||
state
|
||||
.update(); // بهروزرسانی state برای اعمال تغییرات در انیمیشن و UI
|
||||
state.update();
|
||||
},
|
||||
),
|
||||
// Padding(
|
||||
|
|
|
|||
|
|
@ -27,12 +27,10 @@ class _PdfViewerPageState extends State<PdfViewerPage> {
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// Add access token to URL if needed
|
||||
_fullPdfUrl = widget.pdfUrl.contains('?')
|
||||
? 'https://api.didvan.app${widget.pdfUrl}'
|
||||
: 'https://api.didvan.app${widget.pdfUrl}';
|
||||
|
||||
// Debug: Print the PDF URL
|
||||
if (kDebugMode) {
|
||||
print('Original PDF URL: ${widget.pdfUrl}');
|
||||
print('Full PDF URL : $_fullPdfUrl');
|
||||
|
|
@ -103,9 +101,9 @@ class _PdfViewerPageState extends State<PdfViewerPage> {
|
|||
color: Colors.red,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
DidvanText(
|
||||
const DidvanText(
|
||||
'خطا در بارگذاری PDF',
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -133,8 +133,8 @@ class _DirectListState extends State<DirectList>
|
|||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
const Color.fromARGB(255, 0, 126, 167),
|
||||
),
|
||||
shape:
|
||||
MaterialStateProperty.all<RoundedRectangleBorder>(
|
||||
shape: MaterialStateProperty.all<
|
||||
RoundedRectangleBorder>(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
|
|
@ -146,7 +146,9 @@ class _DirectListState extends State<DirectList>
|
|||
arguments: {'type': 'پشتیبانی اپلیکیشن'},
|
||||
).then((value) {
|
||||
if (mounted) {
|
||||
context.read<DirectListState>().getDirectsList();
|
||||
context
|
||||
.read<DirectListState>()
|
||||
.getDirectsList();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// ignore_for_file: deprecated_member_use
|
||||
|
||||
import 'package:didvan/constants/assets.dart';
|
||||
import 'package:didvan/config/theme_data.dart';
|
||||
import 'package:didvan/routes/routes.dart';
|
||||
|
|
@ -5,7 +7,6 @@ import 'package:didvan/views/widgets/search_field.dart';
|
|||
import 'package:didvan/views/home/home_state.dart';
|
||||
import 'package:didvan/utils/action_sheet.dart';
|
||||
import 'package:didvan/models/view/action_sheet_data.dart';
|
||||
import 'package:didvan/constants/app_icons.dart';
|
||||
import 'package:didvan/views/widgets/didvan/checkbox.dart';
|
||||
import 'package:didvan/views/widgets/item_title.dart';
|
||||
import 'package:didvan/views/widgets/date_picker_button.dart';
|
||||
|
|
@ -148,7 +149,7 @@ class HomeAppBar extends StatelessWidget {
|
|||
if (onFilterPressed != null) {
|
||||
onFilterPressed!();
|
||||
} else {
|
||||
_showFilterBottomSheet(context);
|
||||
showFilterBottomSheet(context);
|
||||
}
|
||||
},
|
||||
isFiltered: isFiltered ?? homeState?.filtering ?? false,
|
||||
|
|
@ -167,12 +168,17 @@ class HomeAppBar extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
|
||||
Future<void> _showFilterBottomSheet(BuildContext context) async {
|
||||
Future<void> showFilterBottomSheet(BuildContext context) async {
|
||||
final state = Provider.of<HomeState>(context, listen: false);
|
||||
|
||||
ActionSheetUtils(context).showBottomSheet(
|
||||
data: ActionSheetData(
|
||||
titleIcon: DidvanIcons.filter_regular,
|
||||
title: 'فیلتر جستجو',
|
||||
titleIconWidget: SvgPicture.asset(
|
||||
'lib/assets/icons/document-filter.svg',
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
dismissTitle: 'حذف فیلتر',
|
||||
confrimTitle: 'نمایش نتایج',
|
||||
onDismissed: () => state.resetFilters(false),
|
||||
|
|
@ -180,11 +186,15 @@ class HomeAppBar extends StatelessWidget {
|
|||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (state.currentPageIndex != 3) ...[
|
||||
if (state.currentPageIndex != 9) ...[
|
||||
ItemTitle(
|
||||
title: 'تاریخ ایجاد',
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
icon: DidvanIcons.calendar_range_regular,
|
||||
title: 'تاریخ',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
iconWidget: 'lib/assets/icons/calendar.svg',
|
||||
color: const Color.fromARGB(255, 27, 60, 89),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
StatefulBuilder(
|
||||
|
|
@ -211,8 +221,12 @@ class HomeAppBar extends StatelessWidget {
|
|||
],
|
||||
ItemTitle(
|
||||
title: 'دسته بندی',
|
||||
icon: DidvanIcons.category_regular,
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium
|
||||
?.copyWith(fontWeight: FontWeight.bold),
|
||||
iconWidget: 'lib/assets/icons/ion_extension-puzzle-outline.svg',
|
||||
color: const Color.fromARGB(255, 27, 60, 89),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Wrap(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import 'package:didvan/config/theme_data.dart';
|
||||
import 'package:didvan/constants/app_icons.dart'; // <-- این خط اضافه شد
|
||||
import 'package:didvan/constants/app_icons.dart';
|
||||
import 'package:didvan/constants/assets.dart';
|
||||
import 'package:didvan/models/ai/ai_chat_args.dart';
|
||||
import 'package:didvan/providers/user.dart';
|
||||
|
|
@ -276,18 +276,18 @@ class _HistoryDrawerContentState extends State<HistoryDrawerContent> {
|
|||
|
||||
String _getMonthName(int month) {
|
||||
const monthNames = [
|
||||
'فروردین', // 1
|
||||
'اردیبهشت', // 2
|
||||
'خرداد', // 3
|
||||
'تیر', // 4
|
||||
'مرداد', // 5
|
||||
'شهریور', // 6
|
||||
'مهر', // 7
|
||||
'آبان', // 8
|
||||
'آذر', // 9
|
||||
'دی', // 10
|
||||
'بهمن', // 11
|
||||
'اسفند', // 12
|
||||
'فروردین',
|
||||
'اردیبهشت',
|
||||
'خرداد',
|
||||
'تیر',
|
||||
'مرداد',
|
||||
'شهریور',
|
||||
'مهر',
|
||||
'آبان',
|
||||
'آذر',
|
||||
'دی',
|
||||
'بهمن',
|
||||
'اسفند',
|
||||
];
|
||||
|
||||
if (month >= 1 && month <= 12) {
|
||||
|
|
@ -298,9 +298,7 @@ class _HistoryDrawerContentState extends State<HistoryDrawerContent> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// --- اضافه شد ---
|
||||
final theme = Theme.of(context);
|
||||
// --- ---
|
||||
|
||||
return Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
|
|
@ -429,21 +427,20 @@ class _HistoryDrawerContentState extends State<HistoryDrawerContent> {
|
|||
],
|
||||
),
|
||||
),
|
||||
// --- شروع کد اضافه شده ---
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 30.0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
// بستن دراور
|
||||
Navigator.pop(context);
|
||||
// نویگیت به صفحه آرشیو
|
||||
Navigator.of(context).pushNamed(Routes.aiArchivedHistory);
|
||||
Navigator.of(context)
|
||||
.pushNamed(Routes.aiArchivedHistory);
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
'lib/assets/icons/direct-inbox.svg',
|
||||
color: const Color.fromARGB(255, 61, 61, 61),
|
||||
color:
|
||||
const Color.fromARGB(255, 61, 61, 61),
|
||||
height: 20,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
|
|
@ -459,7 +456,6 @@ class _HistoryDrawerContentState extends State<HistoryDrawerContent> {
|
|||
),
|
||||
),
|
||||
),
|
||||
// --- پایان کد اضافه شده ---
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
import 'package:didvan/config/theme_data.dart';
|
||||
import 'package:didvan/views/widgets/didvan/text.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
|
||||
class ItemTitle extends StatelessWidget {
|
||||
final String title;
|
||||
final TextStyle? style;
|
||||
final IconData? icon;
|
||||
final Color? color;
|
||||
final String? iconWidget;
|
||||
|
||||
const ItemTitle({
|
||||
Key? key,
|
||||
|
|
@ -14,6 +16,7 @@ class ItemTitle extends StatelessWidget {
|
|||
this.icon,
|
||||
this.color,
|
||||
this.style,
|
||||
this.iconWidget,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -23,9 +26,11 @@ class ItemTitle extends StatelessWidget {
|
|||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (iconWidget != null)
|
||||
SvgPicture.asset(iconWidget!, color: color),
|
||||
if (icon != null)
|
||||
Icon(icon, color: color ?? Theme.of(context).colorScheme.title),
|
||||
if (icon != null) const SizedBox(width: 4),
|
||||
if (iconWidget != null || icon != null) const SizedBox(width: 4),
|
||||
DidvanText(
|
||||
title,
|
||||
style: style ?? Theme.of(context).textTheme.titleMedium,
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ class SearchAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||
void _onChanged(String value, BuildContext context) {
|
||||
final state = context.read<HomeState>();
|
||||
|
||||
// Use the improved search functionality from HomeState
|
||||
if (value.length >= 2) {
|
||||
state.onSearchChanged(value);
|
||||
} else if (value.isEmpty) {
|
||||
|
|
@ -90,7 +89,7 @@ class SearchAppBar extends StatelessWidget implements PreferredSizeWidget {
|
|||
content: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (state.currentPageIndex != 3) ...[
|
||||
if (state.currentPageIndex != 9) ...[
|
||||
ItemTitle(
|
||||
title: 'تاریخ ایجاد',
|
||||
style: Theme.of(context).textTheme.bodyMedium,
|
||||
|
|
|
|||
Loading…
Reference in New Issue