add profile, messages, and connectionStatus shared state
This commit is contained in:
parent
308dbe2b4e
commit
81b4d018fb
9 changed files with 44 additions and 17 deletions
18
src/render/shared/connectionStatus.ts
Normal file
18
src/render/shared/connectionStatus.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// shared
|
||||
import { ref } from "vue";
|
||||
|
||||
export const isAlive = ref(false);
|
||||
export const loading = ref(true);
|
||||
|
||||
export const setConnectionStatus: IpcListenerCallback<boolean | null> = (payload) => {
|
||||
if (payload) {
|
||||
isAlive.value = payload;
|
||||
} else {
|
||||
loading.value = true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
export default {
|
||||
isAlive
|
||||
};
|
||||
Loading…
Reference in a new issue