Skip to content

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

feat: update settings ui to match mobile version

thecodrr241ec4d8fd9d
diff --git a/apps/web/src/components/dialogs/buydialog.js b/apps/web/src/components/dialogs/buydialog.js
index e430694c9..93df4a9cb 100644
--- a/apps/web/src/components/dialogs/buydialog.js
+++ b/apps/web/src/components/dialogs/buydialog.js
@@ -7,6 +7,9 @@ import { getCouponData, upgrade } from "../../common/checkout";
import getSymbolFromCurrency from "currency-symbol-map";
import { ANALYTICS_EVENTS, trackEvent } from "../../utils/analytics";
import { navigate } from "../../navigation";
+import ReactToggle from "react-toggle";
+import "react-toggle/style.css";
+import "../properties/toggle.css";
const premiumDetails = [
{
@@ -180,11 +183,12 @@ function BuyDialog(props) {
<Text variant="body" mr={1}>
Monthly
</Text>
- {plan === "monthly" ? (
- <Icon.ToggleUnchecked color="primary" />
- ) : (
- <Icon.ToggleChecked color="primary" />
- )}
+ <ReactToggle
+ size={20}
+ onChange={() => {}}
+ checked={plan !== "monthly"}
+ icons={false}
+ />
<Text variant="body" ml={1}>
Yearly
</Text>
diff --git a/apps/web/src/components/toggle/index.js b/apps/web/src/components/toggle/index.js
index bb684a2d3..13cc1f071 100644
--- a/apps/web/src/components/toggle/index.js
+++ b/apps/web/src/components/toggle/index.js
@@ -1,9 +1,11 @@
import React from "react";
import { showBuyDialog } from "../../common/dialog-controller";
import Tip from "../tip";
-import * as Icon from "../icons";
import { isUserPremium } from "../../hooks/use-is-user-premium";
import { Flex } from "rebass";
+import ReactToggle from "react-toggle";
+import "react-toggle/style.css";
+import "../properties/toggle.css";
function Toggle(props) {
const { title, onTip, offTip, isToggled, onToggled, onlyIf, premium } = props;
@@ -28,11 +30,12 @@ function Toggle(props) {
}}
>
<Tip text={title} tip={isToggled ? onTip : offTip} />
- {isToggled ? (
- <Icon.ToggleChecked size={30} sx={{ flexShrink: 0 }} color="primary" />
- ) : (
- <Icon.ToggleUnchecked size={30} sx={{ flexShrink: 0 }} />
- )}
+ <ReactToggle
+ size={20}
+ onChange={() => {}}
+ checked={isToggled}
+ icons={false}
+ />
</Flex>
);
}
diff --git a/apps/web/src/views/settings.js b/apps/web/src/views/settings.js
index facb2ad09..97adf03a7 100644
--- a/apps/web/src/views/settings.js
+++ b/apps/web/src/views/settings.js
@@ -801,15 +801,15 @@ function AccountStatus(props) {
mt={2}
>
{remainingDays > 0 && isPro
- ? `You are subscribed to the Pro plan.`
+ ? `Subscribed to Notesnook Pro.`
: remainingDays > 0 && isTrial
- ? "Your free trial is ongoing."
+ ? "Your free trial has started."
: isBeta
? "Your beta subscription has ended."
: isTrial
? "Your trial has ended."
: isPro
- ? "Your premium subscription has ended."
+ ? "Your Notesnook Pro subscription has ended."
: ""}
</Text>
{subtitle && <Text variant="subBody">{subtitle}</Text>}
@@ -920,24 +920,23 @@ function Header(props) {
const { title, isOpen, onClick } = props;
return (
<Flex
- sx={{ borderRadius: "default", cursor: "pointer" }}
- bg="bgSecondary"
- mt={2}
- p={2}
+ sx={{ borderBottom: "1px solid var(--border)", cursor: "pointer" }}
+ // mt={2}
+ py={2}
justifyContent="space-between"
onClick={onClick}
>
<Text
variant="subtitle"
- fontWeight="body"
- color={isOpen ? "primary" : "text"}
+ fontWeight={isOpen ? "bold" : "body"}
+ color={isOpen ? "primary" : "fontTertiary"}
>
{title}
</Text>
{isOpen ? (
<Icon.ChevronUp size={19} color="primary" />
) : (
- <Icon.ChevronDown size={19} />
+ <Icon.ChevronDown size={19} color="fontTertiary" />
)}
</Flex>
);