From 7ef39ec73402c9babf320037dc72e358358d341a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 30 Jul 2023 20:43:19 +0200 Subject: [PATCH] Sort accounts --- src/views/MainView.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/views/MainView.vue b/src/views/MainView.vue index 9b6f484..b8c3215 100644 --- a/src/views/MainView.vue +++ b/src/views/MainView.vue @@ -8,6 +8,11 @@ import base32Encode from 'base32-encode'; const router = useRouter(); const accounts = useStorage('sake-accounts', []); +accounts.value.sort((a, b) => { + const va = `${a.localPart}@${a.domain}`; + const vb = `${b.localPart}@${b.domain}`; + return va.localeCompare(vb); +}); const selectedAccountId = ref(accounts.value[0].id); const subAddrName = ref('');