@@ -80,6 +80,24 @@ const locale = (option: UnwrapRef<timer.option.AppearanceOption>) => h(ElSelect,
8080 )
8181} )
8282
83+ const ALL_LIMIT_FILTER_TYPE : timer . limit . FilterType [ ] = [
84+ 'translucent' ,
85+ 'groundGlass' ,
86+ ]
87+
88+ const limitFilterTypeSelect = ( option : timer . option . AppearanceOption ) => h ( ElSelect , {
89+ modelValue : option . limitMarkFilter ,
90+ size : 'small' ,
91+ onChange : ( val : timer . limit . FilterType ) => {
92+ option . limitMarkFilter = val
93+ optionService . setAppearanceOption ( unref ( option ) )
94+ }
95+ } , {
96+ default : ( ) => ALL_LIMIT_FILTER_TYPE . map ( item =>
97+ h ( ElOption , { value : item , label : t ( msg => msg . option . appearance . limitFilterType [ item ] ) } )
98+ )
99+ } )
100+
83101function copy ( target : timer . option . AppearanceOption , source : timer . option . AppearanceOption ) {
84102 target . displayWhitelistMenu = source . displayWhitelistMenu
85103 target . displayBadgeText = source . displayBadgeText
@@ -88,6 +106,7 @@ function copy(target: timer.option.AppearanceOption, source: timer.option.Appear
88106 target . darkMode = source . darkMode
89107 target . darkModeTimeStart = source . darkModeTimeStart
90108 target . darkModeTimeEnd = source . darkModeTimeEnd
109+ target . limitMarkFilter = source . limitMarkFilter
91110}
92111
93112const _default = defineComponent ( {
@@ -143,7 +162,14 @@ const _default = defineComponent({
143162 input : printInConsole ( option ) ,
144163 console : tagText ( msg => msg . option . appearance . printInConsole . console ) ,
145164 info : tagText ( msg => msg . option . appearance . printInConsole . info )
146- } , msg => msg . appearance . printInConsole . label , t ( msg => msg . option . yes ) )
165+ } , msg => msg . appearance . printInConsole . label , t ( msg => msg . option . yes ) ) ,
166+ h ( ElDivider ) ,
167+ renderOptionItem ( {
168+ input : limitFilterTypeSelect ( option )
169+ } ,
170+ msg => msg . appearance . limitFilterType . label ,
171+ t ( msg => msg . option . appearance . limitFilterType [ defaultAppearance ( ) . limitMarkFilter ] )
172+ )
147173 ] )
148174 }
149175} )
0 commit comments