Jared hace 2 años
padre
commit
982109d047
Se han modificado 1 ficheros con 209 adiciones y 87 borrados
  1. 209 87
      js/liff-functions.js

+ 209 - 87
js/liff-functions.js

@@ -67,124 +67,246 @@ function shareTargetPicker() {
     .shareTargetPicker([
       
       {
-        "type": "bubble",
-        "styles": {
-          "footer": {
-            "backgroundColor": "#42b3f4"
-          }
-        },
-        "header": {
-          "type": "box",
-          "layout": "horizontal",
-          "contents": [
-            {
+        "type": "carousel",
+        "contents": [
+          {
+            "type": "bubble",
+            "size": "nano",
+            "header": {
               "type": "box",
-              "layout": "baseline",
+              "layout": "vertical",
               "contents": [
                 {
-                  "type": "icon",
-                  "size": "xxl",
-                  "url": "https://scontent.fbkk7-2.fna.fbcdn.net/v/t1.0-1/p200x200/22814542_1962234637127047_1607260544847069468_n.png?_nc_cat=0&oh=2a303227c24dfab9e71a405b6d594d50&oe=5BC3965D"
+                  "type": "text",
+                  "text": "In Progress",
+                  "color": "#ffffff",
+                  "align": "start",
+                  "size": "md",
+                  "gravity": "center"
+                },
+                {
+                  "type": "text",
+                  "text": "70%",
+                  "color": "#ffffff",
+                  "align": "start",
+                  "size": "xs",
+                  "gravity": "center",
+                  "margin": "lg"
+                },
+                {
+                  "type": "box",
+                  "layout": "vertical",
+                  "contents": [
+                    {
+                      "type": "box",
+                      "layout": "vertical",
+                      "contents": [
+                        {
+                          "type": "filler"
+                        }
+                      ],
+                      "width": "70%",
+                      "backgroundColor": "#0D8186",
+                      "height": "6px"
+                    }
+                  ],
+                  "backgroundColor": "#9FD8E36E",
+                  "height": "6px",
+                  "margin": "sm"
                 }
-              ]
+              ],
+              "backgroundColor": "#27ACB2",
+              "paddingTop": "19px",
+              "paddingAll": "12px",
+              "paddingBottom": "16px"
             },
-            {
+            "body": {
+              "type": "box",
+              "layout": "vertical",
+              "contents": [
+                {
+                  "type": "box",
+                  "layout": "horizontal",
+                  "contents": [
+                    {
+                      "type": "text",
+                      "text": "Buy milk and lettuce before class",
+                      "color": "#8C8C8C",
+                      "size": "sm",
+                      "wrap": true
+                    }
+                  ],
+                  "flex": 1
+                }
+              ],
+              "spacing": "md",
+              "paddingAll": "12px"
+            },
+            "styles": {
+              "footer": {
+                "separator": false
+              }
+            }
+          },
+          {
+            "type": "bubble",
+            "size": "nano",
+            "header": {
               "type": "box",
               "layout": "vertical",
-              "flex": 5,
               "contents": [
                 {
                   "type": "text",
-                  "text": "โรงพยาบาลอ่างทอง",
-                  "weight": "bold",
-                  "color": "#aaaaaa",
+                  "text": "Pending",
+                  "color": "#ffffff",
+                  "align": "start",
                   "size": "md",
-                  "gravity": "top"
+                  "gravity": "center"
                 },
                 {
                   "type": "text",
-                  "text": "ขอขอบพระคุณ",
-                  "weight": "bold",
-                  "color": "#aaaaaa",
-                  "size": "lg",
-                  "gravity": "top"
+                  "text": "30%",
+                  "color": "#ffffff",
+                  "align": "start",
+                  "size": "xs",
+                  "gravity": "center",
+                  "margin": "lg"
+                },
+                {
+                  "type": "box",
+                  "layout": "vertical",
+                  "contents": [
+                    {
+                      "type": "box",
+                      "layout": "vertical",
+                      "contents": [
+                        {
+                          "type": "filler"
+                        }
+                      ],
+                      "width": "30%",
+                      "backgroundColor": "#DE5658",
+                      "height": "6px"
+                    }
+                  ],
+                  "backgroundColor": "#FAD2A76E",
+                  "height": "6px",
+                  "margin": "sm"
                 }
-              ]
-            }
-          ]
-        },
-        "hero": {
-          "type": "image",
-          "url": "https://scontent.fbkk7-2.fna.fbcdn.net/v/t1.0-9/35076722_2227987830551725_330757188106584064_n.jpg?_nc_cat=0&oh=0f5fa137c5bd65f109a40439afcd59eb&oe=5BB566B6",
-          "size": "full",
-          "aspectRatio": "16:9",
-          "aspectMode": "cover",
-          "action": {
-            "type": "uri",
-            "uri": "http://bit.ly/2JGBRKv"
-          }
-        },
-        "body": {
-          "type": "box",
-          "layout": "vertical",
-          "contents": [
-            {
-              "type": "text",
-              "margin": "sm",
-              "text": "คุณกานต์สินี ไหลสงวนงาม",
-              "weight": "bold",
-              "size": "md",
-              "wrap": true
+              ],
+              "backgroundColor": "#FF6B6E",
+              "paddingTop": "19px",
+              "paddingAll": "12px",
+              "paddingBottom": "16px"
             },
-            {
+            "body": {
               "type": "box",
               "layout": "vertical",
-              "margin": "xs",
               "contents": [
                 {
                   "type": "box",
-                  "layout": "baseline",
-                  "spacing": "sm",
+                  "layout": "horizontal",
                   "contents": [
                     {
                       "type": "text",
-                      "text": "บริจาคเงินจำนวน ๑๘๐,๐๐๐ บาท เพื่อซื้อครุภัณฑ์ทางการแพทย์ ใช้ในโรงพยาบาลอ่างทอง โดยมีนายแพทย์พงษ์นรินทร์ ชาติรังสรรค์ผู้อำนวยการโรงพยาบาลอ่างทอง เป็นผู้รับมอบ",
-                      "wrap": true,
-                      "color": "#666666",
+                      "text": "Wash my car",
+                      "color": "#8C8C8C",
                       "size": "sm",
-                      "flex": 6
+                      "wrap": true
                     }
-                  ]
+                  ],
+                  "flex": 1
                 }
-              ]
+              ],
+              "spacing": "md",
+              "paddingAll": "12px"
             },
-            {
-              "type": "text",
-              "margin": "md",
-              "text": "วันที่ 12 มิ.ย. 2561",
-              "size": "sm",
-              "color": "#adadad"
+            "styles": {
+              "footer": {
+                "separator": false
+              }
             }
-          ]
-        },
-        "footer": {
-          "type": "box",
-          "layout": "vertical",
-          "spacing": "sm",
-          "contents": [
-            {
-              "type": "button",
-              "style": "link",
-              "color": "#FFFFFF",
-              "height": "sm",
-              "action": {
-                "type": "uri",
-                "label": "อ่านต่อ...",
-                "uri": "http://bit.ly/2JGBRKv"
+          },
+          {
+            "type": "bubble",
+            "size": "nano",
+            "header": {
+              "type": "box",
+              "layout": "vertical",
+              "contents": [
+                {
+                  "type": "text",
+                  "text": "In Progress",
+                  "color": "#ffffff",
+                  "align": "start",
+                  "size": "md",
+                  "gravity": "center"
+                },
+                {
+                  "type": "text",
+                  "text": "100%",
+                  "color": "#ffffff",
+                  "align": "start",
+                  "size": "xs",
+                  "gravity": "center",
+                  "margin": "lg"
+                },
+                {
+                  "type": "box",
+                  "layout": "vertical",
+                  "contents": [
+                    {
+                      "type": "box",
+                      "layout": "vertical",
+                      "contents": [
+                        {
+                          "type": "filler"
+                        }
+                      ],
+                      "width": "100%",
+                      "backgroundColor": "#7D51E4",
+                      "height": "6px"
+                    }
+                  ],
+                  "backgroundColor": "#9FD8E36E",
+                  "height": "6px",
+                  "margin": "sm"
+                }
+              ],
+              "backgroundColor": "#A17DF5",
+              "paddingTop": "19px",
+              "paddingAll": "12px",
+              "paddingBottom": "16px"
+            },
+            "body": {
+              "type": "box",
+              "layout": "vertical",
+              "contents": [
+                {
+                  "type": "box",
+                  "layout": "horizontal",
+                  "contents": [
+                    {
+                      "type": "text",
+                      "text": "Buy milk and lettuce before class",
+                      "color": "#8C8C8C",
+                      "size": "sm",
+                      "wrap": true
+                    }
+                  ],
+                  "flex": 1
+                }
+              ],
+              "spacing": "md",
+              "paddingAll": "12px"
+            },
+            "styles": {
+              "footer": {
+                "separator": false
               }
             }
-          ]
-        }
+          }
+        ]
       }
 
     ])