From 45ec2dfdbeff328404e339f22063c3640cd99e96 Mon Sep 17 00:00:00 2001 From: Matt Holtzman Date: Tue, 14 Feb 2023 10:30:58 -0500 Subject: [PATCH] add link to launch onboard window (#1417) * add link to launch onboard window * change capital letter --- app/dash/Main/index.js | 10 ++++++++++ main/store/actions/index.js | 4 ++++ main/windows/index.ts | 11 +++++++++++ 3 files changed, 25 insertions(+) diff --git a/app/dash/Main/index.js b/app/dash/Main/index.js index 7453d0a85..7eefaa2b2 100644 --- a/app/dash/Main/index.js +++ b/app/dash/Main/index.js @@ -366,6 +366,16 @@ class Settings extends React.Component { Need help? Join our Discord! +
+
{ + link.send('tray:action', 'setOnboard', { showing: true }) + }} + > + Open Frame Tutorial +
+
Object.assign(dash, update)) }, + setOnboard: (u, update) => { + u('windows.onboard.showing', () => update.showing) + }, navForward: (u, windowId, crumb) => { if (!windowId || !crumb) return log.warn('Invalid nav forward', windowId, crumb) u('windows', windowId, 'nav', (nav) => { @@ -768,6 +771,7 @@ module.exports = { }, completeOnboarding: (u) => { u('main.mute.onboardingWindow', () => true) + u('windows.onboard.showing', () => false) }, // Dapp Frame appDapp: (u, dapp) => { diff --git a/main/windows/index.ts b/main/windows/index.ts index 6716669f5..5bc99efbe 100644 --- a/main/windows/index.ts +++ b/main/windows/index.ts @@ -505,6 +505,17 @@ const init = () => { dash.hide() windows.tray.focus() } + + if (store('windows.onboard.showing')) { + if (!windows.onboard) { + onboard = new Onboard() + } + + onboard.show() + } else if (onboard) { + onboard.hide() + windows.tray.focus() + } }) store.observer(() => broadcast('permissions', JSON.stringify(store('permissions'))))