diff --git a/android/app/src/main/assets/fonts/fontello.ttf b/android/app/src/main/assets/fonts/fontello.ttf index e3fb9417..a5d89c11 100644 Binary files a/android/app/src/main/assets/fonts/fontello.ttf and b/android/app/src/main/assets/fonts/fontello.ttf differ diff --git a/src/assets/fonts/fontello.ttf b/src/assets/fonts/fontello.ttf index e3fb9417..a5d89c11 100644 Binary files a/src/assets/fonts/fontello.ttf and b/src/assets/fonts/fontello.ttf differ diff --git a/src/config/fontello.json b/src/config/fontello.json index bce731c2..b4e9afc4 100644 --- a/src/config/fontello.json +++ b/src/config/fontello.json @@ -859,6 +859,188 @@ "search": [ "stop-custom" ] + }, + { + "uid": "b6af155c8cd61f7c83e667cb5606859d", + "css": "doc", + "code": 59453, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM237.5 529.2H208.3C191.7 529.2 179.2 541.7 179.2 558.3V733.3C179.2 750 191.7 762.5 208.3 762.5H237.5C300 762.5 354.2 712.5 354.2 645.8 354.2 583.3 300 529.2 237.5 529.2ZM237.5 708.3L237.5 708.3 237.5 587.5H237.5C270.8 587.5 295.8 616.7 295.8 645.8 295.8 679.2 270.8 708.3 237.5 708.3ZM462.5 529.2C416.7 529.2 375 566.7 375 616.7V675C375 725 412.5 762.5 462.5 762.5 512.5 762.5 550 725 550 675V616.7C545.8 570.8 508.3 529.2 462.5 529.2ZM491.7 675C491.7 691.7 479.2 704.2 462.5 704.2 445.8 704.2 433.3 691.7 433.3 675V616.7C433.3 600 445.8 587.5 462.5 587.5 479.2 587.5 491.7 600 491.7 616.7V675ZM712.5 733.3C712.5 750 700 762.5 683.3 762.5 620.8 762.5 566.7 712.5 566.7 645.8 566.7 583.3 616.7 529.2 683.3 529.2 700 529.2 712.5 541.7 712.5 558.3S700 587.5 683.3 587.5C650 587.5 625 616.7 625 645.8 625 679.2 650 704.2 683.3 704.2 700 708.3 712.5 720.8 712.5 733.3Z", + "width": 1000 + }, + "search": [ + "doc" + ] + }, + { + "uid": "0f3219ee24f6759ecbb74fc920aa2d4e", + "css": "gif", + "code": 59454, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM587.5 587.5V629.2H637.5C654.2 629.2 666.7 641.7 666.7 658.3 666.7 675 654.2 687.5 637.5 687.5H587.5V737.5C587.5 754.2 575 766.7 558.3 766.7 541.7 766.7 529.2 754.2 529.2 737.5V562.5C529.2 545.8 541.7 533.3 558.3 533.3H654.2C670.8 533.3 683.3 545.8 683.3 562.5S670.8 591.7 654.2 591.7H587.5ZM508.3 558.3V733.3C508.3 750 495.8 762.5 479.2 762.5 462.5 762.5 450 750 450 733.3V558.3C450 541.7 462.5 529.2 479.2 529.2 495.8 529.2 508.3 541.7 508.3 558.3ZM429.2 645.8C429.2 708.3 379.2 762.5 312.5 762.5 250 762.5 195.8 712.5 195.8 645.8 195.8 583.3 245.8 529.2 312.5 529.2 333.3 529.2 358.3 537.5 375 550 383.3 554.2 387.5 562.5 387.5 570.8 387.5 575 387.5 583.3 383.3 587.5 375 600 358.3 604.2 345.8 595.8 337.5 587.5 325 583.3 316.7 583.3 283.3 583.3 254.2 612.5 254.2 641.7S283.3 700 316.7 700C337.5 700 358.3 687.5 370.8 666.7H329.2C312.5 666.7 300 654.2 300 637.5S312.5 608.3 329.2 608.3H408.3C416.7 616.7 429.2 629.2 429.2 645.8Z", + "width": 1000 + }, + "search": [ + "gif" + ] + }, + { + "uid": "166e5f8d3948ea9f9810ba56fdfc8869", + "css": "jpeg", + "code": 59455, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM233.3 558.3V683.3C233.3 695.8 233.3 708.3 225 716.7 220.8 725 212.5 733.3 204.2 737.5 195.8 741.7 183.3 745.8 170.8 745.8L162.5 745.8C162.5 745.8 162.5 745.8 162.5 745.8 154.2 745.8 150 745.8 145.8 737.5 141.7 733.3 137.5 729.2 137.5 720.8 137.5 716.7 137.5 712.5 141.7 708.3 145.8 704.2 150 700 154.2 700L162.5 700C170.8 700 175 695.8 179.2 695.8 183.3 691.7 183.3 687.5 183.3 679.2V554.2C183.3 545.8 187.5 537.5 191.7 533.3 195.8 529.2 204.2 525 212.5 525 220.8 525 229.2 529.2 233.3 533.3 233.3 541.7 233.3 550 233.3 558.3ZM400 550C387.5 537.5 366.7 533.3 345.8 533.3H275C266.7 533.3 258.3 537.5 254.2 541.7 250 545.8 245.8 554.2 245.8 562.5V725C245.8 733.3 250 741.7 254.2 745.8 258.3 745.8 266.7 750 275 750 283.3 750 291.7 745.8 295.8 741.7 300 737.5 304.2 729.2 304.2 720.8V670.8H350C375 670.8 391.7 666.7 404.2 650 416.7 637.5 425 620.8 425 600S412.5 562.5 400 550ZM362.5 620.8C358.3 625 350 629.2 337.5 629.2H300V575H337.5C345.8 575 358.3 575 362.5 583.3 366.7 587.5 370.8 591.7 370.8 604.2 370.8 612.5 366.7 616.7 362.5 620.8ZM575 708.3C579.2 712.5 579.2 716.7 579.2 725 579.2 733.3 579.2 737.5 575 741.7 570.8 745.8 566.7 745.8 558.3 745.8H458.3C450 745.8 441.7 741.7 437.5 737.5S429.2 725 429.2 716.7V558.3C429.2 550 433.3 541.7 437.5 537.5 441.7 533.3 450 529.2 458.3 529.2H558.3C566.7 529.2 570.8 529.2 575 533.3 579.2 537.5 579.2 541.7 579.2 550 579.2 558.3 579.2 562.5 575 566.7 570.8 570.8 566.7 570.8 558.3 570.8H479.2V612.5H550C558.3 612.5 562.5 612.5 566.7 616.7 570.8 620.8 570.8 625 570.8 633.3 570.8 641.7 570.8 645.8 566.7 650 562.5 654.2 558.3 654.2 550 654.2H479.2V695.8H558.3C562.5 704.2 570.8 704.2 575 708.3ZM770.8 645.8V712.5C770.8 716.7 770.8 725 766.7 729.2 762.5 733.3 762.5 737.5 754.2 737.5 745.8 741.7 733.3 741.7 725 745.8 712.5 745.8 704.2 750 691.7 750 666.7 750 645.8 745.8 629.2 737.5 612.5 729.2 600 716.7 591.7 700 583.3 683.3 579.2 662.5 579.2 641.7 579.2 625 583.3 608.3 587.5 595.8S600 570.8 608.3 562.5C616.7 554.2 629.2 545.8 645.8 541.7 666.7 533.3 695.8 533.3 725 537.5 737.5 541.7 745.8 545.8 758.3 550 762.5 554.2 766.7 558.3 766.7 562.5 766.7 566.7 766.7 570.8 766.7 575 766.7 579.2 762.5 583.3 762.5 587.5 758.3 591.7 754.2 595.8 750 595.8 745.8 595.8 741.7 595.8 733.3 591.7 729.2 587.5 720.8 587.5 712.5 583.3 704.2 583.3 695.8 579.2 691.7 579.2 679.2 579.2 666.7 583.3 658.3 587.5 650 591.7 641.7 600 637.5 608.3 633.3 616.7 633.3 629.2 633.3 645.8 633.3 666.7 637.5 683.3 645.8 691.7 654.2 700 670.8 708.3 691.7 708.3 700 708.3 704.2 708.3 712.5 704.2 716.7 704.2 720.8 704.2 720.8 704.2V666.7H700C691.7 666.7 687.5 666.7 683.3 662.5 679.2 658.3 679.2 654.2 679.2 645.8 679.2 637.5 683.3 633.3 683.3 629.2 687.5 625 691.7 625 700 625H750C758.3 625 762.5 625 766.7 629.2 770.8 633.3 770.8 641.7 770.8 645.8Z", + "width": 1000 + }, + "search": [ + "jpeg" + ] + }, + { + "uid": "e97bcfd2139fb1037853403809bba6d6", + "css": "jpg", + "code": 59456, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM433.3 529.2H362.5C345.8 529.2 333.3 541.7 333.3 558.3V733.3C333.3 750 345.8 762.5 362.5 762.5 379.2 762.5 391.7 750 391.7 733.3V683.3H433.3C475 683.3 508.3 650 508.3 608.3 508.3 566.7 475 529.2 433.3 529.2ZM433.3 629.2H391.7V587.5H433.3C445.8 587.5 454.2 595.8 454.2 608.3 454.2 620.8 441.7 629.2 433.3 629.2ZM312.5 558.3V683.3C312.5 725 279.2 758.3 237.5 758.3 195.8 758.3 162.5 725 162.5 683.3V675C162.5 658.3 175 645.8 191.7 645.8S220.8 658.3 220.8 675V683.3C220.8 695.8 229.2 704.2 241.7 704.2 254.2 704.2 262.5 695.8 262.5 683.3V558.3C262.5 541.7 275 529.2 291.7 529.2 300 529.2 312.5 541.7 312.5 558.3ZM762.5 645.8C762.5 708.3 712.5 762.5 645.8 762.5 583.3 762.5 529.2 712.5 529.2 645.8 529.2 583.3 579.2 529.2 645.8 529.2 666.7 529.2 691.7 537.5 708.3 550 716.7 554.2 720.8 562.5 720.8 570.8 720.8 575 720.8 583.3 716.7 587.5 708.3 600 691.7 604.2 679.2 595.8 670.8 587.5 658.3 587.5 645.8 587.5 612.5 587.5 583.3 616.7 583.3 645.8 583.3 679.2 608.3 704.2 645.8 704.2 666.7 704.2 687.5 691.7 700 670.8H658.3C641.7 670.8 629.2 658.3 629.2 641.7S641.7 612.5 658.3 612.5H737.5C750 616.7 762.5 629.2 762.5 645.8Z", + "width": 1000 + }, + "search": [ + "jpg" + ] + }, + { + "uid": "5658deaa8c37df78bd2a1964713dfc68", + "css": "mp3", + "code": 59457, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM504.2 529.2H437.5C420.8 529.2 408.3 541.7 408.3 558.3V716.7C408.3 733.3 420.8 745.8 437.5 745.8 454.2 745.8 466.7 733.3 466.7 716.7V687.5H508.3C550 687.5 583.3 654.2 583.3 612.5 579.2 566.7 545.8 529.2 504.2 529.2ZM504.2 629.2H462.5V587.5H504.2C516.7 587.5 525 595.8 525 608.3 525 620.8 512.5 629.2 504.2 629.2ZM375 558.3V720.8C375 729.2 370.8 737.5 366.7 741.7 362.5 745.8 354.2 750 345.8 750 337.5 750 329.2 745.8 325 741.7S316.7 729.2 316.7 720.8V645.8L283.3 704.2C279.2 708.3 279.2 712.5 275 716.7 266.7 720.8 254.2 720.8 245.8 716.7 241.7 712.5 237.5 708.3 237.5 704.2L204.2 645.8V720.8C204.2 729.2 200 737.5 195.8 741.7 191.7 745.8 183.3 750 175 750 166.7 750 158.3 745.8 154.2 741.7 150 737.5 145.8 729.2 145.8 720.8V558.3C145.8 550 150 541.7 154.2 537.5 158.3 533.3 166.7 529.2 175 529.2 183.3 529.2 187.5 529.2 195.8 533.3 200 537.5 204.2 541.7 208.3 545.8L262.5 641.7 316.7 545.8C320.8 537.5 325 533.3 329.2 533.3 333.3 529.2 341.7 529.2 350 529.2 358.3 529.2 366.7 533.3 370.8 537.5 370.8 541.7 375 550 375 558.3ZM745.8 683.3C745.8 695.8 741.7 708.3 737.5 716.7 729.2 725 720.8 733.3 708.3 737.5 695.8 741.7 679.2 745.8 662.5 745.8 654.2 745.8 641.7 745.8 633.3 741.7 625 741.7 612.5 737.5 608.3 733.3 600 729.2 595.8 725 591.7 720.8 583.3 720.8 583.3 712.5 583.3 708.3 583.3 704.2 583.3 700 587.5 695.8 591.7 691.7 595.8 687.5 600 687.5 604.2 687.5 612.5 687.5 616.7 687.5 625 691.7 629.2 691.7 637.5 695.8 650 700 662.5 695.8 670.8 695.8 675 695.8 679.2 691.7 679.2 691.7 679.2 687.5 683.3 687.5 683.3 683.3 683.3 679.2 683.3 675 679.2 670.8 675 666.7 670.8 666.7 662.5 666.7H645.8C637.5 666.7 629.2 662.5 625 658.3 620.8 654.2 616.7 645.8 616.7 637.5S620.8 625 625 620.8C629.2 616.7 637.5 612.5 645.8 612.5H658.3C662.5 612.5 666.7 612.5 670.8 612.5 675 612.5 675 608.3 679.2 608.3 679.2 608.3 683.3 604.2 683.3 600 683.3 595.8 683.3 591.7 679.2 587.5 675 583.3 670.8 583.3 662.5 583.3 658.3 583.3 654.2 583.3 645.8 583.3 641.7 583.3 633.3 587.5 629.2 587.5 625 591.7 616.7 591.7 612.5 591.7 608.3 591.7 604.2 587.5 600 583.3 595.8 579.2 595.8 575 595.8 570.8 595.8 566.7 595.8 562.5 600 554.2 600 550 608.3 545.8 612.5 541.7 620.8 537.5 629.2 533.3 641.7 533.3 650 533.3 662.5 529.2 670.8 529.2 687.5 529.2 700 533.3 712.5 537.5 725 541.7 733.3 550 737.5 558.3 745.8 566.7 745.8 579.2 745.8 591.7 745.8 600 745.8 608.3 741.7 612.5 737.5 620.8 733.3 625 729.2 629.2 729.2 629.2 725 633.3 725 633.3 733.3 637.5 737.5 641.7 741.7 645.8 741.7 658.3 745.8 670.8 745.8 683.3Z", + "width": 1000 + }, + "search": [ + "mp3" + ] + }, + { + "uid": "c4276d458f6b0b4cea642df8df842cea", + "css": "mp4", + "code": 59458, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM491.7 529.2H420.8C404.2 529.2 391.7 541.7 391.7 558.3V716.7C391.7 733.3 404.2 745.8 420.8 745.8 437.5 745.8 450 733.3 450 716.7V687.5H491.7C533.3 687.5 566.7 654.2 566.7 612.5 566.7 566.7 533.3 529.2 491.7 529.2ZM491.7 629.2H450V587.5H491.7C504.2 587.5 512.5 595.8 512.5 608.3 512.5 620.8 500 629.2 491.7 629.2ZM741.7 666.7C737.5 662.5 733.3 662.5 725 662.5H716.7V545.8C716.7 537.5 712.5 529.2 708.3 525 704.2 520.8 695.8 516.7 687.5 516.7 679.2 516.7 675 516.7 670.8 520.8 666.7 525 662.5 529.2 658.3 533.3L583.3 650C579.2 658.3 575 662.5 575 666.7 575 670.8 570.8 675 570.8 679.2 570.8 687.5 575 695.8 579.2 700 583.3 704.2 591.7 704.2 600 704.2H662.5V716.7C662.5 725 666.7 733.3 670.8 737.5 675 741.7 683.3 745.8 691.7 745.8S708.3 741.7 712.5 737.5C716.7 733.3 720.8 725 720.8 716.7V708.3H729.2C737.5 708.3 741.7 708.3 745.8 700 750 695.8 754.2 691.7 754.2 683.3 750 675 745.8 670.8 741.7 666.7ZM662.5 662.5H625L662.5 608.3V662.5ZM366.7 558.3V716.7C366.7 725 362.5 733.3 358.3 737.5 354.2 741.7 345.8 745.8 337.5 745.8 329.2 745.8 320.8 741.7 316.7 737.5 312.5 733.3 308.3 725 308.3 716.7V645.8L275 700C270.8 704.2 270.8 708.3 266.7 712.5 258.3 716.7 245.8 716.7 237.5 712.5 233.3 708.3 229.2 708.3 229.2 700L195.8 645.8V716.7C195.8 725 191.7 733.3 187.5 737.5 183.3 741.7 175 745.8 166.7 745.8 158.3 745.8 150 741.7 145.8 737.5 141.7 733.3 137.5 725 137.5 716.7V558.3C137.5 550 141.7 541.7 145.8 537.5 150 533.3 158.3 529.2 166.7 529.2 175 529.2 179.2 529.2 183.3 533.3S191.7 541.7 195.8 545.8L250 641.7 304.2 545.8C308.3 537.5 312.5 533.3 316.7 533.3 320.8 529.2 329.2 529.2 333.3 529.2 341.7 529.2 350 533.3 354.2 537.5 366.7 541.7 366.7 550 366.7 558.3Z", + "width": 1000 + }, + "search": [ + "mp4" + ] + }, + { + "uid": "da23c14f148fecd1fb3f17d0cd6f4141", + "css": "others", + "code": 59459, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V895.8C216.7 900 216.7 900 216.7 904.2 225 945.8 258.3 975 300 975H845.8C891.7 975 933.3 937.5 933.3 887.5V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7Z", + "width": 1000 + }, + "search": [ + "others" + ] + }, + { + "uid": "449675dcc8582c64aec858ca315cd13a", + "css": "pdf", + "code": 59460, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C100 333.3 62.5 375 62.5 420.8V725C62.5 787.5 112.5 837.5 175 837.5H216.7V887.5C216.7 933.3 254.2 975 304.2 975H850C895.8 975 937.5 937.5 937.5 887.5V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM275 529.2H208.3C191.7 529.2 179.2 541.7 179.2 558.3V733.3C179.2 750 191.7 762.5 208.3 762.5 225 762.5 237.5 750 237.5 733.3V683.3H279.2C320.8 683.3 354.2 650 354.2 608.3 354.2 566.7 316.7 529.2 275 529.2ZM275 629.2H233.3V587.5H275C287.5 587.5 295.8 595.8 295.8 608.3 295.8 620.8 287.5 629.2 275 629.2ZM433.3 529.2H404.2C387.5 529.2 375 541.7 375 558.3V733.3C375 750 387.5 762.5 404.2 762.5H433.3C495.8 762.5 550 712.5 550 645.8 545.8 583.3 495.8 529.2 433.3 529.2ZM433.3 708.3L433.3 708.3 433.3 587.5H433.3C466.7 587.5 491.7 616.7 491.7 645.8 491.7 679.2 466.7 708.3 433.3 708.3ZM625 587.5V629.2H675C691.7 629.2 704.2 641.7 704.2 658.3 704.2 675 691.7 687.5 675 687.5H625V737.5C625 754.2 612.5 766.7 595.8 766.7 579.2 766.7 566.7 754.2 566.7 737.5V562.5C566.7 545.8 579.2 533.3 595.8 533.3H691.7C708.3 533.3 720.8 545.8 720.8 562.5S708.3 591.7 691.7 591.7H625Z", + "width": 1000 + }, + "search": [ + "pdf" + ] + }, + { + "uid": "437848c83571253a56ee335bd6995f9c", + "css": "png", + "code": 59461, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM254.2 529.2H187.5C170.8 529.2 158.3 541.7 158.3 558.3V733.3C158.3 750 170.8 762.5 187.5 762.5S216.7 750 216.7 733.3V683.3H258.3C300 683.3 333.3 650 333.3 608.3 333.3 566.7 300 529.2 254.2 529.2ZM254.2 629.2H212.5V587.5H254.2C266.7 587.5 275 595.8 275 608.3 275 620.8 266.7 629.2 254.2 629.2ZM762.5 645.8C762.5 708.3 712.5 762.5 645.8 762.5 583.3 762.5 529.2 712.5 529.2 645.8 529.2 583.3 579.2 529.2 645.8 529.2 666.7 529.2 691.7 537.5 708.3 550 716.7 554.2 720.8 562.5 720.8 570.8 720.8 575 720.8 583.3 716.7 587.5 708.3 600 691.7 604.2 679.2 595.8 670.8 587.5 658.3 587.5 645.8 587.5 612.5 587.5 583.3 616.7 583.3 645.8 583.3 679.2 608.3 704.2 645.8 704.2 666.7 704.2 687.5 691.7 700 670.8H658.3C641.7 670.8 629.2 658.3 629.2 641.7S641.7 612.5 658.3 612.5H737.5C750 616.7 762.5 629.2 762.5 645.8ZM508.3 558.3V733.3C508.3 745.8 500 758.3 487.5 762.5 483.3 762.5 483.3 762.5 479.2 762.5 470.8 762.5 458.3 758.3 454.2 745.8L408.3 662.5V729.2C408.3 745.8 395.8 758.3 379.2 758.3S354.2 750 354.2 733.3V558.3C354.2 545.8 362.5 533.3 375 529.2 387.5 525 400 533.3 408.3 541.7L454.2 625V558.3C454.2 541.7 466.7 529.2 483.3 529.2 495.8 529.2 508.3 541.7 508.3 558.3Z", + "width": 1000 + }, + "search": [ + "png" + ] + }, + { + "uid": "08cbe2202700da5a5130ce7a70d67746", + "css": "svg", + "code": 59462, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM333.3 695.8C333.3 733.3 304.2 762.5 266.7 762.5H208.3C191.7 762.5 179.2 750 179.2 733.3S191.7 708.3 208.3 708.3H266.7C270.8 708.3 279.2 704.2 279.2 695.8 279.2 691.7 275 683.3 266.7 683.3H245.8C208.3 683.3 179.2 654.2 179.2 616.7 179.2 579.2 208.3 550 245.8 550H304.2C320.8 550 333.3 562.5 333.3 579.2S320.8 608.3 304.2 608.3H245.8C241.7 608.3 233.3 612.5 233.3 620.8 233.3 625 237.5 633.3 245.8 633.3H266.7C304.2 629.2 333.3 658.3 333.3 695.8ZM750 650C750 712.5 700 758.3 641.7 758.3 579.2 758.3 533.3 708.3 533.3 650S583.3 541.7 641.7 541.7C662.5 541.7 683.3 545.8 704.2 558.3 712.5 562.5 716.7 570.8 716.7 579.2 716.7 583.3 716.7 587.5 712.5 595.8 704.2 608.3 687.5 612.5 675 604.2 666.7 595.8 654.2 595.8 641.7 595.8 608.3 595.8 583.3 620.8 583.3 654.2 583.3 683.3 608.3 712.5 641.7 712.5 662.5 712.5 683.3 700 691.7 683.3H650C637.5 683.3 625 670.8 625 658.3 625 641.7 637.5 633.3 650 633.3H725C741.7 625 750 637.5 750 650ZM529.2 570.8C529.2 579.2 529.2 583.3 525 591.7L470.8 733.3C466.7 741.7 462.5 750 458.3 754.2 454.2 758.3 445.8 762.5 437.5 762.5 429.2 762.5 420.8 758.3 416.7 754.2S408.3 741.7 404.2 733.3L350 591.7C345.8 583.3 345.8 575 345.8 570.8 345.8 562.5 350 558.3 354.2 554.2 358.3 550 366.7 545.8 375 545.8 383.3 545.8 387.5 545.8 391.7 550 395.8 554.2 400 562.5 404.2 570.8L437.5 666.7 470.8 570.8C475 562.5 479.2 554.2 483.3 550 487.5 545.8 495.8 545.8 504.2 545.8 512.5 545.8 516.7 550 520.8 554.2 529.2 558.3 529.2 566.7 529.2 570.8Z", + "width": 1000 + }, + "search": [ + "svg" + ] + }, + { + "uid": "debc4716535e277108cc1ef4cce1acc1", + "css": "txt", + "code": 59463, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM725 558.3C725 575 712.5 587.5 695.8 587.5H666.7V733.3C666.7 750 654.2 762.5 637.5 762.5 620.8 762.5 608.3 750 608.3 733.3V587.5H579.2C562.5 587.5 550 575 550 558.3S562.5 529.2 579.2 529.2H695.8C712.5 529.2 725 541.7 725 558.3ZM354.2 558.3C354.2 575 341.7 587.5 325 587.5H291.7V733.3C291.7 750 279.2 762.5 262.5 762.5 245.8 762.5 233.3 750 233.3 733.3V587.5H208.3C191.7 587.5 179.2 575 179.2 558.3S191.7 529.2 208.3 529.2H325C341.7 529.2 354.2 541.7 354.2 558.3ZM516.7 741.7C512.5 745.8 508.3 745.8 504.2 745.8 495.8 745.8 487.5 741.7 479.2 733.3L454.2 691.7 429.2 733.3C425 741.7 416.7 745.8 404.2 745.8 400 745.8 395.8 745.8 391.7 741.7 379.2 733.3 375 716.7 383.3 704.2L425 637.5 387.5 575C383.3 566.7 383.3 562.5 383.3 554.2 383.3 550 387.5 545.8 387.5 541.7L395.8 537.5 395.8 537.5C400 533.3 404.2 533.3 408.3 533.3 416.7 533.3 425 537.5 429.2 545.8H429.2L433.3 554.2 454.2 583.3 475 554.2 479.2 545.8H479.2C483.3 537.5 491.7 533.3 500 533.3 504.2 533.3 508.3 533.3 512.5 537.5L512.5 537.5 520.8 541.7C525 545.8 525 550 525 554.2 525 562.5 525 570.8 520.8 575L483.3 637.5 525 700C533.3 716.7 529.2 733.3 516.7 741.7Z", + "width": 1000 + }, + "search": [ + "txt" + ] + }, + { + "uid": "4a5830b320131adbffced0f124c7ab93", + "css": "xls", + "code": 59464, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM362.5 737.5C358.3 741.7 354.2 741.7 350 741.7 341.7 741.7 333.3 737.5 325 729.2L300 687.5 275 729.2C270.8 737.5 262.5 741.7 250 741.7 245.8 741.7 241.7 741.7 237.5 737.5 225 729.2 220.8 712.5 229.2 700L270.8 633.3 233.3 570.8C229.2 562.5 229.2 558.3 229.2 550 229.2 545.8 233.3 541.7 233.3 537.5L241.7 533.3 241.7 533.3C245.8 533.3 250 529.2 254.2 529.2 262.5 529.2 270.8 533.3 275 541.7H275L279.2 550 300 583.3 320.8 554.2 325 541.7H325C329.2 533.3 337.5 529.2 345.8 529.2 350 529.2 354.2 529.2 358.3 533.3L358.3 533.3 366.7 541.7C370.8 545.8 375 550 375 554.2 375 562.5 375 570.8 370.8 575L333.3 637.5 375 704.2C379.2 712.5 375 729.2 362.5 737.5ZM512.5 716.7C512.5 733.3 500 745.8 483.3 745.8H425C408.3 745.8 395.8 733.3 395.8 716.7V558.3C395.8 541.7 408.3 529.2 425 529.2S454.2 541.7 454.2 558.3V687.5H483.3C500 687.5 512.5 700 512.5 716.7ZM670.8 637.5V716.7C670.8 733.3 658.3 745.8 641.7 745.8H562.5C545.8 745.8 533.3 733.3 533.3 716.7S545.8 687.5 562.5 687.5H612.5V666.7H562.5C545.8 666.7 533.3 654.2 533.3 637.5V558.3C533.3 541.7 545.8 529.2 562.5 529.2H641.7C658.3 529.2 670.8 541.7 670.8 558.3S658.3 587.5 641.7 587.5H591.7V608.3H641.7C658.3 608.3 670.8 620.8 670.8 637.5Z", + "width": 1000 + }, + "search": [ + "xls" + ] + }, + { + "uid": "9cf30afb3d5ec742942da814f8a5224e", + "css": "zip", + "code": 59465, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M929.2 187.5L770.8 29.2C766.7 25 758.3 20.8 750 20.8H304.2C258.3 20.8 216.7 58.3 216.7 108.3V333.3H150C104.2 333.3 66.7 370.8 62.5 412.5 62.5 412.5 62.5 416.7 62.5 416.7V720.8C62.5 783.3 112.5 833.3 175 833.3H216.7V883.3C216.7 929.2 254.2 970.8 304.2 970.8H850C895.8 970.8 937.5 933.3 937.5 883.3V208.3C937.5 200 933.3 191.7 929.2 187.5ZM783.3 116.7L845.8 179.2H783.3V116.7ZM150 391.7H220.8V454.2H150C133.3 454.2 120.8 441.7 120.8 425 116.7 404.2 133.3 391.7 150 391.7ZM175 783.3C141.7 783.3 116.7 758.3 116.7 725V500C125 504.2 137.5 504.2 145.8 504.2H762.5C775 504.2 783.3 512.5 783.3 525V758.3C783.3 770.8 775 779.2 762.5 779.2H175ZM883.3 891.7C883.3 908.3 870.8 920.8 854.2 920.8H304.2C287.5 920.8 275 908.3 275 891.7V841.7H766.7C808.3 841.7 841.7 808.3 841.7 766.7V533.3C841.7 491.7 808.3 458.3 766.7 458.3H275V108.3C275 91.7 287.5 79.2 304.2 79.2H725V208.3C725 225 737.5 237.5 754.2 237.5H883.3V891.7ZM429.2 733.3C429.2 750 416.7 762.5 400 762.5H283.3C275 762.5 262.5 758.3 258.3 745.8 254.2 737.5 254.2 725 258.3 716.7L345.8 583.3H283.3C266.7 583.3 254.2 570.8 254.2 554.2S266.7 525 283.3 525H400C408.3 525 420.8 529.2 425 541.7 429.2 550 429.2 562.5 425 570.8L337.5 708.3H404.2C416.7 708.3 429.2 720.8 429.2 733.3ZM625 529.2H558.3C541.7 529.2 529.2 541.7 529.2 558.3V733.3C529.2 750 541.7 762.5 558.3 762.5 575 762.5 587.5 750 587.5 733.3V683.3H629.2C670.8 683.3 704.2 650 704.2 608.3 704.2 566.7 670.8 529.2 625 529.2ZM625 629.2H583.3V587.5H625C637.5 587.5 645.8 595.8 645.8 608.3 645.8 620.8 637.5 629.2 625 629.2ZM508.3 558.3V733.3C508.3 750 495.8 762.5 479.2 762.5 462.5 762.5 450 750 450 733.3V558.3C450 541.7 462.5 529.2 479.2 529.2 495.8 529.2 508.3 541.7 508.3 558.3Z", + "width": 1000 + }, + "search": [ + "zip" + ] } ] } \ No newline at end of file diff --git a/src/modules/tasks/atoms/document-preview.atom.tsx b/src/modules/tasks/atoms/document-preview.atom.tsx index 13412e43..65c012b3 100644 --- a/src/modules/tasks/atoms/document-preview.atom.tsx +++ b/src/modules/tasks/atoms/document-preview.atom.tsx @@ -6,7 +6,7 @@ import { Txt, useTheme, } from '@/shared' -import { isImage, isVideo } from '@/shared/helpers' +import { getIconNameByExtension, isImage, isVideo } from '@/shared/helpers' import { PartialTheme } from '@/shared/themes/interfaces' import React, { FC, useState } from 'react' import { Linking, StyleSheet, TouchableOpacity, View } from 'react-native' @@ -24,10 +24,11 @@ export const DocumentPreview: FC = ({ url, allowDelete, onDelete }) => { const prepareFileName = () => { const splitUrlArr = url.split('/') - return splitUrlArr[splitUrlArr.length - 1] } + const iconName = getIconNameByExtension(url) + const renderPreview = () => { if (isImage(url)) return ( @@ -71,7 +72,7 @@ export const DocumentPreview: FC = ({ url, allowDelete, onDelete }) => { return ( = props => { fsService.shareFile(content?.fileUrl, content?.name) }, [props.content]) + const iconName = getIconNameByExtension(props?.content?.fileUrl) + return ( = props => { diff --git a/src/shared/components/plugins/chat/message-media-preview.component.tsx b/src/shared/components/plugins/chat/message-media-preview.component.tsx index 86ce723c..4534ee69 100644 --- a/src/shared/components/plugins/chat/message-media-preview.component.tsx +++ b/src/shared/components/plugins/chat/message-media-preview.component.tsx @@ -1,4 +1,5 @@ import { $size, IconComponent, MessageType, useTheme } from '@/shared' +import { getIconNameByExtension } from '@/shared/helpers' import React, { useMemo, useState } from 'react' import { StyleSheet, Image, View, StyleProp, ViewStyle } from 'react-native' import Video from 'react-native-video' @@ -20,13 +21,14 @@ export const MessageMediaPreview = ({ const [paused, setPaused] = useState(false) + const iconName = getIconNameByExtension(uri) const getContent = () => { if (type === MessageType.File) return ( ) diff --git a/src/shared/enums/file-type.enum.ts b/src/shared/enums/file-type.enum.ts new file mode 100644 index 00000000..6179c756 --- /dev/null +++ b/src/shared/enums/file-type.enum.ts @@ -0,0 +1,14 @@ +export enum FileType { + DOC = "doc", + GIF = "gif", + JPEG = "jpeg", + JPG = "jpg", + MP3 = "mp3", + MP4 = "mp4", + PDF = "pdf", + PNG = "png", + SVG = "svg", + TXT = "txt", + XLS = "xls", + ZIP = "zip" +} \ No newline at end of file diff --git a/src/shared/enums/index.ts b/src/shared/enums/index.ts index 98c201d9..420feb75 100644 --- a/src/shared/enums/index.ts +++ b/src/shared/enums/index.ts @@ -14,4 +14,5 @@ export * from './btns-type.enum' export * from './actions-queue-type.enum' export * from './entity-type.enum' export * from './permissions.enum' -export * from './error-message.enum' \ No newline at end of file +export * from './error-message.enum' +export * from './file-type.enum' \ No newline at end of file diff --git a/src/shared/helpers/fs.helpers.ts b/src/shared/helpers/fs.helpers.ts index dea54b40..1001cbb0 100644 --- a/src/shared/helpers/fs.helpers.ts +++ b/src/shared/helpers/fs.helpers.ts @@ -1,4 +1,6 @@ +import _ from 'lodash' import { Alert, Platform } from 'react-native' +import { FileType } from '../enums' import { IFile } from '../interfaces' export const MAX_FILE_SIZE = 50000000 @@ -8,6 +10,21 @@ const DIGITS_REG_EXP = /\d+/ const M4A_EXT = 'm4a' const MOV_EXT = 'mov' +const iconByFileType = { + [FileType.DOC]: 'doc', + [FileType.JPG]: 'jpg', + [FileType.GIF]: 'gif', + [FileType.JPEG]: 'jpeg', + [FileType.MP3]: 'mp3', + [FileType.MP4]: 'mp4', + [FileType.PDF]: 'pdf', + [FileType.PNG]: 'png', + [FileType.SVG]: 'svg', + [FileType.TXT]: 'txt', + [FileType.XLS]: 'xls', + [FileType.ZIP]: 'zip' +}; + export const getFileName = (file: any) => { // Alert.alert('FILe', JSON.stringify(file)) try { @@ -146,3 +163,22 @@ export const getNameFromFileUrl = (url: string) => { return dirtyName; }; + +export const getFileType = (name: string) => { + if (!name) return null; + + const extension = getFileExtension(name); + if (_.isEmpty(extension)) return null; + + if (Object.values(FileType).includes(extension.toLowerCase() as FileType)) + return extension.toLowerCase() as FileType; + + return null; +}; + +export const getIconNameByExtension = (name: string) => { + const fileType = getFileType(name); + const iconByType = iconByFileType[fileType]; + if (iconByType) return iconByType; + return 'others'; +};