add Bitcoin wallet status tab in CMS.

This commit is contained in:
2026-09-06 16:07:56 +02:00
parent 33600d5c1c
commit 82932ce7c8
5 changed files with 153 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
import { defineStore } from 'pinia';
import { ref } from 'vue';
import { api } from '@/plugins/axios';
import type { BitcoinWalletStatus } from '@/types/bitcoinWallet/BitcoinWalletStatus';
export const useBitcoinWalletStore = defineStore('bitcoinWallet', () => {
const status = ref<BitcoinWalletStatus | null>(null);
const fetchStatus = async (): Promise<BitcoinWalletStatus> => {
const { data } = await api.get<BitcoinWalletStatus>('/bitcoin-wallet');
status.value = data;
return data;
};
return {
status,
fetchStatus
};
});