@@ -16,11 +16,6 @@ import "./limit-option.sass"
1616import { judgeVerificationRequired , processVerification } from "@app/util/limit"
1717import limitService from "@service/limit-service"
1818
19- const ALL_FILTER : timer . limit . FilterType [ ] = [
20- 'translucent' ,
21- 'groundGlass' ,
22- ]
23-
2419const ALL_LEVEL : timer . limit . RestrictionLevel [ ] = [
2520 'nothing' ,
2621 'verification' ,
@@ -48,7 +43,7 @@ const verifyTriggered = async (option: timer.option.DailyLimitOption, verified:
4843}
4944
5045function copy ( target : timer . option . DailyLimitOption , source : timer . option . DailyLimitOption ) {
51- target . limitFilter = source . limitFilter
46+ target . limitPrompt = source . limitPrompt
5247 target . limitLevel = source . limitLevel
5348 target . limitPassword = source . limitPassword
5449 target . limitVerifyDifficulty = source . limitVerifyDifficulty
@@ -83,22 +78,10 @@ const _default = defineComponent((_, ctx) => {
8378 ctx . expose ( { reset : ( ) => reset ( option ) } satisfies OptionInstance )
8479
8580 return ( ) => < >
86- < OptionItem
87- label = { msg => msg . option . dailyLimit . filter . label }
88- defaultValue = { t ( msg => msg . option . dailyLimit . filter [ defaultDailyLimit ( ) . limitFilter ] ) }
89- hideDivider
90- >
91- < ElSelect
92- modelValue = { option . limitFilter }
93- size = "small"
94- onChange = { val => option . limitFilter = val }
95- >
96- { ALL_FILTER . map ( item => < ElOption value = { item } label = { t ( msg => msg . option . dailyLimit . filter [ item ] ) } /> ) }
97- </ ElSelect >
98- </ OptionItem >
9981 < OptionItem
10082 label = { msg => msg . option . dailyLimit . level . label }
10183 defaultValue = { t ( msg => msg . option . dailyLimit . level [ defaultDailyLimit ( ) . limitLevel ] ) }
84+ hideDivider
10285 >
10386 < ElSelect
10487 modelValue = { option . limitLevel }
@@ -145,6 +128,15 @@ const _default = defineComponent((_, ctx) => {
145128 { ALL_DIFF . map ( item => < ElOption value = { item } label = { t ( msg => msg . option . dailyLimit . level . verificationDifficulty [ item ] ) } /> ) }
146129 </ ElSelect >
147130 </ OptionItem >
131+ < OptionItem label = { msg => msg . option . dailyLimit . prompt } >
132+ < ElInput
133+ modelValue = { option . limitPrompt }
134+ size = "small"
135+ onInput = { val => option . limitPrompt = val }
136+ placeholder = { t ( msg => msg . limitModal . defaultPrompt ) }
137+ style = { { width : "250px" } }
138+ />
139+ </ OptionItem >
148140 </ >
149141} )
150142
0 commit comments