fix(stage-tamagotchi): crash on onboarding save by bump electron to v40.8.0, bring back auto-popup (#1246)
--------- Co-authored-by: Neko Ayaka <neko@ayaka.moe>
This commit is contained in:
@@ -7,6 +7,7 @@ import { defineInvokeHandler } from '@moeru/eventa'
|
||||
import { createContext } from '@moeru/eventa/adapters/electron/main'
|
||||
import { safeClose } from '@proj-airi/electron-vueuse/main'
|
||||
import { BrowserWindow, ipcMain, shell } from 'electron'
|
||||
import { isMacOS } from 'std-env'
|
||||
|
||||
import icon from '../../../../resources/icon.png?asset'
|
||||
|
||||
@@ -42,8 +43,8 @@ export function setupOnboardingWindowManager(params: {
|
||||
show: false,
|
||||
icon,
|
||||
resizable: true,
|
||||
frame: false,
|
||||
titleBarStyle: 'hidden',
|
||||
frame: !isMacOS,
|
||||
titleBarStyle: isMacOS ? 'hidden' : undefined,
|
||||
transparent: false,
|
||||
backgroundColor: '#0f0f0f',
|
||||
webPreferences: {
|
||||
|
||||
@@ -27,8 +27,7 @@ import { useProvidersStore } from '@proj-airi/stage-ui/stores/providers'
|
||||
import { useSettings, useSettingsAudioDevice } from '@proj-airi/stage-ui/stores/settings'
|
||||
import { refDebounced, useBroadcastChannel } from '@vueuse/core'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { isLinux } from 'std-env'
|
||||
import { computed, onUnmounted, ref, toRef, watch } from 'vue'
|
||||
import { computed, onMounted, onUnmounted, ref, toRef, watch } from 'vue'
|
||||
|
||||
import ControlsIsland from '../components/stage-islands/controls-island/index.vue'
|
||||
import ResourceStatusIsland from '../components/stage-islands/resource-status-island/index.vue'
|
||||
@@ -50,6 +49,8 @@ const shouldFadeOnCursorWithin = ref(false)
|
||||
const onboardingStore = useOnboardingStore()
|
||||
const openOnboarding = useElectronEventaInvoke(electronOpenOnboarding)
|
||||
|
||||
const isLinux = useElectronEventaInvoke(electron.app.isLinux)
|
||||
|
||||
const { isOutside: isOutsideWindow } = useElectronMouseInWindow()
|
||||
const { isOutside } = useElectronMouseInElement(controlsIslandRef)
|
||||
const isOutsideFor250Ms = refDebounced(isOutside, 250)
|
||||
@@ -87,7 +88,7 @@ const isAroundWindowBorderFor250Ms = refDebounced(isAroundWindowBorder, 250)
|
||||
const setIgnoreMouseEvents = useElectronEventaInvoke(electron.window.setIgnoreMouseEvents)
|
||||
|
||||
const context = useElectronEventaContext()
|
||||
const startDraggingWindow = !isLinux ? defineInvoke(context.value, electronStartDraggingWindow) : undefined
|
||||
const startDraggingWindow = !isLinux() ? defineInvoke(context.value, electronStartDraggingWindow) : undefined
|
||||
|
||||
const live2dStore = useLive2d()
|
||||
const { scale, positionInPercentageString } = storeToRefs(live2dStore)
|
||||
@@ -317,6 +318,10 @@ watch([() => onboardingStore.shouldShowSetup], ([shouldShowSetup]) => {
|
||||
}
|
||||
}, { immediate: true })
|
||||
|
||||
onMounted(() => {
|
||||
onboardingStore.initializeSetupCheck()
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
stopAudioInteraction()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user