feat(config): add configurable max accounts limit (#156)
Adds `maxAccounts` configuration parameter to control the maximum number of Google accounts. **Changes:** - New config field `maxAccounts` (default: 10, range: 1-100) - Settings page: slider control for adjusting limit - Accounts page: counter badge (e.g., "8/10") with visual feedback - Add button disabled when limit reached - Server-side validation on account creation **Breaking Changes:** None
This commit is contained in:
@@ -250,6 +250,12 @@ window.Components.serverConfig = () => ({
|
||||
(v) => window.Validators.validateTimeout(v, MAX_WAIT_MIN, MAX_WAIT_MAX));
|
||||
},
|
||||
|
||||
toggleMaxAccounts(value) {
|
||||
const { MAX_ACCOUNTS_MIN, MAX_ACCOUNTS_MAX } = window.AppConstants.VALIDATION;
|
||||
this.saveConfigField('maxAccounts', value, 'Max Accounts',
|
||||
(v) => window.Validators.validateRange(v, MAX_ACCOUNTS_MIN, MAX_ACCOUNTS_MAX, 'Max Accounts'));
|
||||
},
|
||||
|
||||
toggleRateLimitDedupWindowMs(value) {
|
||||
const { RATE_LIMIT_DEDUP_MIN, RATE_LIMIT_DEDUP_MAX } = window.AppConstants.VALIDATION;
|
||||
this.saveConfigField('rateLimitDedupWindowMs', value, 'Rate Limit Dedup Window',
|
||||
|
||||
Reference in New Issue
Block a user