feat(mail) : MailRefreshButton — bouton sync manuel, disabled pendant syncing

This commit is contained in:
2026-05-20 00:34:59 +02:00
parent 535753b189
commit 95a98012ad

View File

@@ -0,0 +1,24 @@
<script setup lang="ts">
import { useMailStore } from '~/stores/mail'
const store = useMailStore()
const { syncing } = storeToRefs(store)
const { t } = useI18n()
async function handleRefresh(): Promise<void> {
await store.triggerSync()
}
</script>
<template>
<MalioButton
:label="t('mail.actions.refresh')"
variant="secondary"
icon-name="material-symbols:refresh"
icon-position="left"
:icon-size="16"
:disabled="syncing"
@click="handleRefresh"
/>
</template>