@@ -11,6 +11,7 @@ import { mockTags } from '@/utils/mock'
11
11
import {
12
12
BRAND_LAYOUT ,
13
13
BANNER_LAYOUT ,
14
+ BANNER_NOTIFY_LAYOUT ,
14
15
CHANGELOG_LAYOUT ,
15
16
POST_LAYOUT ,
16
17
COLORS ,
@@ -54,6 +55,11 @@ const settingsModalFields = {
54
55
T . enumeration ( values ( BANNER_LAYOUT ) ) ,
55
56
BANNER_LAYOUT . HEADER ,
56
57
) ,
58
+ bannerNotifyLayout : T . optional (
59
+ T . enumeration ( values ( BANNER_NOTIFY_LAYOUT ) ) ,
60
+ BANNER_NOTIFY_LAYOUT . DEFAULT ,
61
+ ) ,
62
+ bannerNotifyBg : T . optional ( T . enumeration ( keys ( COLORS ) ) , 'BLACK' ) ,
57
63
changelogLayout : T . optional (
58
64
T . enumeration ( values ( CHANGELOG_LAYOUT ) ) ,
59
65
CHANGELOG_LAYOUT . FOLD ,
@@ -81,6 +87,8 @@ const DashboardThread = T.model('DashboardThread', {
81
87
changelogLayout,
82
88
postLayout,
83
89
bannerLayout,
90
+ bannerNotifyLayout,
91
+ bannerNotifyBg,
84
92
brandLayout,
85
93
} = initSettings
86
94
@@ -90,6 +98,8 @@ const DashboardThread = T.model('DashboardThread', {
90
98
post : postLayout ,
91
99
changelog : changelogLayout ,
92
100
banner : bannerLayout ,
101
+ bannerNotify : bannerNotifyLayout ,
102
+ bannerNotifyBg,
93
103
}
94
104
} ,
95
105
get curCommunity ( ) : TCommunity {
@@ -106,6 +116,12 @@ const DashboardThread = T.model('DashboardThread', {
106
116
const primaryColorTouched = slf . primaryColor !== initSettings . primaryColor
107
117
const brandLayoutTouched = slf . brandLayout !== initSettings . brandLayout
108
118
const bannerLayoutTouched = slf . bannerLayout !== initSettings . bannerLayout
119
+ const bannerNotifyLayoutTouched =
120
+ slf . bannerNotifyLayout !== initSettings . bannerNotifyLayout
121
+
122
+ const bannerNotifyBgTouched =
123
+ slf . bannerNotifyBg !== initSettings . bannerNotifyBg
124
+
109
125
const postLayoutTouched = slf . postLayout !== initSettings . postLayout
110
126
const changelogLayoutTouched =
111
127
slf . changelogLayout !== initSettings . changelogLayout
@@ -116,6 +132,8 @@ const DashboardThread = T.model('DashboardThread', {
116
132
primaryColor : primaryColorTouched ,
117
133
brandLayout : brandLayoutTouched ,
118
134
bannerLayout : bannerLayoutTouched ,
135
+ bannerNotifyLayout : bannerNotifyLayoutTouched ,
136
+ bannerNotifyBg : bannerNotifyBgTouched ,
119
137
postLayout : postLayoutTouched ,
120
138
changelogLayout : changelogLayoutTouched ,
121
139
alias : aliasTouched ,
@@ -167,6 +185,8 @@ const DashboardThread = T.model('DashboardThread', {
167
185
'primaryColor' ,
168
186
'brandLayout' ,
169
187
'bannerLayout' ,
188
+ 'bannerNotifyLayout' ,
189
+ 'bannerNotifyBg' ,
170
190
'postLayout' ,
171
191
'changelogLayout' ,
172
192
] ,
0 commit comments