From abef1428190db1882697b08694237eff7546f759 Mon Sep 17 00:00:00 2001 From: Mouad Taoussi <50294614+mouadTaoussi@users.noreply.github.com> Date: Thu, 30 Sep 2021 13:53:16 +0100 Subject: [PATCH] [Feature Request]: Support Remaining time progress in Notification (programmatically) (#3536) * Initial code * Finishing * Finished * Snapshot written * Make progress not rounded * added remaining time progressbar in Notification * added remaining time progressbar in Notification * Ran tests * used rounded property in progress component * support remaining time progress in notification that opens programmatically * support remaining time progress in notification that opens programmatically * added example * added example and used v-show in Message.vue --- .../notification/examples/ExAutoClose.vue | 3 ++- .../examples/ExProgrammatically.vue | 13 ++++++++++ src/components/message/Message.vue | 2 +- src/components/notification/Notification.vue | 2 +- src/scss/components/_message.scss | 2 +- src/utils/MessageMixin.js | 24 +++++++++++-------- 6 files changed, 32 insertions(+), 14 deletions(-) diff --git a/docs/pages/components/notification/examples/ExAutoClose.vue b/docs/pages/components/notification/examples/ExAutoClose.vue index 0254c784f..f29365c31 100644 --- a/docs/pages/components/notification/examples/ExAutoClose.vue +++ b/docs/pages/components/notification/examples/ExAutoClose.vue @@ -5,7 +5,8 @@ :disabled="isActive" @click="isActive = true" /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce id fermentum quam. Proin sagittis, nibh id hendrerit imperdiet, elit sapien laoreet elit diff --git a/docs/pages/components/notification/examples/ExProgrammatically.vue b/docs/pages/components/notification/examples/ExProgrammatically.vue index 73719205a..f75f471b3 100644 --- a/docs/pages/components/notification/examples/ExProgrammatically.vue +++ b/docs/pages/components/notification/examples/ExProgrammatically.vue @@ -20,6 +20,11 @@ type="is-link" size="is-medium" @click="pause" /> + @@ -55,6 +60,14 @@ pauseOnHover: true, }) }, + progress() { + this.$buefy.notification.open({ + message: `I can show you a little progress bar displaying the remaining time!`, + duration: 5000, + progressBar: true, + type: 'is-primary', + }) + }, } } diff --git a/src/components/message/Message.vue b/src/components/message/Message.vue index c71d93cae..b67435057 100644 --- a/src/components/message/Message.vue +++ b/src/components/message/Message.vue @@ -1,7 +1,7 @@