show connection status poc
This commit is contained in:
parent
e13f90a6cc
commit
4afa716251
5 changed files with 51 additions and 30 deletions
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue