Merge branch 'desktop' into staging
6
assets/svg/Button.svg
Normal file
After Width: | Height: | Size: 8 KiB |
3
assets/svg/about-desktop.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M3.44444 2.21973C2.09618 2.21973 1 3.31591 1 4.66417V15.6642C1 17.0124 2.09618 18.1086 3.44444 18.1086H10.1667L9.75799 19.3308H7.11111C6.43507 19.3308 5.88889 19.877 5.88889 20.5531C5.88889 21.2291 6.43507 21.7753 7.11111 21.7753H16.8889C17.5649 21.7753 18.1111 21.2291 18.1111 20.5531C18.1111 19.877 17.5649 19.3308 16.8889 19.3308H14.242L13.8333 18.1086H20.5556C21.9038 18.1086 23 17.0124 23 15.6642V4.66417C23 3.31591 21.9038 2.21973 20.5556 2.21973H3.44444ZM20.5556 4.66417V13.2197H3.44444V4.66417H20.5556Z" fill="#232323"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 641 B |
3
assets/svg/address-book-desktop.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M16.8242 1H4.44922C2.93027 1 1.69922 2.23105 1.69922 3.75V20.25C1.69922 21.7689 2.93027 23 4.44922 23H16.8242C18.3432 23 19.5742 21.7689 19.5742 20.25V3.75C19.5742 2.23105 18.341 1 16.8242 1ZM10.6367 6.5C12.1557 6.5 13.3867 7.73105 13.3867 9.25C13.3867 10.7689 12.1557 12 10.6367 12C9.1182 12 7.88672 10.7689 7.88672 9.25C7.88672 7.73105 9.11992 6.5 10.6367 6.5ZM14.7617 17.5H6.51172C6.13359 17.5 5.82422 17.1906 5.82422 16.8125C5.82422 14.9133 7.3625 13.375 9.26172 13.375H12.0117C13.9101 13.375 15.4492 14.9141 15.4492 16.8125C15.4492 17.1906 15.1398 17.5 14.7617 17.5ZM21.6367 3.75H20.9492V7.875H21.6367C22.0148 7.875 22.3242 7.56563 22.3242 7.1875V4.4375C22.3242 4.05766 22.0148 3.75 21.6367 3.75ZM21.6367 9.25H20.9492V13.375H21.6367C22.0148 13.375 22.3242 13.0656 22.3242 12.6875V9.9375C22.3242 9.55937 22.0148 9.25 21.6367 9.25ZM21.6367 14.75H20.9492V18.875H21.6367C22.0164 18.875 22.3242 18.5672 22.3242 18.1875V15.4375C22.3242 15.0594 22.0148 14.75 21.6367 14.75Z" fill="#232323"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
24
assets/svg/dark/dark-theme.svg
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<svg width="200" height="162" viewBox="0 0 200 162" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_5863_29353)">
|
||||||
|
<rect width="200" height="162" rx="8" fill="#2A2D34"/>
|
||||||
|
<rect x="10" y="10" width="180" height="20" rx="2" fill="#444953"/>
|
||||||
|
<rect x="16" y="16" width="106" height="8" rx="1" fill="#7E8692"/>
|
||||||
|
<rect x="10" y="40" width="180" height="20" rx="2" fill="#333942"/>
|
||||||
|
<rect x="16" y="46" width="106" height="8" rx="1" fill="#575C63"/>
|
||||||
|
<rect x="10" y="62" width="180" height="20" rx="2" fill="#333942"/>
|
||||||
|
<rect x="16" y="68" width="106" height="8" rx="1" fill="#575C63"/>
|
||||||
|
<rect x="10" y="84" width="180" height="20" rx="2" fill="#333942"/>
|
||||||
|
<rect x="16" y="90" width="106" height="8" rx="1" fill="#575C63"/>
|
||||||
|
<rect x="10" y="106" width="180" height="20" rx="2" fill="#333942"/>
|
||||||
|
<rect x="16" y="112" width="106" height="8" rx="1" fill="#575C63"/>
|
||||||
|
<rect x="10" y="128" width="180" height="20" rx="2" fill="#333942"/>
|
||||||
|
<rect x="16" y="134" width="106" height="8" rx="1" fill="#575C63"/>
|
||||||
|
<rect x="10" y="150" width="180" height="20" rx="2" fill="#333942"/>
|
||||||
|
<rect x="16" y="156" width="106" height="8" rx="1" fill="#575C63"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_5863_29353">
|
||||||
|
<rect width="200" height="162" rx="8" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
4
assets/svg/dollar-sign-circle.svg
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
|
||||||
|
<path d="M23.659 10.0005C24.8164 10.0005 25.7475 10.9367 25.7475 12.1005V13.483C26.8701 13.623 27.9926 13.973 29.089 14.2792C30.2029 14.5855 30.8555 15.7405 30.5423 16.8605C30.2377 17.9805 29.089 18.6367 27.9752 18.3217C27.1485 18.0942 26.3218 17.8492 25.4777 17.683C24.2073 17.438 22.7279 17.5517 21.5358 18.0767C20.4654 18.5405 19.5865 19.6605 20.7961 20.4392C21.9448 21.183 23.3893 21.4805 24.6772 21.8567C26.1913 22.2855 28.1144 22.8367 29.5589 23.8255C31.4386 25.1205 32.3175 27.2205 31.8998 29.478C31.5082 31.6567 29.994 33.0917 28.184 33.8267C27.4357 34.133 26.609 34.2467 25.7475 34.4217V35.9005C25.7475 37.0642 24.8164 38.0005 23.659 38.0005C22.5017 38.0005 21.5706 37.0642 21.5706 35.9005L21.4923 34.2117C20.1696 33.8967 18.7947 33.4417 17.4372 32.9955C16.3407 32.628 15.749 31.438 16.1058 30.3442C16.4713 29.2417 17.5764 28.6467 18.7425 29.0055C20.0738 29.443 21.4313 29.968 22.8063 30.178C24.4509 30.423 25.7649 30.2742 26.6264 29.9242C27.7838 29.4605 28.332 28.078 27.2007 27.2905C26.0347 26.4942 24.5379 26.1792 23.2065 25.803C21.7446 25.383 19.9259 24.8667 18.551 23.983C16.6627 22.7667 15.7055 20.7367 16.1145 18.5055C16.4974 16.3792 18.142 14.9705 19.8737 14.218C20.4045 13.9905 20.9788 13.8067 21.4923 13.6667V12.1005C21.4923 10.9367 22.5017 10.0005 23.5807 10.0005H23.659Z" fill="#232323"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
3
assets/svg/exchange-desktop.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M6.69844 6.70024C9.61406 3.78461 14.325 3.77055 17.2594 6.65336L15.3281 8.57993C15.0047 8.90336 14.9109 9.38618 15.0844 9.80805C15.2578 10.2299 15.6703 10.5018 16.125 10.5018H21.7266H22.125C22.7484 10.5018 23.25 10.0002 23.25 9.3768V3.3768C23.25 2.92211 22.9781 2.50961 22.5563 2.33618C22.1344 2.16274 21.6516 2.25649 21.3281 2.57993L19.3781 4.52993C15.2719 0.475238 8.65781 0.489301 4.575 4.5768C3.43125 5.72055 2.60625 7.06586 2.1 8.50492C1.82344 9.28774 2.23594 10.1409 3.01406 10.4174C3.79219 10.694 4.65 10.2815 4.92656 9.50336C5.2875 8.48149 5.87344 7.52055 6.69844 6.70024ZM0.75 14.6268V14.9831V15.0159V20.6268C0.75 21.0815 1.02187 21.494 1.44375 21.6674C1.86562 21.8409 2.34844 21.7471 2.67188 21.4237L4.62187 19.4737C8.72812 23.5284 15.3422 23.5143 19.425 19.4268C20.5688 18.2831 21.3984 16.9377 21.9047 15.5034C22.1812 14.7206 21.7687 13.8674 20.9906 13.5909C20.2125 13.3143 19.3547 13.7268 19.0781 14.5049C18.7172 15.5268 18.1313 16.4877 17.3063 17.3081C14.3906 20.2237 9.67969 20.2377 6.74531 17.3549L8.67188 15.4237C8.99531 15.1002 9.08906 14.6174 8.91562 14.1956C8.74219 13.7737 8.32969 13.5018 7.875 13.5018H2.26875H2.23594H1.875C1.25156 13.5018 0.75 14.0034 0.75 14.6268Z" fill="#232323"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
3
assets/svg/exit-desktop.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="22" height="20" viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M6.875 3.12012C7.63555 3.12012 8.25 2.50566 8.25 1.74512C8.25 0.98457 7.63555 0.370117 6.875 0.370117H4.125C1.84766 0.370117 0 2.21777 0 4.49512V15.4951C0 17.7725 1.84766 19.6201 4.125 19.6201H6.875C7.63555 19.6201 8.25 19.0057 8.25 18.2451C8.25 17.4846 7.63555 16.8701 6.875 16.8701H4.125C3.36445 16.8701 2.75 16.2557 2.75 15.4951V4.49512C2.75 3.73457 3.36445 3.12012 4.125 3.12012H6.875ZM21.6777 10.7428C21.884 10.5494 22 10.2787 22 9.99512C22 9.71152 21.884 9.44082 21.6777 9.24746L15.4902 3.40371C15.1895 3.12012 14.7512 3.04277 14.373 3.20605C13.9949 3.36934 13.75 3.74316 13.75 4.15137V7.24512H8.25C7.48945 7.24512 6.875 7.85957 6.875 8.62012V11.3701C6.875 12.1307 7.48945 12.7451 8.25 12.7451H13.75V15.8389C13.75 16.2514 13.9949 16.6209 14.373 16.7842C14.7512 16.9475 15.1895 16.8701 15.4902 16.5865L21.6777 10.7428Z" fill="#232323"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 954 B |
11
assets/svg/language-circle.svg
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
|
||||||
|
<g clip-path="url(#clip0_5784_28907)">
|
||||||
|
<path d="M29.602 20.0474C30.0832 20.0474 30.477 20.3954 30.477 20.9067V21.0786H33.102C33.5832 21.0786 33.977 21.4267 33.977 21.938C33.977 22.4106 33.5832 22.7974 33.102 22.7974H33.0145L32.9445 22.9907C32.5551 24.0048 31.9601 24.9931 31.2076 25.8009C31.247 25.8224 31.2863 25.8095 31.3257 25.8696L32.1526 26.3552C32.5682 26.6001 32.6995 27.1286 32.4501 27.5368C32.2051 27.945 31.667 28.0739 31.2513 27.829L30.4245 27.3435C30.232 27.2274 30.0001 27.1071 29.8513 26.9782C29.392 27.3005 28.8932 27.5798 28.3682 27.8118L28.2063 27.8806C27.7645 28.0739 27.2482 27.8763 27.0513 27.4423C26.8545 27.0083 27.0557 26.5013 27.4976 26.3079L27.6551 26.2392C27.9351 26.1146 28.2063 25.9384 28.4645 25.8181L27.9351 25.2938C27.5895 24.9587 27.5895 24.4173 27.9351 24.0821C28.2763 23.7427 28.8276 23.7427 29.1688 24.0821L29.8076 24.7052L29.8338 24.6923C30.3763 24.1681 30.8182 23.5149 31.1376 22.7587H26.452C25.9313 22.7587 25.577 22.4106 25.577 21.8993C25.577 21.4267 25.9313 21.0399 26.452 21.0399H28.727V20.8681C28.727 20.3954 29.0813 20.0087 29.602 20.0087V20.0474ZM17.002 23.0208L17.8332 24.8599H16.1313L17.002 23.0208ZM10.002 18.5005C10.002 16.9815 11.2554 15.7505 12.802 15.7505H35.202C36.7463 15.7505 38.002 16.9815 38.002 18.5005V29.5005C38.002 31.0173 36.7463 32.2505 35.202 32.2505H12.802C11.2554 32.2505 10.002 31.0173 10.002 29.5005V18.5005ZM24.002 29.5005H35.202V18.5005H24.002V29.5005ZM17.8026 20.5587C17.6626 20.2493 17.3476 20.0474 17.002 20.0474C16.6563 20.0474 16.3413 20.2493 16.2013 20.5587L13.4022 26.7462C13.2062 27.1415 13.4048 27.6872 13.8467 27.8806C14.2881 28.0739 14.8057 27.8763 15.0026 27.4423L15.392 26.5399H18.612L19.0013 27.4423C19.1982 27.8763 19.7145 28.0739 20.1563 27.8806C20.5982 27.6872 20.7995 27.1415 20.6026 26.7462L17.8026 20.5587Z" fill="#232323"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_5784_28907">
|
||||||
|
<rect width="28" height="22" fill="white" transform="translate(10.002 13.0005)"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
24
assets/svg/light/light-mode.svg
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<svg width="200" height="162" viewBox="0 0 200 162" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_5887_94222)">
|
||||||
|
<rect width="200" height="162" rx="8" fill="#E8EAEC"/>
|
||||||
|
<rect x="10" y="10" width="180" height="20" rx="2" fill="#DBDDE1"/>
|
||||||
|
<rect x="16" y="16" width="106" height="8" rx="1" fill="#C4C8CC"/>
|
||||||
|
<rect x="10" y="40" width="180" height="20" rx="2" fill="#FEFEFE"/>
|
||||||
|
<rect x="16" y="46" width="106" height="8" rx="1" fill="#C4C8CC"/>
|
||||||
|
<rect x="10" y="62" width="180" height="20" rx="2" fill="#FEFEFE"/>
|
||||||
|
<rect x="16" y="68" width="106" height="8" rx="1" fill="#C4C8CC"/>
|
||||||
|
<rect x="10" y="84" width="180" height="20" rx="2" fill="#FEFEFE"/>
|
||||||
|
<rect x="16" y="90" width="106" height="8" rx="1" fill="#C4C8CC"/>
|
||||||
|
<rect x="10" y="106" width="180" height="20" rx="2" fill="#FEFEFE"/>
|
||||||
|
<rect x="16" y="112" width="106" height="8" rx="1" fill="#C4C8CC"/>
|
||||||
|
<rect x="10" y="128" width="180" height="20" rx="2" fill="#FEFEFE"/>
|
||||||
|
<rect x="16" y="134" width="106" height="8" rx="1" fill="#C4C8CC"/>
|
||||||
|
<rect x="10" y="150" width="180" height="20" rx="2" fill="#FEFEFE"/>
|
||||||
|
<rect x="16" y="156" width="106" height="8" rx="1" fill="#C4C8CC"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_5887_94222">
|
||||||
|
<rect width="200" height="162" rx="8" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
11
assets/svg/lock-circle.svg
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
|
||||||
|
<g clip-path="url(#clip0_5764_28774)">
|
||||||
|
<path d="M24 10.9995C28.2589 10.9995 31.7143 14.254 31.7143 18.2687V20.6918H32.5714C34.4625 20.6918 36 22.1406 36 23.9226V33.6149C36 35.3969 34.4625 36.8457 32.5714 36.8457H15.4286C13.5348 36.8457 12 35.3969 12 33.6149V23.9226C12 22.1406 13.5348 20.6918 15.4286 20.6918H16.2857V18.2687C16.2857 14.254 19.7411 10.9995 24 10.9995ZM24 14.2303C21.6321 14.2303 19.7143 16.0385 19.7143 18.2687V20.6918H28.2857V18.2687C28.2857 16.0385 26.3679 14.2303 24 14.2303ZM25.7143 27.1534C25.7143 26.2598 24.9482 25.538 24 25.538C23.0518 25.538 22.2857 26.2598 22.2857 27.1534V30.3841C22.2857 31.2776 23.0518 31.9995 24 31.9995C24.9482 31.9995 25.7143 31.2776 25.7143 30.3841V27.1534Z" fill="#232323"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_5764_28774">
|
||||||
|
<rect width="24" height="25.8462" fill="white" transform="translate(12 10.9995)"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1 KiB |
4
assets/svg/node-circle.svg
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
|
||||||
|
<path d="M34.5 25.5H13.5C12.6741 25.5 12 26.1741 12 27V33C12 33.8259 12.6741 34.5 13.5 34.5H34.5C35.3259 34.5 36 33.8259 36 33V27C36 26.175 35.325 25.5 34.5 25.5ZM28.5 31.125C27.8789 31.125 27.375 30.6211 27.375 30C27.375 29.3789 27.8789 28.875 28.5 28.875C29.1211 28.875 29.625 29.3789 29.625 30C29.625 30.6211 29.1234 31.125 28.5 31.125ZM31.5 31.125C30.8789 31.125 30.375 30.6211 30.375 30C30.375 29.3789 30.8789 28.875 31.5 28.875C32.1211 28.875 32.625 29.3789 32.625 30C32.625 30.6211 32.1234 31.125 31.5 31.125ZM34.5 13.5H13.5C12.6741 13.5 12 14.1741 12 15V21C12 21.8259 12.6741 22.5 13.5 22.5H34.5C35.3259 22.5 36 21.8259 36 21V15C36 14.1741 35.325 13.5 34.5 13.5ZM28.5 19.125C27.8789 19.125 27.375 18.6211 27.375 18C27.375 17.3789 27.8813 16.875 28.5 16.875C29.1187 16.875 29.625 17.3812 29.625 18C29.625 18.6188 29.1234 19.125 28.5 19.125ZM31.5 19.125C30.8789 19.125 30.375 18.6211 30.375 18C30.375 17.3789 30.8813 16.875 31.5 16.875C32.1187 16.875 32.625 17.3812 32.625 18C32.625 18.6188 32.1234 19.125 31.5 19.125Z" fill="#232323"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
4
assets/svg/rotate-circle.svg
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
|
||||||
|
<path d="M32.25 17.5031V15.75C32.25 14.9217 32.9203 14.25 33.75 14.25C34.5797 14.25 35.25 14.9217 35.25 15.75V21C35.25 21.8297 34.5797 22.5 33.75 22.5H32.5219C32.4984 22.5 32.475 22.5 32.4516 22.5H28.5C27.6703 22.5 27 21.8297 27 21C27 20.1703 27.6703 19.5 28.5 19.5H30C28.6313 17.6766 26.4516 16.5 23.9578 16.5C20.7375 16.5 17.9578 18.5859 16.9266 21.5016C16.6505 22.2797 15.7931 22.6922 15.0122 22.4156C14.2313 22.1391 13.8216 21.2391 14.0977 20.4984C15.5386 16.4241 19.425 13.5 23.9578 13.5C27.3469 13.5 30.2859 15.0666 32.25 17.5031ZM14.25 33.75C13.4217 33.75 12.75 33.0797 12.75 32.25V27C12.75 26.1703 13.4217 25.5 14.25 25.5H19.5C20.3297 25.5 21 26.1703 21 27C21 27.8297 20.3297 28.5 19.5 28.5H17.9578C19.3687 30.3234 21.5484 31.5 24 31.5C27.2625 31.5 30.0422 29.4141 31.0734 26.4984C31.35 25.7203 32.2078 25.3078 32.9859 25.5844C33.7688 25.8609 34.1766 26.7188 33.9 27.5016C32.4609 31.575 28.575 34.5 24 34.5C20.6531 34.5 17.6719 32.9344 15.75 30.4969V32.25C15.75 33.0797 15.0783 33.75 14.25 33.75Z" fill="#232323"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
11
assets/svg/sun-circle.svg
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="48" height="48" rx="24" fill="#E0E3E3"/>
|
||||||
|
<g clip-path="url(#clip0_5813_29015)">
|
||||||
|
<path d="M16.5734 18.4328C16.8289 18.6892 17.1657 18.8173 17.5015 18.8173C17.8373 18.8173 18.1758 18.6898 18.4328 18.4328C18.9455 17.9201 18.9455 17.0897 18.4328 16.5773L15.9555 14.0999C15.4445 13.5872 14.6123 13.5872 14.0994 14.0999C13.5864 14.6126 13.5867 15.443 14.0994 15.956L16.5734 18.4328ZM24 16.125C24.7246 16.125 25.3125 15.5371 25.3125 14.8125V11.3125C25.3125 10.5879 24.7273 10 24 10C23.2727 10 22.6875 10.5879 22.6875 11.3125V14.8125C22.6875 15.5398 23.2781 16.125 24 16.125ZM16.125 24C16.125 23.2754 15.5371 22.6875 14.8125 22.6875H11.3125C10.5879 22.6875 10 23.2781 10 24C10 24.7219 10.5879 25.3125 11.3125 25.3125H14.8125C15.5398 25.3125 16.125 24.7273 16.125 24ZM30.4969 18.8156C30.8327 18.8156 31.1695 18.6874 31.4249 18.4311L33.8995 15.9549C34.4122 15.4422 34.4122 14.6117 33.8995 14.0988C33.3868 13.5858 32.5548 13.5861 32.0434 14.0988L29.5688 16.575C29.0561 17.0877 29.0561 17.9181 29.5688 18.4306C29.8242 18.6898 30.1633 18.8156 30.4969 18.8156ZM24 31.875C23.2754 31.875 22.6875 32.4629 22.6875 33.1875V36.6875C22.6875 37.4148 23.2781 38 24 38C24.7219 38 25.3125 37.4121 25.3125 36.6875V33.1875C25.3125 32.4656 24.7273 31.875 24 31.875ZM16.5734 29.5672L14.0988 32.0434C13.5861 32.5561 13.5861 33.3866 14.0988 33.8995C14.3552 34.1559 14.6911 34.284 15.0269 34.284C15.3627 34.284 15.6995 34.1559 15.9549 33.8995L18.4295 31.4233C18.9422 30.9106 18.9422 30.0802 18.4295 29.5677C17.9168 29.0553 17.0875 29.0531 16.5734 29.5672ZM36.6875 22.6875H33.1875C32.4629 22.6875 31.875 23.2754 31.875 24C31.875 24.7246 32.4629 25.3125 33.1875 25.3125H36.6875C37.4148 25.3125 38 24.7273 38 24C38 23.2727 37.4148 22.6875 36.6875 22.6875ZM31.4266 29.5672C30.9156 29.0545 30.0834 29.0547 29.5705 29.5674C29.0575 30.0801 29.0578 30.9105 29.5705 31.4229L32.0451 33.8992C32.3006 34.1555 32.6373 34.2837 32.9731 34.2837C33.3089 34.2837 33.6447 34.1555 33.9012 33.8992C34.4139 33.3865 34.4139 32.556 33.9012 32.0431L31.4266 29.5672ZM24 17.875C20.6148 17.875 17.875 20.6148 17.875 24C17.875 27.383 20.617 30.125 24 30.125C27.383 30.125 30.125 27.383 30.125 24C30.125 20.6148 27.3852 17.875 24 17.875Z" fill="#232323"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_5813_29015">
|
||||||
|
<rect width="28" height="28" fill="white" transform="translate(10 10)"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
3
assets/svg/wallet-desktop.svg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M20.25 2.83008C21.0105 2.83008 21.625 3.4165 21.625 4.1396C21.625 4.8627 21.0105 5.44913 20.25 5.44913H4.4375C4.05766 5.44913 3.75 5.74377 3.75 6.10389C3.75 6.46401 4.05766 6.75865 4.4375 6.75865H20.25C21.7668 6.75865 23 7.93313 23 9.3777V18.5444C23 19.9889 21.7668 21.1634 20.25 21.1634H3.75C2.23105 21.1634 1 19.9889 1 18.5444V5.44913C1 4.00251 2.23105 2.83008 3.75 2.83008H20.25ZM18.875 15.2706C19.6355 15.2706 20.25 14.6854 20.25 13.961C20.25 13.2367 19.6355 12.6515 18.875 12.6515C18.1145 12.6515 17.5 13.2367 17.5 13.961C17.5 14.6854 18.1145 15.2706 18.875 15.2706Z" fill="#232323"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 702 B |
|
@ -68,6 +68,9 @@ final openedFromSWBFileStringStateProvider =
|
||||||
void main() async {
|
void main() async {
|
||||||
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||||
GoogleFonts.config.allowRuntimeFetching = false;
|
GoogleFonts.config.allowRuntimeFetching = false;
|
||||||
|
if(Platform.isIOS){
|
||||||
|
Util.libraryPath = await getLibraryDirectory();
|
||||||
|
}
|
||||||
|
|
||||||
if (Util.isDesktop) {
|
if (Util.isDesktop) {
|
||||||
setWindowTitle('Stack Wallet');
|
setWindowTitle('Stack Wallet');
|
||||||
|
|
|
@ -90,6 +90,8 @@ class _AddWalletViewState extends State<AddWalletView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _searchFieldController,
|
controller: _searchFieldController,
|
||||||
focusNode: _searchFocusNode,
|
focusNode: _searchFocusNode,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
|
|
|
@ -194,6 +194,8 @@ class _NameYourWalletViewState extends ConsumerState<NameYourWalletView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
onChanged: (string) {
|
onChanged: (string) {
|
||||||
if (string.isEmpty) {
|
if (string.isEmpty) {
|
||||||
if (_nextEnabled) {
|
if (_nextEnabled) {
|
||||||
|
|
|
@ -7,6 +7,8 @@ import 'package:stackwallet/utilities/constants.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class MobileMnemonicLengthSelector extends ConsumerWidget {
|
class MobileMnemonicLengthSelector extends ConsumerWidget {
|
||||||
const MobileMnemonicLengthSelector({
|
const MobileMnemonicLengthSelector({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -19,7 +21,9 @@ class MobileMnemonicLengthSelector extends ConsumerWidget {
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
const TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
// controller: _lengthController,
|
// controller: _lengthController,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
textInputAction: TextInputAction.none,
|
textInputAction: TextInputAction.none,
|
||||||
|
|
|
@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class RestoreFromDatePicker extends StatefulWidget {
|
class RestoreFromDatePicker extends StatefulWidget {
|
||||||
const RestoreFromDatePicker({
|
const RestoreFromDatePicker({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -35,6 +37,8 @@ class _RestoreFromDatePickerState extends State<RestoreFromDatePicker> {
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
controller: _dateController,
|
controller: _dateController,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
|
|
|
@ -21,6 +21,8 @@ import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class AddressBookView extends ConsumerStatefulWidget {
|
class AddressBookView extends ConsumerStatefulWidget {
|
||||||
const AddressBookView({Key? key, this.coin}) : super(key: key);
|
const AddressBookView({Key? key, this.coin}) : super(key: key);
|
||||||
|
|
||||||
|
@ -198,6 +200,8 @@ class _AddressBookViewState extends ConsumerState<AddressBookView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _searchController,
|
controller: _searchController,
|
||||||
focusNode: _searchFocusNode,
|
focusNode: _searchFocusNode,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
|
|
|
@ -22,6 +22,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class AddAddressBookEntryView extends ConsumerStatefulWidget {
|
class AddAddressBookEntryView extends ConsumerStatefulWidget {
|
||||||
const AddAddressBookEntryView({
|
const AddAddressBookEntryView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -279,6 +281,8 @@ class _AddAddressBookEntryViewState
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: nameController,
|
controller: nameController,
|
||||||
focusNode: nameFocusNode,
|
focusNode: nameFocusNode,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
|
|
|
@ -13,6 +13,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class EditContactNameEmojiView extends ConsumerStatefulWidget {
|
class EditContactNameEmojiView extends ConsumerStatefulWidget {
|
||||||
const EditContactNameEmojiView({
|
const EditContactNameEmojiView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -200,6 +202,8 @@ class _EditContactNameEmojiViewState
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: nameController,
|
controller: nameController,
|
||||||
focusNode: nameFocusNode,
|
focusNode: nameFocusNode,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
|
|
|
@ -20,6 +20,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class NewContactAddressEntryForm extends ConsumerStatefulWidget {
|
class NewContactAddressEntryForm extends ConsumerStatefulWidget {
|
||||||
const NewContactAddressEntryForm({
|
const NewContactAddressEntryForm({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -71,6 +73,8 @@ class _NewContactAddressEntryFormState
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
@ -154,6 +158,8 @@ class _NewContactAddressEntryFormState
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
focusNode: addressLabelFocusNode,
|
focusNode: addressLabelFocusNode,
|
||||||
controller: addressLabelController,
|
controller: addressLabelController,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
|
@ -197,6 +203,7 @@ class _NewContactAddressEntryFormState
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
focusNode: addressFocusNode,
|
focusNode: addressFocusNode,
|
||||||
controller: addressController,
|
controller: addressController,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
|
@ -324,7 +331,6 @@ class _NewContactAddressEntryFormState
|
||||||
key: const Key("addAddressBookEntryViewAddressField"),
|
key: const Key("addAddressBookEntryViewAddressField"),
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
autocorrect: false,
|
autocorrect: false,
|
||||||
enableSuggestions: false,
|
|
||||||
// inputFormatters: <TextInputFormatter>[
|
// inputFormatters: <TextInputFormatter>[
|
||||||
// FilteringTextInputFormatter.allow(RegExp("[a-zA-Z0-9]{34}")),
|
// FilteringTextInputFormatter.allow(RegExp("[a-zA-Z0-9]{34}")),
|
||||||
// ],
|
// ],
|
||||||
|
|
|
@ -9,6 +9,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class EditTradeNoteView extends ConsumerStatefulWidget {
|
class EditTradeNoteView extends ConsumerStatefulWidget {
|
||||||
const EditTradeNoteView({
|
const EditTradeNoteView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -85,6 +87,8 @@ class _EditNoteViewState extends ConsumerState<EditTradeNoteView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _noteController,
|
controller: _noteController,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
focusNode: noteFieldFocusNode,
|
focusNode: noteFieldFocusNode,
|
||||||
|
|
|
@ -16,6 +16,8 @@ import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class FixedRateMarketPairCoinSelectionView extends ConsumerStatefulWidget {
|
class FixedRateMarketPairCoinSelectionView extends ConsumerStatefulWidget {
|
||||||
const FixedRateMarketPairCoinSelectionView({
|
const FixedRateMarketPairCoinSelectionView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -152,6 +154,8 @@ class _FixedRateMarketPairCoinSelectionViewState
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _searchController,
|
controller: _searchController,
|
||||||
focusNode: _searchFocusNode,
|
focusNode: _searchFocusNode,
|
||||||
onChanged: filter,
|
onChanged: filter,
|
||||||
|
|
|
@ -13,6 +13,8 @@ import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class FloatingRateCurrencySelectionView extends StatefulWidget {
|
class FloatingRateCurrencySelectionView extends StatefulWidget {
|
||||||
const FloatingRateCurrencySelectionView({
|
const FloatingRateCurrencySelectionView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -108,6 +110,8 @@ class _FloatingRateCurrencySelectionViewState
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _searchController,
|
controller: _searchController,
|
||||||
focusNode: _searchFocusNode,
|
focusNode: _searchFocusNode,
|
||||||
onChanged: filter,
|
onChanged: filter,
|
||||||
|
|
|
@ -19,6 +19,7 @@ import 'package:stackwallet/utilities/enums/flush_bar_type.dart';
|
||||||
import 'package:stackwallet/utilities/logger.dart';
|
import 'package:stackwallet/utilities/logger.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||||
import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
@ -160,6 +161,8 @@ class _GenerateUriQrCodeViewState extends State<GenerateUriQrCodeView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: amountController,
|
controller: amountController,
|
||||||
focusNode: _amountFocusNode,
|
focusNode: _amountFocusNode,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
|
@ -209,6 +212,8 @@ class _GenerateUriQrCodeViewState extends State<GenerateUriQrCodeView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: noteController,
|
controller: noteController,
|
||||||
focusNode: _noteFocusNode,
|
focusNode: _noteFocusNode,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
|
|
|
@ -41,6 +41,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class SendView extends ConsumerStatefulWidget {
|
class SendView extends ConsumerStatefulWidget {
|
||||||
const SendView({
|
const SendView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -885,7 +887,10 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
if (coin == Coin.firo)
|
if (coin == Coin.firo)
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
const TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions:
|
||||||
|
Util.isDesktop ? false : true,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
textInputAction: TextInputAction.none,
|
textInputAction: TextInputAction.none,
|
||||||
),
|
),
|
||||||
|
@ -1061,6 +1066,8 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
height: 8,
|
height: 8,
|
||||||
),
|
),
|
||||||
TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
style: STextStyles.smallMed14(context).copyWith(
|
style: STextStyles.smallMed14(context).copyWith(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.extension<StackColors>()!
|
.extension<StackColors>()!
|
||||||
|
@ -1114,6 +1121,8 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
),
|
),
|
||||||
if (Prefs.instance.externalCalls)
|
if (Prefs.instance.externalCalls)
|
||||||
TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
style: STextStyles.smallMed14(context).copyWith(
|
style: STextStyles.smallMed14(context).copyWith(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.extension<StackColors>()!
|
.extension<StackColors>()!
|
||||||
|
@ -1238,6 +1247,8 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: noteController,
|
controller: noteController,
|
||||||
focusNode: _noteFocusNode,
|
focusNode: _noteFocusNode,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
|
@ -1283,6 +1294,8 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: feeController,
|
controller: feeController,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
textInputAction: TextInputAction.none,
|
textInputAction: TextInputAction.none,
|
||||||
|
|
|
@ -36,6 +36,8 @@ import 'package:stackwallet/pages/settings_views/global_settings_view/stack_back
|
||||||
|
|
||||||
import 'package:stackwallet/utilities/clipboard_interface.dart';
|
import 'package:stackwallet/utilities/clipboard_interface.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class DebugView extends ConsumerStatefulWidget {
|
class DebugView extends ConsumerStatefulWidget {
|
||||||
const DebugView({Key? key}) : super(key: key);
|
const DebugView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@ -228,6 +230,8 @@ class _DebugViewState extends ConsumerState<DebugView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _searchController,
|
controller: _searchController,
|
||||||
focusNode: _searchFocusNode,
|
focusNode: _searchFocusNode,
|
||||||
onChanged: (newString) {
|
onChanged: (newString) {
|
||||||
|
|
|
@ -13,6 +13,8 @@ import 'package:stackwallet/widgets/rounded_container.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class BaseCurrencySettingsView extends ConsumerStatefulWidget {
|
class BaseCurrencySettingsView extends ConsumerStatefulWidget {
|
||||||
const BaseCurrencySettingsView({Key? key}) : super(key: key);
|
const BaseCurrencySettingsView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@ -140,6 +142,8 @@ class _CurrencyViewState extends ConsumerState<BaseCurrencySettingsView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _searchController,
|
controller: _searchController,
|
||||||
focusNode: _searchFocusNode,
|
focusNode: _searchFocusNode,
|
||||||
onChanged: (newString) {
|
onChanged: (newString) {
|
||||||
|
|
|
@ -13,6 +13,8 @@ import 'package:stackwallet/widgets/rounded_container.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class LanguageSettingsView extends ConsumerStatefulWidget {
|
class LanguageSettingsView extends ConsumerStatefulWidget {
|
||||||
const LanguageSettingsView({Key? key}) : super(key: key);
|
const LanguageSettingsView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@ -138,6 +140,8 @@ class _LanguageViewState extends ConsumerState<LanguageSettingsView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _searchController,
|
controller: _searchController,
|
||||||
focusNode: _searchFocusNode,
|
focusNode: _searchFocusNode,
|
||||||
onChanged: (newString) {
|
onChanged: (newString) {
|
||||||
|
|
|
@ -27,6 +27,8 @@ import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
enum AddEditNodeViewType { add, edit }
|
enum AddEditNodeViewType { add, edit }
|
||||||
|
|
||||||
class AddEditNodeView extends ConsumerStatefulWidget {
|
class AddEditNodeView extends ConsumerStatefulWidget {
|
||||||
|
@ -648,6 +650,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
key: const Key("addCustomNodeNodeNameFieldKey"),
|
key: const Key("addCustomNodeNodeNameFieldKey"),
|
||||||
readOnly: widget.readOnly,
|
readOnly: widget.readOnly,
|
||||||
enabled: enableField(_nameController),
|
enabled: enableField(_nameController),
|
||||||
|
@ -695,6 +699,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
key: const Key("addCustomNodeNodeAddressFieldKey"),
|
key: const Key("addCustomNodeNodeAddressFieldKey"),
|
||||||
readOnly: widget.readOnly,
|
readOnly: widget.readOnly,
|
||||||
enabled: enableField(_hostController),
|
enabled: enableField(_hostController),
|
||||||
|
@ -746,6 +752,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
key: const Key("addCustomNodeNodePortFieldKey"),
|
key: const Key("addCustomNodeNodePortFieldKey"),
|
||||||
readOnly: widget.readOnly,
|
readOnly: widget.readOnly,
|
||||||
enabled: enableField(_portController),
|
enabled: enableField(_portController),
|
||||||
|
@ -797,6 +805,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _usernameController,
|
controller: _usernameController,
|
||||||
readOnly: widget.readOnly,
|
readOnly: widget.readOnly,
|
||||||
enabled: enableField(_usernameController),
|
enabled: enableField(_usernameController),
|
||||||
|
@ -844,6 +854,8 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _passwordController,
|
controller: _passwordController,
|
||||||
readOnly: widget.readOnly,
|
readOnly: widget.readOnly,
|
||||||
enabled: enableField(_passwordController),
|
enabled: enableField(_passwordController),
|
||||||
|
|
|
@ -7,7 +7,10 @@ import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
class CoinNodesView extends ConsumerStatefulWidget {
|
class CoinNodesView extends ConsumerStatefulWidget {
|
||||||
|
@ -37,6 +40,75 @@ class _CoinNodesViewState extends ConsumerState<CoinNodesView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
if (Util.isDesktop) {
|
||||||
|
return DesktopDialog(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
const SizedBox(
|
||||||
|
width: 32,
|
||||||
|
),
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.iconFor(coin: widget.coin),
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 12,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"${widget.coin.prettyName} nodes",
|
||||||
|
style: STextStyles.desktopH3(context),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: const DesktopDialogCloseButton(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 32,
|
||||||
|
right: 32,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"${widget.coin.prettyName} nodes",
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||||
|
color:
|
||||||
|
Theme.of(context).extension<StackColors>()!.textDark3,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
),
|
||||||
|
RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
text: 'Add new nodes',
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||||
|
color: Colors.blueAccent,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 12,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
child: NodesList(
|
||||||
|
coin: widget.coin,
|
||||||
|
popBackToRoute: CoinNodesView.routeName,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
|
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
@ -103,3 +175,4 @@ class _CoinNodesViewState extends ConsumerState<CoinNodesView> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class AutoBackupView extends ConsumerStatefulWidget {
|
class AutoBackupView extends ConsumerStatefulWidget {
|
||||||
const AutoBackupView({Key? key}) : super(key: key);
|
const AutoBackupView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@ -423,6 +425,8 @@ class _AutoBackupViewState extends ConsumerState<AutoBackupView> {
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
key: const Key("backupFrequencyFieldKey"),
|
key: const Key("backupFrequencyFieldKey"),
|
||||||
controller: frequencyController,
|
controller: frequencyController,
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
|
|
@ -27,6 +27,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:zxcvbn/zxcvbn.dart';
|
import 'package:zxcvbn/zxcvbn.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class CreateAutoBackupView extends ConsumerStatefulWidget {
|
class CreateAutoBackupView extends ConsumerStatefulWidget {
|
||||||
const CreateAutoBackupView({
|
const CreateAutoBackupView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -146,6 +148,8 @@ class _EnableAutoBackupViewState extends ConsumerState<CreateAutoBackupView> {
|
||||||
),
|
),
|
||||||
if (!Platform.isAndroid)
|
if (!Platform.isAndroid)
|
||||||
TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
onTap: Platform.isAndroid
|
onTap: Platform.isAndroid
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
|
@ -411,7 +415,9 @@ class _EnableAutoBackupViewState extends ConsumerState<CreateAutoBackupView> {
|
||||||
),
|
),
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
const TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
textInputAction: TextInputAction.none,
|
textInputAction: TextInputAction.none,
|
||||||
),
|
),
|
||||||
|
|
|
@ -14,6 +14,7 @@ import 'package:stackwallet/utilities/enums/flush_bar_type.dart';
|
||||||
import 'package:stackwallet/utilities/logger.dart';
|
import 'package:stackwallet/utilities/logger.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||||
import 'package:stackwallet/widgets/progress_bar.dart';
|
import 'package:stackwallet/widgets/progress_bar.dart';
|
||||||
import 'package:stackwallet/widgets/stack_dialog.dart';
|
import 'package:stackwallet/widgets/stack_dialog.dart';
|
||||||
|
@ -129,6 +130,8 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
onTap: Platform.isAndroid
|
onTap: Platform.isAndroid
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
|
|
|
@ -27,6 +27,8 @@ import 'package:stackwallet/widgets/stack_dialog.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:zxcvbn/zxcvbn.dart';
|
import 'package:zxcvbn/zxcvbn.dart';
|
||||||
|
|
||||||
|
import '../../../../utilities/util.dart';
|
||||||
|
|
||||||
class EditAutoBackupView extends ConsumerStatefulWidget {
|
class EditAutoBackupView extends ConsumerStatefulWidget {
|
||||||
const EditAutoBackupView({
|
const EditAutoBackupView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -148,6 +150,8 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
|
||||||
),
|
),
|
||||||
if (!Platform.isAndroid)
|
if (!Platform.isAndroid)
|
||||||
TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
onTap: Platform.isAndroid
|
onTap: Platform.isAndroid
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
|
@ -413,7 +417,9 @@ class _EditAutoBackupViewState extends ConsumerState<EditAutoBackupView> {
|
||||||
),
|
),
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
const TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
textInputAction: TextInputAction.none,
|
textInputAction: TextInputAction.none,
|
||||||
),
|
),
|
||||||
|
|
|
@ -20,6 +20,8 @@ import 'package:stackwallet/widgets/loading_indicator.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class RestoreFromFileView extends ConsumerStatefulWidget {
|
class RestoreFromFileView extends ConsumerStatefulWidget {
|
||||||
const RestoreFromFileView({Key? key}) : super(key: key);
|
const RestoreFromFileView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@ -96,6 +98,8 @@ class _RestoreFromFileViewState extends ConsumerState<RestoreFromFileView> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
try {
|
try {
|
||||||
await stackFileSystem.prepareStorage();
|
await stackFileSystem.prepareStorage();
|
||||||
|
|
|
@ -30,6 +30,8 @@ import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
/// [eventBus] should only be set during testing
|
/// [eventBus] should only be set during testing
|
||||||
class WalletSettingsView extends StatefulWidget {
|
class WalletSettingsView extends StatefulWidget {
|
||||||
const WalletSettingsView({
|
const WalletSettingsView({
|
||||||
|
@ -374,6 +376,8 @@ class _EpiBoxInfoFormState extends ConsumerState<EpicBoxInfoForm> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: hostController,
|
controller: hostController,
|
||||||
decoration: const InputDecoration(hintText: "Host"),
|
decoration: const InputDecoration(hintText: "Host"),
|
||||||
),
|
),
|
||||||
|
@ -381,6 +385,8 @@ class _EpiBoxInfoFormState extends ConsumerState<EpicBoxInfoForm> {
|
||||||
height: 8,
|
height: 8,
|
||||||
),
|
),
|
||||||
TextField(
|
TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: portController,
|
controller: portController,
|
||||||
decoration: const InputDecoration(hintText: "Port"),
|
decoration: const InputDecoration(hintText: "Port"),
|
||||||
keyboardType: const TextInputType.numberWithOptions(),
|
keyboardType: const TextInputType.numberWithOptions(),
|
||||||
|
|
|
@ -11,6 +11,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class RenameWalletView extends ConsumerStatefulWidget {
|
class RenameWalletView extends ConsumerStatefulWidget {
|
||||||
const RenameWalletView({
|
const RenameWalletView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -74,6 +76,8 @@ class _RenameWalletViewState extends ConsumerState<RenameWalletView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
|
|
|
@ -21,6 +21,8 @@ import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
import 'package:stackwallet/widgets/transaction_card.dart';
|
import 'package:stackwallet/widgets/transaction_card.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class AllTransactionsView extends ConsumerStatefulWidget {
|
class AllTransactionsView extends ConsumerStatefulWidget {
|
||||||
const AllTransactionsView({
|
const AllTransactionsView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -234,6 +236,8 @@ class _TransactionDetailsViewState extends ConsumerState<AllTransactionsView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _searchController,
|
controller: _searchController,
|
||||||
focusNode: searchFieldFocusNode,
|
focusNode: searchFieldFocusNode,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
|
|
|
@ -9,6 +9,8 @@ import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||||
|
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
|
||||||
class EditNoteView extends ConsumerStatefulWidget {
|
class EditNoteView extends ConsumerStatefulWidget {
|
||||||
const EditNoteView({
|
const EditNoteView({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
@ -87,6 +89,8 @@ class _EditNoteViewState extends ConsumerState<EditNoteView> {
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
controller: _noteController,
|
controller: _noteController,
|
||||||
style: STextStyles.field(context),
|
style: STextStyles.field(context),
|
||||||
focusNode: noteFieldFocusNode,
|
focusNode: noteFieldFocusNode,
|
||||||
|
|
|
@ -569,6 +569,8 @@ class _TransactionSearchViewState
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
key: const Key("transactionSearchViewAmountFieldKey"),
|
key: const Key("transactionSearchViewAmountFieldKey"),
|
||||||
controller: _amountTextEditingController,
|
controller: _amountTextEditingController,
|
||||||
focusNode: amountTextFieldFocusNode,
|
focusNode: amountTextFieldFocusNode,
|
||||||
|
@ -636,6 +638,8 @@ class _TransactionSearchViewState
|
||||||
Constants.size.circularBorderRadius,
|
Constants.size.circularBorderRadius,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
autocorrect: Util.isDesktop ? false : true,
|
||||||
|
enableSuggestions: Util.isDesktop ? false : true,
|
||||||
key:
|
key:
|
||||||
const Key("transactionSearchViewKeywordFieldKey"),
|
const Key("transactionSearchViewKeywordFieldKey"),
|
||||||
controller: _keywordTextEditingController,
|
controller: _keywordTextEditingController,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/desktop_menu.dart';
|
import 'package:stackwallet/pages_desktop_specific/home/desktop_menu.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/desktop_settings_view.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/my_stack_view.dart';
|
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/my_stack_view.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart';
|
|
||||||
import 'package:stackwallet/route_generator.dart';
|
import 'package:stackwallet/route_generator.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ class _DesktopHomeViewState extends ConsumerState<DesktopHomeView> {
|
||||||
int currentViewIndex = 0;
|
int currentViewIndex = 0;
|
||||||
final List<Widget> contentViews = [
|
final List<Widget> contentViews = [
|
||||||
const Navigator(
|
const Navigator(
|
||||||
|
key: Key("desktopStackHomeKey"),
|
||||||
onGenerateRoute: RouteGenerator.generateRoute,
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
initialRoute: MyStackView.routeName,
|
initialRoute: MyStackView.routeName,
|
||||||
),
|
),
|
||||||
|
@ -32,8 +33,9 @@ class _DesktopHomeViewState extends ConsumerState<DesktopHomeView> {
|
||||||
color: Colors.orange,
|
color: Colors.orange,
|
||||||
),
|
),
|
||||||
const Navigator(
|
const Navigator(
|
||||||
|
key: Key("desktopSettingHomeKey"),
|
||||||
onGenerateRoute: RouteGenerator.generateRoute,
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
initialRoute: SettingsMenu.routeName,
|
initialRoute: DesktopSettingsView.routeName,
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
|
@ -41,9 +43,6 @@ class _DesktopHomeViewState extends ConsumerState<DesktopHomeView> {
|
||||||
Container(
|
Container(
|
||||||
color: Colors.pink,
|
color: Colors.pink,
|
||||||
),
|
),
|
||||||
Container(
|
|
||||||
color: Colors.purple,
|
|
||||||
),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
void onMenuSelectionChanged(int newIndex) {
|
void onMenuSelectionChanged(int newIndex) {
|
||||||
|
@ -61,6 +60,10 @@ class _DesktopHomeViewState extends ConsumerState<DesktopHomeView> {
|
||||||
DesktopMenu(
|
DesktopMenu(
|
||||||
onSelectionChanged: onMenuSelectionChanged,
|
onSelectionChanged: onMenuSelectionChanged,
|
||||||
),
|
),
|
||||||
|
Container(
|
||||||
|
width: 1,
|
||||||
|
color: Theme.of(context).extension<StackColors>()!.background,
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: contentViews[currentViewIndex],
|
child: contentViews[currentViewIndex],
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
@ -70,7 +72,8 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 60,
|
height: 60,
|
||||||
),
|
),
|
||||||
SizedBox(
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
width: _width == expandedWidth
|
width: _width == expandedWidth
|
||||||
? _width - 32 // 16 padding on either side
|
? _width - 32 // 16 padding on either side
|
||||||
: _width - 16, // 8 padding on either side
|
: _width - 16, // 8 padding on either side
|
||||||
|
@ -79,9 +82,17 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
children: [
|
children: [
|
||||||
DesktopMenuItem(
|
DesktopMenuItem(
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
Assets.svg.walletFa,
|
Assets.svg.walletDesktop,
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
color: 0 == selectedMenuItem
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
label: "My Stack",
|
label: "My Stack",
|
||||||
value: 0,
|
value: 0,
|
||||||
|
@ -94,9 +105,17 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
),
|
),
|
||||||
DesktopMenuItem(
|
DesktopMenuItem(
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
Assets.svg.exchange3,
|
Assets.svg.exchangeDesktop,
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
color: 1 == selectedMenuItem
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
label: "Exchange",
|
label: "Exchange",
|
||||||
value: 1,
|
value: 1,
|
||||||
|
@ -112,6 +131,14 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
Assets.svg.bell,
|
Assets.svg.bell,
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
color: 2 == selectedMenuItem
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
label: "Notifications",
|
label: "Notifications",
|
||||||
value: 2,
|
value: 2,
|
||||||
|
@ -124,9 +151,17 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
),
|
),
|
||||||
DesktopMenuItem(
|
DesktopMenuItem(
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
Assets.svg.addressBook2,
|
Assets.svg.addressBookDesktop,
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
color: 3 == selectedMenuItem
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
label: "Address Book",
|
label: "Address Book",
|
||||||
value: 3,
|
value: 3,
|
||||||
|
@ -142,6 +177,14 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
Assets.svg.gear,
|
Assets.svg.gear,
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
color: 4 == selectedMenuItem
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
label: "Settings",
|
label: "Settings",
|
||||||
value: 4,
|
value: 4,
|
||||||
|
@ -157,6 +200,14 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
Assets.svg.messageQuestion,
|
Assets.svg.messageQuestion,
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
color: 5 == selectedMenuItem
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
label: "Support",
|
label: "Support",
|
||||||
value: 5,
|
value: 5,
|
||||||
|
@ -169,9 +220,17 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
),
|
),
|
||||||
DesktopMenuItem(
|
DesktopMenuItem(
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
Assets.svg.messageQuestion,
|
Assets.svg.aboutDesktop,
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
color: 6 == selectedMenuItem
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
label: "About",
|
label: "About",
|
||||||
value: 6,
|
value: 6,
|
||||||
|
@ -179,27 +238,31 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
onChanged: updateSelectedMenuItem,
|
onChanged: updateSelectedMenuItem,
|
||||||
iconOnly: _width == minimizedWidth,
|
iconOnly: _width == minimizedWidth,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const Spacer(),
|
||||||
height: 2,
|
|
||||||
),
|
|
||||||
DesktopMenuItem(
|
DesktopMenuItem(
|
||||||
icon: SvgPicture.asset(
|
icon: SvgPicture.asset(
|
||||||
Assets.svg.messageQuestion,
|
Assets.svg.exitDesktop,
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark
|
||||||
|
.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
label: "Exit",
|
label: "Exit",
|
||||||
value: 7,
|
value: 7,
|
||||||
group: selectedMenuItem,
|
group: selectedMenuItem,
|
||||||
onChanged: updateSelectedMenuItem,
|
onChanged: (_) {
|
||||||
|
// todo: save stuff/ notify before exit?
|
||||||
|
exit(0);
|
||||||
|
},
|
||||||
iconOnly: _width == minimizedWidth,
|
iconOnly: _width == minimizedWidth,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
children: [
|
children: [
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
IconButton(
|
IconButton(
|
||||||
|
@ -212,7 +275,7 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,7 +1,19 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/advanced_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/appearance_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/currency_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/language_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/nodes_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/security_settings.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart';
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/syncing_preferences_settings.dart';
|
||||||
|
import 'package:stackwallet/route_generator.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
||||||
|
|
||||||
class DesktopSettingsView extends ConsumerStatefulWidget {
|
class DesktopSettingsView extends ConsumerStatefulWidget {
|
||||||
const DesktopSettingsView({Key? key}) : super(key: key);
|
const DesktopSettingsView({Key? key}) : super(key: key);
|
||||||
|
@ -16,29 +28,45 @@ class DesktopSettingsView extends ConsumerStatefulWidget {
|
||||||
class _DesktopSettingsViewState extends ConsumerState<DesktopSettingsView> {
|
class _DesktopSettingsViewState extends ConsumerState<DesktopSettingsView> {
|
||||||
int currentViewIndex = 0;
|
int currentViewIndex = 0;
|
||||||
final List<Widget> contentViews = [
|
final List<Widget> contentViews = [
|
||||||
Container(
|
const Navigator(
|
||||||
color: Colors.lime,
|
key: Key("settingsBackupRestoreDesktopKey"),
|
||||||
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
|
initialRoute: BackupRestoreSettings.routeName,
|
||||||
), //b+r
|
), //b+r
|
||||||
Container(
|
const Navigator(
|
||||||
color: Colors.green,
|
key: Key("settingsSecurityDesktopKey"),
|
||||||
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
|
initialRoute: SecuritySettings.routeName,
|
||||||
), //security
|
), //security
|
||||||
Container(
|
const Navigator(
|
||||||
color: Colors.red,
|
key: Key("settingsCurrencyDesktopKey"),
|
||||||
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
|
initialRoute: CurrencySettings.routeName,
|
||||||
), //currency
|
), //currency
|
||||||
Container(
|
const Navigator(
|
||||||
color: Colors.orange,
|
key: Key("settingsLanguageDesktopKey"),
|
||||||
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
|
initialRoute: LanguageOptionSettings.routeName,
|
||||||
), //language
|
), //language
|
||||||
Container(
|
const Navigator(
|
||||||
color: Colors.yellow,
|
key: Key("settingsNodesDesktopKey"),
|
||||||
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
|
initialRoute: NodesSettings.routeName,
|
||||||
), //nodes
|
), //nodes
|
||||||
Container(
|
const Navigator(
|
||||||
color: Colors.blue,
|
key: Key("settingsSyncingPreferencesDesktopKey"),
|
||||||
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
|
initialRoute: SyncingPreferencesSettings.routeName,
|
||||||
), //syncing prefs
|
), //syncing prefs
|
||||||
Container(
|
const Navigator(
|
||||||
color: Colors.pink,
|
key: Key("settingsAppearanceDesktopKey"),
|
||||||
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
|
initialRoute: AppearanceOptionSettings.routeName,
|
||||||
), //appearance
|
), //appearance
|
||||||
Container(
|
const Navigator(
|
||||||
color: Colors.purple,
|
key: Key("settingsAdvancedDesktopKey"),
|
||||||
|
onGenerateRoute: RouteGenerator.generateRoute,
|
||||||
|
initialRoute: AdvancedSettings.routeName,
|
||||||
), //advanced
|
), //advanced
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -48,12 +76,26 @@ class _DesktopSettingsViewState extends ConsumerState<DesktopSettingsView> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// will have a row with two items: SettingsMenu and settings contentxd
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Material(
|
return DesktopScaffold(
|
||||||
color: Theme.of(context).extension<StackColors>()!.background,
|
background: Theme.of(context).extension<StackColors>()!.background,
|
||||||
child: Row(
|
appBar: DesktopAppBar(
|
||||||
|
isCompactHeight: true,
|
||||||
|
leading: Row(
|
||||||
|
children: [
|
||||||
|
const SizedBox(
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Settings",
|
||||||
|
style: STextStyles.desktopH3(context),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Row(
|
||||||
children: [
|
children: [
|
||||||
SettingsMenu(
|
SettingsMenu(
|
||||||
onSelectionChanged: onMenuSelectionChanged,
|
onSelectionChanged: onMenuSelectionChanged,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/wallet_view/desktop_wallet_view.dart';
|
||||||
import 'package:stackwallet/utilities/constants.dart';
|
import 'package:stackwallet/utilities/constants.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
import 'package:stackwallet/widgets/wallet_info_row/wallet_info_row.dart';
|
import 'package:stackwallet/widgets/wallet_info_row/wallet_info_row.dart';
|
||||||
|
@ -37,6 +38,12 @@ class CoinWalletsTable extends ConsumerWidget {
|
||||||
),
|
),
|
||||||
WalletInfoRow(
|
WalletInfoRow(
|
||||||
walletId: walletIds[i],
|
walletId: walletIds[i],
|
||||||
|
onPressed: () async {
|
||||||
|
await Navigator.of(context).pushNamed(
|
||||||
|
DesktopWalletView.routeName,
|
||||||
|
arguments: walletIds[i],
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -0,0 +1,283 @@
|
||||||
|
import 'package:decimal/decimal.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:stackwallet/pages/wallet_view/sub_widgets/wallet_balance_toggle_sheet.dart';
|
||||||
|
import 'package:stackwallet/pages/wallet_view/sub_widgets/wallet_refresh_button.dart';
|
||||||
|
import 'package:stackwallet/providers/providers.dart';
|
||||||
|
import 'package:stackwallet/providers/wallet/wallet_balance_toggle_state_provider.dart';
|
||||||
|
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
|
||||||
|
import 'package:stackwallet/services/coins/manager.dart';
|
||||||
|
import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
|
import 'package:stackwallet/utilities/enums/wallet_balance_toggle_state.dart';
|
||||||
|
import 'package:stackwallet/utilities/format.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/animated_text.dart';
|
||||||
|
|
||||||
|
class DesktopWalletSummary extends StatefulWidget {
|
||||||
|
const DesktopWalletSummary({
|
||||||
|
Key? key,
|
||||||
|
required this.walletId,
|
||||||
|
required this.managerProvider,
|
||||||
|
required this.initialSyncStatus,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final String walletId;
|
||||||
|
final ChangeNotifierProvider<Manager> managerProvider;
|
||||||
|
final WalletSyncStatus initialSyncStatus;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<DesktopWalletSummary> createState() => _WDesktopWalletSummaryState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _WDesktopWalletSummaryState extends State<DesktopWalletSummary> {
|
||||||
|
late final String walletId;
|
||||||
|
late final ChangeNotifierProvider<Manager> managerProvider;
|
||||||
|
|
||||||
|
void showSheet() {
|
||||||
|
showModalBottomSheet<dynamic>(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
context: context,
|
||||||
|
shape: const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.vertical(
|
||||||
|
top: Radius.circular(20),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
builder: (_) => WalletBalanceToggleSheet(walletId: walletId),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Decimal? _balanceTotalCached;
|
||||||
|
Decimal? _balanceCached;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
walletId = widget.walletId;
|
||||||
|
managerProvider = widget.managerProvider;
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
return Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Consumer(
|
||||||
|
builder: (_, ref, __) {
|
||||||
|
final Coin coin =
|
||||||
|
ref.watch(managerProvider.select((value) => value.coin));
|
||||||
|
final externalCalls = ref.watch(prefsChangeNotifierProvider
|
||||||
|
.select((value) => value.externalCalls));
|
||||||
|
|
||||||
|
Future<Decimal>? totalBalanceFuture;
|
||||||
|
Future<Decimal>? availableBalanceFuture;
|
||||||
|
if (coin == Coin.firo || coin == Coin.firoTestNet) {
|
||||||
|
final firoWallet =
|
||||||
|
ref.watch(managerProvider.select((value) => value.wallet))
|
||||||
|
as FiroWallet;
|
||||||
|
totalBalanceFuture = firoWallet.availablePublicBalance();
|
||||||
|
availableBalanceFuture = firoWallet.availablePrivateBalance();
|
||||||
|
} else {
|
||||||
|
totalBalanceFuture = ref.watch(
|
||||||
|
managerProvider.select((value) => value.totalBalance));
|
||||||
|
|
||||||
|
availableBalanceFuture = ref.watch(managerProvider
|
||||||
|
.select((value) => value.availableBalance));
|
||||||
|
}
|
||||||
|
|
||||||
|
final locale = ref.watch(localeServiceChangeNotifierProvider
|
||||||
|
.select((value) => value.locale));
|
||||||
|
|
||||||
|
final baseCurrency = ref.watch(prefsChangeNotifierProvider
|
||||||
|
.select((value) => value.currency));
|
||||||
|
|
||||||
|
final priceTuple = ref.watch(priceAnd24hChangeNotifierProvider
|
||||||
|
.select((value) => value.getPrice(coin)));
|
||||||
|
|
||||||
|
final _showAvailable =
|
||||||
|
ref.watch(walletBalanceToggleStateProvider.state).state ==
|
||||||
|
WalletBalanceToggleState.available;
|
||||||
|
|
||||||
|
return FutureBuilder(
|
||||||
|
future: _showAvailable
|
||||||
|
? availableBalanceFuture
|
||||||
|
: totalBalanceFuture,
|
||||||
|
builder: (fbContext, AsyncSnapshot<Decimal> snapshot) {
|
||||||
|
if (snapshot.connectionState == ConnectionState.done &&
|
||||||
|
snapshot.hasData &&
|
||||||
|
snapshot.data != null) {
|
||||||
|
if (_showAvailable) {
|
||||||
|
_balanceCached = snapshot.data!;
|
||||||
|
} else {
|
||||||
|
_balanceTotalCached = snapshot.data!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Decimal? balanceToShow =
|
||||||
|
_showAvailable ? _balanceCached : _balanceTotalCached;
|
||||||
|
|
||||||
|
if (balanceToShow != null) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: showSheet,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
if (coin == Coin.firo ||
|
||||||
|
coin == Coin.firoTestNet)
|
||||||
|
Text(
|
||||||
|
"${_showAvailable ? "Private" : "Public"} Balance",
|
||||||
|
style: STextStyles.subtitle500(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFavoriteCard,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (coin != Coin.firo &&
|
||||||
|
coin != Coin.firoTestNet)
|
||||||
|
Text(
|
||||||
|
"${_showAvailable ? "Available" : "Full"} Balance",
|
||||||
|
style: STextStyles.subtitle500(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFavoriteCard,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 4,
|
||||||
|
),
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.chevronDown,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFavoriteCard,
|
||||||
|
width: 8,
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
FittedBox(
|
||||||
|
fit: BoxFit.scaleDown,
|
||||||
|
child: Text(
|
||||||
|
"${Format.localizedStringAsFixed(
|
||||||
|
value: balanceToShow,
|
||||||
|
locale: locale,
|
||||||
|
decimalPlaces: 8,
|
||||||
|
)} ${coin.ticker}",
|
||||||
|
style: STextStyles.desktopH3(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (externalCalls)
|
||||||
|
Text(
|
||||||
|
"${Format.localizedStringAsFixed(
|
||||||
|
value: priceTuple.item1 * balanceToShow,
|
||||||
|
locale: locale,
|
||||||
|
decimalPlaces: 2,
|
||||||
|
)} $baseCurrency",
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textSubtitle1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: showSheet,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
if (coin == Coin.firo ||
|
||||||
|
coin == Coin.firoTestNet)
|
||||||
|
Text(
|
||||||
|
"${_showAvailable ? "Private" : "Public"} Balance",
|
||||||
|
style: STextStyles.subtitle500(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFavoriteCard,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (coin != Coin.firo &&
|
||||||
|
coin != Coin.firoTestNet)
|
||||||
|
Text(
|
||||||
|
"${_showAvailable ? "Available" : "Full"} Balance",
|
||||||
|
style: STextStyles.subtitle500(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFavoriteCard,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 4,
|
||||||
|
),
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.chevronDown,
|
||||||
|
width: 8,
|
||||||
|
height: 4,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFavoriteCard,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
AnimatedText(
|
||||||
|
stringsToLoopThrough: const [
|
||||||
|
"Loading balance ",
|
||||||
|
"Loading balance. ",
|
||||||
|
"Loading balance.. ",
|
||||||
|
"Loading balance..."
|
||||||
|
],
|
||||||
|
style: STextStyles.desktopH3(context).copyWith(
|
||||||
|
fontSize: 24,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFavoriteCard,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
AnimatedText(
|
||||||
|
stringsToLoopThrough: const [
|
||||||
|
"Loading balance ",
|
||||||
|
"Loading balance. ",
|
||||||
|
"Loading balance.. ",
|
||||||
|
"Loading balance..."
|
||||||
|
],
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textSubtitle1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
WalletRefreshButton(
|
||||||
|
walletId: walletId,
|
||||||
|
initialSyncStatus: widget.initialSyncStatus,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,485 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/wallet_view/desktop_wallet_summary.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/wallet_view/receive/desktop_receive.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/wallet_view/send/desktop_send.dart';
|
||||||
|
import 'package:stackwallet/providers/providers.dart';
|
||||||
|
import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/constants.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
|
||||||
|
class DesktopWalletView extends ConsumerStatefulWidget {
|
||||||
|
const DesktopWalletView({
|
||||||
|
Key? key,
|
||||||
|
required this.walletId,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
static const String routeName = "/desktopWalletView";
|
||||||
|
|
||||||
|
final String walletId;
|
||||||
|
|
||||||
|
@override
|
||||||
|
ConsumerState<DesktopWalletView> createState() => _DesktopWalletViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DesktopWalletViewState extends ConsumerState<DesktopWalletView> {
|
||||||
|
late final String walletId;
|
||||||
|
|
||||||
|
Future<void> onBackPressed() async {
|
||||||
|
// TODO log out and close wallet before popping back
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
walletId = widget.walletId;
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final manager = ref.watch(walletsChangeNotifierProvider
|
||||||
|
.select((value) => value.getManager(walletId)));
|
||||||
|
final coin = manager.coin;
|
||||||
|
final managerProvider = ref.watch(walletsChangeNotifierProvider
|
||||||
|
.select((value) => value.getManagerProvider(walletId)));
|
||||||
|
|
||||||
|
return DesktopScaffold(
|
||||||
|
appBar: DesktopAppBar(
|
||||||
|
background: Theme.of(context).extension<StackColors>()!.popupBG,
|
||||||
|
leading: Row(
|
||||||
|
children: [
|
||||||
|
const SizedBox(
|
||||||
|
width: 32,
|
||||||
|
),
|
||||||
|
AppBarIconButton(
|
||||||
|
size: 32,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFieldDefaultBG,
|
||||||
|
shadows: const [],
|
||||||
|
icon: SvgPicture.asset(
|
||||||
|
Assets.svg.arrowLeft,
|
||||||
|
width: 18,
|
||||||
|
height: 18,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.topNavIconPrimary,
|
||||||
|
),
|
||||||
|
onPressed: onBackPressed,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 15,
|
||||||
|
),
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.iconFor(coin: coin),
|
||||||
|
width: 32,
|
||||||
|
height: 32,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 12,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
manager.walletName,
|
||||||
|
style: STextStyles.desktopH3(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
trailing: Row(
|
||||||
|
children: const [
|
||||||
|
NetworkInfoButton(),
|
||||||
|
SizedBox(
|
||||||
|
width: 12,
|
||||||
|
),
|
||||||
|
WalletKeysButton(),
|
||||||
|
SizedBox(
|
||||||
|
width: 32,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
isCompactHeight: true,
|
||||||
|
),
|
||||||
|
body: Padding(
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
RoundedWhiteContainer(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.iconFor(coin: coin),
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 10,
|
||||||
|
),
|
||||||
|
DesktopWalletSummary(
|
||||||
|
walletId: walletId,
|
||||||
|
managerProvider: managerProvider,
|
||||||
|
initialSyncStatus: ref.watch(managerProvider
|
||||||
|
.select((value) => value.isRefreshing))
|
||||||
|
? WalletSyncStatus.syncing
|
||||||
|
: WalletSyncStatus.synced,
|
||||||
|
),
|
||||||
|
// Column(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
// children: [
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// "TODO: balance",
|
||||||
|
// style: STextStyles.desktopH3(context),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(
|
||||||
|
// width: 8,
|
||||||
|
// ),
|
||||||
|
// Container(
|
||||||
|
// color: Colors.red,
|
||||||
|
// width: 20,
|
||||||
|
// height: 20,
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// Text(
|
||||||
|
// "todo: fiat balance",
|
||||||
|
// style:
|
||||||
|
// STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||||
|
// color: Theme.of(context)
|
||||||
|
// .extension<StackColors>()!
|
||||||
|
// .textSubtitle1,
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
const Spacer(),
|
||||||
|
SecondaryButton(
|
||||||
|
width: 180,
|
||||||
|
height: 56,
|
||||||
|
onPressed: () {
|
||||||
|
// todo: go to wallet initiated exchange
|
||||||
|
},
|
||||||
|
label: "Exchange",
|
||||||
|
icon: Container(
|
||||||
|
color: Colors.red,
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 450,
|
||||||
|
child: MyWallet(
|
||||||
|
walletId: walletId,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 16,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: RecentDesktopTransactions(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyWallet extends StatefulWidget {
|
||||||
|
const MyWallet({
|
||||||
|
Key? key,
|
||||||
|
required this.walletId,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final String walletId;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<MyWallet> createState() => _MyWalletState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _MyWalletState extends State<MyWallet> {
|
||||||
|
int _selectedIndex = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"My wallet",
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFieldActiveSearchIconLeft,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(context).extension<StackColors>()!.popupBG,
|
||||||
|
borderRadius: BorderRadius.vertical(
|
||||||
|
top: Radius.circular(
|
||||||
|
Constants.size.circularBorderRadius,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: SendReceiveTabMenu(
|
||||||
|
onChanged: (index) {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = index;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(context).extension<StackColors>()!.popupBG,
|
||||||
|
borderRadius: BorderRadius.vertical(
|
||||||
|
bottom: Radius.circular(
|
||||||
|
Constants.size.circularBorderRadius,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: IndexedStack(
|
||||||
|
index: _selectedIndex,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
key: const Key("desktopSendViewPortKey"),
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
child: DesktopSend(
|
||||||
|
walletId: widget.walletId,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
key: const Key("desktopReceiveViewPortKey"),
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
child: DesktopReceive(
|
||||||
|
walletId: widget.walletId,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class SendReceiveTabMenu extends StatefulWidget {
|
||||||
|
const SendReceiveTabMenu({
|
||||||
|
Key? key,
|
||||||
|
this.initialIndex = 0,
|
||||||
|
this.onChanged,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final int initialIndex;
|
||||||
|
final void Function(int)? onChanged;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<SendReceiveTabMenu> createState() => _SendReceiveTabMenuState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SendReceiveTabMenuState extends State<SendReceiveTabMenu> {
|
||||||
|
late int _selectedIndex;
|
||||||
|
|
||||||
|
void _onChanged(int newIndex) {
|
||||||
|
if (_selectedIndex != newIndex) {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = newIndex;
|
||||||
|
});
|
||||||
|
widget.onChanged?.call(_selectedIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_selectedIndex = widget.initialIndex;
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () => _onChanged(0),
|
||||||
|
child: Container(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
const SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Send",
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||||
|
color: _selectedIndex == 0
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textSubtitle1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 19,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 2,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: _selectedIndex == 0
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.background,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () => _onChanged(1),
|
||||||
|
child: Container(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
const SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Receive",
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||||
|
color: _selectedIndex == 1
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textSubtitle1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 19,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 2,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: _selectedIndex == 1
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.background,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RecentDesktopTransactions extends StatefulWidget {
|
||||||
|
const RecentDesktopTransactions({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<RecentDesktopTransactions> createState() =>
|
||||||
|
_RecentDesktopTransactionsState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _RecentDesktopTransactionsState extends State<RecentDesktopTransactions> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Recent transactions",
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFieldActiveSearchIconLeft,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
BlueTextButton(
|
||||||
|
text: "See all",
|
||||||
|
onTap: () {
|
||||||
|
// todo: show all txns
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
|
child: Container(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class NetworkInfoButton extends StatelessWidget {
|
||||||
|
const NetworkInfoButton({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: Text("todo: sync status"),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class WalletKeysButton extends StatelessWidget {
|
||||||
|
const WalletKeysButton({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
child: Text("todo: wallet keys"),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,236 @@
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:qr_flutter/qr_flutter.dart';
|
||||||
|
import 'package:stackwallet/notifications/show_flush_bar.dart';
|
||||||
|
import 'package:stackwallet/pages/receive_view/generate_receiving_uri_qr_code_view.dart';
|
||||||
|
import 'package:stackwallet/providers/providers.dart';
|
||||||
|
import 'package:stackwallet/route_generator.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/clipboard_interface.dart';
|
||||||
|
import 'package:stackwallet/utilities/constants.dart';
|
||||||
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
|
import 'package:stackwallet/utilities/enums/flush_bar_type.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/custom_loading_overlay.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
|
||||||
|
class DesktopReceive extends ConsumerStatefulWidget {
|
||||||
|
const DesktopReceive({
|
||||||
|
Key? key,
|
||||||
|
required this.walletId,
|
||||||
|
this.clipboard = const ClipboardWrapper(),
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
final String walletId;
|
||||||
|
final ClipboardInterface clipboard;
|
||||||
|
|
||||||
|
@override
|
||||||
|
ConsumerState<DesktopReceive> createState() => _DesktopReceiveState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DesktopReceiveState extends ConsumerState<DesktopReceive> {
|
||||||
|
late final Coin coin;
|
||||||
|
late final String walletId;
|
||||||
|
late final ClipboardInterface clipboard;
|
||||||
|
|
||||||
|
Future<void> generateNewAddress() async {
|
||||||
|
bool shouldPop = false;
|
||||||
|
unawaited(
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (_) {
|
||||||
|
return WillPopScope(
|
||||||
|
onWillPop: () async => shouldPop,
|
||||||
|
child: Container(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.overlay
|
||||||
|
.withOpacity(0.5),
|
||||||
|
child: const CustomLoadingOverlay(
|
||||||
|
message: "Generating address",
|
||||||
|
eventBus: null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
await ref
|
||||||
|
.read(walletsChangeNotifierProvider)
|
||||||
|
.getManager(walletId)
|
||||||
|
.generateNewAddress();
|
||||||
|
|
||||||
|
shouldPop = true;
|
||||||
|
|
||||||
|
if (mounted) {
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String receivingAddress = "";
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
walletId = widget.walletId;
|
||||||
|
coin = ref.read(walletsChangeNotifierProvider).getManager(walletId).coin;
|
||||||
|
clipboard = widget.clipboard;
|
||||||
|
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) async {
|
||||||
|
final address = await ref
|
||||||
|
.read(walletsChangeNotifierProvider)
|
||||||
|
.getManager(walletId)
|
||||||
|
.currentReceivingAddress;
|
||||||
|
setState(() {
|
||||||
|
receivingAddress = address;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
|
||||||
|
ref.listen(
|
||||||
|
ref
|
||||||
|
.read(walletsChangeNotifierProvider)
|
||||||
|
.getManagerProvider(walletId)
|
||||||
|
.select((value) => value.currentReceivingAddress),
|
||||||
|
(previous, next) {
|
||||||
|
if (next is Future<String>) {
|
||||||
|
next.then((value) => setState(() => receivingAddress = value));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
clipboard.setData(
|
||||||
|
ClipboardData(text: receivingAddress),
|
||||||
|
);
|
||||||
|
showFloatingFlushBar(
|
||||||
|
type: FlushBarType.info,
|
||||||
|
message: "Copied to clipboard",
|
||||||
|
iconAsset: Assets.svg.copy,
|
||||||
|
context: context,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
color: Theme.of(context).extension<StackColors>()!.background,
|
||||||
|
width: 2,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
Constants.size.circularBorderRadius,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Your ${coin.ticker} address",
|
||||||
|
style: STextStyles.itemSubtitle(context),
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.copy,
|
||||||
|
width: 10,
|
||||||
|
height: 10,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.infoItemIcons,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 4,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Copy",
|
||||||
|
style: STextStyles.link2(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 4,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
receivingAddress,
|
||||||
|
style: STextStyles.itemSubtitle12(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (coin != Coin.epicCash)
|
||||||
|
const SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
if (coin != Coin.epicCash)
|
||||||
|
SecondaryButton(
|
||||||
|
height: 56,
|
||||||
|
onPressed: generateNewAddress,
|
||||||
|
label: "Generate new address",
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 32,
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: QrImage(
|
||||||
|
data: "${coin.uriScheme}:$receivingAddress",
|
||||||
|
size: 200,
|
||||||
|
foregroundColor:
|
||||||
|
Theme.of(context).extension<StackColors>()!.accentColorDark,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 32,
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: BlueTextButton(
|
||||||
|
text: "Create new QR code",
|
||||||
|
onTap: () async {
|
||||||
|
unawaited(
|
||||||
|
Navigator.of(context).push(
|
||||||
|
RouteGenerator.getRoute(
|
||||||
|
shouldUseMaterialRoute: RouteGenerator.useMaterialPageRoute,
|
||||||
|
builder: (_) => GenerateUriQrCodeView(
|
||||||
|
coin: coin,
|
||||||
|
receivingAddress: receivingAddress,
|
||||||
|
),
|
||||||
|
settings: const RouteSettings(
|
||||||
|
name: GenerateUriQrCodeView.routeName,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,104 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/src/widgets/framework.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
|
||||||
|
class AdvancedSettings extends ConsumerStatefulWidget {
|
||||||
|
const AdvancedSettings({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
static const String routeName = "/settingsMenuAdvanced";
|
||||||
|
|
||||||
|
@override
|
||||||
|
ConsumerState<AdvancedSettings> createState() => _AdvancedSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.circleLanguage,
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Advanced",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nConfigurate these settings only if you know what you are doing!",
|
||||||
|
style: STextStyles.desktopTextExtraExtraSmall(
|
||||||
|
context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
child: ShowLogsButton(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ShowLogsButton extends ConsumerWidget {
|
||||||
|
const ShowLogsButton({
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
return SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 48,
|
||||||
|
child: TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getPrimaryEnabledButtonColor(context),
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text(
|
||||||
|
"Show logs",
|
||||||
|
style: STextStyles.button(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,315 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/src/widgets/framework.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
|
||||||
|
import '../../../providers/global/prefs_provider.dart';
|
||||||
|
import '../../../utilities/constants.dart';
|
||||||
|
import '../../../widgets/custom_buttons/draggable_switch_button.dart';
|
||||||
|
|
||||||
|
class AppearanceOptionSettings extends ConsumerStatefulWidget {
|
||||||
|
const AppearanceOptionSettings({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
static const String routeName = "/settingsMenuAppearance";
|
||||||
|
|
||||||
|
@override
|
||||||
|
ConsumerState<AppearanceOptionSettings> createState() =>
|
||||||
|
_AppearanceOptionSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AppearanceOptionSettings
|
||||||
|
extends ConsumerState<AppearanceOptionSettings> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.circleSun,
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Appearances",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nCustomize how your Stack Wallet looks according to your preferences.",
|
||||||
|
style: STextStyles.desktopTextExtraExtraSmall(
|
||||||
|
context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const Padding(
|
||||||
|
padding: EdgeInsets.all(10.0),
|
||||||
|
child: Divider(
|
||||||
|
thickness: 0.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(10.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Display favorite wallets",
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark),
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
width: 40,
|
||||||
|
child: DraggableSwitchButton(
|
||||||
|
isOn: ref.watch(
|
||||||
|
prefsChangeNotifierProvider
|
||||||
|
.select((value) => value.showFavoriteWallets),
|
||||||
|
),
|
||||||
|
onValueChanged: (newValue) {
|
||||||
|
ref
|
||||||
|
.read(prefsChangeNotifierProvider)
|
||||||
|
.showFavoriteWallets = newValue;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Padding(
|
||||||
|
padding: EdgeInsets.all(10.0),
|
||||||
|
child: Divider(
|
||||||
|
thickness: 0.5,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(10.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Choose theme",
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark),
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 10,
|
||||||
|
right: 10,
|
||||||
|
),
|
||||||
|
child: ThemeToggle(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ThemeToggle extends StatefulWidget {
|
||||||
|
const ThemeToggle({
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
// final bool externalCallsEnabled;
|
||||||
|
// final void Function(bool)? onChanged;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<StatefulWidget> createState() => _ThemeToggle();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ThemeToggle extends State<ThemeToggle> {
|
||||||
|
// late bool externalCallsEnabled;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: RawMaterialButton(
|
||||||
|
elevation: 0,
|
||||||
|
hoverColor: Colors.transparent,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
Constants.size.circularBorderRadius * 2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () {}, //onPressed
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 24,
|
||||||
|
),
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets.svg.themeLight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 50,
|
||||||
|
top: 12,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
"Light",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// if (externalCallsEnabled)
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
left: 6,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets.svg.checkCircle,
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.infoItemIcons,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// if (!externalCallsEnabled)
|
||||||
|
// Positioned(
|
||||||
|
// top: 4,
|
||||||
|
// right: 4,
|
||||||
|
// child: Container(
|
||||||
|
// width: 20,
|
||||||
|
// height: 20,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius: BorderRadius.circular(1000),
|
||||||
|
// color: Theme.of(context)
|
||||||
|
// .extension<StackColors>()!
|
||||||
|
// .textFieldDefaultBG,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 1,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: RawMaterialButton(
|
||||||
|
elevation: 0,
|
||||||
|
hoverColor: Colors.transparent,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
Constants.size.circularBorderRadius * 2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: () {}, //onPressed
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.themeDark,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 50,
|
||||||
|
top: 12,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
"Dark",
|
||||||
|
style: STextStyles.desktopTextExtraSmall(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
// if (externalCallsEnabled)
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets.svg.checkCircle,
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.infoItemIcons,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// if (!externalCallsEnabled)
|
||||||
|
// Positioned(
|
||||||
|
// top: 4,
|
||||||
|
// right: 4,
|
||||||
|
// child: Container(
|
||||||
|
// width: 20,
|
||||||
|
// height: 20,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius: BorderRadius.circular(1000),
|
||||||
|
// color: Theme.of(context)
|
||||||
|
// .extension<StackColors>()!
|
||||||
|
// .textFieldDefaultBG,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,282 @@
|
||||||
|
import 'package:flutter/gestures.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
class BackupRestoreSettings extends ConsumerStatefulWidget {
|
||||||
|
const BackupRestoreSettings({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
static const String routeName = "/settingsMenuBackupRestore";
|
||||||
|
|
||||||
|
@override
|
||||||
|
ConsumerState<BackupRestoreSettings> createState() =>
|
||||||
|
_BackupRestoreSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
return ListView(
|
||||||
|
shrinkWrap: true,
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.backupAuto,
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Auto Backup",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nAuto backup is a custom Stack Wallet feature that offers a convenient backup of your data."
|
||||||
|
"To ensure maximum security, we recommend using a unique password that you haven't used anywhere "
|
||||||
|
"else on the internet before. Your password is not stored.",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextExtraExtraSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nFor more information, please see our website ",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextExtraExtraSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: "stackwallet.com",
|
||||||
|
style: STextStyles.richLink(context)
|
||||||
|
.copyWith(fontSize: 14),
|
||||||
|
recognizer: TapGestureRecognizer()
|
||||||
|
..onTap = () {
|
||||||
|
launchUrl(
|
||||||
|
Uri.parse("https://stackwallet.com/"),
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
child: AutoBackupButton(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 25,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.backupAdd,
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Manual Backup",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nCreate manual backup to easily transfer your data between devices. "
|
||||||
|
"You will create a backup file that can be later used in the Restore option. "
|
||||||
|
"Use a strong password to encrypt your data.",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextExtraExtraSmall(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
child: ManualBackupButton(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 25,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.backupRestore,
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
alignment: Alignment.topLeft,
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Restore Backup",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nUse your Stack Wallet backup file to restore your wallets, address book "
|
||||||
|
"and wallet preferences.",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextExtraExtraSmall(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
child: ManualBackupButton(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AutoBackupButton extends ConsumerWidget {
|
||||||
|
const AutoBackupButton({
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
return SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 48,
|
||||||
|
child: TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getPrimaryEnabledButtonColor(context),
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text(
|
||||||
|
"Enable auto backup",
|
||||||
|
style: STextStyles.button(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ManualBackupButton extends ConsumerWidget {
|
||||||
|
const ManualBackupButton({
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
return SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 48,
|
||||||
|
child: TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getPrimaryEnabledButtonColor(context),
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text(
|
||||||
|
"Create manual backup",
|
||||||
|
style: STextStyles.button(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RestoreBackupButton extends ConsumerWidget {
|
||||||
|
const RestoreBackupButton({
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
return SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 48,
|
||||||
|
child: TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getPrimaryEnabledButtonColor(context),
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text(
|
||||||
|
"Restore backup",
|
||||||
|
style: STextStyles.button(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,102 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/src/widgets/framework.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
|
||||||
|
class CurrencySettings extends ConsumerStatefulWidget {
|
||||||
|
const CurrencySettings({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
static const String routeName = "/settingsMenuCurrency";
|
||||||
|
|
||||||
|
@override
|
||||||
|
ConsumerState<CurrencySettings> createState() => _CurrencySettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CurrencySettings extends ConsumerState<CurrencySettings> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.circleDollarSign,
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Currency",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nProtect your Stack Wallet with a strong password. Stack Wallet does not store "
|
||||||
|
"your password, and is therefore NOT able to restore it. Keep your password safe and secure.",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextExtraExtraSmall(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
child: NewPasswordButton(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class NewPasswordButton extends ConsumerWidget {
|
||||||
|
const NewPasswordButton({
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
return SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 48,
|
||||||
|
child: TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getPrimaryEnabledButtonColor(context),
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text(
|
||||||
|
"Set up new password",
|
||||||
|
style: STextStyles.button(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,73 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||||
|
|
||||||
|
class EnableBackupDialog extends StatelessWidget {
|
||||||
|
const EnableBackupDialog({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return DesktopDialog(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(32),
|
||||||
|
child: Text(
|
||||||
|
"Enable Auto Backup",
|
||||||
|
style: STextStyles.desktopH3(context),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const DesktopDialogCloseButton(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"To enable Auto Backup, you need to create a backup file.",
|
||||||
|
style: STextStyles.desktopTextSmall(context).copyWith(
|
||||||
|
color: Theme.of(context).extension<StackColors>()!.textDark3,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(32),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: SecondaryButton(
|
||||||
|
label: "Cancel",
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 16,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: PrimaryButton(
|
||||||
|
label: "Continue",
|
||||||
|
onPressed: () {
|
||||||
|
// Navigator.of(context).pop();
|
||||||
|
// onConfirm.call();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/src/widgets/framework.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
|
||||||
|
class LanguageOptionSettings extends ConsumerStatefulWidget {
|
||||||
|
const LanguageOptionSettings({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
static const String routeName = "/settingsMenuLanguage";
|
||||||
|
|
||||||
|
@override
|
||||||
|
ConsumerState<LanguageOptionSettings> createState() =>
|
||||||
|
_LanguageOptionSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LanguageOptionSettings extends ConsumerState<LanguageOptionSettings> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.circleLanguage,
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Language",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nSelect the language of your wallet. We use your system language by default.",
|
||||||
|
style: STextStyles.desktopTextExtraExtraSmall(
|
||||||
|
context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
child: ChangeLanguageButton(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChangeLanguageButton extends ConsumerWidget {
|
||||||
|
const ChangeLanguageButton({
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
return SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 48,
|
||||||
|
child: TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getPrimaryEnabledButtonColor(context),
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text(
|
||||||
|
"Change language",
|
||||||
|
style: STextStyles.button(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,180 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/src/widgets/framework.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:stackwallet/providers/global/node_service_provider.dart';
|
||||||
|
import 'package:stackwallet/providers/global/prefs_provider.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
|
||||||
|
import '../../../pages/settings_views/global_settings_view/manage_nodes_views/coin_nodes_view.dart';
|
||||||
|
import '../../../utilities/constants.dart';
|
||||||
|
|
||||||
|
class NodesSettings extends ConsumerStatefulWidget {
|
||||||
|
const NodesSettings({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
static const String routeName = "/settingsMenuNodes";
|
||||||
|
|
||||||
|
@override
|
||||||
|
ConsumerState<NodesSettings> createState() => _NodesSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _NodesSettings extends ConsumerState<NodesSettings> {
|
||||||
|
List<Coin> _coins = [...Coin.values];
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_coins = _coins.toList();
|
||||||
|
_coins.remove(Coin.firoTestNet);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
bool showTestNet = ref.watch(
|
||||||
|
prefsChangeNotifierProvider.select((value) => value.showTestNetCoins),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Coin> coins = showTestNet
|
||||||
|
? _coins
|
||||||
|
: _coins.sublist(0, _coins.length - kTestNetCoinCount);
|
||||||
|
|
||||||
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.circleNode,
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Nodes",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: "\n\nSelect a coin to see nodes",
|
||||||
|
style: STextStyles.desktopTextExtraExtraSmall(
|
||||||
|
context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
//TODO: add search bar
|
||||||
|
SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
...coins.map(
|
||||||
|
(coin) {
|
||||||
|
final count = ref
|
||||||
|
.watch(nodeServiceChangeNotifierProvider
|
||||||
|
.select((value) => value.getNodesFor(coin)))
|
||||||
|
.length;
|
||||||
|
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
|
child: RawMaterialButton(
|
||||||
|
// splashColor: Theme.of(context).extension<StackColors>()!.highlight,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
Constants.size.circularBorderRadius,
|
||||||
|
),
|
||||||
|
// side: BorderSide(
|
||||||
|
// color: Theme.of(context)
|
||||||
|
// .extension<StackColors>()!
|
||||||
|
// .shadow),
|
||||||
|
),
|
||||||
|
materialTapTargetSize:
|
||||||
|
MaterialTapTargetSize.shrinkWrap,
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
CoinNodesView.routeName,
|
||||||
|
arguments: coin,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(
|
||||||
|
12.0,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.iconFor(coin: coin),
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 12,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"${coin.prettyName} nodes",
|
||||||
|
style: STextStyles.titleBold12(
|
||||||
|
context),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
count > 1
|
||||||
|
? "$count nodes"
|
||||||
|
: "Default",
|
||||||
|
style: STextStyles.label(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: SvgPicture.asset(
|
||||||
|
Assets.svg.chevronRight,
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,141 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/src/widgets/framework.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
|
||||||
|
import '../../../utilities/theme/stack_colors.dart';
|
||||||
|
import 'enable_backup_dialog.dart';
|
||||||
|
|
||||||
|
class SecuritySettings extends ConsumerStatefulWidget {
|
||||||
|
const SecuritySettings({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
static const String routeName = "/settingsMenuSecurity";
|
||||||
|
|
||||||
|
@override
|
||||||
|
ConsumerState<SecuritySettings> createState() => _SecuritySettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SecuritySettings extends ConsumerState<SecuritySettings> {
|
||||||
|
Future<void> enableAutoBackup() async {
|
||||||
|
// wait for keyboard to disappear
|
||||||
|
FocusScope.of(context).unfocus();
|
||||||
|
await Future<void>.delayed(
|
||||||
|
const Duration(milliseconds: 100),
|
||||||
|
);
|
||||||
|
|
||||||
|
await showDialog<dynamic>(
|
||||||
|
context: context,
|
||||||
|
useSafeArea: false,
|
||||||
|
barrierDismissible: true,
|
||||||
|
builder: (context) {
|
||||||
|
return EnableBackupDialog();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.circleLock,
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Change Password",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\n\nProtect your Stack Wallet with a strong password. Stack Wallet does not store "
|
||||||
|
"your password, and is therefore NOT able to restore it. Keep your password safe and secure.",
|
||||||
|
style:
|
||||||
|
STextStyles.desktopTextExtraExtraSmall(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
child: NewPasswordButton(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class NewPasswordButton extends ConsumerWidget {
|
||||||
|
const NewPasswordButton({
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
Future<void> enableAutoBackup() async {
|
||||||
|
// wait for keyboard to disappear
|
||||||
|
FocusScope.of(context).unfocus();
|
||||||
|
await Future<void>.delayed(
|
||||||
|
const Duration(milliseconds: 100),
|
||||||
|
);
|
||||||
|
|
||||||
|
await showDialog<dynamic>(
|
||||||
|
context: context,
|
||||||
|
useSafeArea: false,
|
||||||
|
barrierDismissible: true,
|
||||||
|
builder: (context) {
|
||||||
|
return EnableBackupDialog();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 48,
|
||||||
|
child: TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getPrimaryEnabledButtonColor(context),
|
||||||
|
onPressed: () {
|
||||||
|
enableAutoBackup();
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
"Set up new password",
|
||||||
|
style: STextStyles.button(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,7 +3,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu_item.dart';
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu_item.dart';
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
|
||||||
class SettingsMenu extends ConsumerStatefulWidget {
|
class SettingsMenu extends ConsumerStatefulWidget {
|
||||||
|
@ -35,34 +34,11 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
debugPrint("BUILD: $runtimeType");
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
|
||||||
return Material(
|
return Column(
|
||||||
color: Theme.of(context).extension<StackColors>()!.background,
|
|
||||||
child: SizedBox(
|
|
||||||
width: 300,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(24.0, 10.0, 0, 0),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 20,
|
|
||||||
// width: 300,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"Settings",
|
|
||||||
style: STextStyles.desktopH3(context).copyWith(
|
|
||||||
fontSize: 24,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(
|
padding: const EdgeInsets.only(left: 15),
|
||||||
3.0,
|
|
||||||
30.0,
|
|
||||||
55.0,
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
@ -71,6 +47,11 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
||||||
Assets.svg.polygon,
|
Assets.svg.polygon,
|
||||||
width: 11,
|
width: 11,
|
||||||
height: 11,
|
height: 11,
|
||||||
|
color: selectedMenuItem == 0
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
label: "Backup and restore",
|
label: "Backup and restore",
|
||||||
value: 0,
|
value: 0,
|
||||||
|
@ -85,6 +66,11 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
||||||
Assets.svg.polygon,
|
Assets.svg.polygon,
|
||||||
width: 11,
|
width: 11,
|
||||||
height: 11,
|
height: 11,
|
||||||
|
color: selectedMenuItem == 1
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
label: "Security",
|
label: "Security",
|
||||||
value: 1,
|
value: 1,
|
||||||
|
@ -99,6 +85,11 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
||||||
Assets.svg.polygon,
|
Assets.svg.polygon,
|
||||||
width: 11,
|
width: 11,
|
||||||
height: 11,
|
height: 11,
|
||||||
|
color: selectedMenuItem == 2
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
label: "Currency",
|
label: "Currency",
|
||||||
value: 2,
|
value: 2,
|
||||||
|
@ -113,6 +104,11 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
||||||
Assets.svg.polygon,
|
Assets.svg.polygon,
|
||||||
width: 11,
|
width: 11,
|
||||||
height: 11,
|
height: 11,
|
||||||
|
color: selectedMenuItem == 3
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
label: "Language",
|
label: "Language",
|
||||||
value: 3,
|
value: 3,
|
||||||
|
@ -127,6 +123,11 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
||||||
Assets.svg.polygon,
|
Assets.svg.polygon,
|
||||||
width: 11,
|
width: 11,
|
||||||
height: 11,
|
height: 11,
|
||||||
|
color: selectedMenuItem == 4
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
label: "Nodes",
|
label: "Nodes",
|
||||||
value: 4,
|
value: 4,
|
||||||
|
@ -141,6 +142,11 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
||||||
Assets.svg.polygon,
|
Assets.svg.polygon,
|
||||||
width: 11,
|
width: 11,
|
||||||
height: 11,
|
height: 11,
|
||||||
|
color: selectedMenuItem == 5
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
label: "Syncing preferences",
|
label: "Syncing preferences",
|
||||||
value: 5,
|
value: 5,
|
||||||
|
@ -155,6 +161,11 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
||||||
Assets.svg.polygon,
|
Assets.svg.polygon,
|
||||||
width: 11,
|
width: 11,
|
||||||
height: 11,
|
height: 11,
|
||||||
|
color: selectedMenuItem == 6
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
label: "Appearance",
|
label: "Appearance",
|
||||||
value: 6,
|
value: 6,
|
||||||
|
@ -169,6 +180,11 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
||||||
Assets.svg.polygon,
|
Assets.svg.polygon,
|
||||||
width: 11,
|
width: 11,
|
||||||
height: 11,
|
height: 11,
|
||||||
|
color: selectedMenuItem == 7
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.accentColorBlue
|
||||||
|
: Colors.transparent,
|
||||||
),
|
),
|
||||||
label: "Advanced",
|
label: "Advanced",
|
||||||
value: 7,
|
value: 7,
|
||||||
|
@ -179,11 +195,6 @@ class _SettingsMenuState extends ConsumerState<SettingsMenu> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/src/widgets/framework.dart';
|
||||||
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
|
||||||
|
class SyncingPreferencesSettings extends ConsumerStatefulWidget {
|
||||||
|
const SyncingPreferencesSettings({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
static const String routeName = "/settingsMenuSyncingPref";
|
||||||
|
|
||||||
|
@override
|
||||||
|
ConsumerState<SyncingPreferencesSettings> createState() =>
|
||||||
|
_SyncingPreferencesSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SyncingPreferencesSettings
|
||||||
|
extends ConsumerState<SyncingPreferencesSettings> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
debugPrint("BUILD: $runtimeType");
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 30,
|
||||||
|
),
|
||||||
|
child: RoundedWhiteContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.circleArrowRotate,
|
||||||
|
width: 48,
|
||||||
|
height: 48,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(10),
|
||||||
|
child: RichText(
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: "Syncing Preferences",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text:
|
||||||
|
"\nSet up your syncing preferences for all wallets in your Stack.",
|
||||||
|
style: STextStyles.desktopTextExtraExtraSmall(
|
||||||
|
context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: const [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.all(
|
||||||
|
10,
|
||||||
|
),
|
||||||
|
child: ChangePrefButton(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChangePrefButton extends ConsumerWidget {
|
||||||
|
const ChangePrefButton({
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
return SizedBox(
|
||||||
|
width: 200,
|
||||||
|
height: 48,
|
||||||
|
child: TextButton(
|
||||||
|
style: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.getPrimaryEnabledButtonColor(context),
|
||||||
|
onPressed: () {},
|
||||||
|
child: Text(
|
||||||
|
"Change preferences",
|
||||||
|
style: STextStyles.button(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -86,7 +86,16 @@ import 'package:stackwallet/pages_desktop_specific/create_password/create_passwo
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/desktop_home_view.dart';
|
import 'package:stackwallet/pages_desktop_specific/home/desktop_home_view.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/desktop_settings_view.dart';
|
import 'package:stackwallet/pages_desktop_specific/home/desktop_settings_view.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/my_stack_view.dart';
|
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/my_stack_view.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/my_stack_view/wallet_view/desktop_wallet_view.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/advanced_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/appearance_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/backup_and_restore_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/currency_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/language_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/nodes_settings.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/security_settings.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart';
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/settings_menu.dart';
|
||||||
|
import 'package:stackwallet/pages_desktop_specific/home/settings_menu/syncing_preferences_settings.dart';
|
||||||
import 'package:stackwallet/services/coins/manager.dart';
|
import 'package:stackwallet/services/coins/manager.dart';
|
||||||
import 'package:stackwallet/services/event_bus/events/global/node_connection_status_changed_event.dart';
|
import 'package:stackwallet/services/event_bus/events/global/node_connection_status_changed_event.dart';
|
||||||
import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart';
|
import 'package:stackwallet/services/event_bus/events/global/wallet_sync_status_changed_event.dart';
|
||||||
|
@ -957,11 +966,11 @@ class RouteGenerator {
|
||||||
builder: (_) => const DesktopHomeView(),
|
builder: (_) => const DesktopHomeView(),
|
||||||
settings: RouteSettings(name: settings.name));
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
// case DesktopSettingsView.routeName:
|
case DesktopSettingsView.routeName:
|
||||||
// return getRoute(
|
return getRoute(
|
||||||
// shouldUseMaterialRoute: useMaterialPageRoute,
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
// builder: (_) => const DesktopSettingsView(),
|
builder: (_) => const DesktopSettingsView(),
|
||||||
// settings: RouteSettings(name: settings.name));
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
case MyStackView.routeName:
|
case MyStackView.routeName:
|
||||||
return getRoute(
|
return getRoute(
|
||||||
|
@ -969,6 +978,20 @@ class RouteGenerator {
|
||||||
builder: (_) => const MyStackView(),
|
builder: (_) => const MyStackView(),
|
||||||
settings: RouteSettings(name: settings.name));
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
|
case DesktopWalletView.routeName:
|
||||||
|
if (args is String) {
|
||||||
|
return getRoute(
|
||||||
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
|
builder: (_) => DesktopWalletView(
|
||||||
|
walletId: args,
|
||||||
|
),
|
||||||
|
settings: RouteSettings(
|
||||||
|
name: settings.name,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return _routeError("${settings.name} invalid args: ${args.toString()}");
|
||||||
|
|
||||||
case SettingsMenu.routeName:
|
case SettingsMenu.routeName:
|
||||||
return getRoute(
|
return getRoute(
|
||||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
|
@ -977,6 +1000,54 @@ class RouteGenerator {
|
||||||
),
|
),
|
||||||
settings: RouteSettings(name: settings.name));
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
|
case BackupRestoreSettings.routeName:
|
||||||
|
return getRoute(
|
||||||
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
|
builder: (_) => const BackupRestoreSettings(),
|
||||||
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
|
case SecuritySettings.routeName:
|
||||||
|
return getRoute(
|
||||||
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
|
builder: (_) => const SecuritySettings(),
|
||||||
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
|
case CurrencySettings.routeName:
|
||||||
|
return getRoute(
|
||||||
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
|
builder: (_) => const CurrencySettings(),
|
||||||
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
|
case LanguageOptionSettings.routeName:
|
||||||
|
return getRoute(
|
||||||
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
|
builder: (_) => const LanguageOptionSettings(),
|
||||||
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
|
case NodesSettings.routeName:
|
||||||
|
return getRoute(
|
||||||
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
|
builder: (_) => const NodesSettings(),
|
||||||
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
|
case SyncingPreferencesSettings.routeName:
|
||||||
|
return getRoute(
|
||||||
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
|
builder: (_) => const SyncingPreferencesSettings(),
|
||||||
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
|
case AppearanceOptionSettings.routeName:
|
||||||
|
return getRoute(
|
||||||
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
|
builder: (_) => const AppearanceOptionSettings(),
|
||||||
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
|
case AdvancedSettings.routeName:
|
||||||
|
return getRoute(
|
||||||
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
|
builder: (_) => const AdvancedSettings(),
|
||||||
|
settings: RouteSettings(name: settings.name));
|
||||||
|
|
||||||
// == End of desktop specific routes =====================================
|
// == End of desktop specific routes =====================================
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -59,6 +59,15 @@ class _SVG {
|
||||||
String txExchangeFailed(BuildContext context) =>
|
String txExchangeFailed(BuildContext context) =>
|
||||||
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-exchange-icon-failed.svg";
|
"assets/svg/${Theme.of(context).extension<StackColors>()!.themeType.name}/tx-exchange-icon-failed.svg";
|
||||||
|
|
||||||
|
String get themeLight => "assets/svg/light/light-mode.svg";
|
||||||
|
String get themeDark => "assets/svg/dark/dark-theme.svg";
|
||||||
|
String get circleNode => "assets/svg/node-circle.svg";
|
||||||
|
String get circleSun => "assets/svg/sun-circle.svg";
|
||||||
|
String get circleArrowRotate => "assets/svg/rotate-circle.svg";
|
||||||
|
String get circleLanguage => "assets/svg/language-circle.svg";
|
||||||
|
String get circleDollarSign => "assets/svg/dollar-sign-circle.svg";
|
||||||
|
String get circleLock => "assets/svg/lock-circle.svg";
|
||||||
|
String get disableButton => "assets/svg/Button.svg";
|
||||||
String get polygon => "assets/svg/Polygon.svg";
|
String get polygon => "assets/svg/Polygon.svg";
|
||||||
String get personaIncognito => "assets/svg/persona-incognito-1.svg";
|
String get personaIncognito => "assets/svg/persona-incognito-1.svg";
|
||||||
String get personaEasy => "assets/svg/persona-easy-1.svg";
|
String get personaEasy => "assets/svg/persona-easy-1.svg";
|
||||||
|
@ -130,6 +139,11 @@ class _SVG {
|
||||||
String get anonymize => "assets/svg/tx-icon-anonymize.svg";
|
String get anonymize => "assets/svg/tx-icon-anonymize.svg";
|
||||||
String get anonymizePending => "assets/svg/tx-icon-anonymize-pending.svg";
|
String get anonymizePending => "assets/svg/tx-icon-anonymize-pending.svg";
|
||||||
String get anonymizeFailed => "assets/svg/tx-icon-anonymize-failed.svg";
|
String get anonymizeFailed => "assets/svg/tx-icon-anonymize-failed.svg";
|
||||||
|
String get addressBookDesktop => "assets/svg/address-book-desktop.svg";
|
||||||
|
String get exchangeDesktop => "assets/svg/exchange-desktop.svg";
|
||||||
|
String get aboutDesktop => "assets/svg/about-desktop.svg";
|
||||||
|
String get walletDesktop => "assets/svg/wallet-desktop.svg";
|
||||||
|
String get exitDesktop => "assets/svg/exit-desktop.svg";
|
||||||
|
|
||||||
String get ellipse1 => "assets/svg/Ellipse-43.svg";
|
String get ellipse1 => "assets/svg/Ellipse-43.svg";
|
||||||
String get ellipse2 => "assets/svg/Ellipse-42.svg";
|
String get ellipse2 => "assets/svg/Ellipse-42.svg";
|
||||||
|
|
|
@ -679,6 +679,25 @@ class STextStyles {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static TextStyle desktopTextSmall(BuildContext context) {
|
||||||
|
switch (_theme(context).themeType) {
|
||||||
|
case ThemeType.light:
|
||||||
|
return GoogleFonts.inter(
|
||||||
|
color: _theme(context).textDark,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
fontSize: 18,
|
||||||
|
height: 27 / 18,
|
||||||
|
);
|
||||||
|
case ThemeType.dark:
|
||||||
|
return GoogleFonts.inter(
|
||||||
|
color: _theme(context).buttonTextPrimaryDisabled,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
fontSize: 18,
|
||||||
|
height: 27 / 18,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static TextStyle desktopTextExtraSmall(BuildContext context) {
|
static TextStyle desktopTextExtraSmall(BuildContext context) {
|
||||||
switch (_theme(context).themeType) {
|
switch (_theme(context).themeType) {
|
||||||
case ThemeType.light:
|
case ThemeType.light:
|
||||||
|
|
|
@ -1519,5 +1519,8 @@ class StackColors extends ThemeExtension<StackColors> {
|
||||||
backgroundColor: MaterialStateProperty.all<Color>(
|
backgroundColor: MaterialStateProperty.all<Color>(
|
||||||
background,
|
background,
|
||||||
),
|
),
|
||||||
|
overlayColor: MaterialStateProperty.all<Color>(
|
||||||
|
Colors.transparent,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
abstract class Util {
|
abstract class Util {
|
||||||
|
static Directory? libraryPath;
|
||||||
static bool get isDesktop {
|
static bool get isDesktop {
|
||||||
|
if(Platform.isIOS && libraryPath != null && !libraryPath!.path.contains("/var/mobile/")){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return Platform.isLinux || Platform.isMacOS || Platform.isWindows;
|
return Platform.isLinux || Platform.isMacOS || Platform.isWindows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,13 @@ class WalletInfoRow extends ConsumerWidget {
|
||||||
.watch(walletsChangeNotifierProvider.notifier)
|
.watch(walletsChangeNotifierProvider.notifier)
|
||||||
.getManagerProvider(walletId));
|
.getManagerProvider(walletId));
|
||||||
|
|
||||||
return Row(
|
if (Util.isDesktop) {
|
||||||
children: Util.isDesktop
|
return GestureDetector(
|
||||||
? [
|
onTap: onPressed,
|
||||||
|
child: Container(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
@ -38,11 +42,9 @@ class WalletInfoRow extends ConsumerWidget {
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
manager.walletName,
|
manager.walletName,
|
||||||
style:
|
style: STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||||
STextStyles.desktopTextExtraSmall(context).copyWith(
|
color:
|
||||||
color: Theme.of(context)
|
Theme.of(context).extension<StackColors>()!.textDark,
|
||||||
.extension<StackColors>()!
|
|
||||||
.textDark,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -70,8 +72,13 @@ class WalletInfoRow extends ConsumerWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
]
|
],
|
||||||
: [
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
WalletInfoCoinIcon(coin: manager.coin),
|
WalletInfoCoinIcon(coin: manager.coin),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 12,
|
width: 12,
|
||||||
|
@ -96,3 +103,4 @@ class WalletInfoRow extends ConsumerWidget {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
60
pubspec.lock
|
@ -42,7 +42,7 @@ packages:
|
||||||
name: archive
|
name: archive
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.3.0"
|
version: "3.1.11"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -63,7 +63,7 @@ packages:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.9.0"
|
version: "2.8.2"
|
||||||
barcode_scan2:
|
barcode_scan2:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -190,7 +190,14 @@ packages:
|
||||||
name: characters
|
name: characters
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.1"
|
version: "1.2.0"
|
||||||
|
charcode:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: charcode
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.1"
|
||||||
checked_yaml:
|
checked_yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -204,7 +211,7 @@ packages:
|
||||||
name: clock
|
name: clock
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.1"
|
version: "1.1.0"
|
||||||
code_builder:
|
code_builder:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -274,7 +281,7 @@ packages:
|
||||||
name: coverage
|
name: coverage
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.0"
|
version: "1.2.0"
|
||||||
cross_file:
|
cross_file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -428,7 +435,7 @@ packages:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.0"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -543,7 +550,7 @@ packages:
|
||||||
name: flutter_native_splash
|
name: flutter_native_splash
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.11"
|
version: "2.2.9"
|
||||||
flutter_plugin_android_lifecycle:
|
flutter_plugin_android_lifecycle:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -816,6 +823,13 @@ packages:
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "0.0.1"
|
version: "0.0.1"
|
||||||
|
lint:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: lint
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.10.0"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -843,28 +857,28 @@ packages:
|
||||||
name: lottie
|
name: lottie
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.3"
|
version: "1.4.2"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: matcher
|
name: matcher
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.12.12"
|
version: "0.12.11"
|
||||||
material_color_utilities:
|
material_color_utilities:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.5"
|
version: "0.1.4"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.7.0"
|
||||||
mime:
|
mime:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -976,7 +990,7 @@ packages:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.2"
|
version: "1.8.1"
|
||||||
path_drawing:
|
path_drawing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1352,7 +1366,7 @@ packages:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.9.0"
|
version: "1.8.2"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1410,42 +1424,42 @@ packages:
|
||||||
name: sync_http
|
name: sync_http
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.1"
|
version: "0.3.0"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: term_glyph
|
name: term_glyph
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.1"
|
version: "1.2.0"
|
||||||
test:
|
test:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test
|
name: test
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.21.4"
|
version: "1.21.1"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.12"
|
version: "0.4.9"
|
||||||
test_core:
|
test_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_core
|
name: test_core
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.16"
|
version: "0.4.13"
|
||||||
time:
|
time:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: time
|
name: time
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.3"
|
version: "2.1.2"
|
||||||
timezone:
|
timezone:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1487,7 +1501,7 @@ packages:
|
||||||
name: typed_data
|
name: typed_data
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.1"
|
version: "1.3.0"
|
||||||
universal_io:
|
universal_io:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1571,7 +1585,7 @@ packages:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "9.0.0"
|
version: "8.2.2"
|
||||||
wakelock:
|
wakelock:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -1687,5 +1701,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.18.0 <3.0.0"
|
dart: ">=2.17.5 <3.0.0"
|
||||||
flutter: ">=3.3.0"
|
flutter: ">=3.0.1"
|
||||||
|
|
14
pubspec.yaml
|
@ -294,6 +294,20 @@ flutter:
|
||||||
- assets/svg/Polygon.svg
|
- assets/svg/Polygon.svg
|
||||||
- assets/svg/persona-easy-1.svg
|
- assets/svg/persona-easy-1.svg
|
||||||
- assets/svg/persona-incognito-1.svg
|
- assets/svg/persona-incognito-1.svg
|
||||||
|
- assets/svg/Button.svg
|
||||||
|
- assets/svg/lock-circle.svg
|
||||||
|
- assets/svg/dollar-sign-circle.svg
|
||||||
|
- assets/svg/language-circle.svg
|
||||||
|
- assets/svg/rotate-circle.svg
|
||||||
|
- assets/svg/sun-circle.svg
|
||||||
|
- assets/svg/node-circle.svg
|
||||||
|
- assets/svg/dark/dark-theme.svg
|
||||||
|
- assets/svg/light/light-mode.svg
|
||||||
|
- assets/svg/address-book-desktop.svg
|
||||||
|
- assets/svg/about-desktop.svg
|
||||||
|
- assets/svg/exchange-desktop.svg
|
||||||
|
- assets/svg/wallet-desktop.svg
|
||||||
|
- assets/svg/exit-desktop.svg
|
||||||
# coin icons
|
# coin icons
|
||||||
- assets/svg/coin_icons/Bitcoin.svg
|
- assets/svg/coin_icons/Bitcoin.svg
|
||||||
- assets/svg/coin_icons/Bitcoincash.svg
|
- assets/svg/coin_icons/Bitcoincash.svg
|
||||||
|
|