diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2023-10-05 20:46:49 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2023-10-09 10:16:53 +0200 |
| commit | 9551fd134a993636ffedcbe42d8d2b1407e93ddf (patch) | |
| tree | 7e921f6b1673954c80c67a9e54765d36d67560ec | |
| parent | 5e31696a7870bd0a2df8b4a5d9e4cb5b54c5d444 (diff) | |
| download | mullvadvpn-9551fd134a993636ffedcbe42d8d2b1407e93ddf.tar.xz mullvadvpn-9551fd134a993636ffedcbe42d8d2b1407e93ddf.zip | |
Simplify location specification interfaces
| -rw-r--r-- | gui/src/renderer/components/select-location/custom-list-helpers.ts | 1 | ||||
| -rw-r--r-- | gui/src/renderer/components/select-location/select-location-types.ts | 10 |
2 files changed, 4 insertions, 7 deletions
diff --git a/gui/src/renderer/components/select-location/custom-list-helpers.ts b/gui/src/renderer/components/select-location/custom-list-helpers.ts index 163acb11b9..40d77ba33d 100644 --- a/gui/src/renderer/components/select-location/custom-list-helpers.ts +++ b/gui/src/renderer/components/select-location/custom-list-helpers.ts @@ -56,7 +56,6 @@ function prepareCustomList( const disabledReason = isCustomListDisabled(location, locations, disabledLocation); return { - ...list, label: list.name, list, location, diff --git a/gui/src/renderer/components/select-location/select-location-types.ts b/gui/src/renderer/components/select-location/select-location-types.ts index 29d897e0e5..c42cc45f6b 100644 --- a/gui/src/renderer/components/select-location/select-location-types.ts +++ b/gui/src/renderer/components/select-location/select-location-types.ts @@ -74,9 +74,7 @@ interface CommonNormalLocationSpecification active: boolean; } -export interface CustomListSpecification - extends Omit<ICustomList, 'locations'>, - CommonNormalLocationSpecification { +export interface CustomListSpecification extends CommonNormalLocationSpecification { location: RelayLocationCustomList; list: ICustomList; expanded: boolean; @@ -84,7 +82,7 @@ export interface CustomListSpecification } export interface CountrySpecification - extends Omit<IRelayLocationCountryRedux, 'cities'>, + extends Pick<IRelayLocationCountryRedux, 'name' | 'code'>, CommonNormalLocationSpecification { location: RelayLocationCountry; expanded: boolean; @@ -92,7 +90,7 @@ export interface CountrySpecification } export interface CitySpecification - extends Omit<IRelayLocationCityRedux, 'relays'>, + extends Pick<IRelayLocationCityRedux, 'name' | 'code'>, CommonNormalLocationSpecification { location: RelayLocationCity; expanded: boolean; @@ -100,7 +98,7 @@ export interface CitySpecification } export interface RelaySpecification - extends IRelayLocationRelayRedux, + extends Omit<IRelayLocationRelayRedux, 'ipv4AddrIn' | 'includeInCountry' | 'weight'>, CommonNormalLocationSpecification { location: RelayLocationRelay; } |
