summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2019-09-17 14:25:54 +0200
committerLinus Färnstrand <linus@mullvad.net>2019-09-17 14:27:34 +0200
commit7efe41d6064383e011ebd657135a9a89c6e89fe5 (patch)
tree117e7225bb8dcb84de5f042c1debce57e138ebce /gui/src/renderer
parent5f756eb1041df226a3b326c6911c08907e8c9170 (diff)
downloadmullvadvpn-7efe41d6064383e011ebd657135a9a89c6e89fe5.tar.xz
mullvadvpn-7efe41d6064383e011ebd657135a9a89c6e89fe5.zip
Use natural sorting in the Electron GUI
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/app.tsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index 69c55d4000..72344fc25f 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -563,12 +563,16 @@ export default class AppRenderer {
longitude: city.longitude,
hasActiveRelays: city.relays.some((relay) => relay.active),
relays: city.relays.sort((relayA, relayB) =>
- relayA.hostname.localeCompare(relayB.hostname),
+ relayA.hostname.localeCompare(relayB.hostname, this.locale, { numeric: true }),
),
}))
- .sort((cityA, cityB) => cityA.name.localeCompare(cityB.name)),
+ .sort((cityA, cityB) =>
+ cityA.name.localeCompare(cityB.name, this.locale, { numeric: true }),
+ ),
}))
- .sort((countryA, countryB) => countryA.name.localeCompare(countryB.name));
+ .sort((countryA, countryB) =>
+ countryA.name.localeCompare(countryB.name, this.locale, { numeric: true }),
+ );
}
private setRelays(relayList: IRelayList) {