add profile, messages, and connectionStatus shared state

This commit is contained in:
riqo 2021-06-23 08:11:36 -05:00
commit 81b4d018fb
9 changed files with 44 additions and 17 deletions

View file

@ -0,0 +1,27 @@
// shared
import { ref } from "vue";
export const profile = ref();
export const authComplete = ref(false);
export const setProfile: IpcListenerCallback<Profile | null> = (payload) => {
payload ? profile.value = payload : clearProfile();
showRender();
};
export const clearProfile = () => {
profile.value = null;
};
export const showRender = () => {
authComplete.value = true;
};
export default {
setProfile,
clearProfile,
profile,
showRender,
authComplete,
};