From 2613fe6cf10773c221132a0a005205f2ff989e54 Mon Sep 17 00:00:00 2001
From: Tim <135014430+nagisa77@users.noreply.github.com>
Date: Sat, 23 Aug 2025 02:58:24 +0800
Subject: [PATCH] feat: introduce message popup component
---
frontend_nuxt/components/GlobalPopups.vue | 18 ++++++
frontend_nuxt/components/MessagePopup.vue | 74 +++++++++++++++++++++++
2 files changed, 92 insertions(+)
create mode 100644 frontend_nuxt/components/MessagePopup.vue
diff --git a/frontend_nuxt/components/GlobalPopups.vue b/frontend_nuxt/components/GlobalPopups.vue
index 90a0f00c7..58af7d1dd 100644
--- a/frontend_nuxt/components/GlobalPopups.vue
+++ b/frontend_nuxt/components/GlobalPopups.vue
@@ -7,6 +7,7 @@
@close="closeMilkTeaPopup"
/>
+
{
await checkInviteCodeActivity()
if (showInviteCodePopup.value) return
+ await checkMessageFeature()
+ if (showMessagePopup.value) return
+
await checkNotificationSetting()
if (showNotificationPopup.value) return
@@ -97,6 +103,18 @@ const closeMilkTeaPopup = () => {
showMilkTeaPopup.value = false
}
+const checkMessageFeature = async () => {
+ if (!import.meta.client) return
+ if (!authState.loggedIn) return
+ if (localStorage.getItem('messageFeaturePopupShown')) return
+ showMessagePopup.value = true
+}
+const closeMessagePopup = () => {
+ if (!import.meta.client) return
+ localStorage.setItem('messageFeaturePopupShown', 'true')
+ showMessagePopup.value = false
+}
+
const checkNotificationSetting = async () => {
if (!import.meta.client) return
if (!authState.loggedIn) return
diff --git a/frontend_nuxt/components/MessagePopup.vue b/frontend_nuxt/components/MessagePopup.vue
new file mode 100644
index 000000000..c11697d25
--- /dev/null
+++ b/frontend_nuxt/components/MessagePopup.vue
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+