diff --git a/animations/apiError.json b/animations/apiError.json old mode 100644 new mode 100755 index d794b13..5918240 --- a/animations/apiError.json +++ b/animations/apiError.json @@ -1 +1 @@ -{"v":"4.8.0","meta":{"g":"LottieFiles AE ","a":"","k":"","d":"","tc":""},"fr":24,"ip":0,"op":48,"w":1000,"h":1000,"nm":"Loading part","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":89,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.755,0.755,0.667],"y":[1,1,1]},"o":{"x":[1,1,0.333],"y":[0,0,0]},"t":0,"s":[0,0,100]},{"t":21,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-86,-88.5],[92,87]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":45,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[1],"y":[0]},"t":12,"s":[100]},{"t":21,"s":[0]}],"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":72,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.755,0.755,0.667],"y":[1,1,1]},"o":{"x":[1,1,0.333],"y":[0,0,0]},"t":0,"s":[0,0,100]},{"t":21,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-86,-88.5],[92,87]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":38,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[1],"y":[0]},"t":12,"s":[0]},{"t":21,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":72,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Layer 1/Animation Done Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[263,263,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.755,0.755,0.667],"y":[1,1,1]},"o":{"x":[1,1,0.333],"y":[0,0,0]},"t":0,"s":[0,0,100]},{"t":16.7998046875,"s":[100,100,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-144.975],[144.975,0],[0,144.975],[-144.975,0]],"o":[[0,144.975],[-144.975,0],[0,-144.975],[144.975,0]],"v":[[262.5,0],[0,262.5],[-262.5,0],[0,-262.5]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[262.75,262.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":72,"st":0,"bm":0}],"markers":[]} \ No newline at end of file +{"v":"5.4.1","fr":29.9700012207031,"ip":0,"op":150.000006109625,"w":150,"h":150,"nm":"Bag-anim","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"ref","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p667_1_0p167_0p167"],"t":0,"s":[0],"e":[-21]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p667_1_0p167_0p167"],"t":8,"s":[-21],"e":[185.2]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":26,"s":[185.2],"e":[180]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":30,"s":[180],"e":[180]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p667_1_0p167_0p167"],"t":98.828,"s":[180],"e":[200]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p667_1_0p167_0p167"],"t":103.828,"s":[200],"e":[-5]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.333],"y":[0]},"n":["0p833_0p833_0p333_0"],"t":124.22,"s":[-5],"e":[0]},{"t":127.000005172816}],"ix":10},"p":{"a":0,"k":[75,75,0],"ix":2},"a":{"a":0,"k":[50,50,0],"ix":1},"s":{"a":0,"k":[30,30,100],"ix":6}},"ao":0,"ip":0,"op":152.000006191087,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Eye R","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[85.25,75,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-5.625,-12.875],[-5.625,-4.25]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.917647058824,0.388235294118,0.4,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.333],"y":[0]},"n":["0p833_0p833_0p333_0"],"t":42,"s":[0],"e":[100]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"n":["0p833_1_0p167_0"],"t":55,"s":[100],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0]},"n":["0p833_0p833_0p167_0"],"t":88.828,"s":[100],"e":[0]},{"t":98.8275040253266}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":42.0000017106951,"op":153.000006231818,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Eye L","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[75,75,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-5.625,-12.875],[-5.625,-4.25]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.917647058824,0.388235294118,0.4,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.333],"y":[0]},"n":["0p833_0p833_0p333_0"],"t":42,"s":[0],"e":[100]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"n":["0p833_1_0p167_0"],"t":49.99,"s":[100],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0]},"n":["0p833_0p833_0p167_0"],"t":86.828,"s":[100],"e":[0]},{"t":96.8275039438649}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":42.0000017106951,"op":152.000006191087,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"mouth","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[50.313,-63.333,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[333.333,333.333,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-13.875],[0,14.625]],"o":[[0,13.875],[0,-14.625]],"v":[[-11.125,21],[11.25,21]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.917647063732,0.388235300779,0.40000000596,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":2,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":true},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"handle","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p667_1_0p167_0p167"],"t":36,"s":[100],"e":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"n":["0p667_1_0p167_0"],"t":46.57,"s":[0],"e":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0.167]},"n":["0p667_1_0p167_0p167"],"t":86.828,"s":[0],"e":[100]},{"t":95.8275039031341}],"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":152.000006191087,"st":-899.000036617021,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"bag-outside","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[50.313,-63.333,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[333.333,333.333,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-13.875],[0,14.625]],"o":[[0,13.875],[0,-14.625]],"v":[[-11.125,21],[11.25,21]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.556862771511,0.556862771511,0.57647061348,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":2,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":true},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"handle","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,-3.313],[0,0],[0,0],[0,2.75]],"o":[[0,0],[0,0],[0,3.313],[0,0],[0,0],[0,-2.75]],"v":[[23.938,15.938],[-24.097,15.975],[-24.125,53.438],[-21.109,57.375],[21.25,57.313],[23.938,54.375]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.556862771511,0.556862771511,0.57647061348,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.976470588235,0.976470588235,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"bag","np":3,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":152.000006191087,"st":-899.000036617021,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"bag-inside","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[50,-63.333,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[333.333,333.333,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[16.625,10.5],[-16.75,10.5],[-23.875,15.75],[-14.875,36],[13.5,35.75],[24,15.625]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.556862771511,0.556862771511,0.57647061348,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.733333333333,0.760784313725,0.788235294118,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":151.000006150356,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"BG","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[78,71,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[94.964,94.964,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[142,142],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.997878011068,0.819607962814,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.976470588235,0.976470588235,0.976470588235,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3,4],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[103.512,103.512],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":153.000006231818,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/lib/app/modules/Graphql/controllers/graphql_controller.dart b/lib/app/modules/Graphql/controllers/graphql_controller.dart index f90d908..4a0abd1 100644 --- a/lib/app/modules/Graphql/controllers/graphql_controller.dart +++ b/lib/app/modules/Graphql/controllers/graphql_controller.dart @@ -1,3 +1,6 @@ +import 'dart:io'; + +import 'package:flutter/foundation.dart'; import 'package:get/get.dart'; import 'package:getx_standard/app/service/handler/exception_handler.dart'; @@ -54,6 +57,28 @@ class GraphQLController extends GetxController with ExceptionHandler { hideLoading(); } + /// + Future uploadFileMutation(File file) async { + showLoading(); + const mutation = ''' + + '''; + + final result = await graphQLService.performMutationWithFile( + mutation: mutation, + file: file, + fileFieldName: 'fileFieldName', + variables: { + // Additional variables if needed + }, + ).catchError(handleGraphqlError); + if (result == null) return; + if (kDebugMode) { + print(result.toString()); + } + hideLoading(); + } + @override void onReady() async { await getAlbums(); diff --git a/lib/app/service/graphQL/graphql_config.dart b/lib/app/service/graphQL/graphql_config.dart index 5888d29..9ef5e6d 100644 --- a/lib/app/service/graphQL/graphql_config.dart +++ b/lib/app/service/graphQL/graphql_config.dart @@ -4,8 +4,16 @@ class GraphQLConfig { static HttpLink httpLink = HttpLink("https://api.mocki.io/v2/c4d7a195/graphql"); + final AuthLink authLink = AuthLink( + getToken: () async { + // String token = await MySharedPref.getToken() ?? ""; + // return "JWT $token"; + return "JWT token"; + }, + headerKey: "Authorization"); + GraphQLClient graphqlClient() => GraphQLClient( cache: GraphQLCache(), - link: httpLink, + link: authLink.concat(httpLink), ); } diff --git a/lib/app/service/graphQL/graphql_service.dart b/lib/app/service/graphQL/graphql_service.dart index 09727d7..c76990a 100644 --- a/lib/app/service/graphQL/graphql_service.dart +++ b/lib/app/service/graphQL/graphql_service.dart @@ -1,3 +1,6 @@ +import 'dart:convert'; +import 'dart:io'; + import 'package:get/get.dart'; import 'package:graphql_flutter/graphql_flutter.dart'; @@ -6,37 +9,64 @@ import 'graphql_config.dart'; class GraphQLService extends GetxService { GraphQLConfig graphQLConfig = GraphQLConfig(); String errorMessage = ""; + + /// MUTATIONS Future performMutation(String mutation) async { final mutationOptions = MutationOptions( document: gql(mutation), + fetchPolicy: FetchPolicy.networkOnly, ); final result = await graphQLConfig.graphqlClient().mutate(mutationOptions); + _checkException(result); + return result.data; + } - if (result.hasException) { - final List errors = result.exception!.graphqlErrors; - final LinkException? linkException = result.exception!.linkException; - if (errors.isNotEmpty) { - for (final GraphQLError error in errors) { - errorMessage = error.message.toString(); + /// + Future performMutationWithFile({ + required String mutation, + required File file, + required String fileFieldName, + Map? variables, + }) async { + final String base64File = base64Encode(file.readAsBytesSync()); - throw error.message; - } - } else if (linkException != null) { - throw linkException; - } - } + final MutationOptions options = MutationOptions( + document: gql(mutation), + variables: { + ...variables ?? {}, + fileFieldName: { + 'filename': file.path.split('/').last, + 'mimetype': 'YOUR_FILE_MIMETYPE', + 'encoding': 'base64', + 'content': base64File, + }, + }, + fetchPolicy: FetchPolicy.noCache, + ); + + final result = await graphQLConfig.graphqlClient().mutate(options); + _checkException(result); return result.data; } + /// QUERY Future performQuery(String query) async { final queryOptions = QueryOptions( document: gql(query), + fetchPolicy: FetchPolicy.networkOnly, ); final result = await graphQLConfig.graphqlClient().query(queryOptions); + _checkException(result); + + return result.data; + } + + /// ERROR CHECKER + _checkException(result) { if (result.hasException) { final List errors = result.exception!.graphqlErrors; final LinkException? linkException = result.exception!.linkException; @@ -47,10 +77,11 @@ class GraphQLService extends GetxService { throw error.message; } } else if (linkException != null) { + errorMessage = linkException.originalException.toString() != "null" + ? linkException.originalException.toString() + : "Something went wrong!"; throw linkException; } } - - return result.data; } } diff --git a/lib/app/service/handler/exception_handler.dart b/lib/app/service/handler/exception_handler.dart index 859e6ed..831906f 100644 --- a/lib/app/service/handler/exception_handler.dart +++ b/lib/app/service/handler/exception_handler.dart @@ -10,6 +10,7 @@ mixin class ExceptionHandler { final GraphQLService graphQLService = GraphQLService(); RxBool isError = false.obs; + /// FOR REST API void handleError(error) { isError.value = true; hideLoading(); @@ -23,6 +24,7 @@ mixin class ExceptionHandler { } } + /// FOR GRAPHQL API void handleGraphqlError(error) { isError.value = true; hideLoading(); diff --git a/lib/app/service/helper/dialog_helper.dart b/lib/app/service/helper/dialog_helper.dart index 2c6683e..b17ab46 100644 --- a/lib/app/service/helper/dialog_helper.dart +++ b/lib/app/service/helper/dialog_helper.dart @@ -1,3 +1,4 @@ +import 'package:animated_text_kit/animated_text_kit.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; @@ -22,22 +23,32 @@ class DialogHelper { children: [ Text( title, - style: Get.textTheme.headlineMedium, + style: TextStyle( + color: Colors.redAccent, + fontWeight: FontWeight.w400, + fontSize: 16.sp, + ), ), SizedBox(height: 5.h), Lottie.asset( 'animations/apiError.json', - height: 140.h, + height: 120.h, repeat: true, reverse: true, fit: BoxFit.cover, ), - SizedBox(height: 5.h), - Text( - 'message: $description', - style: Get.textTheme.titleLarge, - textAlign: TextAlign.center, - ), + SizedBox(height: 20.h), + AnimatedTextKit(repeatForever: true, animatedTexts: [ + ColorizeAnimatedText(description, + textStyle: Get.textTheme.headlineMedium as TextStyle, + textAlign: TextAlign.center, + colors: [ + Colors.purple, + Colors.blue, + Colors.yellow, + Colors.red, + ]), + ]), SizedBox(height: 30.h), SizedBox( width: 100.w, diff --git a/lib/main.dart b/lib/main.dart index 6f51056..ab67e0a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -37,6 +37,8 @@ Future main() async { initialRoute: AppPages.NAV, // first screen to show when app is running + defaultTransition: Transition.noTransition, + getPages: AppPages.routes, // app screens locale: MySharedPref.getCurrentLocal(), // app language translations: diff --git a/pubspec.lock b/pubspec.lock index 26bf5f5..e9274b1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -9,6 +9,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + animated_text_kit: + dependency: "direct main" + description: + name: animated_text_kit + sha256: "37392a5376c9a1a503b02463c38bc0342ef814ddbb8f9977bc90f2a84b22fa92" + url: "https://pub.dev" + source: hosted + version: "4.2.2" archive: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 2509b84..f2ae7b2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,6 +39,7 @@ dependencies: cached_network_image: ^3.2.3 graphql_flutter: ^5.1.0 intl: ^0.17.0 + animated_text_kit: ^4.2.2