refactor: new project struct (#8199)

packages/frontend/web -> packages/frontend/apps/web
packages/frontend/mobile -> packages/frontend/apps/mobile
packages/frontend/electron -> packages/frontend/apps/electron
This commit is contained in:
EYHN
2024-09-12 07:42:57 +00:00
parent 7c4eab6cd3
commit cc5a6e6d40
291 changed files with 139 additions and 134 deletions
@@ -0,0 +1,24 @@
import { logger } from '../logger';
import { initAndShowMainWindow } from './main-window';
import { getOnboardingWindow, getOrCreateOnboardingWindow } from './onboarding';
import { launchStage } from './stage';
/**
* Launch app depending on launch stage
*/
export async function launch() {
const stage = launchStage.value;
if (stage === 'main') {
initAndShowMainWindow().catch(e => {
logger.error('Failed to restore or create window:', e);
});
getOnboardingWindow()
.then(w => w?.destroy())
.catch(e => logger.error('Failed to destroy onboarding window:', e));
}
if (stage === 'onboarding')
getOrCreateOnboardingWindow().catch(e => {
logger.error('Failed to restore or create onboarding window:', e);
});
}