mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-05 01:17:35 +08:00
fix: global popup
This commit is contained in:
@@ -7,6 +7,7 @@ import lombok.Setter;
|
|||||||
import org.hibernate.annotations.CreationTimestamp;
|
import org.hibernate.annotations.CreationTimestamp;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.EnumSet;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@@ -68,7 +69,10 @@ public class User {
|
|||||||
@CollectionTable(name = "user_disabled_notification_types", joinColumns = @JoinColumn(name = "user_id"))
|
@CollectionTable(name = "user_disabled_notification_types", joinColumns = @JoinColumn(name = "user_id"))
|
||||||
@Column(name = "notification_type")
|
@Column(name = "notification_type")
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
private Set<NotificationType> disabledNotificationTypes = new HashSet<>();
|
private Set<NotificationType> disabledNotificationTypes = EnumSet.of(
|
||||||
|
NotificationType.POST_VIEWED,
|
||||||
|
NotificationType.USER_ACTIVITY
|
||||||
|
);
|
||||||
|
|
||||||
@CreationTimestamp
|
@CreationTimestamp
|
||||||
@Column(nullable = false, updatable = false,
|
@Column(nullable = false, updatable = false,
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
await this.checkMilkTeaActivity()
|
await this.checkMilkTeaActivity()
|
||||||
if (!this.showMilkTeaPopup) {
|
if (this.showMilkTeaPopup) return
|
||||||
await this.checkNotificationSetting()
|
|
||||||
if (!this.showNotificationPopup) {
|
await this.checkNotificationSetting()
|
||||||
await this.checkNewMedals()
|
if (this.showNotificationPopup) return
|
||||||
}
|
|
||||||
}
|
await this.checkNewMedals()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async checkMilkTeaActivity() {
|
async checkMilkTeaActivity() {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<BasePopup :visible="visible" @close="close">
|
<BasePopup :visible="visible" @close="close">
|
||||||
<div class="notification-popup">
|
<div class="notification-popup">
|
||||||
<div class="notification-popup-title">通知设置上线啦</div>
|
<div class="notification-popup-title">🎉 通知设置上线啦</div>
|
||||||
<div class="notification-popup-text">现在可以调整通知类型</div>
|
<div class="notification-popup-text">现在可以在消息 -> 消息设置中调整通知类型</div>
|
||||||
<div class="notification-popup-actions">
|
<div class="notification-popup-actions">
|
||||||
<div class="notification-popup-close" @click="close">知道了</div>
|
<div class="notification-popup-close" @click="close">知道了</div>
|
||||||
<div class="notification-popup-button" @click="gotoSetting">去看看</div>
|
<div class="notification-popup-button" @click="gotoSetting">去看看</div>
|
||||||
@@ -47,6 +47,7 @@ export default {
|
|||||||
.notification-popup-title {
|
.notification-popup-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-popup-actions {
|
.notification-popup-actions {
|
||||||
|
|||||||
Reference in New Issue
Block a user