Skip to content

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

feat: overhaul auth ui

thecodrr110484011703
diff --git a/apps/web/src/app-effects.js b/apps/web/src/app-effects.js
index 796613b59..abc04a62f 100644
--- a/apps/web/src/app-effects.js
+++ b/apps/web/src/app-effects.js
@@ -24,6 +24,7 @@ import useSystemTheme from "./utils/use-system-theme";
import { isTesting } from "./utils/platform";
import { updateStatus, removeStatus } from "./hooks/use-status";
import { showToast } from "./utils/toast";
+import { interruptedOnboarding } from "./components/dialogs/onboarding-dialog";
if (process.env.NODE_ENV === "production") {
loadTrackerScript();
@@ -73,6 +74,8 @@ export default function AppEffects({ setShow }) {
}
await resetReminders();
setIsVaultCreated(await db.vault.exists());
+
+ showOnboardingDialog("new"); //interruptedOnboarding());
})();
return () => {
userCheckStatusEvent.unsubscribe();
diff --git a/apps/web/src/assets/cause.svg b/apps/web/src/assets/cause.svg
new file mode 100644
index 000000000..d12e6a12a
--- /dev/null
+++ b/apps/web/src/assets/cause.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 732.64 638.92"><path fill="#fff" d="M121.52 222.42a33.5 33.5 0 0 1-5.16.12 1.13 1.13 0 0 0-1.24.98l-3.29 24.68a10.02 10.02 0 0 1-2.12 4.9 10.66 10.66 0 0 0-2.4 8.14v41.93s-.21 5.6 4.08 5.6a62.1 62.1 0 0 0 15.49 0s3.44-.66 3.44-5.82v-41.29a10.1 10.1 0 0 0-2.13-8.2 10.28 10.28 0 0 1-2.06-4.87l-3.42-25.2a1.13 1.13 0 0 0-1.2-.97Z"/><path fill="#3f3d56" d="M119.12 309.95a62.67 62.67 0 0 1-7.77-.48 4.18 4.18 0 0 1-3.1-1.27c-1.75-1.81-1.65-4.92-1.65-5.06v-41.86a11.4 11.4 0 0 1 2.56-8.64 9.3 9.3 0 0 0 1.97-4.54l3.29-24.68a1.84 1.84 0 0 1 2.02-1.58 32.66 32.66 0 0 0 5-.12h.03a1.83 1.83 0 0 1 1.95 1.57l3.41 25.2a9.58 9.58 0 0 0 1.92 4.53 10.78 10.78 0 0 1 2.27 8.7v41.23c0 5.68-3.97 6.5-4.01 6.5a63.14 63.14 0 0 1-7.9.5Zm-2.86-86.7a.42.42 0 0 0-.44.36l-3.29 24.69a10.74 10.74 0 0 1-2.27 5.24 10 10 0 0 0-2.25 7.61v42.02c0 .05-.07 2.68 1.26 4.05a2.8 2.8 0 0 0 2.12.83l.09.01a61.47 61.47 0 0 0 15.3 0c.07-.02 2.83-.64 2.83-5.1v-41.42a9.38 9.38 0 0 0-1.97-7.64 11.01 11.01 0 0 1-2.2-5.2L122 223.47a.42.42 0 0 0-.43-.35 34.36 34.36 0 0 1-5.26.12.56.56 0 0 0-.06 0Z"/><path fill="var(--bgsecondary)" d="M116.32 261.99h5.22a7.82 7.82 0 0 1 7.82 7.82v19.62a7.82 7.82 0 0 1-7.82 7.82h-5.22a7.82 7.82 0 0 1-7.82-7.82v-19.62a7.82 7.82 0 0 1 7.82-7.82Z"/><path fill="#9f616a" d="M20.43 622.44h17.01l8.09-65.59h-25.1v65.59z"/><path fill="#2f2e41" d="M16.1 616.89h33.48a21.34 21.34 0 0 1 21.35 21.34v.69H16.1ZM9.74 388.16s-7.37 8.33 4.83 40.8l-2.14 178.07 39.54-.77 8.7-86.86 15.82-126.75Z"/><path fill="#3f3d56" d="m90.06 412.78-.44-.07A2495.49 2495.49 0 0 1 .47 397.53l-.47-.1 13.26-32.25c-.1-3.37-2.97-98.02 2.52-125.22 5.32-26.32 30.4-30.64 33.26-31.05l2.87-9.5 36.25 18.86 6.32 21.76 1.29 59.64Z"/><path fill="#9f616a" d="M111.89 290.03a11.83 11.83 0 0 0-8.7 3.8H42.28l-22.32 4.75 3.66 28.27 79.4-17.08a11.87 11.87 0 1 0 8.88-19.74Z"/><circle cx="320.33" cy="305.18" r="29.37" fill="#9f616a" transform="rotate(-61.34 93.43 436.93)"/><path fill="#2f2e41" d="m59.03 151.16-1.42-2.86 7.16-3.56s7.9-12.86 22.2-9.25 20.74 5.78 20.74 5.78l7.14 3.6-3.58 3.56 6.43 2.16-4.3 2.14 5 2.87-2.69 14.74s-4.47-11.18-13.07-6.9-24.32-2.21-24.32-2.21l-13.66 26.43s-2.82-9.26-7.84-6.8c0 0-12.84-20.44 2.21-29.7Z"/><path fill="#3f3d56" d="m24 332.14-6.97-20.72-1.68-69.1 2.97-9.8a27.39 27.39 0 1 1 51.72 17.9l-15.9 40.78.8 1.57 34.48-.28 12.24 22.04Z"/><path fill="#ffb7b7" d="M368.95 323.63a10.61 10.61 0 0 0 1.7-16.18l16.99-33.67-19.47 2.26-13.15 31.62a10.67 10.67 0 0 0 13.93 15.97Zm136.29 238.45-15.32-.01-7.28-59.07h22.6v59.08z"/><path fill="#2f2e41" d="M509.15 576.92h-49.39v-.63a19.22 19.22 0 0 1 19.22-19.22h30.17Z"/><path fill="#ffb7b7" d="m421.54 562.08-15.32-.01-7.28-59.07h22.6v59.08z"/><path fill="#2f2e41" d="M421.7 576.92h-49.4v-.63a19.22 19.22 0 0 1 19.23-19.22h30.16Zm-1.41-264.35-15 34.54-12.36 198.5 31.23-1.24 8.53-94.63L459 365.45l15.13 93.97 6.25 82.45 25.84 1.12 10.3-230.42h-96.23z"/><path fill="var(--bgsecondary)" d="m495.22 142.15-43.45 1.1-25.5 13.09-1.4 96.61-15.92 66.7s99.4 6.85 113.15-3.15l-16.24-76.2 21.78-82.36Z"/><path fill="var(--bgsecondary)" d="m432.97 157.94-4.04-2.73s-16.76 5.02-21.71 27.36c0 0-3.8 11.21-5.46 18.92-1.9 8.84-44.02 90.04-44.02 90.04l25.22 7.24L429.19 224Z"/><path fill="#ffb7b7" d="M526.96 336.02a10.61 10.61 0 0 1 2.83-16.03l-7.05-37.04 18.09 7.54 3.92 34.02a10.67 10.67 0 0 1-17.79 11.5Z"/><path fill="var(--bgsecondary)" d="m521.1 159.1 4.64-1.51s14.73 9.44 13.33 32.29c0 0 .55 11.82.02 19.69-.6 9.02 7.5 98.69 7.5 98.69h-26.24l-11.24-81.2Z"/><path fill="#ffb7b7" d="M505.89 101.62a30.12 30.12 0 1 1-30.12-30.12 30.04 30.04 0 0 1 30.12 29.97v.15Z"/><path fill="#2f2e41" d="M445.75 61.17c3.53-7.6 10.35-6.1 16.33-3.52 7.56-1.68 14.75-6.7 22.9-3.73 8.02 11.67 34.97 8.24 29.24 27.24-.01 4.56 8.57 1.9 7.07 9.36 4.54 14.36-16.4 41.54-28.42 35.82 2.97-5.45 9.76-17.83-.54-19.06-22.16 20.62-2.29-39.26-30.13-21.85-9.22 8.44-21.84-15.83-16.45-24.26Z"/><path fill="#9f616a" d="M532.23 339.02a10 10 0 0 0 11.98-9.6l75.63-71.18-17.02-13.57-69.11 74.42a10.06 10.06 0 0 0-1.48 19.93Z"/><path fill="#cbcbcb" d="m609.12 269.75-14.71-17.24a4.49 4.49 0 0 1 1.03-6.72l19.16-12a12.46 12.46 0 0 1 16.12 19.02l-14.8 16.98a4.49 4.49 0 0 1-6.8-.04Z"/><path fill="#9f616a" d="M569.56 621h-18.49l-8.8-71.33 27.29.01V621z"/><path fill="#2f2e41" d="M574.27 638.92h-59.62v-.76a23.2 23.2 0 0 1 23.2-23.2h36.42Z"/><path fill="#9f616a" d="M717.37 621h-18.49l-8.8-71.33 27.29.01V621z"/><path fill="#2f2e41" d="M722.08 638.92h-59.62v-.76a23.2 23.2 0 0 1 23.2-23.2h36.42Zm-54.45-331.36 18.64-68.87-24.18-13.59h-33.75l-13.13 14.05s-21.93 15.26-16.63 32.16l8.57 38.51-13.1 61.16-65.99 91.52-15.62 89.9 61.5 16.11 66.49-130.93 32.24 144.98 59.97-3.02-20.66-175.78s-5.9-53.55-36.78-86.99Z"/><path fill="#9f616a" d="M706.12 368.49a10 10 0 0 0-1.28-15.3l-14.46-97.56-20.76 6.55 20.78 93.97a10.06 10.06 0 0 0 15.72 12.34Z"/><path fill="#cbcbcb" d="m693.95 270.94-22.52 2.6a4.49 4.49 0 0 1-5-4.6l.73-22.6a12.46 12.46 0 0 1 24.77-2.78l5.84 21.76a4.49 4.49 0 0 1-3.82 5.62Z"/><path fill="#2f2e41" d="M607.47 205.52V176.5a38.88 38.88 0 1 1 77.76 0v29.02a5.23 5.23 0 0 1-5.23 5.22h-67.3a5.23 5.23 0 0 1-5.22-5.22Z"/><circle cx="872.04" cy="312.1" r="28.51" fill="#9f616a" transform="rotate(-28.66 499.72 704.16)"/><path fill="#2f2e41" d="M598.27 178.83a30.8 30.8 0 0 1 30.76-30.76h5.8a30.79 30.79 0 0 1 30.75 30.76v.58h-12.26l-4.18-11.72-.84 11.72h-6.34l-2.1-5.91-.43 5.9h-41.16Z"/><path fill="#2f2e41" d="M635.55 214a5.15 5.15 0 0 1-.4-5.46c6.14-11.7 14.75-33.3 3.32-46.64l-.82-.95h33.18v49.8l-30.14 5.33a5.34 5.34 0 0 1-.92.08 5.2 5.2 0 0 1-4.22-2.16Z"/><path fill="#ffb7b7" d="M330.6 240.53a11.48 11.48 0 0 0-1.15 1.39l-54.06-1.32-6.31-11.53-18.64 7.25 9.19 21.48a8.72 8.72 0 0 0 9.06 5.24l61.08-7.38a11.45 11.45 0 1 0 .83-15.13ZM154.37 568.84h17.78l8.45-68.57-26.23.01v68.56z"/><path fill="#2f2e41" d="M149.84 563.03h35a22.3 22.3 0 0 1 22.32 22.31v.72h-57.32Z"/><path fill="#ffb7b7" d="m315.78 568.44 16.34-6.98-19.15-66.37-24.13 10.3 26.94 63.05z"/><path fill="#2f2e41" d="m309.33 564.89 32.19-13.76a22.3 22.3 0 0 1 29.28 11.75l.28.67-52.7 22.52Z"/><path fill="#ffb7b7" d="m240.77 255.38 1.29 20.83-37.57 4.02-39.32 4.21 11.57-31.63 64.03 2.57z"/><path fill="#e4e4e4" d="M242.1 262.85c-.43-.16-42.87-16.67-68.94-3.17l-.64.33-5.2-25.6-2.96-55.03 19.28-9.1 5.3-11.9 36.17-2.14 7.43 10.2 25.3 8.28-15.12 88.38Z"/><path fill="#e4e4e4" d="m243.42 213.18 4.47-35.14 10.19-3.1.17.06c.24.1 5.77 2.2 7.28 9.87 1.46 7.36 12.41 53.12 12.52 53.59l.11.45-25.73 10.3Z"/><path fill="#2f2e41" d="m302.54 556.4 34.25-7.04-54.75-151.07-18.73-51.53s-11.89-41.31-17.26-57.3l-3.24-21.45-76.7 8.49s-21.43 31.46-14.92 82.74L148.25 552l34.25 1.76 28.7-194.4 50.35 106.56s15.87 45.48 27.23 55.34Z"/><path fill="#ffb7b7" d="M196.87 283.65a11.48 11.48 0 0 0-1.8.1l-35.8-40.54 4.17-12.46-17.98-8.74-9.52 21.34a8.72 8.72 0 0 0 2.33 10.21l46.94 39.77a11.45 11.45 0 1 0 11.66-9.68Z"/><path fill="#e4e4e4" d="m142.22 228.02 13.99-39.85c1.57-4.7 3.54-7.55 5.85-8.48a3.61 3.61 0 0 1 2.9-.03l6.28 7.92 5.82 24.46-14.93 35.12Z"/><path fill="#2f2e41" d="M234.82 148H173.4a4.77 4.77 0 0 1-4.76-4.77v-26.47a35.47 35.47 0 0 1 70.94 0v26.47a4.77 4.77 0 0 1-4.76 4.77Z"/><circle cx="211.4" cy="121.37" r="26.01" fill="#ffb7b7"/><path fill="#2f2e41" d="M247.97 119.4h-37.55l-.39-5.39-1.92 5.4h-5.78l-.77-10.69-3.81 10.69h-11.2v-.53a28.1 28.1 0 0 1 28.07-28.06h5.3a28.1 28.1 0 0 1 28.05 28.06Z"/><path fill="#2f2e41" d="M210.11 152.94a4.87 4.87 0 0 1-.84-.08l-27.5-4.85v-45.45h30.27l-.75.88c-10.43 12.16-2.57 31.88 3.04 42.55a4.7 4.7 0 0 1-.37 4.98 4.75 4.75 0 0 1-3.85 1.97Z"/><path fill="#fff" d="M539.52 262.18a33.5 33.5 0 0 1-5.16.12 1.13 1.13 0 0 0-1.24.98l-3.29 24.68a10.02 10.02 0 0 1-2.12 4.9 10.66 10.66 0 0 0-2.4 8.14v41.93s-.21 5.6 4.08 5.6a62.1 62.1 0 0 0 15.49 0s3.44-.66 3.44-5.82v-41.29a10.1 10.1 0 0 0-2.13-8.2 10.28 10.28 0 0 1-2.06-4.87l-3.42-25.2a1.13 1.13 0 0 0-1.2-.97Z"/><path fill="#3f3d56" d="M537.12 349.71a62.67 62.67 0 0 1-7.77-.48 4.18 4.18 0 0 1-3.1-1.27c-1.75-1.81-1.65-4.92-1.65-5.06v-41.86a11.4 11.4 0 0 1 2.56-8.64 9.3 9.3 0 0 0 1.97-4.54l3.29-24.68a1.84 1.84 0 0 1 2.02-1.58 32.66 32.66 0 0 0 5-.12h.03a1.83 1.83 0 0 1 1.95 1.57l3.41 25.2a9.58 9.58 0 0 0 1.92 4.53 10.78 10.78 0 0 1 2.27 8.7v41.23c0 5.68-3.97 6.5-4.01 6.5a63.14 63.14 0 0 1-7.9.5Zm-2.86-86.7a.42.42 0 0 0-.44.36l-3.29 24.69a10.74 10.74 0 0 1-2.27 5.24 10 10 0 0 0-2.25 7.61v42.02c0 .05-.07 2.68 1.26 4.05a2.8 2.8 0 0 0 2.12.83l.09.01a61.46 61.46 0 0 0 15.3 0c.07-.02 2.83-.64 2.83-5.1V301.3a9.38 9.38 0 0 0-1.97-7.64 11.01 11.01 0 0 1-2.2-5.2L540 263.24a.42.42 0 0 0-.43-.36 34.36 34.36 0 0 1-5.26.12.56.56 0 0 0-.06 0Z"/><path fill="var(--bgsecondary)" d="M534.32 301.75h5.22a7.82 7.82 0 0 1 7.82 7.82v19.62a7.82 7.82 0 0 1-7.82 7.82h-5.22a7.82 7.82 0 0 1-7.82-7.82v-19.62a7.82 7.82 0 0 1 7.82-7.82Z"/><path fill="#fff" d="M362.52 228.18a33.5 33.5 0 0 1-5.16.12 1.13 1.13 0 0 0-1.24.98l-3.29 24.68a10.02 10.02 0 0 1-2.12 4.9 10.66 10.66 0 0 0-2.4 8.14v41.93s-.21 5.6 4.08 5.6a62.1 62.1 0 0 0 15.49 0s3.44-.66 3.44-5.82v-41.29a10.1 10.1 0 0 0-2.13-8.2 10.28 10.28 0 0 1-2.06-4.87l-3.42-25.2a1.13 1.13 0 0 0-1.2-.97Z"/><path fill="#3f3d56" d="M360.12 315.71a62.67 62.67 0 0 1-7.77-.48 4.18 4.18 0 0 1-3.1-1.27c-1.75-1.81-1.65-4.92-1.65-5.06v-41.86a11.4 11.4 0 0 1 2.56-8.64 9.3 9.3 0 0 0 1.97-4.54l3.29-24.68a1.84 1.84 0 0 1 2.02-1.58 32.66 32.66 0 0 0 5-.12h.03a1.83 1.83 0 0 1 1.95 1.57l3.41 25.2a9.58 9.58 0 0 0 1.92 4.53 10.78 10.78 0 0 1 2.27 8.7v41.23c0 5.68-3.97 6.5-4.01 6.5a63.14 63.14 0 0 1-7.9.5Zm-2.86-86.7a.42.42 0 0 0-.44.36l-3.29 24.69a10.74 10.74 0 0 1-2.27 5.24 10 10 0 0 0-2.25 7.61v42.02c0 .05-.07 2.68 1.26 4.05a2.8 2.8 0 0 0 2.12.83l.09.01a61.46 61.46 0 0 0 15.3 0c.07-.02 2.83-.64 2.83-5.1V267.3a9.38 9.38 0 0 0-1.97-7.64 11.01 11.01 0 0 1-2.2-5.2L363 229.24a.42.42 0 0 0-.43-.36 34.36 34.36 0 0 1-5.26.12.56.56 0 0 0-.06 0Z"/><path fill="var(--bgsecondary)" d="M357.32 267.75h5.22a7.82 7.82 0 0 1 7.82 7.82v19.62a7.82 7.82 0 0 1-7.82 7.82h-5.22a7.82 7.82 0 0 1-7.82-7.82v-19.62a7.82 7.82 0 0 1 7.82-7.82Z"/><path fill="#fff" d="M332.52 192.18a33.5 33.5 0 0 1-5.16.12 1.13 1.13 0 0 0-1.24.98l-3.29 24.68a10.02 10.02 0 0 1-2.12 4.9 10.66 10.66 0 0 0-2.4 8.14v41.93s-.21 5.6 4.08 5.6a62.1 62.1 0 0 0 15.49 0s3.44-.66 3.44-5.82v-41.29a10.1 10.1 0 0 0-2.13-8.2 10.28 10.28 0 0 1-2.06-4.87l-3.42-25.2a1.13 1.13 0 0 0-1.2-.97Z"/><path fill="#3f3d56" d="M330.12 279.71a62.67 62.67 0 0 1-7.77-.48 4.18 4.18 0 0 1-3.1-1.27c-1.75-1.81-1.65-4.92-1.65-5.06v-41.86a11.4 11.4 0 0 1 2.56-8.64 9.3 9.3 0 0 0 1.97-4.54l3.29-24.68a1.84 1.84 0 0 1 2.02-1.58 32.66 32.66 0 0 0 5-.12h.03a1.83 1.83 0 0 1 1.95 1.57l3.41 25.2a9.58 9.58 0 0 0 1.92 4.53 10.78 10.78 0 0 1 2.27 8.7v41.23c0 5.68-3.97 6.5-4.01 6.5a63.14 63.14 0 0 1-7.9.5Zm-2.86-86.7a.42.42 0 0 0-.44.36l-3.29 24.69a10.74 10.74 0 0 1-2.27 5.24 10 10 0 0 0-2.25 7.61v42.02c0 .05-.07 2.68 1.26 4.05a2.8 2.8 0 0 0 2.12.83l.09.01a61.46 61.46 0 0 0 15.3 0c.07-.02 2.83-.64 2.83-5.1V231.3a9.38 9.38 0 0 0-1.97-7.64 11.01 11.01 0 0 1-2.2-5.2L333 193.24a.42.42 0 0 0-.43-.36 34.36 34.36 0 0 1-5.26.12.56.56 0 0 0-.06 0Z"/><path fill="var(--bgsecondary)" d="M327.32 231.75h5.22a7.82 7.82 0 0 1 7.82 7.82v19.62a7.82 7.82 0 0 1-7.82 7.82h-5.22a7.82 7.82 0 0 1-7.82-7.82v-19.62a7.82 7.82 0 0 1 7.82-7.82Z"/><circle cx="56.19" cy="46" r="25" fill="#f0f0f0"/><circle cx="632.19" cy="25" r="25" fill="#f0f0f0"/><circle cx="346.19" cy="95" r="18" fill="#f0f0f0"/></svg>
\ No newline at end of file
diff --git a/apps/web/src/assets/testimonials/cameron.jpg b/apps/web/src/assets/testimonials/cameron.jpg
new file mode 100644
index 000000000..94dd3d028
Binary files /dev/null and b/apps/web/src/assets/testimonials/cameron.jpg differ
diff --git a/apps/web/src/assets/testimonials/grberk.jpeg b/apps/web/src/assets/testimonials/grberk.jpeg
new file mode 100644
index 000000000..a032496dc
Binary files /dev/null and b/apps/web/src/assets/testimonials/grberk.jpeg differ
diff --git a/apps/web/src/assets/testimonials/holenstein.jpg b/apps/web/src/assets/testimonials/holenstein.jpg
new file mode 100644
index 000000000..6cf5b2681
Binary files /dev/null and b/apps/web/src/assets/testimonials/holenstein.jpg differ
diff --git a/apps/web/src/assets/testimonials/jason.jpg b/apps/web/src/assets/testimonials/jason.jpg
new file mode 100644
index 000000000..a378817cb
Binary files /dev/null and b/apps/web/src/assets/testimonials/jason.jpg differ
diff --git a/apps/web/src/common/dialogcontroller.js b/apps/web/src/common/dialogcontroller.js
index 87f741704..a80f3f805 100644
--- a/apps/web/src/common/dialogcontroller.js
+++ b/apps/web/src/common/dialogcontroller.js
@@ -14,30 +14,26 @@ import { Box, Flex, Text } from "rebass";
import * as Icon from "../components/icons";
import Config from "../utils/config";
import Dialogs from "../components/dialogs";
-import { Mutex } from "async-mutex";
import { formatDate } from "notes-core/utils/date";
import downloadUpdate from "../commands/download-update";
import installUpdate from "../commands/install-update";
import { getChangelog } from "../utils/version";
import { isDesktop } from "../utils/platform";
-const DialogMutex = new Mutex();
function showDialog(dialog) {
const root = document.getElementById("dialogContainer");
if (root) {
- return DialogMutex.runExclusive(
- () =>
- new Promise((resolve) => {
- const perform = (result) => {
- ReactDOM.unmountComponentAtNode(root);
- hashNavigate("/", { replace: true });
- resolve(result);
- };
- const PropDialog = dialog(Dialogs, perform);
- ReactDOM.render(<ThemeProvider>{PropDialog}</ThemeProvider>, root);
- })
- );
+ return new Promise((resolve, reject) => {
+ const perform = (result) => {
+ ReactDOM.unmountComponentAtNode(root);
+ hashNavigate("/", { replace: true });
+ resolve(result);
+ };
+ const PropDialog = dialog(Dialogs, perform);
+
+ ReactDOM.render(<ThemeProvider>{PropDialog}</ThemeProvider>, root);
+ });
}
return Promise.reject("No element with id 'dialogContainer'");
}
diff --git a/apps/web/src/components/dialogs/onboarding-dialog.js b/apps/web/src/components/dialogs/onboarding-dialog.js
index 9eb2d1593..f61e9bcbf 100644
--- a/apps/web/src/components/dialogs/onboarding-dialog.js
+++ b/apps/web/src/components/dialogs/onboarding-dialog.js
@@ -5,6 +5,7 @@ import { ReactComponent as E2E } from "../../assets/e2e.svg";
import { ReactComponent as Note } from "../../assets/note2.svg";
import { ReactComponent as Nomad } from "../../assets/nomad.svg";
import { ReactComponent as WorkAnywhere } from "../../assets/workanywhere.svg";
+import { ReactComponent as Friends } from "../../assets/cause.svg";
import LightUI from "../../assets/light1.png";
import DarkUI from "../../assets/dark1.png";
import GooglePlay from "../../assets/play.png";
@@ -44,6 +45,13 @@ const newUserSteps = [
component: CrossPlatform,
buttonText: "Next",
},
+ {
+ title: "Join the cause",
+ subtitle:
+ "Meet other privacy-minded people & talk to us directly about your concerns, issues and suggestions.",
+ component: JoinCause,
+ image: <Friends width={140} />,
+ },
{
image: <Icon.Pro size={60} color="primary" />,
title: "Notesnook Pro",
@@ -55,13 +63,18 @@ const newUserSteps = [
const proUserSteps = [
{
title: "Welcome to Notesnook Pro",
- subtitle: "Let's make Notesnook your new private note taking home",
+ subtitle: "Thank you. You are the proof that privacy always comes first.",
buttonText: "Next",
image: <Nomad width={120} />,
+ },
+ {
+ title: "Style your 'nook",
+ subtitle: "Let's make Notesnook your new note taking home",
+ buttonText: "Next",
component: AccentSelector,
},
{
- title: "High priority support",
+ title: "We are always listening",
subtitle: "If you face any issue, you can reach out to us anytime.",
buttonText: "Next",
component: Support,
@@ -77,7 +90,7 @@ const trialUserSteps = [
{
title: "Congratulations!",
subtitle: "You 14-day free trial has been activated.",
- buttonText: "Start taking notes",
+ buttonText: "Continue",
image: <WorkAnywhere width={160} />,
},
];
@@ -88,6 +101,13 @@ const onboarding = {
trial: trialUserSteps,
};
+export function interruptedOnboarding() {
+ for (let key in onboarding) {
+ const index = Config.get(key, undefined);
+ if (index >= 0 && index < onboarding[key].length - 1) return key;
+ }
+}
+
function OnboardingDialog({ onClose: _onClose, type }) {
const [step, setStep] = usePersistentState(type, 0);
const steps = onboarding[type];
@@ -97,7 +117,12 @@ function OnboardingDialog({ onClose: _onClose, type }) {
_onClose();
}, [_onClose, type, steps]);
- if (!steps || !steps[step]) return null;
+ const onNext = useCallback(() => {
+ if (step === steps.length - 1) onClose();
+ else setStep((s) => ++s);
+ }, []);
+
+ if (!steps || !steps[step] || !type) return null;
const {
title,
subtitle,
@@ -113,18 +138,19 @@ function OnboardingDialog({ onClose: _onClose, type }) {
<Text variant={"heading"} mt={2}>
{title}
</Text>
- <Text variant={"body"} color="fontTertiary" textAlign={"center"}>
+ <Text
+ variant={"body"}
+ color="fontTertiary"
+ textAlign={"center"}
+ maxWidth="70%"
+ >
{subtitle}
</Text>
- {Component && <Component onClose={onClose} />}
+ {Component && <Component onClose={onClose} onNext={onNext} />}
{buttonText && (
<Button
sx={{ borderRadius: 50, px: 30, mb: 4, mt: Component ? 0 : 4 }}
- onClick={() => {
- console.log(step, steps.length);
- if (step === steps.length - 1) onClose();
- else setStep((s) => ++s);
- }}
+ onClick={onNext}
>
{buttonText}
</Button>
@@ -135,21 +161,44 @@ function OnboardingDialog({ onClose: _onClose, type }) {
}
export default OnboardingDialog;
+function JoinCause({ onNext }) {
+ return (
+ <Flex mb={4} flexDirection={"column"}>
+ <Button
+ as="a"
+ href="https://discord.com/invite/zQBK97EE22"
+ target="_blank"
+ mt={4}
+ variant={"primary"}
+ sx={{ borderRadius: 50, alignSelf: "center", px: 30 }}
+ onClick={() => onNext()}
+ >
+ Join the community
+ </Button>
+ <Button
+ variant={"anchor"}
+ color="fontTertiary"
+ mt={2}
+ onClick={() => onNext()}
+ >
+ Skip for now
+ </Button>
+ </Flex>
+ );
+}
+
const importers = [
{ title: "Evernote" },
{ title: "Simplenote" },
{ title: "HTML" },
{ title: "Markdown" },
- { title: "Text" },
{ title: "Google Keep" },
{ title: "Standard Notes" },
];
function Importer({ onClose }) {
return (
<Flex my={4} flexDirection={"column"}>
- <Box
- sx={{ display: "grid", gridTemplateColumns: "1fr 1fr 1fr 1fr", gap: 1 }}
- >
+ <Box sx={{ display: "grid", gridTemplateColumns: "1fr 1fr 1fr", gap: 1 }}>
{importers.map((importer) => (
<Flex
sx={{
@@ -158,10 +207,11 @@ function Importer({ onClose }) {
borderRadius: "default",
border: "1px solid var(--border)",
alignItems: "center",
+ justifyContent: "center",
p: 1,
}}
>
- <Text variant={"body"} ml={1}>
+ <Text variant={"body"} textAlign="center" ml={1}>
{importer.title}
</Text>
</Flex>
@@ -173,7 +223,8 @@ function Importer({ onClose }) {
target="_blank"
mt={4}
variant={"primary"}
- sx={{ borderRadius: 50, alignSelf: "center", width: "40%" }}
+ sx={{ borderRadius: 50, alignSelf: "center", px: 30 }}
+ onClick={() => onClose()}
>
Start importing now
</Button>
diff --git a/apps/web/src/components/field/index.js b/apps/web/src/components/field/index.js
index f5cac9e00..8f64f1a2c 100644
--- a/apps/web/src/components/field/index.js
+++ b/apps/web/src/components/field/index.js
@@ -74,7 +74,7 @@ function Field(props) {
fontSize: "subBody",
fontWeight: "normal",
color: "fontTertiary",
- ...styles.label,
+ ...styles.helpText,
}}
>
{helpText}
@@ -133,9 +133,10 @@ function Field(props) {
right: 0,
top: 0,
bottom: 0,
- px: 1,
+ px: 2,
cursor: "pointer",
- borderRadius: "default",
+ borderTopRightRadius: "default",
+ borderBottomRightRadius: "default",
":hover": { bg: "border" },
}}
>
diff --git a/apps/web/src/components/loader/index.js b/apps/web/src/components/loader/index.js
index c6c5052ae..a6e561083 100644
--- a/apps/web/src/components/loader/index.js
+++ b/apps/web/src/components/loader/index.js
@@ -8,6 +8,7 @@ export default function Loader({ title, text }) {
flex={1}
justifyContent="center"
alignItems="center"
+ sx={{ zIndex: 1 }}
>
<Loading rotate />
<Text variant="subtitle" mt={4}>
diff --git a/apps/web/src/hooks/use-is-user-premium.js b/apps/web/src/hooks/use-is-user-premium.js
index 332b7067b..0980d4727 100644
--- a/apps/web/src/hooks/use-is-user-premium.js
+++ b/apps/web/src/hooks/use-is-user-premium.js
@@ -10,7 +10,7 @@ export function useIsUserPremium() {
}
export function isUserPremium(user) {
- if (process.env.REACT_APP_CI) return true;
+ // if (process.env.REACT_APP_CI) return true;
if (!user) user = userstore.get().user;
const subStatus = user?.subscription?.type;
diff --git a/apps/web/src/stores/user-store.js b/apps/web/src/stores/user-store.js
index f93c320e2..b7cbbaaac 100644
--- a/apps/web/src/stores/user-store.js
+++ b/apps/web/src/stores/user-store.js
@@ -89,13 +89,6 @@ class UserStore extends BaseStore {
}
});
- await showOnboardingDialog(
- user?.subscription?.type === SUBSCRIPTION_STATUS.TRIAL
- ? "trial"
- : isUserPremium()
- ? "pro"
- : "new"
- );
return true;
});
};
diff --git a/apps/web/src/theme/colorscheme/dark.js b/apps/web/src/theme/colorscheme/dark.js
index 6ef8379c9..09d0158dc 100644
--- a/apps/web/src/theme/colorscheme/dark.js
+++ b/apps/web/src/theme/colorscheme/dark.js
@@ -6,13 +6,13 @@ class DarkColorSchemeFactory {
return {
primary: accent,
placeholder: hexToRGB("#ffffff", 0.6),
- background: "#1f1f1f",
+ background: "#1b1b1b",
bgTransparent: "#1f1f1f99",
accent: "#000",
bgSecondary: "#2b2b2b",
bgSecondaryText: "#A1A1A1",
- border: "#3b3b3b",
- hover: "#3b3b3b",
+ border: "#353535",
+ hover: "#2f2f2f",
fontSecondary: "#000",
fontTertiary: "#A1A1A1",
text: "#d3d3d3",
diff --git a/apps/web/src/views/auth.js b/apps/web/src/views/auth.js
index ae410becf..d3bea737d 100644
--- a/apps/web/src/views/auth.js
+++ b/apps/web/src/views/auth.js
@@ -1,7 +1,13 @@
-import { useEffect, useState } from "react";
+import { useEffect, useMemo, useState } from "react";
import { Box, Button, Flex, Image, Text } from "rebass";
import ThemeProvider from "../components/theme-provider";
-import { CheckCircle, Loading, Error } from "../components/icons";
+import {
+ CheckCircle,
+ Loading,
+ Error,
+ ArrowRight,
+ ArrowLeft,
+} from "../components/icons";
import Field from "../components/field";
import { getQueryParams, hardNavigate, useQueryParams } from "../navigation";
import { store as userstore } from "../stores/user-store";
@@ -18,6 +24,58 @@ import {
} from "../common/dialog-controller";
import { showToast } from "../utils/toast";
import { isTesting } from "../utils/platform";
+import { getRandom } from "../utils/random";
+import Grberk from "../assets/testimonials/grberk.jpeg";
+import Holenstein from "../assets/testimonials/holenstein.jpg";
+import Jason from "../assets/testimonials/jason.jpg";
+import Cameron from "../assets/testimonials/cameron.jpg";
+
+const testimonials = [
+ {
+ username: "grberk",
+ image: Grberk,
+ name: "Glenn Berkshier",
+ link: "https://twitter.com/grberk/status/1438955961490751489",
+ text: "Are you looking for an alternative to @evernote, or just looking for a more secure note taking platform? Take a look at @notesnook and see if it will fit your needs.",
+ },
+ {
+ username: "HolensteinDan",
+ image: Holenstein,
+ name: "Dan Holenstein",
+ link: "https://twitter.com/HolensteinDan/status/1439728355935342592",
+ text: "@notesnook app is what @evernote should have become long ago. And they're still improving.",
+ },
+ {
+ username: "jasonbereklewis",
+ image: Jason,
+ name: "Jason Berek-Lewis",
+ link: "https://twitter.com/jasonbereklewis/status/1438635808727044098",
+ text: "I work in content writing and communications. My day starts and ends in Notesnook. My Chrome app is always open; it's where I take all my notes. The clean design, focus mode, the tagging and color coding are all features that help keep my work organised every day.",
+ },
+ {
+ username: "camflint",
+ image: Cameron,
+ name: "Cameron Flint",
+ link: "https://twitter.com/camflint/status/1481061416434286592",
+ text: "I'm pretty impressed at the progress @notesnook are making on their app — particularly in respect to how performant the app runs and behaves, despite the overhead of end-to-end encrypting user data.",
+ },
+];
+
+const titles = [
+ "Write with freedom.",
+ "Privacy comes first.",
+ "Take notes privately.",
+ "Encrypted, private, secure.",
+ "❤️ = 🔒 + 🗒️",
+];
+
+function randomTestimonial() {
+ return testimonials[getRandom(0, testimonials.length - 1)];
+}
+
+function randomTitle() {
+ return titles[getRandom(0, titles.length - 1)];
+}
const authTypes = {
sessionexpired: {
@@ -120,10 +178,11 @@ const authTypes = {
},
],
primaryAction: {
- text: "Create account",
+ text: "Agree & continue",
},
secondaryAction: {
text: "Continue without creating an account",
+ icon: <ArrowRight size={18} />,
onClick: () => {
redirectToURL("/");
},
@@ -137,7 +196,7 @@ const authTypes = {
By pressing "Create account" button, you agree to our{" "}
<Text
as="a"
- color="primary"
+ color="text"
target="_blank"
rel="noreferrer"
href="https://notesnook.com/tos"
@@ -147,7 +206,7 @@ const authTypes = {
&amp;{" "}
<Text
as="a"
- color="primary"
+ color="text"
rel="noreferrer"
href="https://notesnook.com/privacy"
>
@@ -218,7 +277,7 @@ const authTypes = {
resetOnNavigate: false,
title: "Recover your account",
subtitle: {
- text: "Remember your password?",
+ text: "Remembered your password?",
action: {
text: "Log in",
onClick: () => hardNavigate("/login", getQueryParams()),
@@ -271,6 +330,8 @@ function Auth(props) {
const theme = useThemeStore((store) => store.theme);
const data = authTypes[type];
+ const testimonial = useMemo(() => randomTestimonial(), []);
+ const title = useMemo(() => randomTitle(), []);
useEffect(() => {
if (isSubmitting) {
@@ -299,207 +360,359 @@ function Auth(props) {
return (
<ThemeProvider>
- <Flex
- sx={{ position: "relative", height: "100%" }}
- justifyContent="center"
- alignItems="center"
- bg="background"
- >
+ <Flex sx={{ position: "relative", height: "100%", bg: "background" }}>
<Box
- as="svg"
- version="1.1"
- viewBox="0 0 1920 1080"
- preserveAspectRatio="xMinYMin slice"
+ flex={1}
sx={{
- position: "absolute",
- top: 0,
- left: 0,
- width: "100vw",
- height: "100vh",
+ position: "relative",
+ overflow: "hidden",
+ flexDirection: "column",
+ display: ["none", "none", "flex"],
}}
>
- <path
- d="M0 336L29.2 316.2C58.3 296.3 116.7 256.7 174.8 267.5C233 278.3 291 339.7 349.2 361.3C407.3 383 465.7 365 523.8 359.5C582 354 640 361 698.2 346.5C756.3 332 814.7 296 872.8 267.2C931 238.3 989 216.7 1047.2 202.3C1105.3 188 1163.7 181 1221.8 202.7C1280 224.3 1338 274.7 1396.2 298C1454.3 321.3 1512.7 317.7 1570.8 332C1629 346.3 1687 378.7 1745.2 366.2C1803.3 353.7 1861.7 296.3 1890.8 267.7L1920 239L1920 0L1890.8 0C1861.7 0 1803.3 0 1745.2 0C1687 0 1629 0 1570.8 0C1512.7 0 1454.3 0 1396.2 0C1338 0 1280 0 1221.8 0C1163.7 0 1105.3 0 1047.2 0C989 0 931 0 872.8 0C814.7 0 756.3 0 698.2 0C640 0 582 0 523.8 0C465.7 0 407.3 0 349.2 0C291 0 233 0 174.8 0C116.7 0 58.3 0 29.2 0L0 0Z"
- fill="var(--dimPrimary)"
- ></path>
- <path
- d="M0 627L29.2 607.3C58.3 587.7 116.7 548.3 174.8 564.7C233 581 291 653 349.2 683.5C407.3 714 465.7 703 523.8 703C582 703 640 714 698.2 724.8C756.3 735.7 814.7 746.3 872.8 742.7C931 739 989 721 1047.2 670.7C1105.3 620.3 1163.7 537.7 1221.8 528.7C1280 519.7 1338 584.3 1396.2 623.8C1454.3 663.3 1512.7 677.7 1570.8 666.8C1629 656 1687 620 1745.2 602C1803.3 584 1861.7 584 1890.8 584L1920 584L1920 237L1890.8 265.7C1861.7 294.3 1803.3 351.7 1745.2 364.2C1687 376.7 1629 344.3 1570.8 330C1512.7 315.7 1454.3 319.3 1396.2 296C1338 272.7 1280 222.3 1221.8 200.7C1163.7 179 1105.3 186 1047.2 200.3C989 214.7 931 236.3 872.8 265.2C814.7 294 756.3 330 698.2 344.5C640 359 582 352 523.8 357.5C465.7 363 407.3 381 349.2 359.3C291 337.7 233 276.3 174.8 265.5C116.7 254.7 58.3 294.3 29.2 314.2L0 334Z"
- fill="var(--shade)"
- ></path>
- <path
- d="M0 735L29.2 731.5C58.3 728 116.7 721 174.8 739C233 757 291 800 349.2 832.3C407.3 864.7 465.7 886.3 523.8 886.3C582 886.3 640 864.7 698.2 859.3C756.3 854 814.7 865 872.8 870.5C931 876 989 876 1047.2 845.3C1105.3 814.7 1163.7 753.3 1221.8 729.8C1280 706.3 1338 720.7 1396.2 738.7C1454.3 756.7 1512.7 778.3 1570.8 789.2C1629 800 1687 800 1745.2 814.5C1803.3 829 1861.7 858 1890.8 872.5L1920 887L1920 582L1890.8 582C1861.7 582 1803.3 582 1745.2 600C1687 618 1629 654 1570.8 664.8C1512.7 675.7 1454.3 661.3 1396.2 621.8C1338 582.3 1280 517.7 1221.8 526.7C1163.7 535.7 1105.3 618.3 1047.2 668.7C989 719 931 737 872.8 740.7C814.7 744.3 756.3 733.7 698.2 722.8C640 712 582 701 523.8 701C465.7 701 407.3 712 349.2 681.5C291 651 233 579 174.8 562.7C116.7 546.3 58.3 585.7 29.2 605.3L0 625Z"
- fill="var(--textSelection)"
- ></path>
- <path
- d="M0 897L29.2 895.3C58.3 893.7 116.7 890.3 174.8 908.3C233 926.3 291 965.7 349.2 985.3C407.3 1005 465.7 1005 523.8 1003.3C582 1001.7 640 998.3 698.2 996.7C756.3 995 814.7 995 872.8 986C931 977 989 959 1047.2 939.2C1105.3 919.3 1163.7 897.7 1221.8 894C1280 890.3 1338 904.7 1396.2 911.8C1454.3 919 1512.7 919 1570.8 928C1629 937 1687 955 1745.2 960.3C1803.3 965.7 1861.7 958.3 1890.8 954.7L1920 951L1920 885L1890.8 870.5C1861.7 856 1803.3 827 1745.2 812.5C1687 798 1629 798 1570.8 787.2C1512.7 776.3 1454.3 754.7 1396.2 736.7C1338 718.7 1280 704.3 1221.8 727.8C1163.7 751.3 1105.3 812.7 1047.2 843.3C989 874 931 874 872.8 868.5C814.7 863 756.3 852 698.2 857.3C640 862.7 582 884.3 523.8 884.3C465.7 884.3 407.3 862.7 349.2 830.3C291 798 233 755 174.8 737C116.7 719 58.3 726 29.2 729.5L0 733Z"
- fill="var(--shade)"
- ></path>
- <path
- d="M0 1081L29.2 1081C58.3 1081 116.7 1081 174.8 1081C233 1081 291 1081 349.2 1081C407.3 1081 465.7 1081 523.8 1081C582 1081 640 1081 698.2 1081C756.3 1081 814.7 1081 872.8 1081C931 1081 989 1081 1047.2 1081C1105.3 1081 1163.7 1081 1221.8 1081C1280 1081 1338 1081 1396.2 1081C1454.3 1081 1512.7 1081 1570.8 1081C1629 1081 1687 1081 1745.2 1081C1803.3 1081 1861.7 1081 1890.8 1081L1920 1081L1920 949L1890.8 952.7C1861.7 956.3 1803.3 963.7 1745.2 958.3C1687 953 1629 935 1570.8 926C1512.7 917 1454.3 917 1396.2 909.8C1338 902.7 1280 888.3 1221.8 892C1163.7 895.7 1105.3 917.3 1047.2 937.2C989 957 931 975 872.8 984C814.7 993 756.3 993 698.2 994.7C640 996.3 582 999.7 523.8 1001.3C465.7 1003 407.3 1003 349.2 983.3C291 963.7 233 924.3 174.8 906.3C116.7 888.3 58.3 891.7 29.2 893.3L0 895Z"
- fill="var(--textSelection)"
- ></path>
- </Box>
+ <Box
+ as="svg"
+ version="1.1"
+ viewBox="0 0 1920 1080"
+ preserveAspectRatio="xMinYMin slice"
+ sx={{
+ position: "absolute",
+ top: -100,
+ left: 0,
+ height: "100%",
+ // opacity: 0.7,
+ }}
+ >
+ <g mask='url("#SvgjsMask1017")' fill="none">
+ <path
+ d="M1184.21-85.14C1033.8-60.27 964.89 302.42 717.38 307.22 469.87 312.02 483.97 244.72 250.55 244.72 17.13 244.72-98.53 307.08-216.28 307.22"
+ stroke="var(--text)"
+ stroke-width="2"
+ ></path>
+ <path
+ d="M641.38-10.43C534.57 43 590.55 387.5 384.53 392.38 178.52 397.26 2.17 282.99-129.16 282.38"
+ stroke="var(--text)"
+ stroke-width="2"
+ ></path>
+ <path
+ d="M1136.18-29.24C957.53-5.77 852.26 404.49 561.01 405.07 269.76 405.65 142.54 160.4-14.16 155.07"
+ stroke="var(--text)"
+ stroke-width="2"
+ ></path>
+ <path
+ d="M508.47-71.88C398.16-66.29 333.42 117.75 114.38 127.84-104.65 137.93-170.96 308.31-279.7 312.84"
+ stroke="var(--text)"
+ stroke-width="2"
+ ></path>
+ <path
+ d="M1104.88-26.74C976.63-19.04 883.5 217.2 653.03 218.11 422.55 219.02 427.1 155.61 201.17 155.61-24.75 155.61-136.64 217.96-250.68 218.11"
+ stroke="var(--text)"
+ stroke-width="2"
+ ></path>
+ </g>
+ <defs>
+ <mask id="SvgjsMask1017">
+ <rect width="1440" height="500" fill="#ffffff"></rect>
+ </mask>
+ </defs>
+ </Box>
+
+ <Flex
+ flexDirection="column"
+ flex={1}
+ alignItems="start"
+ justifyContent={"end"}
+ p={50}
+ sx={{ zIndex: 1 }}
+ >
+ <Image
+ alignSelf="start"
+ src={theme === "dark" ? LogoDark : Logo}
+ width={70}
+ sx={{ borderRadius: "default" }}
+ mb={4}
+ />
+ <Text variant={"heading"} fontSize={48}>
+ {title}
+ </Text>
+ <Text variant="body" mt={10} fontSize={14} color="icon">
+ {testimonial.text} —{" "}
+ <Text as="a" color="icon" href={testimonial.link}>
+ Source
+ </Text>
+ </Text>
+ <Flex alignItems={"center"} justifyContent="center" mt={2}>
+ <Image
+ src={testimonial.image}
+ width={40}
+ sx={{ borderRadius: 50 }}
+ />
+ <Flex flexDirection={"column"} ml={2}>
+ <Text
+ variant="body"
+ fontWeight={"bold"}
+ fontSize={14}
+ color="icon"
+ >
+ {testimonial.name}
+ </Text>
+ <Text variant="subBody">@{testimonial.username}</Text>
+ </Flex>
+ </Flex>
+ </Flex>
+ </Box>
<Flex
- as="form"
- id="authForm"
- p={30}
- width="400px"
- flexDirection="column"
- justifyContent="center"
- alignItems="stretch"
- bg="background"
- mx={[2, 0, 0]}
+ flex={1.5}
sx={{
- zIndex: 1,
- border: "1px solid var(--border)",
- borderRadius: "dialog",
- boxShadow: "0px 0px 60px 10px #00000022",
- }}
- onSubmit={async (e) => {
- console.log(e);
- e.preventDefault();
- setIsSubmitting(true);
- const formData = new FormData(e.target);
- const form = Object.fromEntries(formData.entries());
- form.redirect = redirect;
- if (user) form.email = user.email;
- setForm(form);
- await data.onSubmit(
- form,
- (error) => {
- setIsSubmitting(false);
- setError(error);
- },
- (message) => {
- setSuccess(message);
- setIsSubmitting(false);
- }
- );
+ position: "relative",
}}
+ flexDirection="column"
>
+ <Box
+ as="svg"
+ version="1.1"
+ viewBox="0 0 1920 1080"
+ preserveAspectRatio="xMinYMin slice"
+ sx={{
+ position: "absolute",
+ top: 0,
+ left: 0,
+ right: 0,
+ bottom: 0,
+ width: "130%",
+ height: "100%",
+ }}
+ >
+ <path
+ d="M0 336L29.2 316.2C58.3 296.3 116.7 256.7 174.8 267.5C233 278.3 291 339.7 349.2 361.3C407.3 383 465.7 365 523.8 359.5C582 354 640 361 698.2 346.5C756.3 332 814.7 296 872.8 267.2C931 238.3 989 216.7 1047.2 202.3C1105.3 188 1163.7 181 1221.8 202.7C1280 224.3 1338 274.7 1396.2 298C1454.3 321.3 1512.7 317.7 1570.8 332C1629 346.3 1687 378.7 1745.2 366.2C1803.3 353.7 1861.7 296.3 1890.8 267.7L1920 239L1920 0L1890.8 0C1861.7 0 1803.3 0 1745.2 0C1687 0 1629 0 1570.8 0C1512.7 0 1454.3 0 1396.2 0C1338 0 1280 0 1221.8 0C1163.7 0 1105.3 0 1047.2 0C989 0 931 0 872.8 0C814.7 0 756.3 0 698.2 0C640 0 582 0 523.8 0C465.7 0 407.3 0 349.2 0C291 0 233 0 174.8 0C116.7 0 58.3 0 29.2 0L0 0Z"
+ fill="var(--bgSecondary)"
+ ></path>
+ <path
+ d="M0 627L29.2 607.3C58.3 587.7 116.7 548.3 174.8 564.7C233 581 291 653 349.2 683.5C407.3 714 465.7 703 523.8 703C582 703 640 714 698.2 724.8C756.3 735.7 814.7 746.3 872.8 742.7C931 739 989 721 1047.2 670.7C1105.3 620.3 1163.7 537.7 1221.8 528.7C1280 519.7 1338 584.3 1396.2 623.8C1454.3 663.3 1512.7 677.7 1570.8 666.8C1629 656 1687 620 1745.2 602C1803.3 584 1861.7 584 1890.8 584L1920 584L1920 237L1890.8 265.7C1861.7 294.3 1803.3 351.7 1745.2 364.2C1687 376.7 1629 344.3 1570.8 330C1512.7 315.7 1454.3 319.3 1396.2 296C1338 272.7 1280 222.3 1221.8 200.7C1163.7 179 1105.3 186 1047.2 200.3C989 214.7 931 236.3 872.8 265.2C814.7 294 756.3 330 698.2 344.5C640 359 582 352 523.8 357.5C465.7 363 407.3 381 349.2 359.3C291 337.7 233 276.3 174.8 265.5C116.7 254.7 58.3 294.3 29.2 314.2L0 334Z"
+ fill="var(--hover)"
+ ></path>
+ <path
+ d="M0 735L29.2 731.5C58.3 728 116.7 721 174.8 739C233 757 291 800 349.2 832.3C407.3 864.7 465.7 886.3 523.8 886.3C582 886.3 640 864.7 698.2 859.3C756.3 854 814.7 865 872.8 870.5C931 876 989 876 1047.2 845.3C1105.3 814.7 1163.7 753.3 1221.8 729.8C1280 706.3 1338 720.7 1396.2 738.7C1454.3 756.7 1512.7 778.3 1570.8 789.2C1629 800 1687 800 1745.2 814.5C1803.3 829 1861.7 858 1890.8 872.5L1920 887L1920 582L1890.8 582C1861.7 582 1803.3 582 1745.2 600C1687 618 1629 654 1570.8 664.8C1512.7 675.7 1454.3 661.3 1396.2 621.8C1338 582.3 1280 517.7 1221.8 526.7C1163.7 535.7 1105.3 618.3 1047.2 668.7C989 719 931 737 872.8 740.7C814.7 744.3 756.3 733.7 698.2 722.8C640 712 582 701 523.8 701C465.7 701 407.3 712 349.2 681.5C291 651 233 579 174.8 562.7C116.7 546.3 58.3 585.7 29.2 605.3L0 625Z"
+ fill="var(--border)"
+ ></path>
+ <path
+ d="M0 897L29.2 895.3C58.3 893.7 116.7 890.3 174.8 908.3C233 926.3 291 965.7 349.2 985.3C407.3 1005 465.7 1005 523.8 1003.3C582 1001.7 640 998.3 698.2 996.7C756.3 995 814.7 995 872.8 986C931 977 989 959 1047.2 939.2C1105.3 919.3 1163.7 897.7 1221.8 894C1280 890.3 1338 904.7 1396.2 911.8C1454.3 919 1512.7 919 1570.8 928C1629 937 1687 955 1745.2 960.3C1803.3 965.7 1861.7 958.3 1890.8 954.7L1920 951L1920 885L1890.8 870.5C1861.7 856 1803.3 827 1745.2 812.5C1687 798 1629 798 1570.8 787.2C1512.7 776.3 1454.3 754.7 1396.2 736.7C1338 718.7 1280 704.3 1221.8 727.8C1163.7 751.3 1105.3 812.7 1047.2 843.3C989 874 931 874 872.8 868.5C814.7 863 756.3 852 698.2 857.3C640 862.7 582 884.3 523.8 884.3C465.7 884.3 407.3 862.7 349.2 830.3C291 798 233 755 174.8 737C116.7 719 58.3 726 29.2 729.5L0 733Z"
+ fill="var(--hover)"
+ ></path>
+ <path
+ d="M0 1081L29.2 1081C58.3 1081 116.7 1081 174.8 1081C233 1081 291 1081 349.2 1081C407.3 1081 465.7 1081 523.8 1081C582 1081 640 1081 698.2 1081C756.3 1081 814.7 1081 872.8 1081C931 1081 989 1081 1047.2 1081C1105.3 1081 1163.7 1081 1221.8 1081C1280 1081 1338 1081 1396.2 1081C1454.3 1081 1512.7 1081 1570.8 1081C1629 1081 1687 1081 1745.2 1081C1803.3 1081 1861.7 1081 1890.8 1081L1920 1081L1920 949L1890.8 952.7C1861.7 956.3 1803.3 963.7 1745.2 958.3C1687 953 1629 935 1570.8 926C1512.7 917 1454.3 917 1396.2 909.8C1338 902.7 1280 888.3 1221.8 892C1163.7 895.7 1105.3 917.3 1047.2 937.2C989 957 931 975 872.8 984C814.7 993 756.3 993 698.2 994.7C640 996.3 582 999.7 523.8 1001.3C465.7 1003 407.3 1003 349.2 983.3C291 963.7 233 924.3 174.8 906.3C116.7 888.3 58.3 891.7 29.2 893.3L0 895Z"
+ fill="var(--border)"
+ ></path>
+ </Box>
+
{isSubmitting ? (
<>
<Loader title={data.loading.title} text={data.loading.text} />
</>
) : (
- <>
- <Image
- alignSelf="center"
- src={theme === "dark" ? LogoDark : Logo}
- width={50}
- mb={4}
- />
-
- <Text variant="heading" textAlign="center" fontWeight="heading">
- {data.title}
- </Text>
- <Text
- variant="body"
- mt={1}
- mb={2}
- textAlign="center"
- color="fontTertiary"
- >
- {data.subtitle.text}{" "}
- {data.subtitle.action && (
- <Text
+ <Flex
+ flexDirection={"column"}
+ sx={{
+ zIndex: 1,
+ flex: 1,
+ overflowY: "auto",
+ }}
+ >
+ {data.secondaryAction ? (
+ <>
+ <Button
+ type="button"
+ variant="icon"
+ mr={20}
+ mt={20}
+ alignSelf="end"
+ onClick={data.secondaryAction.onClick}
sx={{
- ":hover": { color: "dimPrimary" },
- cursor: "pointer",
+ display: "flex",
+ alignItems: "center",
+ borderRadius: "default",
+ color: "icon",
}}
- as="b"
- color="primary"
- onClick={data.subtitle.action.onClick}
>
- {data.subtitle.action.text}
- </Text>
- )}
- </Text>
- {success && (
- <Flex bg="shade" p={1} mt={2} sx={{ borderRadius: "default" }}>
- <CheckCircle size={15} color="primary" />
- <Text variant="error" color="primary" ml={1}>
- {success}
- </Text>
- </Flex>
- )}
- {data.fields?.map(({ defaultValue, id, autoFocus, ...rest }) => (
- <Field
- {...rest}
- id={id}
- key={id}
- required
- styles={{
- container: { mt: 2 },
- }}
- data-test-id={id}
- autoFocus={autoFocus}
- defaultValue={defaultValue && defaultValue(user, form)}
- />
- ))}
- {data.supportsPasswordRecovery && (
+ <Text mr={1}>{data.secondaryAction.text}</Text>
+ {data.secondaryAction.icon}
+ </Button>
+ </>
+ ) : (
<Button
type="button"
+ variant="icon"
+ ml={20}
+ mt={20}
alignSelf="start"
- data-test-id="auth-forgot-password"
- mt={1}
- variant="anchor"
- onClick={() => hardNavigate("/recover", getQueryParams())}
+ title="Go to app"
+ onClick={() => hardNavigate("/")}
+ sx={{
+ display: "flex",
+ alignItems: "center",
+ borderRadius: "default",
+ color: "icon",
+ }}
>
- Forgot password?
+ <ArrowLeft />
</Button>
)}
- <Button
- data-test-id="submitButton"
- display="flex"
- type="submit"
- mt={4}
- variant="primary"
- sx={{ borderRadius: "default" }}
- justifyContent="center"
+
+ <Flex
+ as="form"
+ id="authForm"
+ flexDirection="column"
+ alignSelf="center"
+ justifyContent={"center"}
alignItems="center"
- disabled={!isAppLoaded}
+ flex={1}
+ onSubmit={async (e) => {
+ console.log(e);
+ e.preventDefault();
+ setIsSubmitting(true);
+ const formData = new FormData(e.target);
+ const form = Object.fromEntries(formData.entries());
+ form.redirect = redirect;
+ if (user) form.email = user.email;
+ setForm(form);
+ await data.onSubmit(
+ form,
+ (error) => {
+ setIsSubmitting(false);
+ setError(error);
+ },
+ (message) => {
+ setSuccess(message);
+ setIsSubmitting(false);
+ }
+ );
+ }}
>
- {isAppLoaded ? (
- data.primaryAction.text
- ) : (
- <Loading color="static" />
+ <Text variant={"heading"} fontSize={32} textAlign="center">
+ {data.title}
+ </Text>
+ <Text
+ variant="body"
+ fontSize={"title"}
+ textAlign="center"
+ mt={2}
+ mb={35}
+ color="fontTertiary"
+ >
+ {data.subtitle.text}{" "}
+ {data.subtitle.action && (
+ <Text
+ sx={{
+ textDecoration: "underline",
+ ":hover": { color: "dimPrimary" },
+ cursor: "pointer",
+ }}
+ as="b"
+ color="text"
+ onClick={data.subtitle.action.onClick}
+ >
+ {data.subtitle.action.text}
+ </Text>
+ )}
+ </Text>
+ {success && (
+ <Flex
+ bg="shade"
+ p={1}
+ mt={2}
+ sx={{ borderRadius: "default" }}
+ >
+ <CheckCircle size={15} color="primary" />
+ <Text variant="error" color="primary" ml={1}>
+ {success}
+ </Text>
+ </Flex>
)}
- </Button>
- {data.secondaryAction && (
- <>
+ {data.fields?.map(
+ ({ defaultValue, id, autoFocus, ...rest }) => (
+ <Field
+ {...rest}
+ id={id}
+ key={id}
+ required
+ styles={{
+ container: { mt: 2, width: 400 },
+ label: { fontWeight: "normal" },
+ input: {
+ p: "12px",
+ borderRadius: "default",
+ bg: "background",
+ boxShadow: "0px 0px 5px 0px #00000019",
+ // transition: "200ms box-shadow ease-out",
+ // ":hover": { boxShadow: "0px 0px 5px 0px #00000033" },
+ },
+ }}
+ data-test-id={id}
+ autoFocus={autoFocus}
+ defaultValue={defaultValue && defaultValue(user, form)}
+ />
+ )
+ )}
+ {data.supportsPasswordRecovery && (
<Button
type="button"
- variant="anchor"
+ alignSelf="end"
+ data-test-id="auth-forgot-password"
mt={2}
- alignSelf="center"
- onClick={data.secondaryAction.onClick}
+ variant="anchor"
+ color="text"
+ onClick={() => hardNavigate("/recover", getQueryParams())}
>
- {data.secondaryAction.text}
+ Forgot password?
</Button>
- </>
- )}
- {error && (
- <Flex
- bg="errorBg"
- p={1}
- mt={2}
- sx={{ borderRadius: "default" }}
+ )}
+ <Button
+ data-test-id="submitButton"
+ display="flex"
+ type="submit"
+ mt={50}
+ variant="primary"
+ alignSelf={"center"}
+ px={50}
+ sx={{ borderRadius: 50 }}
+ justifyContent="center"
+ alignItems="center"
+ disabled={!isAppLoaded}
>
- <Error size={15} color="error" />
- <Text variant="error" ml={1}>
- {error}
- </Text>
- </Flex>
- )}
+ {isAppLoaded ? (
+ data.primaryAction.text
+ ) : (
+ <Loading color="static" />
+ )}
+ </Button>
+ {error && (
+ <Flex
+ bg="errorBg"
+ p={1}
+ mt={2}
+ sx={{ borderRadius: "default" }}
+ >
+ <Error size={15} color="error" />
+ <Text variant="error" ml={1}>
+ {error}
+ </Text>
+ </Flex>
+ )}
- {data.footer && (
- <Text mt={2} variant="subBody" textAlign="center">
- {data.footer}
- </Text>
- )}
- </>
+ {data.footer && (
+ <Text
+ mt={4}
+ maxWidth={350}
+ variant="subBody"
+ fontSize={13}
+ textAlign="center"
+ >
+ {data.footer}
+ </Text>
+ )}
+ </Flex>
+ </Flex>
)}
</Flex>
</Flex>