杂务:更新 YumiNail 工作区
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<a-modal v-model:open="detailVisible" title="消息详情" @ok="detailVisible = false">
|
||||
<h3>{{ currentMessage?.title }}</h3>
|
||||
<p class="message-meta">{{ currentMessage?.publisherName || '系统消息' }} · {{ currentMessage?.publishTime }}</p>
|
||||
<div v-if="currentMessage?.content" class="message-content">{{ currentMessage?.content }}</div>
|
||||
<div v-if="currentMessageContentHtml" class="message-content" v-html="currentMessageContentHtml"></div>
|
||||
<img v-if="currentMessage?.imageUrl" class="message-image" :src="currentMessage.imageUrl" alt="消息图片" />
|
||||
</a-modal>
|
||||
</div>
|
||||
@@ -50,6 +50,7 @@ import { message } from 'ant-design-vue'
|
||||
*/
|
||||
import { userApi, type SystemMessageVO } from '@/api/user'
|
||||
import { buildSystemMessageActionPath } from '@/utils/system-message-action'
|
||||
import { renderRichContent } from '@/utils/rich-content'
|
||||
|
||||
/**
|
||||
* Purpose: router supports NotificationsView.vue by holding or executing the router page or API role.
|
||||
@@ -72,6 +73,7 @@ const detailVisible = ref(false)
|
||||
const currentMessage = ref<SystemMessageVO | null>(null)
|
||||
/** unreadCount is a reactive state variable used by the template and event handlers. */
|
||||
const unreadCount = computed(() => messages.value.filter(item => item.readStatus !== 1).length)
|
||||
const currentMessageContentHtml = computed(() => renderRichContent(currentMessage.value?.content || ''))
|
||||
|
||||
/**
|
||||
* Purpose: resolveSystemMessageActionPath supports NotificationsView.vue by holding or executing the resolve system message action path page or API role.
|
||||
@@ -128,7 +130,7 @@ onMounted(loadMessages)
|
||||
<style scoped>
|
||||
.notifications-page {
|
||||
min-height: 100vh;
|
||||
background: #fff7f8;
|
||||
background: var(--theme-page-bg);
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
@@ -146,7 +148,7 @@ onMounted(loadMessages)
|
||||
|
||||
.page-header p {
|
||||
margin: 4px 0 0;
|
||||
color: #8a7b83;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
@@ -154,7 +156,7 @@ onMounted(loadMessages)
|
||||
height: 40px;
|
||||
border: 0;
|
||||
border-radius: 20px;
|
||||
background: #fff;
|
||||
background: var(--theme-card-bg);
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
@@ -171,7 +173,8 @@ onMounted(loadMessages)
|
||||
padding: 16px;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
background: var(--theme-card-bg);
|
||||
border: 1px solid var(--theme-border);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@@ -179,11 +182,11 @@ onMounted(loadMessages)
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #d7c9cf;
|
||||
background: var(--theme-border);
|
||||
}
|
||||
|
||||
.message-item.unread .dot {
|
||||
background: #ff5c8a;
|
||||
background: var(--theme-primary);
|
||||
}
|
||||
|
||||
.message-main {
|
||||
@@ -195,20 +198,64 @@ onMounted(loadMessages)
|
||||
width: fit-content;
|
||||
padding: 2px 8px;
|
||||
border-radius: 999px;
|
||||
background: #fff0f4;
|
||||
color: #d74270;
|
||||
background: var(--theme-primary-soft);
|
||||
color: var(--theme-primary);
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.message-main small,
|
||||
.message-meta {
|
||||
color: #8a7b83;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.message-content {
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.8;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.message-content :deep(*) {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.message-content :deep(p),
|
||||
.message-content :deep(ul),
|
||||
.message-content :deep(ol),
|
||||
.message-content :deep(blockquote),
|
||||
.message-content :deep(pre),
|
||||
.message-content :deep(table) {
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
|
||||
.message-content :deep(p:last-child),
|
||||
.message-content :deep(ul:last-child),
|
||||
.message-content :deep(ol:last-child),
|
||||
.message-content :deep(blockquote:last-child),
|
||||
.message-content :deep(pre:last-child),
|
||||
.message-content :deep(table:last-child) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.message-content :deep(ul),
|
||||
.message-content :deep(ol) {
|
||||
padding-left: 1.25em;
|
||||
}
|
||||
|
||||
.message-content :deep(a) {
|
||||
color: var(--theme-primary);
|
||||
}
|
||||
|
||||
.message-content :deep(img) {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.message-content :deep(pre) {
|
||||
overflow-x: auto;
|
||||
padding: 10px 12px;
|
||||
border-radius: 8px;
|
||||
background: var(--theme-primary-soft);
|
||||
}
|
||||
|
||||
.message-image {
|
||||
@@ -218,6 +265,67 @@ onMounted(loadMessages)
|
||||
margin-top: 14px;
|
||||
object-fit: contain;
|
||||
border-radius: 8px;
|
||||
background: #fff7f8;
|
||||
background: var(--theme-primary-soft);
|
||||
}
|
||||
|
||||
.notifications-page {
|
||||
padding: 18px 18px 34px;
|
||||
background:
|
||||
radial-gradient(circle at 84% 0%, color-mix(in srgb, var(--theme-primary) 28%, transparent), transparent 30%),
|
||||
linear-gradient(180deg, color-mix(in srgb, var(--theme-card-bg) 74%, transparent), var(--theme-page-bg));
|
||||
}
|
||||
|
||||
.page-header {
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.page-header h1 {
|
||||
font-size: 27px;
|
||||
font-weight: 860;
|
||||
}
|
||||
|
||||
.page-header p {
|
||||
color: var(--theme-secondary);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
color: var(--theme-primary-action);
|
||||
background: color-mix(in srgb, var(--theme-card-bg) 82%, transparent);
|
||||
box-shadow: 0 12px 24px color-mix(in srgb, var(--theme-neutral) 8%, transparent);
|
||||
}
|
||||
|
||||
.message-list {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.message-item {
|
||||
align-items: flex-start;
|
||||
padding: 17px;
|
||||
border-radius: 22px;
|
||||
background: color-mix(in srgb, var(--theme-card-bg) 90%, transparent);
|
||||
box-shadow: 0 18px 38px color-mix(in srgb, var(--theme-neutral) 7%, transparent);
|
||||
}
|
||||
|
||||
.message-item.unread {
|
||||
border-color: color-mix(in srgb, var(--theme-primary) 36%, var(--theme-border));
|
||||
}
|
||||
|
||||
.message-item.unread .dot {
|
||||
background: var(--theme-primary-action);
|
||||
}
|
||||
|
||||
.message-main strong {
|
||||
color: var(--text-primary);
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.message-main em {
|
||||
color: var(--theme-primary-action);
|
||||
background: color-mix(in srgb, var(--theme-primary) 18%, var(--theme-card-bg));
|
||||
}
|
||||
|
||||
.message-content :deep(a) {
|
||||
color: var(--theme-primary-action);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user