From b0d784139c03396a2686ab794ccc7de69549e60e Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Mon, 14 Jul 2025 14:22:25 +0800 Subject: [PATCH] refactor message page --- .../src/components/NotificationContainer.vue | 49 ++++ open-isle-cli/src/views/MessagePageView.vue | 222 ++++-------------- 2 files changed, 89 insertions(+), 182 deletions(-) create mode 100644 open-isle-cli/src/components/NotificationContainer.vue diff --git a/open-isle-cli/src/components/NotificationContainer.vue b/open-isle-cli/src/components/NotificationContainer.vue new file mode 100644 index 000000000..19deee089 --- /dev/null +++ b/open-isle-cli/src/components/NotificationContainer.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/open-isle-cli/src/views/MessagePageView.vue b/open-isle-cli/src/views/MessagePageView.vue index 7f76627ab..24b08814e 100644 --- a/open-isle-cli/src/views/MessagePageView.vue +++ b/open-isle-cli/src/views/MessagePageView.vue @@ -12,8 +12,7 @@ {{ TimeManager.format(item.createdAt) }} @@ -319,6 +199,7 @@ import { useRouter } from 'vue-router' import { API_BASE_URL } from '../main' import BaseTimeline from '../components/BaseTimeline.vue' import BasePlaceholder from '../components/BasePlaceholder.vue' +import NotificationContainer from '../components/NotificationContainer.vue' import { getToken } from '../utils/auth' import { markNotificationsRead } from '../utils/notification' import { toast } from '../main' @@ -329,7 +210,7 @@ hatch.register() export default { name: 'MessagePageView', - components: { BaseTimeline, BasePlaceholder }, + components: { BaseTimeline, BasePlaceholder, NotificationContainer }, setup() { const router = useRouter() const notifications = ref([]) @@ -580,16 +461,6 @@ export default { color: gray; } -.notif-content-container { - color: rgb(140, 140, 140); - font-weight: normal; - font-size: 14px; - opacity: 0.8; - display: flex; - justify-content: space-between; - align-items: center; -} - .notif-content-text { font-weight: bold; color: var(--primary-color) !important; @@ -606,18 +477,5 @@ export default { color: var(--text-color); } -.mark-read-button { - color: var(--primary-color); - font-size: 12px; - cursor: pointer; -} - -.mark-read-button:hover { - text-decoration: underline; -} - -.has-read-button { - font-size: 12px; -}