diff options
author | 2022-05-05 01:23:19 +0100 | |
---|---|---|
committer | 2022-05-05 00:23:19 +0000 | |
commit | 1fd97a01b2b55ae9ae17f47fe0c86b99afd3771e (patch) | |
tree | 4fd4a5243e5a48a4f2a135f135b2397a8e16f4dd /src/helpers/i18n-helpers.ts | |
parent | Fixing test dir name (diff) | |
download | ferdium-app-1fd97a01b2b55ae9ae17f47fe0c86b99afd3771e.tar.gz ferdium-app-1fd97a01b2b55ae9ae17f47fe0c86b99afd3771e.tar.zst ferdium-app-1fd97a01b2b55ae9ae17f47fe0c86b99afd3771e.zip |
Feature: makes Services location in sidebar changeable (#95)
Diffstat (limited to 'src/helpers/i18n-helpers.ts')
-rw-r--r-- | src/helpers/i18n-helpers.ts | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/helpers/i18n-helpers.ts b/src/helpers/i18n-helpers.ts index e6c66c7d3..9d48a0cf7 100644 --- a/src/helpers/i18n-helpers.ts +++ b/src/helpers/i18n-helpers.ts | |||
@@ -24,6 +24,7 @@ export function getSelectOptions({ | |||
24 | resetToDefaultText = '', | 24 | resetToDefaultText = '', |
25 | automaticDetectionText = '', | 25 | automaticDetectionText = '', |
26 | sort = true, | 26 | sort = true, |
27 | addDefault=false, | ||
27 | }) { | 28 | }) { |
28 | const options: object[] = []; | 29 | const options: object[] = []; |
29 | 30 | ||
@@ -41,11 +42,13 @@ export function getSelectOptions({ | |||
41 | }); | 42 | }); |
42 | } | 43 | } |
43 | 44 | ||
44 | options.push({ | 45 | if (addDefault) { |
45 | value: '───', | 46 | options.push({ |
46 | label: '───', | 47 | value: '───', |
47 | disabled: true, | 48 | label: '───', |
48 | }); | 49 | disabled: true, |
50 | }); | ||
51 | } | ||
49 | 52 | ||
50 | let keys = Object.keys(locales); | 53 | let keys = Object.keys(locales); |
51 | if (sort) { | 54 | if (sort) { |