@@ -11,6 +11,7 @@ import { mockTags } from '@/utils/mock'
1111import {
1212 BRAND_LAYOUT ,
1313 BANNER_LAYOUT ,
14+ BANNER_NOTIFY_LAYOUT ,
1415 CHANGELOG_LAYOUT ,
1516 POST_LAYOUT ,
1617 COLORS ,
@@ -54,6 +55,11 @@ const settingsModalFields = {
5455 T . enumeration ( values ( BANNER_LAYOUT ) ) ,
5556 BANNER_LAYOUT . HEADER ,
5657 ) ,
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' ) ,
5763 changelogLayout : T . optional (
5864 T . enumeration ( values ( CHANGELOG_LAYOUT ) ) ,
5965 CHANGELOG_LAYOUT . FOLD ,
@@ -81,6 +87,8 @@ const DashboardThread = T.model('DashboardThread', {
8187 changelogLayout,
8288 postLayout,
8389 bannerLayout,
90+ bannerNotifyLayout,
91+ bannerNotifyBg,
8492 brandLayout,
8593 } = initSettings
8694
@@ -90,6 +98,8 @@ const DashboardThread = T.model('DashboardThread', {
9098 post : postLayout ,
9199 changelog : changelogLayout ,
92100 banner : bannerLayout ,
101+ bannerNotify : bannerNotifyLayout ,
102+ bannerNotifyBg,
93103 }
94104 } ,
95105 get curCommunity ( ) : TCommunity {
@@ -106,6 +116,12 @@ const DashboardThread = T.model('DashboardThread', {
106116 const primaryColorTouched = slf . primaryColor !== initSettings . primaryColor
107117 const brandLayoutTouched = slf . brandLayout !== initSettings . brandLayout
108118 const bannerLayoutTouched = slf . bannerLayout !== initSettings . bannerLayout
119+ const bannerNotifyLayoutTouched =
120+ slf . bannerNotifyLayout !== initSettings . bannerNotifyLayout
121+
122+ const bannerNotifyBgTouched =
123+ slf . bannerNotifyBg !== initSettings . bannerNotifyBg
124+
109125 const postLayoutTouched = slf . postLayout !== initSettings . postLayout
110126 const changelogLayoutTouched =
111127 slf . changelogLayout !== initSettings . changelogLayout
@@ -116,6 +132,8 @@ const DashboardThread = T.model('DashboardThread', {
116132 primaryColor : primaryColorTouched ,
117133 brandLayout : brandLayoutTouched ,
118134 bannerLayout : bannerLayoutTouched ,
135+ bannerNotifyLayout : bannerNotifyLayoutTouched ,
136+ bannerNotifyBg : bannerNotifyBgTouched ,
119137 postLayout : postLayoutTouched ,
120138 changelogLayout : changelogLayoutTouched ,
121139 alias : aliasTouched ,
@@ -167,6 +185,8 @@ const DashboardThread = T.model('DashboardThread', {
167185 'primaryColor' ,
168186 'brandLayout' ,
169187 'bannerLayout' ,
188+ 'bannerNotifyLayout' ,
189+ 'bannerNotifyBg' ,
170190 'postLayout' ,
171191 'changelogLayout' ,
172192 ] ,
0 commit comments