summary refs log tree commit diff stats
path: root/client/src/views
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2022-02-03 09:37:30 +0530
committerAndinus <andinus@nand.sh>2022-02-03 09:37:30 +0530
commit8399b626aac16c648af8bf0d60c40b02f361ce2f (patch)
treee332621ae40fbe9810e97677d9fd20a9ac3bfe52 /client/src/views
parenta2cb159fb7c4d00fed8dfb827ed16b1391eb0c8d (diff)
downloadvela-8399b626aac16c648af8bf0d60c40b02f361ce2f.tar.gz
Add GetSmile, UploadSmile view
Diffstat (limited to 'client/src/views')
-rw-r--r--client/src/views/GetSmile.vue9
-rw-r--r--client/src/views/Home.vue8
-rw-r--r--client/src/views/NewSmile.vue41
-rw-r--r--client/src/views/UploadSmile.vue7
4 files changed, 48 insertions, 17 deletions
diff --git a/client/src/views/GetSmile.vue b/client/src/views/GetSmile.vue
new file mode 100644
index 0000000..1553a65
--- /dev/null
+++ b/client/src/views/GetSmile.vue
@@ -0,0 +1,9 @@
+<template>
+<div class="get-smile">
+  <p id="subtitle">Get a Smile :)</p>
+
+  {{ $route.params.id }}
+
+  <Toast />
+</div>
+</template>
diff --git a/client/src/views/Home.vue b/client/src/views/Home.vue
index c16d336..880c380 100644
--- a/client/src/views/Home.vue
+++ b/client/src/views/Home.vue
@@ -27,11 +27,3 @@
   </div>
 </div>
 </template>
-
-<style scoped>
-#subtitle {
-    font-size: 1.5rem;
-    text-align: center;
-    margin: 2rem 0;
-}
-</style>
diff --git a/client/src/views/NewSmile.vue b/client/src/views/NewSmile.vue
index aaa3e44..f721d50 100644
--- a/client/src/views/NewSmile.vue
+++ b/client/src/views/NewSmile.vue
@@ -44,15 +44,38 @@ export default {
             }
             this.showProgress = true;
             console.log('Name', this.name);
+
+            // const options = {
+            //     method: 'POST',
+            //     body: JSON.stringify( {
+            //         param1: "d",
+            //         param2: "d"
+            //     } )
+            // };
+
+            fetch('flowers.jpg')
+                .then(function(response) {
+                    if (!response.ok) {
+                        throw new Error('HTTP error, status = ' + response.status);
+                    }
+                    console.log(response);
+                    return response.blob();
+
+                })
+                .then(function(myBlob) {
+                    console.log(myBlob)
+                })
+                .catch(function(error) {
+                    console.log(error)
+                });
+
+            // fetch( '/path/', options )
+            //     .then( response => response.json() )
+            //     .then( response => {
+            //         console.log(response);
+            //         // Do something with response.
+            //     } );
         }
     }
-}
+    }
 </script>
-
-<style scoped>
-#subtitle {
-    font-size: 1.5rem;
-    text-align: center;
-    margin: 2rem 0;
-}
-</style>
diff --git a/client/src/views/UploadSmile.vue b/client/src/views/UploadSmile.vue
new file mode 100644
index 0000000..67e1dd9
--- /dev/null
+++ b/client/src/views/UploadSmile.vue
@@ -0,0 +1,7 @@
+<template>
+<div class="upload-smile">
+  <p id="subtitle">Upload a Smile :)</p>
+
+  <Toast />
+</div>
+</template>