From 2df42b6d5fa780657450f272fe6de60d9a57b52c Mon Sep 17 00:00:00 2001 From: aminecmi Date: Fri, 28 Jan 2022 20:26:46 +0100 Subject: [PATCH] Added bulma. Lists creation/update modal. --- package.json | 1 + public/index.html | 2 + src/App.vue | 23 ++++- src/components/ListCreateUpdateModal.vue | 73 +++++++++++++++ src/components/Lists.vue | 108 +++++++++++++++++++++++ src/components/Login.vue | 17 ++-- yarn.lock | 5 ++ 7 files changed, 220 insertions(+), 9 deletions(-) create mode 100644 src/components/ListCreateUpdateModal.vue create mode 100644 src/components/Lists.vue diff --git a/package.json b/package.json index 874f068..908054e 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "lint": "vue-cli-service lint" }, "dependencies": { + "bulma": "^0.9.3", "core-js": "^3.6.5", "vue": "^2.6.11" }, diff --git a/public/index.html b/public/index.html index 3e5a139..812f705 100644 --- a/public/index.html +++ b/public/index.html @@ -13,5 +13,7 @@
+ + diff --git a/src/App.vue b/src/App.vue index 66153af..167224b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,9 +1,15 @@ @@ -11,21 +17,28 @@ diff --git a/src/components/Lists.vue b/src/components/Lists.vue new file mode 100644 index 0000000..7d7a258 --- /dev/null +++ b/src/components/Lists.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/src/components/Login.vue b/src/components/Login.vue index c57df5e..617ae85 100644 --- a/src/components/Login.vue +++ b/src/components/Login.vue @@ -1,7 +1,12 @@ @@ -23,15 +28,17 @@ export default { }, body: this.key }).then(r => { - if (r.statusCode !== 404) { + if (r.status !== 404) { localStorage.setItem(this.lsKey, this.key) this.$emit('login') + } else { + this.$emit('loading') } }) } }, beforeMount() { this.$emit('loading', true) - this.key = localStorage.getItem(this.lsKey); + this.key = localStorage.getItem(this.lsKey) != 'null' ? localStorage.getItem(this.lsKey) : ''; this.sendKey(); } } diff --git a/yarn.lock b/yarn.lock index e7c4062..5ec2800 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2166,6 +2166,11 @@ builtin-status-codes@^3.0.0: resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= +bulma@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/bulma/-/bulma-0.9.3.tgz#ddccb7436ebe3e21bf47afe01d3c43a296b70243" + integrity sha512-0d7GNW1PY4ud8TWxdNcP6Cc8Bu7MxcntD/RRLGWuiw/s0a9P+XlH/6QoOIrmbj6o8WWJzJYhytiu9nFjTszk1g== + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"