diff --git a/packages/smooth_app/assets/fonts/SmoothIcons.ttf b/packages/smooth_app/assets/fonts/SmoothIcons.ttf index 6df3ad2633a9..15212404a5bb 100644 Binary files a/packages/smooth_app/assets/fonts/SmoothIcons.ttf and b/packages/smooth_app/assets/fonts/SmoothIcons.ttf differ diff --git a/packages/smooth_app/assets/fonts/icons/config.json b/packages/smooth_app/assets/fonts/icons/config.json index 5ea94c628bb1..a4d02e080a55 100644 --- a/packages/smooth_app/assets/fonts/icons/config.json +++ b/packages/smooth_app/assets/fonts/icons/config.json @@ -1006,34 +1006,6 @@ "delete_trash" ] }, - { - "uid": "2d19b1cc3c0954309eec2acd7127bff8", - "css": "image_check", - "code": 59467, - "src": "custom_icons", - "selected": true, - "svg": { - "path": "M303.6 581.4L482.3 760.3C488.2 787.7 498.2 813.6 511.7 837.3L101.2 837.3C86.2 837.2 71.3 833.8 57.8 827.2L303.6 581.4ZM708.3 95.2C764.2 95.2 809.5 140.5 809.5 196.4L809.6 435.1C790.4 430.8 770.5 428.6 750 428.6 667.3 428.6 593.2 465.2 543 523.1L529.8 509.9C516.6 496.7 495.3 496.7 482.1 509.9L404.8 587.2 327.4 509.9C314.2 496.9 293 496.9 279.7 509.9L10.1 779.5C3.5 766 0.1 751.1 0 736.1L0 196.4C0 140.5 45.3 95.2 101.2 95.2L708.3 95.2ZM479.2 661.7L452.5 634.9 502.7 584.7C491.3 608.7 483.2 634.5 479.2 661.7ZM573.4 230.2C517.5 230.2 472.2 275.5 472.2 331.3 472.2 387.2 517.5 432.5 573.4 432.5 629.3 432.5 674.6 387.2 674.6 331.3 674.6 275.5 629.3 230.2 573.4 230.2ZM573.4 297.6C592 297.6 607.1 312.7 607.1 331.3 607.1 350 592 365.1 573.4 365.1 554.8 365.1 539.7 350 539.7 331.3 539.7 312.7 554.8 297.6 573.4 297.6ZM752.4 476.2C626.7 476.2 523.8 579 523.8 704.8 523.8 830.5 626.7 933.3 752.4 933.3 878.1 933.3 980.9 830.5 980.9 704.8 980.9 662.8 969.5 624.8 950.5 590.5L735.2 805.7C731.4 809.5 727.6 811.4 721.9 811.4 716.2 811.4 712.4 809.5 708.5 805.7L622.8 720C615.2 712.4 615.2 700.9 622.8 693.3 630.5 685.7 641.9 685.7 649.5 693.3L721.9 765.7 927.6 558.1C885.7 508.6 822.8 476.2 752.4 476.2ZM927.6 558.1C937.1 567.6 944.7 579 950.5 590.5L994.2 546.6C1001.9 539 1001.9 527.6 994.2 518.1 986.6 510.5 975.2 510.5 967.6 518.1L927.6 558.1Z", - "width": 1000 - }, - "search": [ - "image_check" - ] - }, - { - "uid": "b6303cfee0413dd05e8255b59a58aa3c", - "css": "image_add", - "code": 59468, - "src": "custom_icons", - "selected": true, - "svg": { - "path": "M764.4 428.3C894.5 428.3 1000 533.8 1000 663.9 1000 794 894.5 899.5 764.4 899.5 634.3 899.5 528.8 794 528.8 663.9 528.8 533.8 634.3 428.3 764.4 428.3ZM303.6 581.4L497.9 775.8C507 797.8 518.8 818.5 532.9 837.3L101.2 837.3C86.2 837.2 71.3 833.8 57.8 827.2L303.6 581.4ZM764.4 491.1C752.6 491.1 743 500.6 743 512.5L743 642.5 613 642.5C601.1 642.5 591.6 652.1 591.6 663.9 591.6 669.8 593.9 675.2 597.8 679.1 601.7 683 607.1 685.3 613 685.3L743 685.3 743 815.4C743 821.3 745.4 826.6 749.3 830.5 753.1 834.4 758.5 836.8 764.4 836.8 776.3 836.8 785.8 827.2 785.8 815.4L785.8 685.3 915.9 685.3C927.7 685.3 937.3 675.8 937.3 663.9 937.3 652.1 927.7 642.5 915.9 642.5L785.8 642.5 785.8 512.5C785.8 506.6 783.4 501.2 779.6 497.3 775.7 493.5 770.3 491.1 764.4 491.1ZM708.3 95.2C764.2 95.2 809.5 140.5 809.5 196.4L809.6 384.7C794.1 382.1 778.1 380.7 761.9 380.7 717.8 380.7 676 390.7 638.7 408.6 660.7 390.1 674.6 362.3 674.6 331.3 674.6 275.5 629.3 230.2 573.4 230.2 517.5 230.2 472.2 275.5 472.2 331.3 472.2 387.2 517.5 432.5 573.4 432.5 584.7 432.5 595.5 430.7 605.6 427.3 573.9 448 546.6 474.8 525.4 506.1 512.2 496.9 493.9 498.1 482.1 509.9L404.8 587.2 327.4 509.9C314.2 496.9 293 496.9 279.7 509.9L10.1 779.5C3.5 766 0.1 751.1 0 736.1L0 196.4C0 140.5 45.3 95.2 101.2 95.2L708.3 95.2ZM476.3 658.8L452.5 634.9 482.9 604.5C479 622 476.8 640.2 476.3 658.8ZM573.4 297.6C592 297.6 607.1 312.7 607.1 331.3 607.1 350 592 365.1 573.4 365.1 554.8 365.1 539.7 350 539.7 331.3 539.7 312.7 554.8 297.6 573.4 297.6Z", - "width": 1000 - }, - "search": [ - "image_add" - ] - }, { "uid": "a56b0a2aa9249d396d1cdffed9d14944", "css": "language", @@ -1636,20 +1608,6 @@ "recycling" ] }, - { - "uid": "e66f082674ce91622442c49575bab8d3", - "css": "image_check_alt", - "code": 59509, - "src": "custom_icons", - "selected": true, - "svg": { - "path": "M792.3 479.4C652.7 479.4 539.1 365.8 539.1 226.2 539.1 193.8 544.8 162.9 556.2 134.5L110.7 134.5C101 134.5 91.2 135.4 81.5 137 34.4 144.3 0.4 184 0.4 230.3 0.4 450.2-0.5 669.3 0.4 888.3 0.4 943.5 48.2 992.2 103.4 992.2L754.1 992.2C773.6 992.2 790.7 985.7 806.1 975.1 834.5 953.2 847.5 922.4 847.5 886.7 848.3 778 848.3 668.4 848.3 558.9L848.3 472.9C830.4 477 811.8 479.4 792.3 479.4ZM252.7 262.7C314.4 261.9 364.7 312.2 364.7 374.7 364.7 436.4 316 485.9 253.5 486.7 191.8 486.7 141.5 436.4 141.5 374.7 142.4 313.1 191.8 262.7 252.7 262.7ZM746 849.4C743.6 852.6 737.9 855.1 729.8 855.1 729 855.9 728.2 855.9 725.7 855.9L299 855.9C266.5 855.9 234 855.1 202.4 855.1 187.8 855.1 172.4 854.2 157.8 854.2 144 854.2 130.2 856.7 116.4 855.9 115.6 855.9 115.6 855.9 114.8 855.1 114 855.1 112.3 855.1 110.7 853.4 101.8 847.8 120.4 834 123.7 829.9 133.4 817.7 241.3 666 243 664.4 257.6 642.5 277 630.3 298.1 630.3 329 630.3 344.4 662.8 368.7 676.6 400.4 695.2 420.7 670.1 436.9 645.7 447.4 629.5 458 612.5 468.5 595.4 475 585.7 481.5 575.1 487.2 564.6 494.5 552.4 502.6 541.1 509.9 528.9L525.3 504.5C527 502.9 527.8 501.3 528.6 499.7 534.3 491.6 540.8 486.7 545.6 486.7 550.5 486.7 556.2 491.6 561 500.5 613.8 593.8 666.5 689.5 718.4 782.8L743.6 828.3C746 831.5 746.8 835.6 747.7 838 748.5 841.3 748.5 846.1 746 849.4ZM796.3 18.5C683.8 18.5 592.6 109.7 592.6 222.2 592.6 334.7 683.8 425.9 796.3 425.9 908.8 425.9 1000 334.7 1000 222.2 1000 109.7 908.8 18.5 796.3 18.5ZM906.6 170L777.2 299.3C774 302.6 769.6 304.4 765.1 304.4 760.6 304.4 756.2 302.6 753 299.3L693.9 240.2C687.2 233.6 687.2 222.7 693.9 216 700.6 209.4 711.4 209.4 718.1 216L765.1 263 882.4 145.8C889.1 139.1 899.9 139.1 906.6 145.8 913.3 152.5 913.3 163.3 906.6 170Z", - "width": 1000 - }, - "search": [ - "image_check_alt" - ] - }, { "uid": "150e5961b31e3232a1f05d78cf4f7b8a", "css": "image_error", @@ -1734,20 +1692,6 @@ "scale" ] }, - { - "uid": "859d5bee897e0db0057a710f053ea52e", - "css": "gallery", - "code": 59517, - "src": "custom_icons", - "selected": true, - "svg": { - "path": "M95.2 55.6C43.2 55.6 0 98.7 0 150.8L0 627C0 679.1 43.2 722.2 95.2 722.2L714.3 722.2C766.3 722.2 809.5 679.1 809.5 627L809.5 150.8C809.5 98.7 766.3 55.6 714.3 55.6L95.2 55.6ZM95.2 150.8L714.3 150.8 714.3 484.1 595.2 365.1 397.3 562.6 329.7 495.6 403.8 421.2 306.4 318.5 95.2 531.4 95.2 150.8ZM476.2 198.4C449.9 198.4 428.6 219.7 428.6 246 428.6 272.3 449.9 293.7 476.2 293.7 502.5 293.7 523.8 272.3 523.8 246 523.8 219.7 502.5 198.4 476.2 198.4ZM904.8 246L904.8 817.5 190.5 817.5 190.5 912.7 904.8 912.7C956.8 912.7 1000 869.5 1000 817.5L1000 246 904.8 246Z", - "width": 1000 - }, - "search": [ - "gallery" - ] - }, { "uid": "e660fb4e7284d1796f4951980902e4e1", "css": "ocr", @@ -1999,6 +1943,62 @@ "search": [ "drag_start" ] + }, + { + "uid": "70f59c871da7cd007a4daa4ca6ffcf1d", + "css": "image_add", + "code": 59534, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M792.3 479.4C652.7 479.4 539.1 365.8 539.1 226.2 539.1 193.8 544.8 162.9 556.2 134.5L110.7 134.5C101 134.5 91.2 135.4 81.5 137 34.4 144.3 0.4 184 0.4 230.3 0.4 450.2-0.5 669.3 0.4 888.3 0.4 943.5 48.2 992.2 103.4 992.2L754.1 992.2C773.6 992.2 790.7 985.7 806.1 975.1 834.5 953.2 847.5 922.4 847.5 886.7 848.3 778 848.3 668.4 848.3 558.9L848.3 472.9C830.4 477 811.8 479.4 792.3 479.4ZM252.7 262.7C314.4 261.9 364.7 312.2 364.7 374.7 364.7 436.4 316 485.9 253.5 486.7 191.8 486.7 141.5 436.4 141.5 374.7 142.4 313.1 191.8 262.7 252.7 262.7ZM746 849.4C743.6 852.6 737.9 855.1 729.8 855.1 729 855.9 728.2 855.9 725.7 855.9L299 855.9C266.5 855.9 234 855.1 202.4 855.1 187.8 855.1 172.4 854.2 157.8 854.2 144 854.2 130.2 856.7 116.4 855.9 115.6 855.9 115.6 855.9 114.8 855.1 114 855.1 112.3 855.1 110.7 853.4 101.8 847.8 120.4 834 123.7 829.9 133.4 817.7 241.3 666 243 664.4 257.6 642.5 277 630.3 298.1 630.3 329 630.3 344.4 662.8 368.7 676.6 400.4 695.2 420.7 670.1 436.9 645.7 447.4 629.5 458 612.5 468.5 595.4 475 585.7 481.5 575.1 487.2 564.6 494.5 552.4 502.6 541.1 509.9 528.9L525.3 504.5C527 502.9 527.8 501.3 528.6 499.7 534.3 491.6 540.8 486.7 545.6 486.7 550.5 486.7 556.2 491.6 561 500.5 613.8 593.8 666.5 689.5 718.4 782.8L743.6 828.3C746 831.5 746.8 835.6 747.7 838 748.5 841.3 748.5 846.1 746 849.4ZM796.3 18.5C908.8 18.5 1000 109.7 1000 222.2 1000 334.7 908.8 425.9 796.3 425.9 683.8 425.9 592.6 334.7 592.6 222.2 592.6 109.7 683.8 18.5 796.3 18.5ZM796.3 99C786.1 98.9 777.8 107.2 777.8 117.5L777.8 203.7 691.5 203.7C681.3 203.7 673 212 673 222.2 673 232.5 681.3 240.7 691.5 240.7L777.8 240.7 777.8 327C777.8 337.2 786.1 345.5 796.3 345.5 806.5 345.5 814.8 337.2 814.8 327L814.8 240.7 901.1 240.7C911.3 240.8 919.6 232.5 919.6 222.2 919.6 212 911.3 203.7 901.1 203.7L814.8 203.7 814.8 117.5C814.8 107.2 806.5 99 796.3 99Z", + "width": 1000 + }, + "search": [ + "image_add" + ] + }, + { + "uid": "e7075b203246ca2af68c6169b2b6cf93", + "css": "image_check", + "code": 59535, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M792.3 479.4C652.7 479.4 539.1 365.8 539.1 226.2 539.1 193.8 544.8 162.9 556.2 134.5L110.7 134.5C101 134.5 91.2 135.4 81.5 137 34.4 144.3 0.4 184 0.4 230.3 0.4 450.2-0.5 669.3 0.4 888.3 0.4 943.5 48.2 992.2 103.4 992.2L754.1 992.2C773.6 992.2 790.7 985.7 806.1 975.1 834.5 953.2 847.5 922.4 847.5 886.7 848.3 778 848.3 668.4 848.3 558.9L848.3 472.9C830.4 477 811.8 479.4 792.3 479.4ZM252.7 262.7C314.4 261.9 364.7 312.2 364.7 374.7 364.7 436.4 316 485.9 253.5 486.7 191.8 486.7 141.5 436.4 141.5 374.7 142.4 313.1 191.8 262.7 252.7 262.7ZM746 849.4C743.6 852.6 737.9 855.1 729.8 855.1 729 855.9 728.2 855.9 725.7 855.9L299 855.9C266.5 855.9 234 855.1 202.4 855.1 187.8 855.1 172.4 854.2 157.8 854.2 144 854.2 130.2 856.7 116.4 855.9 115.6 855.9 115.6 855.9 114.8 855.1 114 855.1 112.3 855.1 110.7 853.4 101.8 847.8 120.4 834 123.7 829.9 133.4 817.7 241.3 666 243 664.4 257.6 642.5 277 630.3 298.1 630.3 329 630.3 344.4 662.8 368.7 676.6 400.4 695.2 420.7 670.1 436.9 645.7 447.4 629.5 458 612.5 468.5 595.4 475 585.7 481.5 575.1 487.2 564.6 494.5 552.4 502.6 541.1 509.9 528.9L525.3 504.5C527 502.9 527.8 501.3 528.6 499.7 534.3 491.6 540.8 486.7 545.6 486.7 550.5 486.7 556.2 491.6 561 500.5 613.8 593.8 666.5 689.5 718.4 782.8L743.6 828.3C746 831.5 746.8 835.6 747.7 838 748.5 841.3 748.5 846.1 746 849.4ZM796.3 18.5C683.8 18.5 592.6 109.7 592.6 222.2 592.6 334.7 683.8 425.9 796.3 425.9 908.8 425.9 1000 334.7 1000 222.2 1000 109.7 908.8 18.5 796.3 18.5ZM906.6 170L777.2 299.3C774 302.6 769.6 304.4 765.1 304.4 760.6 304.4 756.2 302.6 753 299.3L693.9 240.2C687.2 233.6 687.2 222.7 693.9 216 700.6 209.4 711.4 209.4 718.1 216L765.1 263 882.4 145.8C889.1 139.1 899.9 139.1 906.6 145.8 913.3 152.5 913.3 163.3 906.6 170Z", + "width": 1000 + }, + "search": [ + "image_check" + ] + }, + { + "uid": "69bec990a7438c97d1cec162fe3b697a", + "css": "gallery", + "code": 59536, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M903.9 165.8L284.1 165.8C274.2 165.8 265.2 166.7 255.3 168.3 210.2 175.7 175.7 213.5 175.7 258.6 175.7 472.1 174.9 685.6 175.7 899 175.7 952.4 222.5 1000 275.8 1000L908.8 1000C927.7 1000 945 994.3 958.9 982.8 986.8 961.4 999.1 931.9 999.1 897.4 1000 791.5 1000 684.7 1000 578.8L1000 262.7C1000.8 202 964.7 165.8 903.9 165.8ZM422 290.6C481.9 289.8 530.4 339.1 530.4 399 530.4 458.9 482.7 507.4 422.8 507.4 362.9 507.4 314.4 458.1 314.4 399 314.4 339.9 362.9 290.6 422 290.6ZM902.3 860.4C899.8 863.7 894.1 866.2 885.8 866.2 885 867 884.2 867 882.6 867L467.1 867C435.9 867 403.9 866.2 372.7 866.2 358.8 866.2 344 865.4 329.2 865.4 316.1 865.4 302.9 867.8 289 867 288.2 867 288.2 867 287.3 866.2 286.5 866.2 284.9 865.4 284.1 864.5 275 858.8 293.1 845.6 296.4 841.5 306.2 829.2 411.3 682.3 412.1 680.6 426.1 659.3 445.8 647.8 465.5 647.8 495 647.8 510.6 679.8 533.6 692.9 564 711 584.5 687.2 599.3 662.6 609.2 646.1 619.8 629.7 629.7 613.3 635.4 603.4 642 593.6 647.8 583.7 655.1 572.2 662.5 560.8 669.9 549.3L684.7 525.5C686.3 523.8 687.2 522.2 688 520.5 693.7 513.1 700.3 507.4 705.2 507.4 710.1 507.4 715.1 512.3 720 520.5 771.7 612.5 823.4 705.3 873.5 795.6L898.2 839.9C900.6 843.2 901.4 846.5 902.3 849.8 903.9 853.9 903.9 858 902.3 860.4ZM825.1 96.1L825.1 110 243 110C232.3 110 220.8 110.8 211 112.5 159.3 120.7 120.7 164.2 120.7 215.1 120.7 422 120.7 628.1 120.7 834.2L101 834.2C47.6 834.2 0.8 786.5 0.8 733.2 0.8 519.7 0.8 307.1 0.8 92.8 0.8 47.6 34.5 9.9 80.4 2.5 89.5 0.8 99.3 0 109.2 0L729 0C789 0 825.1 36.1 825.1 96.1Z", + "width": 1000 + }, + "search": [ + "gallery" + ] + }, + { + "uid": "89fee98331f0925155c8b602c948de5e", + "css": "image_open", + "code": 59537, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M748.4 0C810.1 0 848.1 37.4 848.1 99.1L848.1 424.6C848.1 457.5 848.1 490.4 848.1 523.3 831.3 520.2 814 518.5 796.3 518.5 748.6 518.5 703.8 530.5 664.6 551.7 630.1 490 595.2 427.5 560.7 365.7 555.8 356.7 550.3 351.9 545.4 351.9 540.6 351.9 533.7 356.7 528.1 365 526.7 366.4 526.1 367.8 524.7 369.9L509.4 394.1C501.8 406.6 494.2 418.4 486.6 430.2 480.3 440.6 474.1 450.9 467.9 460.6 457.5 478 446.4 494.6 436 511.2 420.8 536.1 400 561.1 368.1 542.4 344.6 528.5 328.6 496 298.2 496 277.4 496 257.3 508.4 242.7 529.9 242.7 530 242.1 530.8 241.2 532.1L237.3 537.5C229.1 549.1 212.5 572.2 194.5 597.4L183.5 612.6C156 651 128.3 689.4 123.6 695.5 120.8 699.6 102.1 713.5 111.1 719 112.5 719.7 113.9 720.4 114.6 720.4 116 721.1 116 721.1 116.7 721.1 131.2 722.5 144.4 719.7 158.2 719.7 172.8 719.7 188 720.4 202.6 720.4 234.4 720.4 267 721.1 298.9 721.1L528.8 721.1C522.1 745 518.5 770.2 518.5 796.3 518.5 817.3 520.9 837.8 525.3 857.5L103.5 857.5C48.1 857.5 0.3 809.1 0.3 753.6-0.4 534.1 0.3 315.2 0.3 95.6 0.3 49.2 35.6 9.7 82 2.1 91 0.7 101.4 0 111.1 0ZM253.1 128.1C192.2 128.1 142.3 178.7 142.3 239.7 142.3 300.6 192.2 351.2 253.8 351.2 315.5 351.2 364.7 301.3 364.7 239.7 364.7 177.3 314.8 127.5 253.1 128.1ZM796.3 592.6C908.8 592.6 1000 683.8 1000 796.3 1000 908.8 908.8 1000 796.3 1000 683.8 1000 592.6 908.8 592.6 796.3 592.6 683.8 683.8 592.6 796.3 592.6ZM796.3 696.3C707.4 696.3 650.1 789.2 650.1 789.2 649 791.1 648.1 792.9 648.1 795.1 648.1 797 648.8 798.6 649.7 800.1 649.7 800.4 697.5 893.8 796.3 893.8 895.1 893.8 942.8 800.4 942.8 800.4 943.8 798.6 944.4 797 944.4 795.1 944.4 792.9 943.6 791.1 942.5 789.5 942.5 789.2 885.2 696.3 796.3 696.3ZM796.3 725.9C834.5 725.9 865.4 756.9 865.4 795.1 865.4 833.2 834.5 864.2 796.3 864.2 758.1 864.2 727.2 833.2 727.2 795.1 727.2 756.9 758.1 725.9 796.3 725.9ZM796.3 765.4C779.9 765.4 766.7 778.7 766.7 795.1 766.7 811.4 779.9 824.7 796.3 824.7 812.7 824.7 825.9 811.4 825.9 795.1 825.9 778.7 812.7 765.4 796.3 765.4Z", + "width": 1000 + }, + "search": [ + "image_open" + ] } ] } \ No newline at end of file diff --git a/packages/smooth_app/assets/fonts/icons/gallery.svg b/packages/smooth_app/assets/fonts/icons/gallery.svg index c469075010de..604fcd04e09a 100644 --- a/packages/smooth_app/assets/fonts/icons/gallery.svg +++ b/packages/smooth_app/assets/fonts/icons/gallery.svg @@ -2,6 +2,8 @@ Gallery - + + + \ No newline at end of file diff --git a/packages/smooth_app/assets/fonts/icons/icons.sketch b/packages/smooth_app/assets/fonts/icons/icons.sketch index 1fb8aae73685..083d0d6321e4 100644 Binary files a/packages/smooth_app/assets/fonts/icons/icons.sketch and b/packages/smooth_app/assets/fonts/icons/icons.sketch differ diff --git a/packages/smooth_app/assets/fonts/icons/image_add.svg b/packages/smooth_app/assets/fonts/icons/image_add.svg index 879719436748..12aae0767b20 100644 --- a/packages/smooth_app/assets/fonts/icons/image_add.svg +++ b/packages/smooth_app/assets/fonts/icons/image_add.svg @@ -1,7 +1,10 @@ - + Image add - + + + + \ No newline at end of file diff --git a/packages/smooth_app/assets/fonts/icons/image_check.svg b/packages/smooth_app/assets/fonts/icons/image_check.svg index c84ce8140c2d..41fe4614b898 100644 --- a/packages/smooth_app/assets/fonts/icons/image_check.svg +++ b/packages/smooth_app/assets/fonts/icons/image_check.svg @@ -1,8 +1,10 @@ - + Image check - - + + + + \ No newline at end of file diff --git a/packages/smooth_app/assets/fonts/icons/image_check_alt.svg b/packages/smooth_app/assets/fonts/icons/image_check_alt.svg deleted file mode 100644 index 41fe4614b898..000000000000 --- a/packages/smooth_app/assets/fonts/icons/image_check_alt.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - Image check - - - - - - - \ No newline at end of file diff --git a/packages/smooth_app/assets/fonts/icons/image_open.svg b/packages/smooth_app/assets/fonts/icons/image_open.svg new file mode 100644 index 000000000000..e9a104487165 --- /dev/null +++ b/packages/smooth_app/assets/fonts/icons/image_open.svg @@ -0,0 +1,8 @@ + + + Image open + + + + + \ No newline at end of file diff --git a/packages/smooth_app/lib/generic_lib/bottom_sheets/smooth_bottom_sheet.dart b/packages/smooth_app/lib/generic_lib/bottom_sheets/smooth_bottom_sheet.dart index 00c0ec1198f1..99c1e64c0ea1 100644 --- a/packages/smooth_app/lib/generic_lib/bottom_sheets/smooth_bottom_sheet.dart +++ b/packages/smooth_app/lib/generic_lib/bottom_sheets/smooth_bottom_sheet.dart @@ -457,8 +457,9 @@ class SmoothModalSheetHeader extends StatelessWidget implements SizeWidget { return switch (type) { SmoothModalSheetType.error => ERROR_COLOR, - SmoothModalSheetType.info => - context.extension().primaryDark, + SmoothModalSheetType.info => context.lightTheme() + ? context.extension().primaryBlack + : Colors.black, }; } diff --git a/packages/smooth_app/lib/generic_lib/widgets/languages_selector.dart b/packages/smooth_app/lib/generic_lib/widgets/languages_selector.dart index 03a2075ded2a..51cbf6257788 100644 --- a/packages/smooth_app/lib/generic_lib/widgets/languages_selector.dart +++ b/packages/smooth_app/lib/generic_lib/widgets/languages_selector.dart @@ -268,24 +268,31 @@ class _LanguagesListState extends State<_LanguagesList> { width: double.infinity, height: MediaQuery.sizeOf(context).height * (widget.selectedLanguages.isNotEmpty ? 0.4 : 0.3), - child: Scrollbar( - child: ListView.separated( - padding: EdgeInsets.zero, - itemBuilder: (BuildContext context, int index) { - final (OpenFoodFactsLanguage? language, _LanguageType type) = - _findItem(index); - - if (type == _LanguageType.selectedTitle || - type == _LanguageType.popularTitle) { - return _buildSection(extension, type, appLocalizations); - } - - return _buildLanguageTile(language, type); - }, - itemCount: _countItems(), - shrinkWrap: true, - separatorBuilder: (_, __) => const Divider(height: 1.0), - reverse: true, + child: Theme( + data: Theme.of(context).copyWith( + dividerTheme: DividerThemeData( + color: context.lightTheme() ? null : extension.greyDark, + ), + ), + child: Scrollbar( + child: ListView.separated( + padding: EdgeInsets.zero, + itemBuilder: (BuildContext context, int index) { + final (OpenFoodFactsLanguage? language, _LanguageType type) = + _findItem(index); + + if (type == _LanguageType.selectedTitle || + type == _LanguageType.popularTitle) { + return _buildSection(extension, type, appLocalizations); + } + + return _buildLanguageTile(language, type); + }, + itemCount: _countItems(), + shrinkWrap: true, + separatorBuilder: (_, __) => const Divider(height: 1.0), + reverse: true, + ), ), ), ), @@ -328,7 +335,7 @@ class _LanguagesListState extends State<_LanguagesList> { return Container( color: context.lightTheme() ? extension.primaryMedium - : extension.primaryNormal, + : extension.primarySemiDark, padding: const EdgeInsetsDirectional.symmetric( horizontal: VERY_LARGE_SPACE, vertical: VERY_SMALL_SPACE, diff --git a/packages/smooth_app/lib/generic_lib/widgets/smooth_text_form_field.dart b/packages/smooth_app/lib/generic_lib/widgets/smooth_text_form_field.dart index 80f15c9e3a66..69e8cf44e0cb 100644 --- a/packages/smooth_app/lib/generic_lib/widgets/smooth_text_form_field.dart +++ b/packages/smooth_app/lib/generic_lib/widgets/smooth_text_form_field.dart @@ -17,6 +17,7 @@ class SmoothTextFormField extends StatefulWidget { required this.controller, this.enabled, this.textInputAction, + this.textCapitalization, this.validator, this.autofillHints, required this.hintText, @@ -43,6 +44,7 @@ class SmoothTextFormField extends StatefulWidget { final Widget? suffixIcon; final bool? enabled; final TextInputAction? textInputAction; + final TextCapitalization? textCapitalization; final String? Function(String?)? validator; final Iterable? autofillHints; final TextInputType? textInputType; @@ -91,6 +93,7 @@ class _SmoothTextFormFieldState extends State { controller: widget.controller, enabled: widget.enabled, textInputAction: widget.textInputAction, + textCapitalization: widget.textCapitalization ?? TextCapitalization.none, validator: widget.validator, obscureText: _obscureText, enableSuggestions: enableSuggestions, diff --git a/packages/smooth_app/lib/l10n/app_en.arb b/packages/smooth_app/lib/l10n/app_en.arb index 0582a4de988d..7c977b80cdeb 100644 --- a/packages/smooth_app/lib/l10n/app_en.arb +++ b/packages/smooth_app/lib/l10n/app_en.arb @@ -1489,6 +1489,10 @@ "@edit_product_pending_operations_banner_message": { "description": "When a product has pending edits (being sent to the server), there is a message on the edit page. Please keep the ** syntax to make the text bold." }, + "edit_product_pending_operations_banner_short_message": "Your edits are being **sent in the background** (or later in case of error).", + "@edit_product_pending_operations_banner_short_message": { + "description": "When a product has pending edits (being sent to the server), there is a message on the edit page. Please keep the ** syntax to make the text bold." + }, "edit_product_label_short": "Edit", "@edit_product_label_short": { "description": "Edit product button short label (only the verb)" diff --git a/packages/smooth_app/lib/l10n/app_fr.arb b/packages/smooth_app/lib/l10n/app_fr.arb index c01e914d2899..fc6943cf56b0 100644 --- a/packages/smooth_app/lib/l10n/app_fr.arb +++ b/packages/smooth_app/lib/l10n/app_fr.arb @@ -1489,6 +1489,10 @@ "@edit_product_pending_operations_banner_message": { "description": "When a product has pending edits (being sent to the server), there is a message on the edit page. Please keep the ** syntax to make the text bold." }, + "edit_product_pending_operations_banner_short_message": "Vos modifications sont en cours d'envoi en **arrière-plan** (ou plus tard en cas d'erreur).", + "@edit_product_pending_operations_banner_short_message": { + "description": "When a product has pending edits (being sent to the server), there is a message on the edit page. Please keep the ** syntax to make the text bold." + }, "edit_product_label_short": "Modifier", "@edit_product_label_short": { "description": "Edit product button short label (only the verb)" diff --git a/packages/smooth_app/lib/pages/image/product_image_other_page.dart b/packages/smooth_app/lib/pages/image/product_image_other_page.dart index 07d9ffacf764..2f700905de3c 100644 --- a/packages/smooth_app/lib/pages/image/product_image_other_page.dart +++ b/packages/smooth_app/lib/pages/image/product_image_other_page.dart @@ -53,7 +53,7 @@ class ProductImageOtherPage extends StatefulWidget { product.productType, ); - final Widget existingPictureIcon = icons.Picture.checkAlt( + final Widget existingPictureIcon = icons.Picture.check( color: extension.success, semanticLabel: appLocalizations.photo_already_exists, ); diff --git a/packages/smooth_app/lib/pages/product/add_basic_details/add_basic_details_name.dart b/packages/smooth_app/lib/pages/product/add_basic_details/add_basic_details_name.dart index 4796bce2e971..46325181e763 100644 --- a/packages/smooth_app/lib/pages/product/add_basic_details/add_basic_details_name.dart +++ b/packages/smooth_app/lib/pages/product/add_basic_details/add_basic_details_name.dart @@ -300,6 +300,7 @@ class _ProductNameInputWidgetState extends State<_ProductNameInputWidget> { child: SmoothTextFormField( controller: widget.controller, type: TextFieldTypes.PLAIN_TEXT, + textCapitalization: TextCapitalization.sentences, hintText: appLocalizations.add_basic_details_product_name_hint, hintTextStyle: @@ -316,7 +317,7 @@ class _ProductNameInputWidgetState extends State<_ProductNameInputWidget> { const SizedBox(width: 2.0), if (widget.productName.hasPhoto || _photoTaken) IconButton( - icon: icons.Picture.checkAlt( + icon: icons.Picture.check( color: extension.success, ), tooltip: appLocalizations @@ -490,7 +491,6 @@ class _ProductNameExplanation extends StatelessWidget { const SizedBox(height: VERY_LARGE_SPACE), ExplanationBodyInfo( text: appLocalizations.add_basic_details_product_name_help_info2, - icon: false, safeArea: true, ), ], diff --git a/packages/smooth_app/lib/pages/product/edit_ocr/edit_ocr_textfield.dart b/packages/smooth_app/lib/pages/product/edit_ocr/edit_ocr_textfield.dart index 0e0dbec0f014..654f0b5878e6 100644 --- a/packages/smooth_app/lib/pages/product/edit_ocr/edit_ocr_textfield.dart +++ b/packages/smooth_app/lib/pages/product/edit_ocr/edit_ocr_textfield.dart @@ -102,6 +102,7 @@ class EditOCRTextField extends StatelessWidget { maxLines: null, controller: controller, textInputAction: TextInputAction.newline, + textCapitalization: TextCapitalization.sentences, spellCheckConfiguration: (prefs.getFlag( UserPreferencesDevMode .userPreferencesFlagSpellCheckerOnOcr) ?? diff --git a/packages/smooth_app/lib/pages/product/edit_product/edit_product_footer.dart b/packages/smooth_app/lib/pages/product/edit_product/edit_product_footer.dart index 711046bbaba6..1ff838dd58bb 100644 --- a/packages/smooth_app/lib/pages/product/edit_product/edit_product_footer.dart +++ b/packages/smooth_app/lib/pages/product/edit_product/edit_product_footer.dart @@ -1,170 +1,383 @@ import 'dart:math' as math; import 'package:flutter/material.dart'; +import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:smooth_app/generic_lib/design_constants.dart'; import 'package:smooth_app/generic_lib/duration_constants.dart'; import 'package:smooth_app/helpers/haptic_feedback_helper.dart'; import 'package:smooth_app/helpers/num_utils.dart'; import 'package:smooth_app/helpers/ui_helpers.dart'; import 'package:smooth_app/pages/product/product_page/footer/new_product_footer.dart'; +import 'package:smooth_app/resources/app_animations.dart'; import 'package:smooth_app/resources/app_icons.dart'; import 'package:smooth_app/themes/smooth_theme.dart'; import 'package:smooth_app/themes/smooth_theme_colors.dart'; import 'package:smooth_app/themes/theme_provider.dart'; +import 'package:smooth_app/widgets/smooth_text.dart'; +import 'package:smooth_app/widgets/widget_height.dart'; class EditProductFooter extends StatefulWidget { - const EditProductFooter({super.key}); + const EditProductFooter({ + required this.uploadIndicator, + super.key, + }); + + final bool uploadIndicator; @override State createState() => _EditProductFooterState(); } class _EditProductFooterState extends State - with SingleTickerProviderStateMixin { + with TickerProviderStateMixin { static const double BUTTON_WIDTH = 45.0; - late AnimationController _controller; - late Animation _animation; - late double _offsetX = -1.0; + final ScrollController _scrollController = ScrollController(); + + late AnimationController _menuController; + late AnimationController _loadingController; + late Animation _menuAnimation; + late Animation _loadingAnimation; + late double _menuOffsetX = -1.0; + late double _loadingOffsetY; + late double _height = 0.0; + late DragStartDetails _dragStartDetails; @override void initState() { super.initState(); - _controller = AnimationController( + _menuController = AnimationController( vsync: this, duration: SmoothAnimationsDuration.medium, - )..addListener(() => setState(() { - _offsetX = _animation.value; - })); + ) + ..addListener(() { + setState(() { + _menuOffsetX = _menuAnimation.value; + + /// Also move the upload indicator + if (widget.uploadIndicator) { + _loadingOffsetY = _height * + (1 - _menuOffsetX.progressAndClamp(0.0, _maxOffsetX, 1.0)); + } + }); + }) + ..addStatusListener((AnimationStatus status) { + if (status == AnimationStatus.completed && _menuOffsetX > 0.0) { + _scrollController.jumpTo(0.0); + } + }); + + _loadingController = AnimationController( + vsync: this, + duration: SmoothAnimationsDuration.long, + )..addListener(() { + setState(() => _loadingOffsetY = _loadingAnimation.value); + }); + + if (widget.uploadIndicator) { + _loadingOffsetY = 0.0; + } else { + /// Temp value + _loadingOffsetY = double.infinity; + } onNextFrame(() => setState( - () => _offsetX = MediaQuery.sizeOf(context).width - BUTTON_WIDTH, + () => _menuOffsetX = _maxOffsetX, )); } + @override + void didUpdateWidget(covariant EditProductFooter oldWidget) { + super.didUpdateWidget(oldWidget); + + if (oldWidget.uploadIndicator != widget.uploadIndicator) { + if (widget.uploadIndicator) { + _startLoadingAnimation(from: _height, to: 0.0); + } else { + _startLoadingAnimation(from: 0.0, to: _height); + } + } + } + @override Widget build(BuildContext context) { - if (_offsetX < 0.0) { + if (_menuOffsetX < 0.0) { /// Wait for the first frame to be displayed return EMPTY_WIDGET; } final double width = MediaQuery.sizeOf(context).width; - return Transform.translate( - offset: Offset(_offsetX, 0), - child: IntrinsicHeight( - child: Row( - children: [ - GestureDetector( - onTap: () { - if (_offsetX == 0.0) { - _startAnimation( - from: 0.0, - to: width - BUTTON_WIDTH, - ); - } else { - _startAnimation( - from: width - BUTTON_WIDTH, - to: 0.0, - ); - } - }, - onTapDown: (TapDownDetails details) { - SmoothHapticFeedback.click(); - }, - onHorizontalDragUpdate: (DragUpdateDetails details) { - setState(() { - _offsetX += details.delta.dx; - if (_offsetX < 0) { - _offsetX = 0; - } else if (_offsetX > width - BUTTON_WIDTH) { - _offsetX = width - BUTTON_WIDTH; - } - }); - }, - onHorizontalDragEnd: (DragEndDetails details) { - if (details.globalPosition.dx < width / 2) { - _startAnimation( - from: _offsetX, - to: 0.0, - ); - } else { - _startAnimation( - from: _offsetX, - to: width - BUTTON_WIDTH, - ); - } - }, - child: DecoratedBox( - decoration: BoxDecoration( - borderRadius: BorderRadiusDirectional.only( - topStart: Radius.circular( - _offsetX.progressAndClamp(0.0, width / 4, 1.0) * 20.0, - ), - ), - color: context.lightTheme() - ? context - .extension() - .primaryBlack - : context - .extension() - .primarySemiDark, + return Stack( + children: [ + PositionedDirectional( + top: 0.0, + start: 0.0, + end: BUTTON_WIDTH - 20.0, + bottom: 0.0, + child: Offstage( + offstage: _loadingOffsetY == _height, + child: Opacity( + opacity: 1 - _loadingOffsetY.progressAndClamp(0.0, _height, 1.0), + child: Transform.translate( + offset: Offset( + 0.0, + _loadingOffsetY, ), - child: SizedBox( - width: BUTTON_WIDTH, - height: ProductFooter.kHeight + - LARGE_SPACE + - MediaQuery.viewPaddingOf(context).bottom, - child: Padding( - padding: EdgeInsetsDirectional.only( - top: LARGE_SPACE, - bottom: MediaQuery.viewPaddingOf(context).bottom, - ), - child: Transform.rotate( - angle: math.pi * - (1 - - _offsetX.progressAndClamp( - 0.0, width - BUTTON_WIDTH, 1.0)), - child: const Drag.start( - color: Colors.white, + child: const _EditPageLoadingIndicator(), + ), + ), + ), + ), + MeasureSize( + onChange: _onSizeAvailable, + child: Transform.translate( + offset: Offset(_menuOffsetX, 0), + child: IntrinsicHeight( + child: Row( + children: [ + GestureDetector( + onTap: () => _onTapMenu(width), + onTapDown: (TapDownDetails details) => + SmoothHapticFeedback.click(), + onHorizontalDragStart: (DragStartDetails details) { + SmoothHapticFeedback.click(); + _dragStartDetails = details; + }, + onHorizontalDragUpdate: (DragUpdateDetails details) => + _onHorizontalDragUpdate(details, width), + onHorizontalDragEnd: (DragEndDetails details) => + _onHorizontalDragEnd(details, width), + child: DecoratedBox( + decoration: BoxDecoration( + borderRadius: BorderRadiusDirectional.only( + topStart: Radius.circular( + _menuOffsetX.progressAndClamp(0.0, width / 4, 1.0) * + 20.0, + ), + ), + color: context.lightTheme() + ? context + .extension() + .primaryBlack + : context + .extension() + .primarySemiDark, + ), + child: SizedBox( + width: BUTTON_WIDTH, + height: ProductFooter.kHeight + + LARGE_SPACE + + MediaQuery.viewPaddingOf(context).bottom, + child: Padding( + padding: EdgeInsetsDirectional.only( + top: LARGE_SPACE, + bottom: MediaQuery.viewPaddingOf(context).bottom, + ), + child: Transform.rotate( + angle: math.pi * + (1 - + _menuOffsetX.progressAndClamp( + 0.0, width - BUTTON_WIDTH, 1.0)), + child: const Drag.start( + color: Colors.white, + ), + ), + ), ), ), ), - ), - ), - ), - SizedBox( - width: MediaQuery.sizeOf(context).width - BUTTON_WIDTH, - child: const ProductFooter( - actions: [ - ProductFooterActionBar.barcode, - ProductFooterActionBar.contributionGuide, - ProductFooterActionBar.openWebsite, + SizedBox( + width: MediaQuery.sizeOf(context).width - BUTTON_WIDTH, + child: ProductFooter( + actions: const [ + ProductFooterActionBar.barcode, + ProductFooterActionBar.contributionGuide, + ProductFooterActionBar.openWebsite, + ], + scrollController: _scrollController, + highlightFirstItem: false, + showSettings: false, + ), + ), ], - highlightFirstItem: false, - showSettings: false, ), ), - ], + ), ), - ), + ], ); } - void _startAnimation({required double from, required double to}) { - _animation = Tween( + void _onSizeAvailable(Size size) { + if (_height != size.height) { + _height = size.height; + if (!widget.uploadIndicator) { + _loadingOffsetY = _height; + } + + _loadingAnimation = Tween( + begin: 0.0, + end: _height, + ).animate( + CurvedAnimation( + parent: _loadingController, + curve: Curves.easeOutQuint, + ), + ); + + setState(() {}); + } + } + + void _onTapMenu(double width) { + if (_menuOffsetX == 0.0) { + _startMenuAnimation( + from: 0.0, + to: width - BUTTON_WIDTH, + ); + } else { + _startMenuAnimation( + from: width - BUTTON_WIDTH, + to: 0.0, + ); + } + } + + /// Move the menu and the upload indicator + void _onHorizontalDragUpdate(DragUpdateDetails details, double width) { + setState(() { + _menuOffsetX += details.delta.dx; + if (_menuOffsetX < 0) { + _menuOffsetX = 0; + } else if (_menuOffsetX > width - BUTTON_WIDTH) { + _menuOffsetX = width - BUTTON_WIDTH; + } + + if (widget.uploadIndicator) { + _loadingOffsetY = _height * + (1 - _menuOffsetX.progressAndClamp(0.0, _maxOffsetX, 1.0)); + } + }); + } + + /// Snap to the closest edge + void _onHorizontalDragEnd(DragEndDetails details, double width) { + if (_dragStartDetails.localPosition.dx - details.localPosition.dx > 0) { + _startMenuAnimation( + from: _menuOffsetX, + to: 0.0, + ); + } else { + _startMenuAnimation( + from: _menuOffsetX, + to: width - BUTTON_WIDTH, + ); + } + } + + double get _maxOffsetX => MediaQuery.sizeOf(context).width - BUTTON_WIDTH; + + void _startMenuAnimation({required double from, required double to}) { + _menuAnimation = Tween( begin: from, end: to, ).animate( - CurvedAnimation(parent: _controller, curve: Curves.easeOutQuint), + CurvedAnimation(parent: _menuController, curve: Curves.easeOutQuint), ); - _controller.forward(from: 0.0); + _menuController.forward(from: 0.0); + } + + void _startLoadingAnimation({required double from, required double to}) { + /// The controller is already set up + if (from == 0.0) { + _loadingController.forward(from: 0.0); + } else { + _loadingController.reverse(from: 1.0); + } } @override void dispose() { - _controller.dispose(); + _menuController.dispose(); + _loadingController.dispose(); super.dispose(); } } + +class _EditPageLoadingIndicator extends StatelessWidget { + const _EditPageLoadingIndicator(); + + @override + Widget build(BuildContext context) { + final AppLocalizations appLocalizations = AppLocalizations.of(context); + final SmoothColorsThemeExtension extension = + context.extension(); + + final bool lightTheme = context.lightTheme(); + + return DecoratedBox( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: + context.lightTheme() ? Colors.black12 : const Color(0x10FFFFFF), + blurRadius: 6.0, + offset: const Offset(0.0, -4.0), + ), + ], + ), + child: IntrinsicHeight( + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + flex: 15, + child: ExcludeSemantics( + child: Container( + width: double.infinity, + height: double.infinity, + color: const Color(0xFF824116), + padding: EdgeInsetsDirectional.only( + top: SMALL_SPACE, + start: LARGE_SPACE, + end: LARGE_SPACE, + bottom: MediaQuery.viewPaddingOf(context).bottom, + ), + alignment: AlignmentDirectional.center, + child: CloudUploadAnimation( + size: MediaQuery.sizeOf(context).width * 0.10, + color: lightTheme ? Colors.white : null, + ), + ), + ), + ), + Expanded( + flex: 85, + child: Container( + width: double.infinity, + height: double.infinity, + color: lightTheme ? Colors.white : extension.primaryUltraBlack, + alignment: AlignmentDirectional.center, + padding: EdgeInsetsDirectional.only( + start: MEDIUM_SPACE, + end: LARGE_SPACE * 2, + bottom: MediaQuery.viewPaddingOf(context).bottom, + ), + child: TextWithBoldParts( + text: appLocalizations + .edit_product_pending_operations_banner_short_message, + textStyle: const TextStyle( + fontSize: 14.5, + ), + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/packages/smooth_app/lib/pages/product/edit_product/edit_product_page.dart b/packages/smooth_app/lib/pages/product/edit_product/edit_product_page.dart index 119bee959778..3fb008453717 100644 --- a/packages/smooth_app/lib/pages/product/edit_product/edit_product_page.dart +++ b/packages/smooth_app/lib/pages/product/edit_product/edit_product_page.dart @@ -9,7 +9,6 @@ import 'package:smooth_app/database/local_database.dart'; import 'package:smooth_app/generic_lib/design_constants.dart'; import 'package:smooth_app/generic_lib/widgets/smooth_list_tile_card.dart'; import 'package:smooth_app/helpers/analytics_helper.dart'; -import 'package:smooth_app/helpers/color_extension.dart'; import 'package:smooth_app/helpers/product_cards_helper.dart'; import 'package:smooth_app/pages/onboarding/currency_selector_helper.dart'; import 'package:smooth_app/pages/prices/price_meta_product.dart'; @@ -23,12 +22,10 @@ import 'package:smooth_app/pages/product/product_field_editor.dart'; import 'package:smooth_app/pages/product/product_page/footer/new_product_footer.dart'; import 'package:smooth_app/pages/product/simple_input_page.dart'; import 'package:smooth_app/pages/product/simple_input_page_helpers.dart'; -import 'package:smooth_app/resources/app_animations.dart'; import 'package:smooth_app/resources/app_icons.dart' as icons; import 'package:smooth_app/themes/smooth_theme.dart'; import 'package:smooth_app/themes/smooth_theme_colors.dart'; import 'package:smooth_app/themes/theme_provider.dart'; -import 'package:smooth_app/widgets/smooth_banner.dart'; import 'package:smooth_app/widgets/v2/smooth_scaffold2.dart'; import 'package:smooth_app/widgets/v2/smooth_topbar2.dart'; @@ -93,9 +90,9 @@ class _EditProductPageState extends State with UpToDateMixin { bottom: MEDIUM_SPACE + ProductFooter.kHeight + LARGE_SPACE, ), bottomSafeArea: true, - floatingBottomBar: const EditProductFooter(), - bottomBar: - hasUploadIndicator ? const _EditPageLoadingIndicator() : null, + floatingBottomBar: EditProductFooter( + uploadIndicator: hasUploadIndicator, + ), children: [ SliverList.list( children: [ @@ -330,35 +327,3 @@ class _ListTitleItem extends SmoothListTileCard { ), ); } - -class _EditPageLoadingIndicator extends StatelessWidget { - const _EditPageLoadingIndicator(); - - @override - Widget build(BuildContext context) { - final AppLocalizations appLocalizations = AppLocalizations.of(context); - final SmoothColorsThemeExtension extension = - context.extension(); - - final bool lightTheme = context.lightTheme(); - - return SmoothBanner( - icon: CloudUploadAnimation( - size: MediaQuery.sizeOf(context).width * 0.10, - ), - iconAlignment: AlignmentDirectional.center, - iconBackgroundColor: lightTheme ? extension.primaryBlack : Colors.black, - title: appLocalizations.edit_product_pending_operations_banner_title, - titleColor: lightTheme ? null : Colors.white, - titleBackgroundColor: - lightTheme ? extension.primaryMedium : Colors.black26, - contentBackgroundColor: lightTheme - ? extension.primaryMedium.lighten() - : extension.primaryUltraBlack, - contentColor: lightTheme ? null : Colors.grey[200], - topShadow: true, - content: appLocalizations.edit_product_pending_operations_banner_message, - addSafeArea: true, - ); - } -} diff --git a/packages/smooth_app/lib/pages/product/nutrition_page/nutrition_page.dart b/packages/smooth_app/lib/pages/product/nutrition_page/nutrition_page.dart index 5eaa334a7a5e..bfcdd80438e1 100644 --- a/packages/smooth_app/lib/pages/product/nutrition_page/nutrition_page.dart +++ b/packages/smooth_app/lib/pages/product/nutrition_page/nutrition_page.dart @@ -122,7 +122,7 @@ class _NutritionPageLoadedState extends State actions: [ if (!_imageVisible) IconButton( - icon: const Icon(Icons.image_rounded), + icon: const Picture.open(), tooltip: ImageField.NUTRITION .getProductImageButtonText(appLocalizations), onPressed: () { diff --git a/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer.dart b/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer.dart index 0a81373dfca7..cc13633fa325 100644 --- a/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer.dart +++ b/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer.dart @@ -27,6 +27,7 @@ class ProductFooter extends StatelessWidget { const ProductFooter({ super.key, this.actions, + this.scrollController, this.showSettings = true, this.highlightFirstItem = true, }); @@ -36,6 +37,7 @@ class ProductFooter extends StatelessWidget { final List? actions; final bool showSettings; final bool highlightFirstItem; + final ScrollController? scrollController; @override Widget build(BuildContext context) { @@ -53,6 +55,7 @@ class ProductFooter extends StatelessWidget { ), child: _ProductFooterButtonsBar( actions: actions, + scrollController: scrollController, showSettings: showSettings, highlightFirstItem: highlightFirstItem, ), @@ -108,9 +111,11 @@ class _ProductFooterButtonsBar extends StatelessWidget { required this.showSettings, required this.highlightFirstItem, this.actions, + this.scrollController, }); final List? actions; + final ScrollController? scrollController; final bool showSettings; final bool highlightFirstItem; @@ -142,6 +147,7 @@ class _ProductFooterButtonsBar extends StatelessWidget { child: actions != null ? _ProductFooterButtonsBarItems( actions: actions!, + scrollController: scrollController, showSettings: showSettings, highlightFirstItem: highlightFirstItem, bottomPadding: bottomPadding, @@ -157,6 +163,7 @@ class _ProductFooterButtonsBar extends StatelessWidget { return _ProductFooterButtonsBarItems( actions: productPageActions, + scrollController: scrollController, showSettings: showSettings, highlightFirstItem: highlightFirstItem, bottomPadding: bottomPadding, @@ -174,9 +181,11 @@ class _ProductFooterButtonsBarItems extends StatelessWidget { required this.showSettings, required this.highlightFirstItem, required this.bottomPadding, + this.scrollController, }); final List actions; + final ScrollController? scrollController; final bool showSettings; final bool highlightFirstItem; final double bottomPadding; @@ -184,6 +193,7 @@ class _ProductFooterButtonsBarItems extends StatelessWidget { @override Widget build(BuildContext context) { return ListView.separated( + controller: scrollController, padding: EdgeInsetsDirectional.only( start: SMALL_SPACE, end: SMALL_SPACE, diff --git a/packages/smooth_app/lib/pages/product/simple_input_page_helpers.dart b/packages/smooth_app/lib/pages/product/simple_input_page_helpers.dart index 3549364498fb..0bc83e2f49b0 100644 --- a/packages/smooth_app/lib/pages/product/simple_input_page_helpers.dart +++ b/packages/smooth_app/lib/pages/product/simple_input_page_helpers.dart @@ -289,6 +289,9 @@ class SimpleInputPageBrandsHelper extends AbstractSimpleInputPageHelper { String getAddTooltip(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_add_action_brand; + @override + TextCapitalization? getTextCapitalization() => TextCapitalization.sentences; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.brand_name; @@ -358,6 +361,9 @@ class SimpleInputPageStoreHelper extends AbstractSimpleInputPageHelper { String getAddTooltip(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_add_action_store; + @override + TextCapitalization? getTextCapitalization() => TextCapitalization.sentences; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_stores_type; @@ -400,6 +406,9 @@ class SimpleInputPageOriginHelper extends AbstractSimpleInputPageHelper { String getAddTooltip(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_add_action_origin; + @override + TextCapitalization? getTextCapitalization() => TextCapitalization.sentences; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_origins_type; @@ -531,6 +540,9 @@ class SimpleInputPageLabelHelper extends AbstractSimpleInputPageHelper { String getAddTooltip(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_add_action_label; + @override + TextCapitalization? getTextCapitalization() => TextCapitalization.sentences; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_labels_type; @@ -609,6 +621,9 @@ class SimpleInputPageCategoryHelper extends AbstractSimpleInputPageHelper { String getAddTooltip(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_add_action_category; + @override + TextCapitalization? getTextCapitalization() => TextCapitalization.sentences; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_categories_type; @@ -664,6 +679,9 @@ class SimpleInputPageCountryHelper extends AbstractSimpleInputPageHelper { String getAddTooltip(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_add_action_country; + @override + TextCapitalization? getTextCapitalization() => TextCapitalization.sentences; + @override String getTypeLabel(AppLocalizations appLocalizations) => appLocalizations.edit_product_form_item_countries_type; diff --git a/packages/smooth_app/lib/resources/app_icons.dart b/packages/smooth_app/lib/resources/app_icons.dart index 8af21eca470c..b48e2c8beb7c 100644 --- a/packages/smooth_app/lib/resources/app_icons.dart +++ b/packages/smooth_app/lib/resources/app_icons.dart @@ -1239,21 +1239,21 @@ class Picture extends AppIcon { super.key, }) : super._(_IconsFont.image_check); - const Picture.checkAlt({ + const Picture.error({ super.color, super.size, super.shadow, super.semanticLabel, super.key, - }) : super._(_IconsFont.image_check_alt); + }) : super._(_IconsFont.image_error); - const Picture.error({ + const Picture.open({ super.color, super.size, super.shadow, super.semanticLabel, super.key, - }) : super._(_IconsFont.image_error); + }) : super._(_IconsFont.image_open); } class PinchToZoom extends AppIcon { diff --git a/packages/smooth_app/lib/resources/app_icons_font.dart b/packages/smooth_app/lib/resources/app_icons_font.dart index e0011a304338..0e94bc7f78f0 100644 --- a/packages/smooth_app/lib/resources/app_icons_font.dart +++ b/packages/smooth_app/lib/resources/app_icons_font.dart @@ -159,10 +159,6 @@ class _IconsFont { IconData(0xe849, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData delete_trash = IconData(0xe84a, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData image_check = - IconData(0xe84b, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData image_add = - IconData(0xe84c, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData app_store = IconData(0xe84d, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData document = @@ -237,8 +233,6 @@ class _IconsFont { IconData(0xe870, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData photo_select = IconData(0xe871, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData image_check_alt = - IconData(0xe875, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData image_error = IconData(0xe876, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData milk_download = @@ -251,8 +245,6 @@ class _IconsFont { IconData(0xe87b, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData scale = IconData(0xe87c, fontFamily: _kFontFam, fontPackage: _kFontPkg); - static const IconData gallery = - IconData(0xe87d, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData milk_filled_unhappy = IconData(0xe87e, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData move = @@ -285,6 +277,14 @@ class _IconsFont { IconData(0xe88c, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData drag_start = IconData(0xe88d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData image_add = + IconData(0xe88e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData image_check = + IconData(0xe88f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData gallery = + IconData(0xe890, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData image_open = + IconData(0xe891, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData share_cupertino = IconData(0xe8a4, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData share_material = diff --git a/packages/smooth_app/lib/widgets/smooth_banner.dart b/packages/smooth_app/lib/widgets/smooth_banner.dart index 80b447447a15..cd6249fb08dc 100644 --- a/packages/smooth_app/lib/widgets/smooth_banner.dart +++ b/packages/smooth_app/lib/widgets/smooth_banner.dart @@ -8,10 +8,12 @@ import 'package:smooth_app/widgets/smooth_text.dart'; class SmoothBanner extends StatelessWidget { const SmoothBanner({ required this.icon, - required this.title, required this.content, + this.title, this.titleColor, + this.titleStyle, this.contentColor, + this.contentStyle, this.iconAlignment, this.iconColor, this.iconBackgroundColor, @@ -26,7 +28,7 @@ class SmoothBanner extends StatelessWidget { final AlignmentGeometry? iconAlignment; final Widget icon; - final String title; + final String? title; final String content; /// If not null, a dismiss button is displayed @@ -39,7 +41,9 @@ class SmoothBanner extends StatelessWidget { final Color? iconColor; final Color? iconBackgroundColor; final Color? titleColor; + final TextStyle? titleStyle; final Color? contentColor; + final TextStyle? contentStyle; final Color? titleBackgroundColor; final Color? contentBackgroundColor; @@ -96,16 +100,18 @@ class SmoothBanner extends StatelessWidget { ), child: Row( children: [ - Expanded( - child: Text( - title, - style: TextStyle( - fontSize: 16.0, - fontWeight: FontWeight.bold, - color: titleColor ?? _titleColor, + if (title != null) + Expanded( + child: Text( + title!, + style: (titleStyle ?? + const TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold, + )) + .copyWith(color: titleColor ?? _titleColor), ), ), - ), if (onDismissClicked != null) ...[ const SizedBox(width: SMALL_SPACE), SmoothCloseButton( @@ -131,12 +137,13 @@ class SmoothBanner extends StatelessWidget { ), Padding( padding: const EdgeInsetsDirectional.symmetric( - horizontal: MEDIUM_SPACE), + horizontal: MEDIUM_SPACE, + ), child: TextWithBoldParts( text: content, - textStyle: TextStyle( - fontSize: 14.0, - height: 1.6, + textStyle: (contentStyle ?? + const TextStyle(fontSize: 14.0, height: 1.6)) + .copyWith( color: contentColor ?? const Color(0xFF373737), ), ), diff --git a/packages/smooth_app/lib/widgets/smooth_explanation_banner.dart b/packages/smooth_app/lib/widgets/smooth_explanation_banner.dart index 05f899e934f0..de6e51333775 100644 --- a/packages/smooth_app/lib/widgets/smooth_explanation_banner.dart +++ b/packages/smooth_app/lib/widgets/smooth_explanation_banner.dart @@ -145,12 +145,10 @@ class ExplanationBodyTitle extends StatelessWidget { class ExplanationBodyInfo extends StatelessWidget { const ExplanationBodyInfo({ required this.text, - this.icon = true, this.safeArea = false, }); final String text; - final bool icon; final bool safeArea; @override @@ -160,45 +158,23 @@ class ExplanationBodyInfo extends StatelessWidget { final bool lightTheme = context.lightTheme(); return ColoredBox( - color: lightTheme ? extension.primaryMedium : extension.primaryTone, + color: lightTheme ? extension.primaryLight : extension.primarySemiDark, child: ClipRect( child: Padding( padding: EdgeInsetsDirectional.only( bottom: safeArea ? MediaQuery.viewPaddingOf(context).bottom : 0.0, ), - child: Row( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - if (icon) - Align( - alignment: AlignmentDirectional.bottomCenter, - child: icons.AppIconTheme( - color: lightTheme - ? extension.primaryNormal - : extension.primaryMedium, - child: Transform.translate( - offset: const Offset(-17.0, 09.0), - child: const icons.Info(size: 55.0), - ), - ), - ), - Expanded( - child: Padding( - padding: EdgeInsetsDirectional.only( - start: icon ? SMALL_SPACE : LARGE_SPACE, - end: LARGE_SPACE, - top: MEDIUM_SPACE, - bottom: MEDIUM_SPACE, - ), - child: TextWithBoldParts( - text: text, - textStyle: TextStyle( - color: lightTheme ? extension.primaryDark : Colors.white, - ), - ), - ), + child: Padding( + padding: const EdgeInsetsDirectional.symmetric( + horizontal: LARGE_SPACE, + vertical: MEDIUM_SPACE, + ), + child: TextWithBoldParts( + text: text, + textStyle: TextStyle( + color: lightTheme ? extension.primaryDark : Colors.white, ), - ], + ), ), ), ), @@ -290,6 +266,7 @@ class _ExplanationContainerTitle extends StatelessWidget { start: LARGE_SPACE, end: LARGE_SPACE, top: MEDIUM_SPACE, + bottom: VERY_SMALL_SPACE, ), child: DecoratedBox( decoration: BoxDecoration( @@ -312,6 +289,7 @@ class _ExplanationContainerTitle extends StatelessWidget { label, style: TextStyle( color: foregroundColor, + fontSize: 16.0, fontWeight: FontWeight.bold, ), ), @@ -390,9 +368,7 @@ class _ExplanationBodyListItem extends StatelessWidget { ], DecoratedBox( decoration: BoxDecoration( - color: lightTheme - ? extension.primaryLight - : extension.primaryMedium, + color: iconBackgroundColor, borderRadius: ROUNDED_BORDER_RADIUS, ), child: Padding( @@ -402,7 +378,14 @@ class _ExplanationBodyListItem extends StatelessWidget { ), child: TextWithBoldParts( text: example, - textStyle: const TextStyle(color: Colors.black), + textStyle: const TextStyle( + color: Colors.white, + fontWeight: FontWeight.w600, + ), + highlightedTextStyle: const TextStyle( + color: Colors.white, + fontWeight: FontWeight.w900, + ), ), ), ) diff --git a/packages/smooth_app/lib/widgets/smooth_text.dart b/packages/smooth_app/lib/widgets/smooth_text.dart index 4e5c6a400129..9d3416843934 100644 --- a/packages/smooth_app/lib/widgets/smooth_text.dart +++ b/packages/smooth_app/lib/widgets/smooth_text.dart @@ -231,6 +231,7 @@ class TextWithBoldParts extends StatelessWidget { const TextWithBoldParts({ required this.text, this.textStyle, + this.highlightedTextStyle, this.textAlign, this.overflow, this.maxLines, @@ -238,6 +239,7 @@ class TextWithBoldParts extends StatelessWidget { final String text; final TextStyle? textStyle; + final TextStyle? highlightedTextStyle; final TextAlign? textAlign; final TextOverflow? overflow; final int? maxLines; @@ -257,7 +259,8 @@ class TextWithBoldParts extends StatelessWidget { symbol: r'\*\*', symbolLength: 2, defaultStyle: defaultTextStyle, - highlightedStyle: const TextStyle(fontWeight: FontWeight.bold), + highlightedStyle: highlightedTextStyle ?? + const TextStyle(fontWeight: FontWeight.bold), ).map( ((String, TextStyle?) part) { return TextSpan(