show connection status poc

This commit is contained in:
riqo 2021-06-24 07:50:58 -05:00
commit 4afa716251
5 changed files with 51 additions and 30 deletions

View file

@ -1,20 +1,12 @@
// shared
import { ref } from "vue";
export const isAlive = ref(false);
export const loading = ref(true);
export const setConnectionStatus: IpcListenerCallback<boolean | null> = (payload) => {
console.log('received payload', payload)
if (payload) {
isAlive.value = payload;
} else {
loading.value = true;
}
export const status = ref("");
export const setConnectionStatus: IpcListenerCallback<string> = (payload) => {
status.value = payload;
};
export default {
isAlive
status
};