Skip to content

Commit 49aca64

Browse files
committed
feat: added unsubscribed notificiation
1 parent 635f3f9 commit 49aca64

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

src/assets/main.css

+12
Original file line numberDiff line numberDiff line change
@@ -459,4 +459,16 @@ article:not(:has(table)) {
459459
/** Fix link as button in nav margin @todo add back to vue3-starter-kit */
460460
nav a[role=button] {
461461
margin-top: 0;
462+
}
463+
464+
/** Fix inconsistent margins and borders when used in groups */
465+
[role=group] .dropdown:not(:first-child),
466+
[role=search] .dropdown:not(:first-child) {
467+
margin-left: calc(var(--pico-border-width) * -1);
468+
}
469+
470+
[role=group]>:not(:first-child)>summary,
471+
[role=search]>:not(:first-child)>summary {
472+
border-top-left-radius: 0;
473+
border-bottom-left-radius: 0;
462474
}

src/eventBus/listeners/notifications.ts

+8
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,12 @@ export default {
249249
5000
250250
).show();
251251
},
252+
[eventTypes.unsubscribed]: () => {
253+
new CustomNotification(
254+
"success",
255+
t("You have been unsubscribed."),
256+
["browser"],
257+
5000
258+
).show();
259+
},
252260
} as Record<eventTypes, any>;

src/locales/en.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -276,5 +276,6 @@
276276
"Create your first Smart Magic Link": "Create your first Smart Magic Link",
277277
"Edit destination": "Edit destination",
278278
"No data available": "No data available",
279-
"No destinations yet": "No destinations yet"
279+
"No destinations yet": "No destinations yet",
280+
"You have been unsubscribed.": "You have been unsubscribed."
280281
}

src/locales/fr.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -276,5 +276,6 @@
276276
"Create your first Smart Magic Link": "Créez votre premier lien magique intelligent",
277277
"Edit destination": "Modifier la destination",
278278
"No data available": "Pas de données disponibles",
279-
"No destinations yet": "Pas encore de destinations"
279+
"No destinations yet": "Pas encore de destinations",
280+
"You have been unsubscribed.": "Vous avez été désabonné."
280281
}

src/views/SingleRedirectView.vue

+2
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,13 @@ const getData = () => {
8989
9090
onMounted(() => {
9191
$bus.$on(eventTypes.started_subscription, getData);
92+
$bus.$on(eventTypes.unsubscribed, getData);
9293
getData();
9394
});
9495
9596
onUnmounted(() => {
9697
$bus.$off(eventTypes.started_subscription, getData);
98+
$bus.$off(eventTypes.unsubscribed, getData);
9799
});
98100
</script>
99101
<template>

0 commit comments

Comments
 (0)