Skip to content

Commit

Permalink
adjust default value frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Wójcik committed Jan 24, 2024
1 parent f82e422 commit 66ecc4a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions web/src/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1287,10 +1287,10 @@ const en: BaseTranslation = {
label: 'Require MFA for this Location',
},
keepalive_interval: {
label: 'Keepalive interval',
label: 'Keepalive interval [seconds]',
},
peer_disconnect_threshold: {
label: 'Peer disconnect threshold',
label: 'Peer disconnect threshold [seconds]',
},
},
controls: {
Expand Down
8 changes: 4 additions & 4 deletions web/src/i18n/i18n-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3011,13 +3011,13 @@ type RootTranslation = {
}
keepalive_interval: {
/**
* K​e​e​p​a​l​i​v​e​ ​i​n​t​e​r​v​a​l
* K​e​e​p​a​l​i​v​e​ ​i​n​t​e​r​v​a​l​ ​[​s​e​c​o​n​d​s​]
*/
label: string
}
peer_disconnect_threshold: {
/**
* P​e​e​r​ ​d​i​s​c​o​n​n​e​c​t​ ​t​h​r​e​s​h​o​l​d
* P​e​e​r​ ​d​i​s​c​o​n​n​e​c​t​ ​t​h​r​e​s​h​o​l​d​ ​[​s​e​c​o​n​d​s​]
*/
label: string
}
Expand Down Expand Up @@ -6541,13 +6541,13 @@ export type TranslationFunctions = {
}
keepalive_interval: {
/**
* Keepalive interval
* Keepalive interval [seconds]
*/
label: () => LocalizedString
}
peer_disconnect_threshold: {
/**
* Peer disconnect threshold
* Peer disconnect threshold [seconds]
*/
label: () => LocalizedString
}
Expand Down
4 changes: 2 additions & 2 deletions web/src/i18n/pl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,10 @@ Uwaga, konfiguracje tutaj podane, nie posiadają twojego klucza prywatnego. Musi
label: 'Wymagaj MFA dla tej lokalizacji',
},
keepalive_interval: {
label: 'Utrzymanie połączenia',
label: 'Utrzymanie połączenia [sekundy]',
},
peer_disconnect_threshold: {
label: 'Peer disconnect threshold',
label: 'Peer disconnect threshold [sekundy]',
},
},
controls: {
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/network/NetworkEditForm/NetworkEditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const defaultValues: FormFields = {
dns: '',
mfa_enabled: false,
keepalive_interval: 25,
peer_disconnect_threshold: 75,
peer_disconnect_threshold: 180,
};

const networkToForm = (data?: Network): FormFields => {
Expand Down Expand Up @@ -197,7 +197,7 @@ export const NetworkEditForm = () => {
peer_disconnect_threshold: yup
.number()
.positive()
.min(1)
.min(120)
.required(LL.form.error.required()),
})
.required();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const WizardNetworkConfiguration = () => {
peer_disconnect_threshold: yup
.number()
.positive()
.min(1)
.min(120)
.required(LL.form.error.required()),
})
.required(),
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/wizard/hooks/useWizardStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const defaultValues: StoreFields = {
dns: '',
mfa_enabled: false,
keepalive_interval: 25,
peer_disconnect_threshold: 75,
peer_disconnect_threshold: 180,
},
};

Expand Down

0 comments on commit 66ecc4a

Please sign in to comment.