Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: add first version of onboarding dialog

thecodrrdee9c32c5fcb
diff --git a/apps/web/package.json b/apps/web/package.json
index 55b05a6b4..544f6c875 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -68,6 +68,7 @@
"@types/node-fetch": "^2.5.10",
"@types/quill": "^2.0.5",
"@types/rebass": "^4.0.10",
+ "@types/rebass__forms": "^4.0.6",
"babel-eslint": "^10.1.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"chalk": "^4.1.0",
diff --git a/apps/web/src/app-effects.js b/apps/web/src/app-effects.js
index d308b38f6..975ca3a75 100644
--- a/apps/web/src/app-effects.js
+++ b/apps/web/src/app-effects.js
@@ -15,7 +15,10 @@ import useAnnouncements from "./utils/use-announcements";
import {
showAnnouncementDialog,
showBuyDialog,
+ showEmailVerificationDialog,
+ showFeatureDialog,
showInvalidSystemTimeDialog,
+ showOnboardingDialog,
} from "./common/dialog-controller";
import useSystemTheme from "./utils/use-system-theme";
import { isTesting } from "./utils/platform";
@@ -70,6 +73,7 @@ export default function AppEffects({ setShow }) {
}
await resetReminders();
setIsVaultCreated(await db.vault.exists());
+ await showOnboardingDialog();
})();
return () => {
userCheckStatusEvent.unsubscribe();
diff --git a/apps/web/src/assets/apple.png b/apps/web/src/assets/apple.png
new file mode 100644
index 000000000..70f336b2f
Binary files /dev/null and b/apps/web/src/assets/apple.png differ
diff --git a/apps/web/src/assets/dark1.png b/apps/web/src/assets/dark1.png
new file mode 100644
index 000000000..00b2c5b05
Binary files /dev/null and b/apps/web/src/assets/dark1.png differ
diff --git a/apps/web/src/assets/dark2.png b/apps/web/src/assets/dark2.png
new file mode 100644
index 000000000..10fa71785
Binary files /dev/null and b/apps/web/src/assets/dark2.png differ
diff --git a/apps/web/src/assets/e2e.svg b/apps/web/src/assets/e2e.svg
new file mode 100644
index 000000000..91221a8ed
--- /dev/null
+++ b/apps/web/src/assets/e2e.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 1100.5 691.71"><path fill="#3f3d56" d="M1100.5 284.1h-1.86v-50.92a29.47 29.47 0 0 0-29.47-29.47H961.3a29.47 29.47 0 0 0-29.47 29.47V512.5a29.47 29.47 0 0 0 29.47 29.47h107.87a29.47 29.47 0 0 0 29.47-29.47V320.33h1.86Z"/><path fill="#d0cde1" d="M1092.37 234.9v278.93a22.01 22.01 0 0 1-22 22h-108.4a22 22 0 0 1-22-22V234.9a22 22 0 0 1 22-22h13.15a10.46 10.46 0 0 0 9.68 14.4h61.8a10.44 10.44 0 0 0 9.68-14.4h14.08a22 22 0 0 1 22.01 22Z"/><path fill="#008837" d="M945.85 355.71h126v34h-126z"/><path fill="#3f3d56" d="M1076.85 383.7h-122a3 3 0 0 1-3-3v-30a3 3 0 0 1 3-3h122a3 3 0 0 1 3 3v30a3 3 0 0 1-3 3Zm-122-34a1 1 0 0 0-1 1v30a1 1 0 0 0 1 1h122a1 1 0 0 0 1-1v-30a1 1 0 0 0-1-1Z"/><path fill="#3f3d56" d="M959.85 374.71h16v2h-16zm22 0h16v2h-16zm22 0h16v2h-16zm22 0h16v2h-16zm22 0h16v2h-16z"/><path d="M1092.37 485.47v28.36a22.01 22.01 0 0 1-22 22h-108.4a22 22 0 0 1-22-22V383.37Z" opacity=".1"/><path fill="#d0cde1" d="M99.85 459.71h473v232h-473z"/><path d="M452.6 691.7H101.85a2 2 0 0 1-2-2v-228a2 2 0 0 1 2-2h4.44Z" opacity=".1"/><path fill="#3f3d56" d="M318.85 490.71h733v2h-733zM550.6 4.32H341.1V0h-94.99v4.32H35.76a14.17 14.17 0 0 0-14.17 14.17v286.85a14.17 14.17 0 0 0 14.17 14.17h514.83a14.17 14.17 0 0 0 14.17-14.17V18.5A14.17 14.17 0 0 0 550.6 4.32Z"/><path fill="#d0cde1" d="M40.59 29.36h505.17v284.98H40.59z"/><circle cx="292.74" cy="16.41" r="5.18" fill="#008837"/><path fill="#3f3d56" d="M190.85 135.7h-12a3 3 0 0 1-3-3v-12a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3Zm-12-16a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-12a1 1 0 0 0-1-1Z"/><path fill="#3f3d56" d="M176.85 133.71h228v2h-228z"/><path fill="#008837" d="M345.85 188.71h53v16h-53z"/><path fill="#3f3d56" d="M402.85 200.7h-49a3 3 0 0 1-3-3v-12a3 3 0 0 1 3-3h49a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3Zm-49-16a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h49a1 1 0 0 0 1-1v-12a1 1 0 0 0-1-1Z"/><path fill="#008837" d="M703.85 206.71h100v70h-100z"/><path fill="#3f3d56" d="M813.85 271.2h-96a4 4 0 0 1-4-4v-66a4 4 0 0 1 4-4h96a4 4 0 0 1 4 4v66a4 4 0 0 1-4 4Zm-96-70v66h96v-66Z"/><path fill="#3f3d56" d="M802.85 198.7h-4a33 33 0 1 0-66 0h-4a37 37 0 1 1 74 0Zm-27 27.5a10 10 0 1 0-15.3 8.48v10.73a5.3 5.3 0 0 0 5.3 5.3 5.3 5.3 0 0 0 5.3-5.3v-10.73a9.98 9.98 0 0 0 4.7-8.47Zm-491.5 336.51h16v2h-16zm22 0h16v2h-16zm22 0h16v2h-16zm22 0h16v2h-16zm22 0h16v2h-16z"/><path fill="#3f3d56" d="M593.85 674.7h-469a4 4 0 0 1-4-4v-228a4 4 0 0 1 4-4h469a4 4 0 0 1 4 4v228a4 4 0 0 1-4 4Zm-469-232v228h469v-228Z"/><circle cx="145.85" cy="470.71" r="6" fill="#3f3d56"/><circle cx="166.85" cy="470.71" r="6" fill="#3f3d56"/><circle cx="187.85" cy="470.71" r="6" fill="#3f3d56"/><path fill="#3f3d56" d="M403.85 576.7h-135a3 3 0 0 1-3-3v-34a3 3 0 0 1 3-3h135a3 3 0 0 1 3 3v34a3 3 0 0 1-3 3Zm-135-38a1 1 0 0 0-1 1v34a1 1 0 0 0 1 1h135a1 1 0 0 0 1-1v-34a1 1 0 0 0-1-1Z"/><circle cx="437.85" cy="559.71" r="18" fill="#008837"/><path fill="#3f3d56" d="M443.85 575.7a19 19 0 1 1 19-19 19.02 19.02 0 0 1-19 19Zm0-36a17 17 0 1 0 17 17 17.02 17.02 0 0 0-17-17Z"/><path fill="#3f3d56" d="m444.12 563.8-9.68-9.68 2.82-2.83 6.32 6.32 17.64-25.06 3.27 2.31-20.37 28.94z"/><path d="M433.76 314.34H40.59V50.95l393.17 263.39z" opacity=".1"/><path fill="#3f3d56" d="M578.95 309.15h-49.3v-3.55a.7.7 0 0 0-.7-.7h-16.91a.7.7 0 0 0-.7.7v3.55h-10.57v-3.55a.7.7 0 0 0-.7-.7h-16.9a.7.7 0 0 0-.71.7v3.55h-10.57v-3.55a.7.7 0 0 0-.7-.7h-16.9a.7.7 0 0 0-.71.7v3.55H443v-3.55a.7.7 0 0 0-.7-.7h-16.9a.7.7 0 0 0-.7.7v3.55h-10.57v-3.55a.7.7 0 0 0-.7-.7h-16.91a.7.7 0 0 0-.7.7v3.55h-10.57v-3.55a.7.7 0 0 0-.7-.7h-16.9a.7.7 0 0 0-.71.7v3.55h-10.57v-3.55a.7.7 0 0 0-.7-.7h-132.4a.7.7 0 0 0-.7.7v3.55H212v-3.55a.7.7 0 0 0-.7-.7h-16.9a.7.7 0 0 0-.71.7v3.55h-10.57v-3.55a.7.7 0 0 0-.7-.7h-16.9a.7.7 0 0 0-.71.7v3.55h-10.56v-3.55a.7.7 0 0 0-.7-.7h-16.91a.7.7 0 0 0-.7.7v3.55h-10.57v-3.55a.7.7 0 0 0-.7-.7h-16.91a.7.7 0 0 0-.7.7v3.55H96.49v-3.55a.7.7 0 0 0-.7-.7h-16.9a.7.7 0 0 0-.71.7v3.55H67.6v-3.55a.7.7 0 0 0-.7-.7H50a.7.7 0 0 0-.7.7v3.55H16.9A16.9 16.9 0 0 0 0 326.05v7.65a16.9 16.9 0 0 0 16.9 16.9h562.05a16.9 16.9 0 0 0 16.9-16.9v-7.64a16.9 16.9 0 0 0-16.9-16.9Zm-154.1-91.45h-264a3 3 0 0 1-3-3v-110a3 3 0 0 1 3-3h264a3 3 0 0 1 3 3v110a3 3 0 0 1-3 3Zm-264-114a1 1 0 0 0-1 1v110a1 1 0 0 0 1 1h264a1 1 0 0 0 1-1v-110a1 1 0 0 0-1-1Z"/><path fill="#3f3d56" d="M190.85 165.7h-12a3 3 0 0 1-3-3v-12a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3Zm-12-16a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-12a1 1 0 0 0-1-1Z"/><path fill="#3f3d56" d="M176.85 163.71h228v2h-228zm88 106h733v2h-733z"/><circle cx="264.85" cy="269.71" r="14" fill="#3f3d56"/><circle cx="997.85" cy="271.71" r="11" fill="#3f3d56"/><circle cx="1051.85" cy="492.71" r="11" fill="#3f3d56"/><circle cx="321.85" cy="492.71" r="11" fill="#3f3d56"/></svg>
\ No newline at end of file
diff --git a/apps/web/src/assets/light1.png b/apps/web/src/assets/light1.png
new file mode 100644
index 000000000..1f351ee54
Binary files /dev/null and b/apps/web/src/assets/light1.png differ
diff --git a/apps/web/src/assets/light2.png b/apps/web/src/assets/light2.png
new file mode 100644
index 000000000..d865d69d0
Binary files /dev/null and b/apps/web/src/assets/light2.png differ
diff --git a/apps/web/src/assets/note2.svg b/apps/web/src/assets/note2.svg
new file mode 100644
index 000000000..f1c1fa674
--- /dev/null
+++ b/apps/web/src/assets/note2.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 485.83 483.5"><path fill="#e6e6e6" d="M320.46 128.1h-79.74a11.48 11.48 0 0 1-9.07-4.4 11.62 11.62 0 0 1-2.17-9.96 201.63 201.63 0 0 0 0-93.65 11.62 11.62 0 0 1 2.17-9.97 11.48 11.48 0 0 1 9.07-4.4h79.74a11.62 11.62 0 0 1 11.44 9.76 337.96 337.96 0 0 1 0 102.86 11.62 11.62 0 0 1-11.44 9.76Z"/><path fill="#fff" d="M240.72 11.73a5.51 5.51 0 0 0-4.36 2.1 5.66 5.66 0 0 0-1.05 4.86 207.66 207.66 0 0 1 0 96.45 5.66 5.66 0 0 0 1.05 4.85 5.51 5.51 0 0 0 4.36 2.1h79.74a5.58 5.58 0 0 0 5.5-4.66 331.99 331.99 0 0 0 0-101.04 5.58 5.58 0 0 0-5.5-4.66Z"/><path fill="#e6e6e6" d="M303.06 40.58H261.2a6 6 0 0 1-6-6v-2.35a6 6 0 0 1 6-6h41.85a6 6 0 0 1 6 6v2.35a6 6 0 0 1-6 6Zm0 29.62H261.2a6 6 0 0 1-6-6v-2.34a6 6 0 0 1 6-6h41.85a6 6 0 0 1 6 6v2.34a6 6 0 0 1-6 6Zm0 29.63H261.2a6 6 0 0 1-6-6V91.5a6 6 0 0 1 6-6h41.85a6 6 0 0 1 6 6v2.34a6 6 0 0 1-6 6Zm167.4 104.27h-79.74a11.48 11.48 0 0 1-9.07-4.4 11.62 11.62 0 0 1-2.17-9.96 201.63 201.63 0 0 0 0-93.65 11.62 11.62 0 0 1 2.17-9.97 11.48 11.48 0 0 1 9.07-4.4h79.74a11.62 11.62 0 0 1 11.44 9.76 337.96 337.96 0 0 1 0 102.86 11.62 11.62 0 0 1-11.44 9.76Z"/><path fill="#fff" d="M390.72 87.73a5.51 5.51 0 0 0-4.36 2.1 5.66 5.66 0 0 0-1.05 4.86 207.66 207.66 0 0 1 0 96.45 5.66 5.66 0 0 0 1.05 4.85 5.51 5.51 0 0 0 4.36 2.1h79.74a5.58 5.58 0 0 0 5.5-4.66 331.99 331.99 0 0 0 0-101.04 5.58 5.58 0 0 0-5.5-4.66Z"/><path fill="#f2f2f2" d="M311.46 290.6h-79.74a11.98 11.98 0 0 1-9.46-4.59 12.12 12.12 0 0 1-2.27-10.4 201.13 201.13 0 0 0 0-93.4 12.12 12.12 0 0 1 2.27-10.4 11.98 11.98 0 0 1 9.46-4.58h79.74a12.13 12.13 0 0 1 11.93 10.18 338.46 338.46 0 0 1 0 103 12.13 12.13 0 0 1-11.93 10.19Z"/><path fill="#e6e6e6" d="M453.06 131.58H411.2a6 6 0 0 1-6-6v-2.35a6 6 0 0 1 6-6h41.85a6 6 0 0 1 6 6v2.35a6 6 0 0 1-6 6Zm0 29.62H411.2a6 6 0 0 1-6-6v-2.34a6 6 0 0 1 6-6h41.85a6 6 0 0 1 6 6v2.34a6 6 0 0 1-6 6Z"/><circle cx="271.81" cy="228.5" r="23" fill="#fff"/><path fill="#e6e6e6" d="M282.81 225.5h-8v-8a3 3 0 0 0-6 0v8h-8a3 3 0 0 0 0 6h8v8a3 3 0 0 0 6 0v-8h8a3 3 0 0 0 0-6Z"/><path fill="#ccc" d="M300.81 17h-42a4.5 4.5 0 0 1-4.5-4.5v-8a4.5 4.5 0 0 1 4.5-4.5h42a4.5 4.5 0 0 1 4.5 4.5v8a4.5 4.5 0 0 1-4.5 4.5Zm152 77h-42a4.5 4.5 0 0 1-4.5-4.5v-8a4.5 4.5 0 0 1 4.5-4.5h42a4.5 4.5 0 0 1 4.5 4.5v8a4.5 4.5 0 0 1-4.5 4.5Z"/><path fill="#ffb8b8" d="M88.6 471.06h12.26l3.83-47.29h-16.1l.01 47.29z"/><path fill="#2f2e41" d="M85.47 467.06h24.14A15.39 15.39 0 0 1 125 482.44v.5H85.47Z"/><path fill="#ffb8b8" d="M22.6 471.06h12.26l5.83-47.29h-18.1l.01 47.29z"/><path fill="#2f2e41" d="M19.47 467.06H43.6A15.39 15.39 0 0 1 59 482.44v.5H19.47Zm5.3-10.94a4.98 4.98 0 0 1-3.37-1.32 4.96 4.96 0 0 1-1.62-3.53l-4.92-176.22 69.82 17.46 21.53 64.61a70.46 70.46 0 0 1 3.55 25.83l-2.67 62.63a5 5 0 0 1-5 4.76H90.4a5.02 5.02 0 0 1-4.96-4.33l-8.37-69.14a37.82 37.82 0 0 0-5.53-15.16l-16.47-26.08a1 1 0 0 0-1.84.41L40.29 451.13a5 5 0 0 1-4.68 4.4l-10.55.58-.29.01Z"/><circle cx="73.06" cy="136.41" r="24.56" fill="#ffb8b8"/><path fill="#e5e5e5" d="M84.34 299.67a5.08 5.08 0 0 1-1.25-.16l-69.27-17.76a5 5 0 0 1-3.66-5.81l15.9-85.7a31.21 31.21 0 0 1 18.26-22.53 30.11 30.11 0 0 1 28.26 2.07c.97.6 1.95 1.27 2.9 1.96a30.96 30.96 0 0 1 12.58 24.53l1.27 98.33a5 5 0 0 1-4.99 5.07Z"/><path fill="#ffb8b8" d="M20.95 300.68a10.06 10.06 0 0 1 4.21-14.83l-3.08-35.6 16.33 8.84.42 32.46a10.11 10.11 0 0 1-17.88 9.13Z"/><path fill="#e5e5e5" d="M26.78 281.14a5.53 5.53 0 0 1-1.36-.17 5.5 5.5 0 0 1-3.98-3.99l-8.02-31.88a47.37 47.37 0 0 1 3.76-33.14L34 179.08a15.54 15.54 0 0 1 18.8-11.02 15.36 15.36 0 0 1 9.48 7.1 15.57 15.57 0 0 1 1.66 11.91L40 240.58l.28 32.04a5.52 5.52 0 0 1-3.58 5.2l-8 2.97a5.48 5.48 0 0 1-1.92.35Z"/><path fill="#ffb8b8" d="M141.32 287.58a10.06 10.06 0 0 1-8.5-12.86l-28.99-20.9 17.36-6.6 24.87 20.85a10.11 10.11 0 0 1-4.74 19.51Z"/><path fill="#e5e5e5" d="M126.14 272.33a5.52 5.52 0 0 1-2.46-.58l-29.4-14.72a47.38 47.38 0 0 1-22.66-24.46l-13.96-34.2a15.54 15.54 0 0 1 3.92-21.44 15.35 15.35 0 0 1 11.59-2.54 15.57 15.57 0 0 1 10.08 6.51l24.94 53.04 24.47 20.68a5.52 5.52 0 0 1 1.6 6.11l-2.96 8.01a5.47 5.47 0 0 1-2.01 2.6 5.5 5.5 0 0 1-3.15 1Z"/><path fill="#2f2e41" d="M67.9 161.34c1.3.57 3.98-9.82 2.78-11.9-1.78-3.1-1.67-3.07-2.86-5.12s-1.44-4.85.09-6.65 5.07-1.56 5.77.7c-.45-4.3 3.79-7.74 8-8.7s8.62-.37 12.85-1.24c4.9-1 10-5.1 8.05-10.5a7.6 7.6 0 0 0-1.49-2.43c-2.26-2.54-5.42-3.63-8.5-4.67-6.44-2.19-13.04-4.4-19.83-4.16a28.8 28.8 0 0 0-25.45 18.61 26.16 26.16 0 0 0-1.08 4.03c-2.33 12.52 4.94 24.88 16.76 29.65Z"/><path d="m38.9 273.34.56-32.93 17.44-35.07-14 36-4 32z" opacity=".2"/><path fill="#e6e6e6" d="m197.08 355.98-73.64-30.6a11.48 11.48 0 0 1-6.69-7.53 11.62 11.62 0 0 1 1.82-10.04 201.63 201.63 0 0 0 35.93-86.48 11.62 11.62 0 0 1 5.83-8.37 11.48 11.48 0 0 1 10.06-.58l73.64 30.6a11.62 11.62 0 0 1 6.82 13.4 337.96 337.96 0 0 1-39.47 94.98 11.62 11.62 0 0 1-14.3 4.62Z"/><path fill="#fff" d="M168.09 217.92a5.51 5.51 0 0 0-4.83.28 5.66 5.66 0 0 0-2.84 4.08 207.66 207.66 0 0 1-37 89.06 5.66 5.66 0 0 0-.9 4.89 5.51 5.51 0 0 0 3.22 3.62l73.64 30.6a5.58 5.58 0 0 0 6.88-2.2 331.99 331.99 0 0 0 38.76-93.3 5.58 5.58 0 0 0-3.3-6.43Z"/><path fill="#e5e5e5" d="m207.3 286.03-38.65-16.05a6 6 0 0 1-3.23-7.85l.9-2.16a6 6 0 0 1 7.84-3.24l38.64 16.06a6 6 0 0 1 3.24 7.84l-.9 2.16a6 6 0 0 1-7.84 3.24Zm-11.37 27.36-38.64-16.06a6 6 0 0 1-3.24-7.84l.9-2.16a6 6 0 0 1 7.84-3.24l38.64 16.05a6 6 0 0 1 3.24 7.85l-.9 2.16a6 6 0 0 1-7.84 3.24Z"/><path fill="#ccc" d="M222.78 247.58a4.49 4.49 0 0 1-1.69-.33l-38.93-15.74a4.5 4.5 0 0 1-2.49-5.86l3-7.42a4.5 4.5 0 0 1 5.86-2.48l38.94 15.74a4.5 4.5 0 0 1 2.48 5.86l-3 7.42a4.51 4.51 0 0 1-4.17 2.81ZM141 483.5H1a1 1 0 1 1 0-2h140a1 1 0 0 1 0 2Z"/></svg>
\ No newline at end of file
diff --git a/apps/web/src/assets/play.png b/apps/web/src/assets/play.png
new file mode 100644
index 000000000..c77b7464b
Binary files /dev/null and b/apps/web/src/assets/play.png differ
diff --git a/apps/web/src/common/dialogcontroller.js b/apps/web/src/common/dialogcontroller.js
index 284790c38..6b79aaec6 100644
--- a/apps/web/src/common/dialogcontroller.js
+++ b/apps/web/src/common/dialogcontroller.js
@@ -598,6 +598,12 @@ export function showImportDialog() {
));
}
+export function showOnboardingDialog() {
+ return showDialog((Dialogs, perform) => (
+ <Dialogs.OnboardingDialog onClose={(res) => perform(res)} />
+ ));
+}
+
export function showInvalidSystemTimeDialog({ serverTime, localTime }) {
return showDialog((Dialogs) => (
<Dialogs.Confirm
diff --git a/apps/web/src/common/reminders.js b/apps/web/src/common/reminders.js
index bf2416319..6198d6d99 100644
--- a/apps/web/src/common/reminders.js
+++ b/apps/web/src/common/reminders.js
@@ -69,7 +69,7 @@ export const Reminders = {
email: {
key: "email",
title: "Your email is not confirmed",
- subtitle: "Confirm your email to get 7 more days of free trial",
+ subtitle: "Please confirm your email to sync your notes",
action: () => hashNavigate("/email/verify"),
icon: Icon.Email,
},
diff --git a/apps/web/src/components/announcements/body.js b/apps/web/src/components/announcements/body.js
index eed687935..5fd019bb6 100644
--- a/apps/web/src/components/announcements/body.js
+++ b/apps/web/src/components/announcements/body.js
@@ -251,7 +251,7 @@ function CalltoAction({ action, index }) {
);
}
-function Features({ item }) {
+export function Features({ item }) {
const { style } = item;
return (
<Box
diff --git a/apps/web/src/components/dialogs/email-verification-dialog.js b/apps/web/src/components/dialogs/email-verification-dialog.js
index 5e060ffbb..4b625689d 100644
--- a/apps/web/src/components/dialogs/email-verification-dialog.js
+++ b/apps/web/src/components/dialogs/email-verification-dialog.js
@@ -39,7 +39,7 @@ function EmailVerificationDialog(props) {
return (
<Dialog
isOpen={true}
- title={"Verify your email"}
+ title={"Confirm your email"}
description={
"Check your spam folder if you haven't received an email yet."
}
@@ -73,7 +73,7 @@ function EmailVerificationDialog(props) {
alignSelf="stretch"
sx={{ borderRadius: "default" }}
>
- We have sent the confirmation link to your email at{" "}
+ We have sent the email confirmation link at{" "}
<Text as="b" fontWeight="bold">
{user.email}
</Text>
diff --git a/apps/web/src/components/dialogs/featuredialog.js b/apps/web/src/components/dialogs/featuredialog.js
index 3e3b65ec6..41af962ad 100644
--- a/apps/web/src/components/dialogs/featuredialog.js
+++ b/apps/web/src/components/dialogs/featuredialog.js
@@ -41,8 +41,7 @@ const features = {
},
welcome: {
title: "Thank you for signing up!",
- subtitle:
- "You can use all features of Notesnook for 7 days. No limitations. No commitments.",
+ subtitle: "Please confirm your email",
subFeatures: [
{
@@ -70,7 +69,7 @@ const features = {
},
confirmed: {
title: "Email confirmed!",
- subtitle: "Your have been rewarded 7 more days of free trial. Enjoy!",
+ subtitle: "",
subFeatures: [
{
title: "Unlimited notes & notebooks",
diff --git a/apps/web/src/components/dialogs/index.js b/apps/web/src/components/dialogs/index.js
index c686ac2fc..1a8f577ea 100644
--- a/apps/web/src/components/dialogs/index.js
+++ b/apps/web/src/components/dialogs/index.js
@@ -14,6 +14,7 @@ import TrackingDetailsDialog from "./trackingdetailsdialog";
import ReminderDialog from "./reminderdialog";
import AnnouncementDialog from "./announcementdialog";
import IssueDialog from "./issuedialog";
+import OnboardingDialog from "./onboarding-dialog";
const Dialogs = {
AddNotebookDialog,
@@ -32,5 +33,6 @@ const Dialogs = {
AnnouncementDialog,
IssueDialog,
ImportDialog,
+ OnboardingDialog,
};
export default Dialogs;
diff --git a/apps/web/src/components/dialogs/onboarding-dialog.js b/apps/web/src/components/dialogs/onboarding-dialog.js
new file mode 100644
index 000000000..06957c598
--- /dev/null
+++ b/apps/web/src/components/dialogs/onboarding-dialog.js
@@ -0,0 +1,202 @@
+import React, { useState } from "react";
+import { Text, Flex, Button, Image, Box } from "rebass";
+import Dialog from "./dialog";
+import * as Icon from "../icons";
+import { getHomeRoute, hardNavigate } from "../../navigation";
+import { ReactComponent as E2E } from "../../assets/e2e.svg";
+import { ReactComponent as Note } from "../../assets/note2.svg";
+import LightUI from "../../assets/light1.png";
+import DarkUI from "../../assets/dark1.png";
+import GooglePlay from "../../assets/play.png";
+import AppleStore from "../../assets/apple.png";
+import { useStore as useThemeStore } from "../../stores/theme-store";
+import { Checkbox, Label } from "@rebass/forms";
+import { Features } from "../announcements/body";
+import { showBuyDialog } from "../../common/dialog-controller";
+
+const steps = [
+ {
+ title: "Safe & encrypted notes",
+ subtitle: "Write with freedom. Never compromise on privacy again.",
+ buttonText: "Get started",
+ image: <Note width={120} />,
+ component: TrackingConsent,
+ },
+ {
+ title: "Choose your style",
+ subtitle:
+ "You can change the theme at any time from Settings or the side menu.",
+ buttonText: "Next",
+ component: ThemeSelector,
+ },
+ {
+ image: <E2E width={180} />,
+ title: "Cross platform & 100% encrypted",
+ subtitle:
+ "Notesnook encrypts everything offline before syncing to your other devices. This means that no one can read your notes except you. Not even us.",
+ component: CrossPlatform,
+ buttonText: "Next",
+ },
+ {
+ image: <Icon.Pro size={60} color="primary" />,
+ title: "Notesnook Pro",
+ subtitle: "Experience the next level of private note taking",
+ component: TrialOffer,
+ },
+];
+
+function OnboardingDialog(props) {
+ const [step, setStep] = useState(0);
+ const {
+ title,
+ subtitle,
+ image,
+ component: Component,
+ buttonText,
+ } = steps[step];
+ return (
+ <Dialog isOpen={true} width={500}>
+ <Flex flexDirection="column" overflowY="auto" alignItems={"center"}>
+ {image}
+ <Text variant={"heading"} mt={2}>
+ {title}
+ </Text>
+ <Text variant={"body"} color="fontTertiary" textAlign={"center"}>
+ {subtitle}
+ </Text>
+ {Component && <Component onClose={props.onClose} />}
+ {buttonText && (
+ <Button
+ sx={{ borderRadius: 50, px: 30, mb: 4 }}
+ onClick={() => setStep((s) => ++s)}
+ >
+ {buttonText}
+ </Button>
+ )}
+ </Flex>
+ </Dialog>
+ );
+}
+export default OnboardingDialog;
+
+const themes = [
+ { key: "light", name: "Light", image: LightUI },
+ { key: "dark", name: "Dark", image: DarkUI },
+];
+
+function ThemeSelector() {
+ const currentTheme = useThemeStore((store) => store.theme);
+ const setTheme = useThemeStore((store) => store.setTheme);
+
+ return (
+ <Flex
+ sx={{ border: "1px solid var(--border)", borderRadius: "default" }}
+ my={4}
+ >
+ {themes.map((theme) => {
+ const isSelected = currentTheme === theme.key;
+ return (
+ <Flex
+ flexDirection={"column"}
+ p={20}
+ alignItems="center"
+ justifyContent={"center"}
+ sx={{
+ borderRight: "1px solid var(--border)",
+ bg: isSelected ? "bgSecondary" : "transparent",
+ cursor: "pointer",
+ ":last-of-type": {
+ borderRight: "0px",
+ },
+ ":hover": {
+ bg: "hover",
+ },
+ }}
+ onClick={() => {
+ setTheme(theme.key);
+ }}
+ >
+ <Image
+ src={theme.image}
+ sx={{
+ borderRadius: "default",
+ border: isSelected ? "2px solid var(--primary)" : "none",
+ boxShadow: isSelected ? "0px 0px 10px 1px #00000016" : "none",
+ }}
+ />
+ <Text variant={"subtitle"} color="icon" mt={2}>
+ {theme.name}
+ </Text>
+ </Flex>
+ );
+ })}
+ </Flex>
+ );
+}
+
+function TrackingConsent() {
+ return (
+ <Label variant="text.subBody" my={4} width="80%">
+ <Checkbox width={14} checked />
+ <Text>
+ Help improve Notesnook by sending completely anonymized product
+ analytics.
+ </Text>
+ </Label>
+ );
+}
+
+function CrossPlatform() {
+ return (
+ <Flex my={4} alignItems="center">
+ <Image src={GooglePlay} flexShrink={0} width={135} />
+ <Image src={AppleStore} flexShrink={0} width={110} />
+ </Flex>
+ );
+}
+
+function TrialOffer({ onClose }) {
+ return (
+ <Flex
+ my={4}
+ flexDirection="column"
+ justifyContent={"center"}
+ alignItems="center"
+ >
+ <Features item={{ style: {} }} />
+ <Text
+ variant={"body"}
+ mt={2}
+ bg="bgSecondary"
+ color="icon"
+ p={1}
+ sx={{ borderRadius: "default" }}
+ >
+ <b>Note:</b> Upgrade now and get a flat 50% discount on all plans.
+ </Text>
+ <Flex mt={2} width="100%" justifyContent={"center"}>
+ <Button
+ sx={{ borderRadius: 50, alignSelf: "center", mr: 2, width: "40%" }}
+ onClick={() => {
+ onClose();
+ showBuyDialog("monthly", "TRIAL2PRO");
+ }}
+ >
+ Upgrade now
+ </Button>
+ <Button
+ variant={"secondary"}
+ sx={{ borderRadius: 50, alignSelf: "center", width: "40%" }}
+ onClick={() => {
+ onClose();
+ }}
+ >
+ Try free for 14 days
+ </Button>
+ </Flex>
+ <Button variant={"anchor"} color="fontTertiary" mt={2} onClick={onClose}>
+ Skip for now
+ </Button>
+ </Flex>
+ );
+}