A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
feat: improve buy dialog
thecodrrfe0bdc0deb3b
diff --git a/apps/web/src/assets/rocket.svg b/apps/web/src/assets/rocket.svgnew file mode 100644index 000000000..c37ff36e0--- /dev/null+++ b/apps/web/src/assets/rocket.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 902.4185 826.2068"><path fill="#e6e6e6" d="m578.1588 659.811 8.6716 19.444c-7.0488-1.1222-13.6039 4.8978-13.7512 12.6288s6.1398 15.7742 13.1891 16.873c-1.347 6.0024-7.1608 8.6486-12.2073 11.0746s-10.4854 6.4495-10.11 12.8451c.3015 5.1354 4.548 9.6693 9.0577 11.4922s9.2414 1.5427 13.8086 1.2368c-6.921 7.2399-7.5956 20.8478-1.5175 30.6108s18.2167 14.5692 27.3054 10.8112c-6.4219 7.9886-5.0267 22.618 2.9433 30.8622 8.0343 8.3109 19.678 9.1153 29.857 8.2397a132.238 132.238 0 0 0 71.0069-28.14c7.7817-6.1834 15.0504-13.4555 19.4895-22.9412s5.747-21.4957 1.6122-32.2905c1.1152 13.5224 14.65 24.2028 26.826 24.8004s22.8066-6.2605 31.8405-14.0811c12.014-10.4005 23.1373-24.9791 21.4884-42.967-.8163-8.9049-4.7058-17.4694-8.5206-25.765l-7.3956-16.0827c-2.9857-6.4928-6.0392-13.0952-10.533-18.5438s-10.7312-9.6665-16.973-9.6264c1.4272-6.5202 2.8608-13.2834 1.6648-20.211s-5.7758-14.1006-12.0043-15.7229c-7.9268-2.0646-14.6448 5.2504-22.6158 4.5608-7.6707-.6636-14.01-8.362-21.4587-11.4124a17.1778 17.1778 0 0 0-18.5372 3.2064c-4.722 4.6097-6.6903 12.398-4.9958 19.7672 1.4843 6.4555 5.4346 12.1491 7.8323 18.375s2.7698 14.231-1.8351 17.6312c-5.5566 4.103-14.0144-1.4802-18.3557-8.2348s-6.8338-14.9334-12.3236-20.614c-6.4792-6.7045-16.6215-8.2758-23.2925-3.6085s-9.2224 15.1192-5.8592 24.0038c2.7498 7.2645 9.049 14.6135 6.8643 21.4543-2.309 7.2298-12.4126 6.3143-18.507 1.2047s-10.1411-12.8059-16.1615-18.0302c-6.114-5.3057-14.098-7.6304-21.1072-6.1458a21.7306 21.7306 0 0 0-15.573 13.9151"/><path fill="#3f3d56" d="m718.556 605.1697-17.9926 8.3596a13.8123 13.8123 0 0 1-8.734 1.1775c-2.612-.6178-4.3771-2.2148-4.841-4.3833l-4.1866-19.5542c-.7905-3.6887 2.2645-8.0532 7.2637-10.3759l9.9366-4.6166c4.9992-2.3227 10.305-1.8428 12.6142 1.1402l12.2444 15.8105c1.358 1.753 1.4403 4.132.2278 6.5267a13.8122 13.8122 0 0 1-6.5326 5.9155Z"/><path fill="#2a2a35" d="M160.6395 243.7622a353.9984 353.9984 0 0 1 77.5017-124.0568c29.0063-30.1117 74.1503-28.8605 74.1503-28.8605l.2578-.32a87.5802 87.5802 0 0 1 92.5527-28.9125c4.3043 1.2351 7.615 1.7826 9.1895 1.2325 28.707-10.0471 27.3583-32.7242 52.1261-50.9928 43.367-31.9872 187.211 4.6535 207.4942 63.5137 16.4392 47.7049 89.8202 70.827 117.2358 107.3174q6.4306 8.5586 12.618 17.3156 2.9013 4.0682 5.7375 8.1978a730.4283 730.4283 0 0 1 52.1472 88.1554 514.1131 514.1131 0 0 1 26.1008 61.6845c28.591 83.582 18.8138 145.8549-60.021 130.4701q-13.9981-2.739-27.3237-4.9011-19.2962-3.149-37.2465-5.1757-24.1722-2.749-45.9936-3.6022-7.3372-.2952-14.4051-.3957c-69.6704-.966-121.349 12.1465-160.719 32.5016q-10.0108 5.1628-18.9733 10.9234a236.0544 236.0544 0 0 0-26.08 19.3192 254.8984 254.8984 0 0 0-31.4226 32.1972l-.5221.6393c-46.0483 56.326-61.203 118.6816-93.2345 129.6607-136.9263 46.9402-223.5264-123.2198-232.4074-289.674q-.6727-12.5815-.7432-25.0912-.0416-5.5915.055-11.1536c.1405-9.6734.567-19.2847 1.2812-28.7797q.4-5.4454.928-10.8332c.388-3.8734.81-7.7237 1.2976-11.5498 3.4833-28.0464 9.577-54.7303 18.4186-78.8296Z"/><path fill="#3f3d56" d="M585.0428 335.3436c-10.9352 5.0912-11.1154 27.895-7.6865 35.2839l6.2138 13.3742 39.6094-18.403-6.2138-13.3742c-3.4356-7.3858-20.9796-21.9547-31.9229-16.8809ZM478.602 527.3596a4.3328 4.3328 0 0 1-4.0698-5.8194 4.2997 4.2997 0 0 1 2.2431-2.4404l204.5538-95.0381a4.33 4.33 0 0 1 5.752 2.1016 4.3357 4.3357 0 0 1-2.1026 5.752h-.0005l-204.5537 95.038a4.3062 4.3062 0 0 1-1.8223.4063Z"/><path fill="#e6e6e6" d="m580.138 401.2944 58.471-27.1664 91.7208 197.4134-58.471 27.1664z"/><path fill="#3f3d56" d="M419.1138 125.6175c-10.9352 5.0911-11.1154 27.895-7.6865 35.2839l6.2138 13.3742 39.6094-18.403-6.2138-13.3742c-3.4356-7.3858-20.9797-21.9548-31.923-16.8809Zm245.0148 502.2467-17.9926 8.3595a13.8122 13.8122 0 0 1-8.7339 1.1775c-2.612-.6177-4.3772-2.2147-4.841-4.3833l-4.1867-19.5542c-.7905-3.6887 2.2645-8.0531 7.2638-10.3758l9.9365-4.6167c4.9992-2.3227 10.305-1.8428 12.6143 1.1403l12.2443 15.8105c1.358 1.753 1.4403 4.132.2278 6.5266a13.8122 13.8122 0 0 1-6.5325 5.9156ZM608.8098 655.31l-17.9925 8.3595a13.8122 13.8122 0 0 1-8.734 1.1775c-2.612-.6178-4.3771-2.2148-4.841-4.3833l-4.1866-19.5543c-.7905-3.6886 2.2645-8.053 7.2637-10.3758l9.9366-4.6166c4.9992-2.3228 10.305-1.8428 12.6142 1.1402l12.2444 15.8105c1.358 1.753 1.4403 4.132.2278 6.5267a13.8122 13.8122 0 0 1-6.5326 5.9155Z"/><path fill="#e6e6e6" d="m429.8108 225.1486 58.471-27.1664L673.685 597.0305l-58.471 27.1664z"/><path fill="#3f3d56" d="m548.951 403.691-6.561-14.437 3.777-1.742 6.541 14.391 94.715 210.006-3.773 1.753m-20.699-221.971-6.561-14.437 3.777-1.742 6.541 14.391 94.715 210.006-3.773 1.753"/><path fill="#e6e6e6" d="m515.8802 229.9172-79.2257 36.8093c-5.044-7.8472-20.2493-48.0602-16.8351-59.9912l-2.5628-11.3777 54.7035-25.416 7.3222 9.0073c10.8691 3.335 32.0285 41.1058 36.598 50.9683Z"/><path fill="#e6e6e6" d="m474.246 170.4284-56.4509 26.2278c-2.0836.968-4.3026.6122-4.9563-.795a1.9521 1.9521 0 0 1-.172-.6428l-2.9217-31.1679c-.125-1.3347 1.0167-2.847 2.7611-3.6576l37.4368-17.3935c1.7444-.8105 3.6367-.7077 4.576.2486l21.9359 22.3337c1.1219 1.1423.5127 3.0975-1.3608 4.3672a6.0808 6.0808 0 0 1-.848.4795Z"/><path fill="#3f3d56" d="M518.5224 414.6174a7.626 7.626 0 0 1-1.814-.2139 5.6039 5.6039 0 0 1-3.8965-3.0254l-34.5126-74.2827c-1.4282-3.0752.4892-7.0078 4.2744-8.7666l50.5361-23.48c3.7857-1.7598 8.0274-.6875 9.4566 2.3872l34.5127 74.2832a5.6026 5.6026 0 0 1-.2007 4.9287 8.5063 8.5063 0 0 1-4.0743 3.8379l-50.5356 23.479a8.9197 8.9197 0 0 1-3.746.8526Z"/><path fill="#e6e6e6" d="m466.9625 453.028 58.471-27.1664 91.7208 197.4134-58.471 27.1664z"/><path fill="#3f3d56" d="m453.3981 173.6846-17.1469 7.9667c-3.3088 1.5373-7.7729-1.0244-9.9497-5.7097s-1.2557-9.749 2.0531-11.2864l17.147-7.9667c3.3088-1.5373 7.7728 1.0244 9.9497 5.7097s1.2557 9.749-2.0532 11.2864Zm19.6104 212.8624c-10.9352 5.0911-11.1154 27.895-7.6865 35.2838l6.2138 13.3742 39.6094-18.403-6.2138-13.3742c-3.4356-7.3858-20.9797-21.9547-31.923-16.8808Z"/><path fill="#e6e6e6" d="M291.361 341.0283c-3.862 2.5732-7.8147-3.5513-3.8785-6.0102 3.8618-2.573 7.8145 3.5514 3.8785 6.0102Zm402-88c-3.862 2.5732-7.8147-3.5513-3.8785-6.0102 3.8618-2.573 7.8145 3.5514 3.8785 6.0102Zm-274 70c-3.862 2.5732-7.8147-3.5513-3.8785-6.0102 3.8618-2.573 7.8145 3.5514 3.8785 6.0102Zm-128 240c-3.862 2.5732-7.8147-3.5513-3.8785-6.0102 3.8618-2.573 7.8145 3.5514 3.8785 6.0102Zm197-501c-3.862 2.5732-7.8147-3.5513-3.8785-6.0102 3.8618-2.573 7.8145 3.5514 3.8785 6.0102Zm-190 118c-3.862 2.5732-7.8147-3.5513-3.8785-6.0102 3.8618-2.573 7.8145 3.5514 3.8785 6.0102ZM571.639 146.2l-2.457-.539.538-2.458-1.638-.359-.539 2.458-2.457-.538-.359 1.638 2.457.539-.538 2.457 1.638.359.539-2.458 2.457.539.359-1.638zM171.542 350.978l-2.457-.539.538-2.457-1.638-.359-.539 2.457-2.458-.538-.359 1.638 2.458.539-.538 2.458 1.638.358.539-2.457 2.457.538.359-1.638z"/><path fill="#3f3d56" d="M675.4293 455.4363a8.5098 8.5098 0 0 1-11.2902-4.1271l-10.1125-21.7655a8.5 8.5 0 0 1 15.4172-7.163l10.1126 21.7655a8.5098 8.5098 0 0 1-4.1271 11.29Zm-172 80a8.5098 8.5098 0 0 1-11.2902-4.1271l-10.1125-21.7655a8.5 8.5 0 0 1 15.4172-7.163l10.1126 21.7655a8.5098 8.5098 0 0 1-4.1271 11.29Z"/><path fill="#e6e6e6" d="m659.851 407.8815-67.8058 31.5035c-4.317-6.7161-17.3306-41.1327-14.4085-51.344l1.4342-11.423 40.4862-19.863 8.9714 7.505c12.64-4.2735 31.22 27.048 31.3225 43.6215Z"/><path fill="#3f3d56" d="m628.371 405.6971-17.1469 7.9668c-3.3088 1.5373-8.3435-2.2527-11.2216-8.4473s-2.5276-12.4867.7812-14.024l17.147-7.9667c3.3087-1.5374 8.3434 2.2526 11.2216 8.4472s2.5276 12.4867-.7813 14.024Zm-145.42 40.9939-6.561-14.437 3.777-1.742 6.541 14.391 94.715 210.006-3.773 1.753"/><path fill="#e6e6e6" d="m547.8167 459.0848-67.8059 31.5035c-10.003-5.165-25.291-38.961-14.4085-51.344l1.4343-11.423 40.4861-19.863 8.9714 7.505c9.3024 2.854 27.4119 35.1806 31.3226 43.6215Z"/><path fill="#3f3d56" d="m514.9412 453.8969-17.147 7.9667c-3.3088 1.5373-8.0304-1.5789-10.5238-6.9455s-1.8299-10.9848 1.479-12.5222l17.147-7.9667c3.3087-1.5373 8.0304 1.5789 10.5238 6.9455s1.8298 10.9848-1.479 12.5222Z"/><circle cx="171.2915" cy="204.8449" r="103" fill="var(--primary)"/><path fill="#f0f0f0" d="m593.6055 312.124 62.5932-182.809-68.7312 180.6206a3.4416 3.4416 0 1 0 6.138 2.1883Z" opacity=".3"/><path fill="#3f3d56" d="M753.1594 203.158q-18.3797 6.1083-40.7515 12.0008c-77.1451 20.311-180.5497 36.1542-291.1655 44.6127-110.6154 8.4583-215.2274 8.5195-294.5635.1742-38.6472-4.0657-69.215-9.9131-90.8537-17.381C12.9158 234.6594.8779 225.1328.0457 214.2511c-1.6208-21.1997 40.2125-39.8585 75.5919-51.7782l.9582 2.843c-48.5852 16.3686-74.7086 33.6665-73.5584 48.7066 1.4643 19.156 46.6443 34.8063 123.9553 42.9396 79.1618 8.327 183.5805 8.2631 294.0213-.1814 110.4401-8.4453 213.655-24.2574 290.6304-44.5233 75.1735-19.7906 117.4504-42.1292 115.9855-61.2855-1.2163-15.9047-32.5672-29.5104-88.2777-38.3124l.4684-2.963c40.48 6.3957 89.0925 18.7082 90.801 41.0467.8318 10.882-9.6177 22.1274-31.0589 33.424-12.2224 6.4393-27.752 12.7922-46.4033 18.9907Z"/><circle cx="783.4253" cy="375.1362" r="10.7023" fill="#ff6584"/><circle cx="851.4253" cy="665.1362" r="10.7023" fill="#f2f2f2"/><circle cx="486.4253" cy="720.1362" r="20.8661" fill="#f2f2f2"/><circle cx="327.4253" cy="454.1362" r="10.7023" fill="#3f3d56"/><path fill="#e6e6e6" d="m687.226 478.768 46.176 11.953 28.321 55.628-47.88 1.878-26.617-69.459z"/><path fill="#ccc" d="m580.645 398.574 25.414 25.428 64.547 139.555-11.884 10.267-78.077-175.25zm-55.259 23.05 1.994 35.896 60.924 141.174 15.576-2.006-78.494-175.064z"/><path fill="#e6e6e6" d="m523.723 566.637-24.869 40.702 18.333 59.669 35.713-31.947-29.177-68.424z"/><path fill="#3f3d56" d="M743.4047 591.647q-19.3681 0-42.4565-1.4638c-79.6138-5.0557-182.7378-22.6328-290.376-49.4922-107.6377-26.8594-206.9302-59.794-279.5855-92.7344-35.3925-16.0468-62.5561-31.2363-80.7353-45.1474-19.247-14.727-27.666-27.564-25.024-38.1529 5.148-20.6289 50.731-25.142 88.064-25.2954l.0128 3c-51.2681.2105-81.5137 8.3867-85.1656 23.022-4.6518 18.6402 33.2867 47.7408 104.087 79.8413 72.4956 32.8682 171.6054 65.7393 279.0732 92.5567 107.4673 26.8164 210.4014 44.3633 289.8398 49.4082 77.5787 4.9277 124.7432-2.9375 129.3946-21.5781 3.8618-15.4766-21.5982-38.2754-71.6895-64.1983l1.379-2.664c36.397 18.8359 78.6454 45.8515 73.2216 67.5888-2.6426 10.5889-16.1055 17.9649-40.0152 21.9229-13.6293 2.2558-30.37 3.3867-50.0244 3.3867Z"/></svg>\ No newline at end of filediff --git a/apps/web/src/components/dialogs/buydialog.js b/apps/web/src/components/dialogs/buydialog.jsindex 0acb80ed3..3449a03e7 100644--- a/apps/web/src/components/dialogs/buydialog.js+++ b/apps/web/src/components/dialogs/buydialog.js@@ -1,5 +1,5 @@import React, { useEffect, useState } from "react";-import { Text, Flex, Button } from "rebass";+import { Text, Flex, Button, Box } from "rebass";import Dialog from "./dialog";import * as Icon from "../icons";import { useStore as useUserStore } from "../../stores/user-store";@@ -8,56 +8,261 @@ import getSymbolFromCurrency from "currency-symbol-map";import { ANALYTICS_EVENTS, trackEvent } from "../../utils/analytics";import { navigate } from "../../navigation";import Switch from "../switch";+import Modal from "react-modal";+import { useTheme } from "emotion-theming";+import { ReactComponent as Rocket } from "../../assets/rocket.svg";-const premiumDetails = [+const sections = [{- title: "Unlimited attachments",- description: "Your notes will be automatically synced to all your devices.",+ title: "Focused on privacy",+ detail:+ "Everything you do in Notesnook stays private. We use XChaCha20-Poly1305-IETF and Argon2 to encrypt your notes.",+ features: [+ {+ title: "Zero ads & zero trackers",+ icon: Icon.Billboard,+ },+ {+ title: "On device encryption",+ icon: Icon.Cellphone,+ },+ {+ title: "Secure app lock for all",+ icon: Icon.CellphoneLock,+ },+ {+ title: "100% end-to-end encrypted",+ icon: Icon.Lock,+ },+ {+ title: "Private vault for notes",+ icon: Icon.ShieldLock,+ pro: true,+ },+ ],},{- title: "Unlimited storage",- description: "Your notes will be automatically synced to all your devices.",+ title: "Instant syncing",+ detail:+ "Seemlessly work from anywhere. Every change is synced instantly everywhere.",+ pro: true,},{- title: "Unlimited notebooks & tags",- description:- "Make unlimited notebooks and tags, and assign colors to your notes for quick access.",+ title: "100% cross platform",+ detail: "Notesnook is available on all major platforms — for everyone.",+ columns: 8,+ features: [+ {+ icon: Icon.iOS,+ },+ {+ icon: Icon.Android,+ },+ {+ icon: Icon.Windows,+ },+ {+ icon: Icon.Linux,+ },+ {+ icon: Icon.MacOS,+ },+ {+ icon: Icon.Chrome,+ },+ {+ icon: Icon.Firefox,+ },+ {+ icon: Icon.Safari,+ },+ ],},{- title: "Automatic syncing",- description: "Your notes will be automatically synced to all your devices.",+ title: "Attach files & images",+ detail:+ "Add your documents, PDFs, images and videos, and keep them safe and organized.",+ pro: true,+ features: [+ {+ title: "Bulletproof encryption",+ icon: Icon.Lock,+ },+ {+ title: "High quality 4K images",+ icon: Icon.ImageMultiple,+ },+ {+ title: "Unlimited storage",+ icon: Icon.Harddisk,+ },+ {+ title: "Upto 500 MB per file",+ icon: Icon.FileCabinet,+ },+ {+ title: "All file types supported",+ icon: Icon.File,+ },+ ],},{- title: "Secure vault for notes",- description:- "Lock any note with a password and keep sensitive data under lock and key.",+ title: "No limit on notes",+ detail:+ "We don't have nonsense like blocks and whatnot. You can create as many notes as you want — no limits.",},{- title: "Full rich text editor + markdown support",- description:- "Add images, links, tables and lists to your notes, and use markdown for fast editing.",+ title: "Safe publishing to the Internet",+ detail:+ "Publishing is nothing new but we offer fully encrypted, anonymous publishing. Take any note & share it with the world.",+ features: [+ {+ title: "Anonymous publishing",+ icon: Icon.Anonymous,+ },+ {+ title: "Password protection",+ icon: Icon.CloudLock,+ },+ {+ title: "Self destructable notes",+ icon: Icon.Timebomb,+ },+ ],},{- title: "Multi-format exports",- description: "Export your notes in PDF, Markdown, or HTML formats.",+ title: "Organize yourself in the best way",+ detail:+ "We offer multiple ways to keep you organized. The only limit is your imagination.",+ features: [+ {+ title: "Unlimited notebooks*",+ icon: Icon.Notebook2,+ pro: true,+ },+ {+ title: "Colors & tags*",+ icon: Icon.Palette,+ pro: true,+ },+ {+ title: "Side menu shortcuts",+ icon: Icon.Shortcut,+ },+ {+ title: "Pins & favorites",+ icon: Icon.Pin,+ },+ ],+ info: "* Free users can only create 3 notebooks (no limit on topics) and 5 tags.",},+{- title: "Automatic encrypted backups",- description: "Enable daily or weekly backups with automatic encryption.",+ title: "Rich tools for rich editing",+ detail:+ "Having the right tool at the right time is crucial for note taking. Lists, tables, codeblocks — you name it, we have it.",+ pro: true,+ features: [+ {+ title: "Lists & tables",+ icon: Icon.Table,+ },+ {+ title: "Images & embeds",+ icon: Icon.Embed,+ },+ {+ title: "Checklists",+ icon: Icon.CheckCircleOutline,+ },+ {+ title: "Markdown shortcuts",+ icon: Icon.Markdown,+ },+ ],},{- title: "Customize Notesnook",- description: "Change app colors and turn on automatic theme switching.",+ title: "Export and take your notes anywhere",+ detail:+ "You own your notes, not us. No proprietary formats. No vendor lock in. No waiting for hours to download your notes.",+ // info: "* Free users can export notes in well formatted plain text.",+ features: [+ {+ title: "Export as Markdown",+ icon: Icon.Markdown,+ pro: true,+ },+ {+ title: "Export as PDF",+ icon: Icon.PDF,+ pro: true,+ },+ {+ title: "Export as HTML",+ icon: Icon.HTML,+ pro: true,+ },+ {+ title: "Export as text",+ icon: Icon.Text,+ },+ {+ title: "Bulk exports",+ icon: Icon.Export,+ },+ ],},{- title: (- <>- Special Pro badge on{" "}- <a href="https://discord.gg/5davZnhw3V">our Discord server</a>- </>- ),- description:- "Pro users get access to special channels and priority support on our Discord server.",+ title: "Backup & keep your notes safe",+ detail:+ "Do not worry about losing your data. Turn on automatic backups on weekly or daily basis.",+ features: [+ {+ title: "Automatic monthly, weekly & daily backups",+ icon: Icon.Backup,+ pro: true,+ },+ {+ title: "Backup encryption",+ icon: Icon.EncryptedBackup,+ pro: true,+ },+ ],+ },+ {+ title: "Personalize & make Notesnook your own",+ detail:+ "Change app themes to match your style. Custom themes are coming soon.",+ pro: true,+ features: [+ {+ title: "10+ themes",+ icon: Icon.Accent,+ },+ {+ title: "Automatic dark mode",+ icon: Icon.Theme,+ },+ {+ title: "Change default home page",+ icon: Icon.Home,+ },+ ],+ },+];++const plans = [+ {+ title: "Monthly",+ subtitle: "Pay once a month",+ price: 4.99,+ currency: "USD",+ },+ {+ title: "Yearly",+ subtitle: "Pay once a year",+ price: 49.99,+ currency: "USD",},];@@ -70,6 +275,7 @@ function BuyDialog(props) {const [plan, setPlan] = useState(props.plan || "monthly");const isLoggedIn = useUserStore((store) => store.isLoggedIn);const user = useUserStore((store) => store.user);+ const theme = useTheme();useEffect(() => {(async function () {@@ -95,15 +301,210 @@ function BuyDialog(props) {}, []);return (- <Dialog+ <ModalisOpen={true}- // showClose- onClose={props.onCancel}- padding={"0px"}- margin={"0px"}- headerPaddingBottom={"0px"}+ onRequestClose={props.onClose}+ shouldCloseOnEsc+ shouldReturnFocusAfterClose+ shouldFocusAfterRender+ onAfterOpen={(e) => {+ if (!props.onClose) return;+ // we need this work around because ReactModal content spreads over the overlay+ const child = e.contentEl.firstElementChild;+ e.contentEl.onmousedown = function (e) {+ if (!e.screenX && !e.screenY) return;+ if (+ e.x < child.offsetLeft ||+ e.x > child.offsetLeft + child.clientWidth ||+ e.y < child.offsetTop ||+ e.y > child.offsetTop + child.clientHeight+ ) {+ props.onClose();+ }+ };+ if (props.onOpen) props.onOpen();+ }}+ style={{+ content: {+ top: 0,+ left: 0,+ right: 0,+ bottom: 0,+ display: "flex",+ justifyContent: "center",+ backgroundColor: undefined,+ padding: 0,+ overflowY: "hidden",+ border: 0,+ zIndex: 0,+ },+ overlay: {+ zIndex: 999,+ background: theme.colors.overlay,+ },+ }}>- <Flex flexDirection="column" flex={1} overflowY="hidden">+ <Flex+ flexDirection="row"+ width={"60%"}+ // maxHeight={["100%", "80%", "70%"]}+ height={["100%", "80%", "70%"]}+ bg="transparent"+ alignSelf={"center"}+ overflowY={props.scrollable ? "auto" : "hidden"}+ sx={{+ position: "relative",+ overflow: "hidden",+ boxShadow: "4px 5px 18px 2px #00000038",+ borderRadius: "dialog",+ }}+ >+ <Flex+ flexDirection="column"+ justifyContent="center"+ alignItems="center"+ sx={{+ borderRadius: "dialog",+ overflow: "hidden",+ bg: "bgTransparent",+ backdropFilter: "blur(8px)",+ }}+ width={350}+ p={4}+ py={50}+ >+ <Rocket width={200} />+ <Text variant="heading" textAlign="center" mt={4}>+ Choose a plan+ </Text>+ <Text variant="body" textAlign="center" mt={1}>+ Every day we spend hours improving Notesnook. You are what makes+ that possible.+ </Text>+ </Flex>+ <Flex+ flex={1}+ flexDirection="column"+ overflowY="auto"+ sx={{ position: "relative" }}+ pt={6}+ bg="background"+ justifyContent="center"+ >+ {plans.map((plan) => (+ <Flex justifyContent="space-between" alignItems="center" p={6}>+ <Text variant="heading" fontWeight="normal">+ {plan.title}+ <Text variant="subtitle" fontWeight="normal">+ {plan.subtitle}+ </Text>+ </Text>+ <Text variant="body" fontSize="subheading">+ {plan.price} {plan.currency}+ </Text>+ </Flex>+ ))}+ </Flex>+ {/* <Flex+ flexDirection="column"+ justifyContent="center"+ alignItems="center"+ sx={{+ borderRadius: "dialog",+ overflow: "hidden",+ bg: "bgTransparent",+ backdropFilter: "blur(8px)",+ }}+ width={350}+ p={4}+ py={50}+ >+ <Rocket width={200} />+ <Text variant="heading" textAlign="center" mt={4}>+ Notesnook Pro+ </Text>+ <Text variant="body" textAlign="center" mt={1}>+ Ready to take the next step in your private note taking journey?+ </Text>+ <Button variant="primary" mt={4}>+ Try free for 14 days+ </Button>+ </Flex>+ <Flex+ flex={1}+ flexDirection="column"+ overflowY="auto"+ sx={{ position: "relative" }}+ pt={6}+ bg="background"+ >+ {sections.map((section) => (+ <Flex flexDirection="column" px={6} pb={50}>+ {section.pro && (+ <Flex+ bg="bgSecondary"+ alignSelf="start"+ px={2}+ py="2px"+ sx={{ borderRadius: 50 }}+ mb={1}+ >+ <Icon.Pro color="primary" size={16} />+ <Text variant="body" color="primary" ml={"2px"}>+ Pro+ </Text>+ </Flex>+ )}+ <Text variant="body" fontSize={"1.3rem"}>+ {section.title}+ </Text>+ <Text variant="body" mt={1} fontSize="title" color="fontTertiary">+ {section.detail}+ </Text>+ {section.features && (+ <Box+ sx={{+ display: "grid",+ gridTemplateColumns: section.columns+ ? "1fr ".repeat(section.columns)+ : "1fr 1fr 1fr",+ gap: 3,+ }}+ mt={4}+ >+ {section.features.map((feature) => (+ <Flex alignItems="start" flexDirection="column">+ <feature.icon size={20} color="text" sx={{ mb: 1 }} />+ {feature.pro && (+ <Flex justifyContent="center" alignItems="center">+ <Icon.Pro color="primary" size={14} />+ <Text variant="subBody" color="primary" ml={"2px"}>+ Pro+ </Text>+ </Flex>+ )}+ {feature.title && (+ <Text variant="body" fontSize="subtitle">+ {feature.title}+ </Text>+ )}+ </Flex>+ ))}+ </Box>+ )}+ {section.info && (+ <Text mt={1} variant="subBody">+ {section.info}+ </Text>+ )}+ </Flex>+ ))}+ </Flex> */}+ </Flex>+ </Modal>+ );++ /* <Flex flexDirection="column" flex={1} overflowY="hidden"><Flex bg="primary" p={5} sx={{ position: "relative" }}><Text variant="heading" fontSize="38px" color="static">Notesnook Pro@@ -271,9 +672,9 @@ function BuyDialog(props) {</>)}</Flex>- </Flex>- </Dialog>- );+ </Flex> */+ // </Dialog>+ // );}export default BuyDialog;diff --git a/apps/web/src/components/dialogs/dialog.js b/apps/web/src/components/dialogs/dialog.jsindex 7c3d7c8b6..870666a9b 100644--- a/apps/web/src/components/dialogs/dialog.js+++ b/apps/web/src/components/dialogs/dialog.js@@ -57,7 +57,6 @@ function Dialog(props) {height={["100%", "auto", "auto"]}bg="background"alignSelf={"center"}- m={props.margin || [0, 2, 2]}overflowY={props.scrollable ? "auto" : "hidden"}sx={{position: "relative",diff --git a/apps/web/src/components/icons/index.js b/apps/web/src/components/icons/index.jsindex f4fd4c5a1..a6a5f63ec 100644--- a/apps/web/src/components/icons/index.js+++ b/apps/web/src/components/icons/index.js@@ -65,8 +65,6 @@ import {mdiChevronUp,mdiSortAscending,mdiSortDescending,- mdiEye,- mdiEyeOff,mdiFullscreen,mdiFullscreenExit,mdiBullhorn,@@ -96,8 +94,36 @@ import {mdiEyeOutline,mdiEyeOffOutline,mdiAttachment,- mdiPen,mdiPencilOutline,+ mdiBillboard,+ mdiCellphone,+ mdiCellphoneLock,+ mdiFileLockOutline,+ mdiShieldLockOutline,+ mdiImageMultipleOutline,+ mdiHarddisk,+ mdiFileCabinet,+ mdiEmoticonOutline,+ mdiPaletteOutline,+ mdiFormatBold,+ mdiTable,+ mdiCrownOutline,+ mdiDatabaseLockOutline,+ mdiPaletteSwatchOutline,+ mdiAppleIos,+ mdiCellphoneAndroid,+ mdiMicrosoftWindows,+ mdiLinux,+ mdiApple,+ mdiWeb,+ mdiYoutube,+ mdiCheckCircleOutline,+ mdiAndroid,+ mdiIncognito,+ mdiCloudLockOutline,+ mdiGoogleChrome,+ mdiFirefox,+ mdiAppleSafari,} from "@mdi/js";import { useTheme } from "emotion-theming";import { AnimatedFlex } from "../animated";@@ -207,6 +233,7 @@ export const LightMode = createIcon(mdiWeatherSunny);export const Theme = createIcon(mdiThemeLightDark);export const Checkmark = createIcon(mdiCheck);export const CheckCircle = createIcon(mdiCheckCircle);+export const CheckCircleOutline = createIcon(mdiCheckCircleOutline);export const Properties = createIcon(mdiDotsVertical);export const Markdown = createIcon(mdiLanguageMarkdownOutline);export const PDF = createIcon(mdiFilePdfOutline);@@ -256,3 +283,32 @@ export const Dismiss = createIcon(mdiClose);export const File = createIcon(mdiFileOutline);export const Download = createIcon(mdiArrowDown);export const ImageDownload = createIcon(mdiImage);+export const Billboard = createIcon(mdiBillboard);+export const Cellphone = createIcon(mdiCellphone);+export const CellphoneLock = createIcon(mdiCellphoneLock);+export const FileLock = createIcon(mdiFileLockOutline);+export const ShieldLock = createIcon(mdiShieldLockOutline);+export const ImageMultiple = createIcon(mdiImageMultipleOutline);+export const Harddisk = createIcon(mdiHarddisk);+export const FileCabinet = createIcon(mdiFileCabinet);+export const Emoticon = createIcon(mdiEmoticonOutline);+export const Palette = createIcon(mdiPaletteOutline);+export const Bold = createIcon(mdiFormatBold);+export const Table = createIcon(mdiTable);+export const Pro = createIcon(mdiCrownOutline);+export const EncryptedBackup = createIcon(mdiDatabaseLockOutline);+export const Accent = createIcon(mdiPaletteSwatchOutline);++export const iOS = createIcon(mdiAppleIos);+export const Android = createIcon(mdiAndroid);+export const Windows = createIcon(mdiMicrosoftWindows);+export const Linux = createIcon(mdiLinux);+export const MacOS = createIcon(mdiApple);+export const Chrome = createIcon(mdiGoogleChrome);+export const Firefox = createIcon(mdiFirefox);+export const Safari = createIcon(mdiAppleSafari);++export const Embed = createIcon(mdiYoutube);+export const Anonymous = createIcon(mdiIncognito);+export const CloudLock = createIcon(mdiCloudLockOutline);+export const Timebomb = createIcon(mdiBomb);diff --git a/apps/web/src/theme/colorscheme/light.js b/apps/web/src/theme/colorscheme/light.jsindex d04213ab3..91b02d8d3 100644--- a/apps/web/src/theme/colorscheme/light.js+++ b/apps/web/src/theme/colorscheme/light.js@@ -6,6 +6,7 @@ class LightColorSchemeFactory {return {primary: accent,background: "white",+ bgTransparent: "#ffffff99",accent: "white",bgSecondary: "#f7f7f7",bgSecondaryText: "#5E5E5E",diff --git a/apps/web/src/theme/variants/button.js b/apps/web/src/theme/variants/button.jsindex f5d5761d3..fb5b26b0f 100644--- a/apps/web/src/theme/variants/button.js+++ b/apps/web/src/theme/variants/button.js@@ -26,7 +26,8 @@ class Default {borderRadius: "default",cursor: "pointer",p: 2,- transition: "filter 200ms ease-in",+ py: "7.5px",+ transition: "filter 200ms ease-in, box-shadow 200ms ease-out",":hover:not(:disabled)": {filter: "brightness(90%)",},@@ -51,7 +52,6 @@ class Primary {variant: "buttons.default",color: "static",bg: "primary",- px: 2,};}}@@ -142,7 +142,6 @@ class Tool {return {variant: "buttons.default",color: "text",- py: 1,backgroundColor: "bgSecondary",borderRadius: "default",":hover": {