diff options
author | Andinus <andinus@nand.sh> | 2022-02-02 17:41:26 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2022-02-02 17:41:26 +0530 |
commit | 4e42cba4f99e0fdbd79e60aaf2e8ffad5a98b822 (patch) | |
tree | c398144e8b38d9487b5457b9dad0a9316dab7a5b /client/src/views | |
parent | 55f43481659363c3373641d9ce60f2219d649cb5 (diff) | |
download | vela-4e42cba4f99e0fdbd79e60aaf2e8ffad5a98b822.tar.gz |
Setup data in NewSmile, add ProgressBar
Diffstat (limited to 'client/src/views')
-rw-r--r-- | client/src/views/NewSmile.vue | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/client/src/views/NewSmile.vue b/client/src/views/NewSmile.vue index 4a5e700..aaa3e44 100644 --- a/client/src/views/NewSmile.vue +++ b/client/src/views/NewSmile.vue @@ -14,16 +14,41 @@ </div> <div class="col-12 md:col-6 flex align-items-center justify-content-center"> <div class="p-inputgroup"> - <Button icon="pi pi-user-plus" /> - <InputText placeholder="Name" /> - <Button label="Create" class="p-button-success" /> + <InputText v-model="name" placeholder="Name" /> + <Button @click="createSmile" + icon="pi pi-user-plus" label="Create" class="p-button-success" /> </div> </div> </div> + <ProgressBar v-if="showProgress" mode="indeterminate" style="height: .4em;" /> </div> + + <Toast /> </div> </template> +<script> +export default { + data() { + return { + name: '', + showProgress: false + } + }, + methods: { + createSmile() { + if (this.name === '') { + this.$toast.add({severity:'warn', summary: 'Invalid Name', + detail:'Empty', life: 2000}); + return; + } + this.showProgress = true; + console.log('Name', this.name); + } + } +} +</script> + <style scoped> #subtitle { font-size: 1.5rem; |