fix(stage-tamagotchi): bad import
This commit is contained in:
@@ -3,12 +3,12 @@ import { defineInvoke } from '@unbird/eventa'
|
||||
import { createContext } from '@unbird/eventa/adapters/electron/renderer'
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
import { captionAttachedChanged, captionGetAttached } from '../../shared/caption'
|
||||
import { captionGetIsFollowingWindow, captionIsFollowingWindowChanged } from '../../shared/eventa'
|
||||
|
||||
const attached = ref(true)
|
||||
|
||||
const { context } = createContext(window.electron.ipcRenderer)
|
||||
const getAttached = defineInvoke(context, captionGetAttached)
|
||||
const getAttached = defineInvoke(context, captionGetIsFollowingWindow)
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
@@ -18,7 +18,7 @@ onMounted(async () => {
|
||||
catch {}
|
||||
|
||||
try {
|
||||
context.on(captionAttachedChanged, (event) => {
|
||||
context.on(captionIsFollowingWindowChanged, (event) => {
|
||||
attached.value = Boolean(event?.body)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ export const electronStartDraggingWindow = defineInvokeEventa('eventa:invoke:ele
|
||||
export const electronOpenMainDevtools = defineInvokeEventa('eventa:invoke:electron:windows:main:devtools:open')
|
||||
export const electronOpenSettings = defineInvokeEventa('eventa:invoke:electron:windows:settings:open')
|
||||
export const electronOpenSettingsDevtools = defineInvokeEventa('eventa:invoke:electron:windows:settings:devtools:open')
|
||||
export const captionAttachedChanged = defineEventa<boolean>('eventa:event:electron:windows:caption-overlay:attached-changed')
|
||||
export const captionGetAttached = defineInvokeEventa<boolean>('eventa:invoke:electron:windows:caption-overlay:get-attached')
|
||||
export const captionIsFollowingWindowChanged = defineEventa<boolean>('eventa:event:electron:windows:caption-overlay:is-following-window-changed')
|
||||
export const captionGetIsFollowingWindow = defineInvokeEventa<boolean>('eventa:invoke:electron:windows:caption-overlay:get-is-following-window')
|
||||
|
||||
export { electron } from './electron'
|
||||
|
||||
Reference in New Issue
Block a user