From a2d11b01373d996b7ce64ef8551f6140631d5dcb Mon Sep 17 00:00:00 2001
From: Emmi Rehn
Date: Fri, 10 Mar 2023 10:47:43 +0200
Subject: [PATCH 1/2] Replace buefy notifications with csc-ui toasts
---
.../src/components/ContainerTable.vue | 15 ++++++-----
.../src/components/SearchBox.vue | 21 ++++++++++-----
.../src/pages/BrowserPage.vue | 5 ++++
.../src/views/Tokens.vue | 26 ++++++++++++-------
4 files changed, 44 insertions(+), 23 deletions(-)
diff --git a/swift_browser_ui_frontend/src/components/ContainerTable.vue b/swift_browser_ui_frontend/src/components/ContainerTable.vue
index 0404a4d23..9169b97f8 100644
--- a/swift_browser_ui_frontend/src/components/ContainerTable.vue
+++ b/swift_browser_ui_frontend/src/components/ContainerTable.vue
@@ -384,13 +384,14 @@ export default {
},
confirmDelete: function (container, objects) {
if (objects > 0) {
- this.$buefy.notification.open({
- message: this.$t("message.container_ops.deleteNote"),
- type: "is-danger",
- position: "is-top-right",
- duration: 30000,
- hasIcon: true,
- });
+ document.querySelector("#container-error-toasts").addToast(
+ {
+ progress: false,
+ type: "error",
+ duration: 30000,
+ message: this.$t("message.container_ops.deleteNote"),
+ },
+ );
this.$router.push(
this.$route.params.project
+ "/"
diff --git a/swift_browser_ui_frontend/src/components/SearchBox.vue b/swift_browser_ui_frontend/src/components/SearchBox.vue
index b7a194ad2..928756723 100644
--- a/swift_browser_ui_frontend/src/components/SearchBox.vue
+++ b/swift_browser_ui_frontend/src/components/SearchBox.vue
@@ -43,6 +43,12 @@
+
@@ -199,13 +205,14 @@ export default {
) &&
ojbCount >= 10000
) {
- this.$buefy.notification.open({
- message: this.$t("message.search.buildingIndex"),
- type: "is-info",
- position: "is-top-right",
- duration: 20000,
- hasIcon: true,
- });
+ document.querySelector("#searchbox-toasts").addToast(
+ {
+ duration: 20000,
+ type: "info",
+ progress: false,
+ message: this.$t("message.search.buildingIndex"),
+ },
+ );
this.$store.state.db.preferences
.where(":id")
.equals(1)
diff --git a/swift_browser_ui_frontend/src/pages/BrowserPage.vue b/swift_browser_ui_frontend/src/pages/BrowserPage.vue
index 985cad09b..405e3f1d2 100644
--- a/swift_browser_ui_frontend/src/pages/BrowserPage.vue
+++ b/swift_browser_ui_frontend/src/pages/BrowserPage.vue
@@ -66,6 +66,11 @@
+
diff --git a/swift_browser_ui_frontend/src/views/Tokens.vue b/swift_browser_ui_frontend/src/views/Tokens.vue
index 55e299023..c61276ed3 100644
--- a/swift_browser_ui_frontend/src/views/Tokens.vue
+++ b/swift_browser_ui_frontend/src/views/Tokens.vue
@@ -59,8 +59,14 @@
hide-footer
/>
+
@@ -150,12 +156,14 @@ export default {
identifier,
).then((ret) => {
this.latest = ret;
- this.$buefy.notification.open({
- message: this.$t("message.tokens.copyToken"),
- duration: 3600000,
- type: "is-success",
- queue: false,
- });
+ document.querySelector("#add-token-toasts").addToast(
+ {
+ duration: 3600000,
+ type: "success",
+ progress: false,
+ message: this.$t("message.tokens.copyToken"),
+ },
+ );
this.getTokens();
});
},
@@ -168,7 +176,7 @@ export default {
this.latest,
).then(() => {
this.copied = true;
- document.querySelector("#token-toasts").addToast(
+ document.querySelector("#copy-token-toasts").addToast(
{
duration: 6000,
type: "success",
From 07ccd0c253c337977ee9f6b04a47ed38193b98fb Mon Sep 17 00:00:00 2001
From: Emmi Rehn
Date: Fri, 10 Mar 2023 10:55:08 +0200
Subject: [PATCH 2/2] Update CHANGELOG.md
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b942a3532..338b7cb7c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -68,6 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- (GL #944) Replace buefy b-loading with c-loader from `csc-ui` and remove unused b-loading
- (GL #944) Replace buefy b-table with c-data-table from `csc-ui`
- (GL #944) Replace buefy dialogs with c-modal from `csc-ui`
+- (GL #944) Replace buefy notifications with c-toasts from `csc-ui`
### Fixed