refac: share chat modal styling update

This commit is contained in:
Timothy J. Baek 2024-04-02 06:12:45 -07:00
parent e273a99153
commit 5faa05a117
3 changed files with 86 additions and 33 deletions

View file

@ -70,14 +70,16 @@
console.log('shareLocal', chat);
if (chat.share_id) {
const shareUrl = `${window.location.origin}/s/${chat.share_id}`;
toast.info(
toast.success(
$i18n.t('Chat is already shared at {{shareUrl}}, copied to clipboard', { shareUrl })
);
copyToClipboard(shareUrl);
} else {
const sharedChat = await shareChatById(localStorage.token, $chatId);
const shareUrl = `${window.location.origin}/s/${sharedChat.id}`;
toast.info($i18n.t('Chat is now shared at {{shareUrl}}, copied to clipboard', { shareUrl }));
toast.success(
$i18n.t('Chat is now shared at {{shareUrl}}, copied to clipboard', { shareUrl })
);
copyToClipboard(shareUrl);
}
};