Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/toast-for-signal #985

Merged
merged 6 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion frontend/_redirects

This file was deleted.

6 changes: 6 additions & 0 deletions frontend/components/modal/ModalSharePage.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<Toaster :theme="$colorMode.value === 'dark' ? 'dark' : 'light'" />
<ModalBase :modalName="modalName">
<div class="px-2 pb-2 pt-1 lg:px-4 lg:pb-4 lg:pt-2">
<DialogTitle class="font-display">
Expand Down Expand Up @@ -247,6 +248,8 @@ import type { Group } from "~/types/entities/group";
import type { Organization } from "~/types/entities/organization";
import type { Event } from "~/types/events/event";
import { IconMap } from "~/types/icon-map";
import { toast, Toaster } from "vue-sonner";
import { useI18n } from "vue-i18n";

const props = defineProps<{
cta: BtnAction["cta"];
Expand All @@ -256,6 +259,8 @@ const props = defineProps<{
resource?: Resource;
user?: User;
}>();

const { t } = useI18n();
const modalName = "ModalSharePage";

const getEntityType = () => {
Expand Down Expand Up @@ -350,6 +355,7 @@ const copyToClipboardThenOpenURL = async (
try {
await navigator.clipboard.writeText(url);
signalContentCopied.value = true;
toast(t("components.modal_share_page.opening_signal"));
setTimeout(() => {
signalContentCopied.value = false;
if (redirectURL) {
Expand Down
1 change: 1 addition & 0 deletions frontend/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
"components.modal_share_page.messenger": "Messenger",
"components.modal_share_page.offline": "Offline",
"components.modal_share_page.online": "Online",
"components.modal_share_page.opening_signal": "Opening Signal",
"components.modal_share_page.signal": "Signal",
"components.modal_share_page.telegram": "Telegram",
"components.modal_share_page.url_copied": "URL copied",
Expand Down
Loading