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
mobile: user profile
Ammar Ahmedae43d58a3818
diff --git a/apps/mobile/app/components/announcements/announcement.js b/apps/mobile/app/components/announcements/announcement.jsindex 4e9e058d2..2512ed45f 100644--- a/apps/mobile/app/components/announcements/announcement.js+++ b/apps/mobile/app/components/announcements/announcement.js@@ -23,12 +23,14 @@ import { View } from "react-native";import { useMessageStore } from "../../stores/use-message-store";import { useSelectionStore } from "../../stores/use-selection-store";import { allowedOnPlatform, renderItem } from "./functions";+import { getContainerBorder } from "../../utils/colors";export const Announcement = ({ color }) => {const { colors } = useThemeColors();const announcements = useMessageStore((state) => state.announcements);let announcement = announcements.length > 0 ? announcements[0] : null;const selectionMode = useSelectionStore((state) => state.selectionMode);+return !announcement || selectionMode ? null : (<Viewstyle={{@@ -45,7 +47,8 @@ export const Announcement = ({ color }) => {borderRadius: 10,overflow: "hidden",backgroundColor: colors.secondary.background,- paddingBottom: 12+ paddingBottom: 12,+ ...getContainerBorder(colors.secondary.background)}}><Viewdiff --git a/apps/mobile/app/components/announcements/cta.js b/apps/mobile/app/components/announcements/cta.jsindex 0613cd30e..2b6f95476 100644--- a/apps/mobile/app/components/announcements/cta.js+++ b/apps/mobile/app/components/announcements/cta.js@@ -103,7 +103,7 @@ export const Cta = ({ actions, style = {}, color, inline }) => {key={item.title}title={item.title}fontSize={SIZE.sm}- type="gray"+ type="plain"onPress={() => onPress(item)}width={null}height={30}@@ -149,7 +149,7 @@ export const Cta = ({ actions, style = {}, color, inline }) => {key={item.title}title={item.title}fontSize={SIZE.xs}- type="gray"+ type="plain"onPress={() => onPress(item)}width={null}height={30}diff --git a/apps/mobile/app/components/announcements/title.js b/apps/mobile/app/components/announcements/title.jsindex ed60205cc..9de105f5f 100644--- a/apps/mobile/app/components/announcements/title.js+++ b/apps/mobile/app/components/announcements/title.js@@ -54,7 +54,7 @@ export const Title = ({ text, style = {}, inline }) => {</Heading><Button- type="gray"+ type="plain"icon="close"height={null}onPress={() => {diff --git a/apps/mobile/app/components/app-lock-overlay/index.tsx b/apps/mobile/app/components/app-lock-overlay/index.tsxindex 4a15791bf..47e184995 100644--- a/apps/mobile/app/components/app-lock-overlay/index.tsx+++ b/apps/mobile/app/components/app-lock-overlay/index.tsx@@ -199,7 +199,7 @@ const AppLockedOverlay = () => {<IconButtonname="fingerprint"size={100}- customStyle={{+ style={{width: 100,height: 100,marginBottom: 20,diff --git a/apps/mobile/app/components/attachments/actions.tsx b/apps/mobile/app/components/attachments/actions.tsxindex 1f695cb44..36f61b85a 100644--- a/apps/mobile/app/components/attachments/actions.tsx+++ b/apps/mobile/app/components/attachments/actions.tsx@@ -50,7 +50,7 @@ import { openNote } from "../list-items/note/wrapper";import { DateMeta } from "../properties/date-meta";import { Button } from "../ui/button";import { Notice } from "../ui/notice";-import { PressableButton } from "../ui/pressable";+import { Pressable } from "../ui/pressable";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";@@ -291,7 +291,7 @@ const Actions = ({</Heading>{notes.map((item) => (- <PressableButton+ <PressableonPress={async () => {eSendEvent(eCloseSheet, contextId);await sleep(150);@@ -299,7 +299,7 @@ const Actions = ({await sleep(300);openNote(item, (item as any).type === "trash");}}- customStyle={{+ style={{paddingVertical: 12,alignItems: "flex-start",@@ -308,7 +308,7 @@ const Actions = ({key={item.id}><Paragraph size={SIZE.xs}>{item.title}</Paragraph>- </PressableButton>+ </Pressable>))}</></View>@@ -319,7 +319,7 @@ const Actions = ({key={item.name}buttonType={{text:- item.name === "Delete" || item.name === "PermDelete"+ item.name === "Delete"? colors.error.paragraph: colors.primary.paragraph}}@@ -327,7 +327,7 @@ const Actions = ({title={item.name}icon={item.icon}loading={loading?.name === item.name}- type="gray"+ type="plain"fontSize={SIZE.sm}style={{borderRadius: 0,diff --git a/apps/mobile/app/components/attachments/download-attachments.tsx b/apps/mobile/app/components/attachments/download-attachments.tsxindex 58d7b99f8..1a8bb33b6 100644--- a/apps/mobile/app/components/attachments/download-attachments.tsx+++ b/apps/mobile/app/components/attachments/download-attachments.tsx@@ -245,7 +245,7 @@ const DownloadAttachments = ({onPress={() => {close?.();}}- type="grayBg"+ type="secondary"title="No"/><Buttondiff --git a/apps/mobile/app/components/attachments/index.tsx b/apps/mobile/app/components/attachments/index.tsxindex bfeb57409..9563f8b58 100644--- a/apps/mobile/app/components/attachments/index.tsx+++ b/apps/mobile/app/components/attachments/index.tsx@@ -209,7 +209,7 @@ export const AttachmentDialog = ({ note }: { note?: Note }) => {) : (<IconButtonname="check-all"- customStyle={{+ style={{height: 40,width: 40,marginRight: 10@@ -222,7 +222,7 @@ export const AttachmentDialog = ({ note }: { note?: Note }) => {<IconButtonname="download"- customStyle={{+ style={{height: 40,width: 40}}@@ -265,7 +265,9 @@ export const AttachmentDialog = ({ note }: { note?: Note }) => {>{attachmentTypes.map((item) => (<Button- type={currentFilter === item.filterBy ? "grayAccent" : "gray"}+ type={+ currentFilter === item.filterBy ? "secondaryAccented" : "plain"+ }key={item.title}title={item.title}style={{diff --git a/apps/mobile/app/components/auth/auth-modal.js b/apps/mobile/app/components/auth/auth-modal.jsindex bd4fecf00..9f01684f2 100644--- a/apps/mobile/app/components/auth/auth-modal.js+++ b/apps/mobile/app/components/auth/auth-modal.js@@ -158,7 +158,7 @@ const AuthModal = () => {hideAuth();}}iconSize={16}- type="gray"+ type="plain"iconPosition="right"icon="chevron-right"height={25}diff --git a/apps/mobile/app/components/auth/forgot-password.js b/apps/mobile/app/components/auth/forgot-password.jsindex 846c320fe..d6e6fbd68 100644--- a/apps/mobile/app/components/auth/forgot-password.js+++ b/apps/mobile/app/components/auth/forgot-password.js@@ -113,7 +113,7 @@ export const ForgotPassword = () => {}}><IconButton- customStyle={{+ style={{width: null,height: null}}diff --git a/apps/mobile/app/components/auth/login.js b/apps/mobile/app/components/auth/login.jsindex a383b26bb..49110e51d 100644--- a/apps/mobile/app/components/auth/login.js+++ b/apps/mobile/app/components/auth/login.js@@ -103,7 +103,7 @@ export const Login = ({ changeMode }) => {justifyContent: "flex-end",paddingHorizontal: 20,backgroundColor: colors.secondary.background,- borderBottomWidth: 1,+ borderBottomWidth: 0.8,marginBottom: 12,borderBottomColor: colors.primary.border,alignSelf: deviceMode !== "mobile" ? "center" : undefined,@@ -222,7 +222,7 @@ export const Login = ({ changeMode }) => {textDecorationLine: "underline"}}fontSize={SIZE.xs}- type="gray"+ type="plain"/></>)}diff --git a/apps/mobile/app/components/auth/session-expired.js b/apps/mobile/app/components/auth/session-expired.jsindex c460751d0..b8ed963b8 100644--- a/apps/mobile/app/components/auth/session-expired.js+++ b/apps/mobile/app/components/auth/session-expired.js@@ -178,7 +178,7 @@ export const SessionExpired = () => {}}><IconButton- customStyle={{+ style={{width: 60,height: 60}}diff --git a/apps/mobile/app/components/auth/signup.js b/apps/mobile/app/components/auth/signup.jsindex 0243908a3..98448ce27 100644--- a/apps/mobile/app/components/auth/signup.js+++ b/apps/mobile/app/components/auth/signup.js@@ -111,7 +111,7 @@ export const Signup = ({ changeMode, trial }) => {paddingHorizontal: 20,backgroundColor: colors.secondary.background,marginBottom: 20,- borderBottomWidth: 1,+ borderBottomWidth: 0.8,borderBottomColor: colors.primary.border,alignSelf: deviceMode !== "mobile" ? "center" : undefined,borderWidth: deviceMode !== "mobile" ? 1 : null,diff --git a/apps/mobile/app/components/auth/two-factor.js b/apps/mobile/app/components/auth/two-factor.jsindex 03faf56ed..8bd69a3a3 100644--- a/apps/mobile/app/components/auth/two-factor.js+++ b/apps/mobile/app/components/auth/two-factor.js@@ -32,7 +32,7 @@ import { SIZE } from "../../utils/size";import { Button } from "../ui/button";import { IconButton } from "../ui/icon-button";import Input from "../ui/input";-import { PressableButton } from "../ui/pressable";+import { Pressable } from "../ui/pressable";import Seperator from "../ui/seperator";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";@@ -151,7 +151,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {}}><IconButton- customStyle={{+ style={{width: 70,height: 70}}@@ -183,7 +183,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {{currentMethod.method === "sms" || currentMethod.method === "email" ? (<ButtononPress={onSendCode}- type={seconds ? "gray" : "transparent"}+ type={seconds ? "plain" : "transparent"}title={sending? ""@@ -247,7 +247,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {<Buttontitle={secondaryMethodsText[currentMethod.method]}- type="gray"+ type="plain"onPress={onRequestSecondaryMethod}height={30}/>@@ -255,7 +255,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {) : (<>{getMethods().map((item) => (- <PressableButton+ <Pressablekey={item.title}onPress={() => {setCurrentMethod({@@ -263,7 +263,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {isPrimary: false});}}- customStyle={{+ style={{paddingHorizontal: 12,paddingVertical: 12,marginTop: 0,@@ -275,8 +275,8 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {}}><IconButton- type="grayAccent"- customStyle={{+ type="secondaryAccented"+ style={{width: 40,height: 40,marginRight: 10@@ -292,7 +292,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo }) => {><Paragraph size={SIZE.md}>{item.title}</Paragraph></View>- </PressableButton>+ </Pressable>))}</>)}diff --git a/apps/mobile/app/components/container/floating-button.tsx b/apps/mobile/app/components/container/floating-button.tsxindex 921851443..de9c7a090 100644--- a/apps/mobile/app/components/container/floating-button.tsx+++ b/apps/mobile/app/components/container/floating-button.tsx@@ -34,7 +34,7 @@ import { useSettingStore } from "../../stores/use-setting-store";import { getElevationStyle } from "../../utils/elevation";import { SIZE, normalize } from "../../utils/size";import NativeTooltip from "../../utils/tooltip";-import { PressableButton } from "../ui/pressable";+import { Pressable } from "../ui/pressable";interface FloatingButtonProps {title: string;@@ -116,11 +116,11 @@ const FloatingButton = ({animatedStyle]}>- <PressableButton+ <PressabletestID={notesnook.buttons.add}type="accent"accentColor={color}- customStyle={{+ style={{...getElevationStyle(5),borderRadius: 100}}@@ -145,7 +145,7 @@ const FloatingButton = ({size={SIZE.xxl}/></View>- </PressableButton>+ </Pressable></Animated.View>);};diff --git a/apps/mobile/app/components/dialog/dialog-buttons.js b/apps/mobile/app/components/dialog/dialog-buttons.jsindex 51543d37e..f0674a121 100644--- a/apps/mobile/app/components/dialog/dialog-buttons.js+++ b/apps/mobile/app/components/dialog/dialog-buttons.js@@ -25,6 +25,7 @@ import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";import Paragraph from "../ui/typography/paragraph";+import { getColorLinearShade } from "../../utils/colors";const DialogButtons = ({onPressPositive,@@ -35,7 +36,7 @@ const DialogButtons = ({doneText,positiveType}) => {- const { colors } = useThemeColors();+ const { colors, isDark } = useThemeColors();return (<View@@ -46,7 +47,13 @@ const DialogButtons = ({height: 60,borderBottomRightRadius: 10,borderBottomLeftRadius: 10,- paddingHorizontal: 12+ paddingHorizontal: 12,+ borderTopWidth: 0.7,+ borderTopColor: getColorLinearShade(+ colors.secondary.background,+ 0.05,+ isDark+ )}]}>@@ -80,7 +87,7 @@ const DialogButtons = ({onPress={onPressNegative}fontSize={SIZE.md}testID={notesnook.ids.default.dialog.no}- type="gray"+ type="plain"boldtitle={negativeTitle}/>diff --git a/apps/mobile/app/components/dialog/dialog-container.tsx b/apps/mobile/app/components/dialog/dialog-container.tsxindex db2584fc0..e583df59a 100644--- a/apps/mobile/app/components/dialog/dialog-container.tsx+++ b/apps/mobile/app/components/dialog/dialog-container.tsx@@ -22,6 +22,7 @@ import { View, ViewProps } from "react-native";import { DDS } from "../../services/device-detection";import { useThemeColors } from "@notesnook/theme";import { getElevationStyle } from "../../utils/elevation";+import { getContainerBorder } from "../../utils/colors";const DialogContainer = ({width,@@ -37,17 +38,15 @@ const DialogContainer = ({return (<View{...restProps}- style={[- {- ...getElevationStyle(5),- width: width || DDS.isTab ? 500 : "85%",- maxHeight: height || 450,- borderRadius: 10,- backgroundColor: colors.primary.background,- paddingTop: 12- },- style- ]}+ style={{+ ...getElevationStyle(5),+ width: width || DDS.isTab ? 500 : "85%",+ maxHeight: height || 450,+ borderRadius: 10,+ backgroundColor: colors.primary.background,+ paddingTop: 12,+ ...getContainerBorder(colors.secondary.background, 0.8, 0.05)+ }}/>);};diff --git a/apps/mobile/app/components/dialog/dialog-header.tsx b/apps/mobile/app/components/dialog/dialog-header.tsxindex a3c0f1771..c189b650e 100644--- a/apps/mobile/app/components/dialog/dialog-header.tsx+++ b/apps/mobile/app/components/dialog/dialog-header.tsx@@ -22,7 +22,7 @@ import { Text, View, ViewStyle } from "react-native";import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";-import { PressableButtonProps } from "../ui/pressable";+import { PressableProps } from "../ui/pressable";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";@@ -34,7 +34,7 @@ type DialogHeaderProps = {onPress?: () => void;loading?: boolean;title?: string;- type?: PressableButtonProps["type"];+ type?: PressableProps["type"];icon?: string;};paragraphColor?: string;@@ -86,7 +86,9 @@ const DialogHeader = ({>{title}{" "}{titlePart ? (- <Text style={{ color: colors.primary.accent }}>{titlePart}</Text>+ <Text style={{ color: colors.primary.accent }}>+ {titlePart}+ </Text>) : null}</Heading>@@ -101,7 +103,7 @@ const DialogHeader = ({fontSize={13}title={button.title}icon={button.icon}- type={button.type || "grayBg"}+ type={button.type || "secondary"}height={25}/>) : null}diff --git a/apps/mobile/app/components/dialog/functions.ts b/apps/mobile/app/components/dialog/functions.tsindex e7f601cbe..9bc39fe92 100644--- a/apps/mobile/app/components/dialog/functions.ts+++ b/apps/mobile/app/components/dialog/functions.ts@@ -29,8 +29,8 @@ type DialogInfo = {onClose?: () => void;positiveType?:| "transparent"- | "gray"- | "grayBg"+ | "plain"+ | "secondary"| "accent"| "inverted"| "shade"diff --git a/apps/mobile/app/components/dialogs/jump-to-section/index.tsx b/apps/mobile/app/components/dialogs/jump-to-section/index.tsxindex bd482afd0..9dd3da19f 100644--- a/apps/mobile/app/components/dialogs/jump-to-section/index.tsx+++ b/apps/mobile/app/components/dialogs/jump-to-section/index.tsx@@ -41,7 +41,7 @@ import {} from "../../../utils/events";import { SIZE } from "../../../utils/size";import BaseDialog from "../../dialog/base-dialog";-import { PressableButton } from "../../ui/pressable";+import { Pressable } from "../../ui/pressable";import Paragraph from "../../ui/typography/paragraph";const JumpToSectionDialog = () => {@@ -181,11 +181,11 @@ const JumpToSectionDialog = () => {>{groups?.map((item, index) => {return (- <PressableButton+ <Pressablekey={item.group.id}onPress={() => onPress(item)}type={currentIndex === index ? "accent" : "transparent"}- customStyle={{+ style={{minWidth: "20%",width: null,paddingHorizontal: 12,@@ -208,7 +208,7 @@ const JumpToSectionDialog = () => {>{item.group.title}</Paragraph>- </PressableButton>+ </Pressable>);})}</View>diff --git a/apps/mobile/app/components/dialogs/pdf-preview/index.js b/apps/mobile/app/components/dialogs/pdf-preview/index.jsindex 91c837e4e..1ca740a1f 100644--- a/apps/mobile/app/components/dialogs/pdf-preview/index.js+++ b/apps/mobile/app/components/dialogs/pdf-preview/index.js@@ -211,7 +211,7 @@ const PDFPreview = () => {color={colors.static.white}name="arrow-left"onPress={close}- customStyle={{+ style={{marginRight: 12}}size={SIZE.xxl}diff --git a/apps/mobile/app/components/dialogs/vault/index.js b/apps/mobile/app/components/dialogs/vault/index.jsindex fedbf1b5d..3fed83284 100644--- a/apps/mobile/app/components/dialogs/vault/index.js+++ b/apps/mobile/app/components/dialogs/vault/index.js@@ -53,6 +53,7 @@ import { Button } from "../../ui/button";import Input from "../../ui/input";import Seperator from "../../ui/seperator";import Paragraph from "../../ui/typography/paragraph";+import { getColorLinearShade } from "../../../utils/colors";export class VaultDialog extends Component {constructor(props) {@@ -858,10 +859,10 @@ export class VaultDialog extends Component {title="Biometric unlocking"iconColor={this.state.biometricUnlock- ? colors.selected.icon+ ? colors.selected.accent: colors.primary.icon}- type={this.state.biometricUnlock ? "transparent" : "selected"}+ type={this.state.biometricUnlock ? "transparent" : "plain"}/>) : null}</View>diff --git a/apps/mobile/app/components/header/left-menus.tsx b/apps/mobile/app/components/header/left-menus.tsxindex bf74e8677..e6aa0fcaf 100644--- a/apps/mobile/app/components/header/left-menus.tsx+++ b/apps/mobile/app/components/header/left-menus.tsx@@ -54,7 +54,7 @@ export const LeftMenus = ({return isTablet && !canGoBack ? null : (<IconButtontestID={notesnook.ids.default.header.buttons.left}- customStyle={{+ style={{justifyContent: "center",alignItems: "center",height: 40,diff --git a/apps/mobile/app/components/header/right-menus.tsx b/apps/mobile/app/components/header/right-menus.tsxindex f72c60de8..cfbb00bbe 100644--- a/apps/mobile/app/components/header/right-menus.tsx+++ b/apps/mobile/app/components/header/right-menus.tsx@@ -61,7 +61,7 @@ export const RightMenus = ({testID="icon-search"name="magnify"color={colors.primary.paragraph}- customStyle={styles.rightBtn}+ style={styles.rightBtn}/>) : null}@@ -108,7 +108,7 @@ export const RightMenus = ({}}name="dots-vertical"color={colors.primary.paragraph}- customStyle={styles.rightBtn}+ style={styles.rightBtn}/>}>@@ -119,7 +119,7 @@ export const RightMenus = ({justifyContent: "flex-start",borderRadius: 0}}- type="gray"+ type="plain"buttonType={{text: contextMenuColors.primary.paragraph}}diff --git a/apps/mobile/app/components/intro/welcome.js b/apps/mobile/app/components/intro/welcome.jsindex 3ba7622b8..3760b3651 100644--- a/apps/mobile/app/components/intro/welcome.js+++ b/apps/mobile/app/components/intro/welcome.js@@ -108,7 +108,7 @@ export const WelcomeNotice = () => {eSendEvent(eCloseLoading);}}iconSize={20}- type="gray"+ type="plain"iconPosition="right"icon="chevron-right"height={25}diff --git a/apps/mobile/app/components/list-items/headers/notebook-header.tsx b/apps/mobile/app/components/list-items/headers/notebook-header.tsxindex ff3767b47..134c10af8 100644--- a/apps/mobile/app/components/list-items/headers/notebook-header.tsx+++ b/apps/mobile/app/components/list-items/headers/notebook-header.tsx@@ -109,12 +109,12 @@ export const NotebookHeader = ({name={isPinnedToMenu ? "link-variant-off" : "link-variant"}onPress={onPinNotebook}tooltipText={"Create shortcut in side menu"}- customStyle={{+ style={{marginRight: 15,width: 40,height: 40}}- type={isPinnedToMenu ? "grayBg" : "grayBg"}+ type={isPinnedToMenu ? "secondary" : "secondary"}color={isPinnedToMenu ? colors.primary.accent : colors.primary.icon}size={SIZE.lg}/>@@ -123,9 +123,9 @@ export const NotebookHeader = ({onPress={onEditNotebook}tooltipText="Edit this notebook"name="pencil"- type="grayBg"+ type="secondary"color={colors.primary.icon}- customStyle={{+ style={{width: 40,height: 40}}diff --git a/apps/mobile/app/components/list-items/headers/section-header.tsx b/apps/mobile/app/components/list-items/headers/section-header.tsxindex 54276249c..344ebb419 100644--- a/apps/mobile/app/components/list-items/headers/section-header.tsx+++ b/apps/mobile/app/components/list-items/headers/section-header.tsx@@ -144,12 +144,12 @@ export const SectionHeader = React.memo<? 10: 0}}- type="gray"+ type="plain"iconPosition="right"/><IconButton- customStyle={{+ style={{width: 25,height: 25}}diff --git a/apps/mobile/app/components/list-items/note/index.tsx b/apps/mobile/app/components/list-items/note/index.tsxindex 567fe1302..20744e36e 100644--- a/apps/mobile/app/components/list-items/note/index.tsx+++ b/apps/mobile/app/components/list-items/note/index.tsx@@ -118,7 +118,7 @@ const NoteItem = ({key={item.id}height={25}icon={item.type === "notebook" ? "bookmark" : "book-outline"}- type="grayBg"+ type="secondary"fontSize={SIZE.xs}iconSize={SIZE.sm}textStyle={{@@ -287,7 +287,7 @@ const NoteItem = ({title={"#" + item.title}key={item.id}height={23}- type="gray"+ type="plain"textStyle={{textDecorationLine: "underline"}}@@ -397,7 +397,7 @@ const NoteItem = ({name="dots-horizontal"size={SIZE.xl}onPress={() => !noOpen && Properties.present(item)}- customStyle={{+ style={{justifyContent: "center",height: 35,width: 35,diff --git a/apps/mobile/app/components/list-items/notebook/index.tsx b/apps/mobile/app/components/list-items/notebook/index.tsxindex 80d1e825d..5dde07b87 100644--- a/apps/mobile/app/components/list-items/notebook/index.tsx+++ b/apps/mobile/app/components/list-items/notebook/index.tsx@@ -198,7 +198,7 @@ export const NotebookItem = ({testID={notesnook.ids.notebook.menu}size={SIZE.xl}onPress={() => Properties.present(item)}- customStyle={{+ style={{justifyContent: "center",height: 35,width: 35,diff --git a/apps/mobile/app/components/list-items/reminder/index.tsx b/apps/mobile/app/components/list-items/reminder/index.tsxindex addc70eaf..ac81c8390 100644--- a/apps/mobile/app/components/list-items/reminder/index.tsx+++ b/apps/mobile/app/components/list-items/reminder/index.tsx@@ -176,7 +176,7 @@ const ReminderItem = React.memo(name="dots-horizontal"size={SIZE.xl}onPress={() => Properties.present(item, [], isSheet)}- customStyle={{+ style={{justifyContent: "center",height: 35,width: 35,diff --git a/apps/mobile/app/components/list-items/selection-wrapper/index.tsx b/apps/mobile/app/components/list-items/selection-wrapper/index.tsxindex 52922e184..5e846193d 100644--- a/apps/mobile/app/components/list-items/selection-wrapper/index.tsx+++ b/apps/mobile/app/components/list-items/selection-wrapper/index.tsx@@ -21,7 +21,7 @@ import { useThemeColors } from "@notesnook/theme";import React, { PropsWithChildren, useRef } from "react";import { useIsCompactModeEnabled } from "../../../hooks/use-is-compact-mode-enabled";import { useSelectionStore } from "../../../stores/use-selection-store";-import { PressableButton } from "../../ui/pressable";+import { Pressable } from "../../ui/pressable";import { Filler } from "./back-fill";import { SelectionIcon } from "./selection";import { Item, TrashItem } from "@notesnook/core";@@ -60,7 +60,7 @@ const SelectionWrapper = ({};return (- <PressableButton+ <PressablecustomColor={isSheet ? colors.primary.hover : "transparent"}testID={testID}onLongPress={onLongPress}@@ -68,7 +68,7 @@ const SelectionWrapper = ({customSelectedColor={colors.primary.hover}customAlpha={!isDark ? -0.02 : 0.02}customOpacity={1}- customStyle={{+ style={{flexDirection: "row",justifyContent: "space-between",alignItems: "center",@@ -83,7 +83,7 @@ const SelectionWrapper = ({{item.type === "note" ? <Filler item={item} color={color} /> : null}<SelectionIcon item={item} />{children}- </PressableButton>+ </Pressable>);};diff --git a/apps/mobile/app/components/list-items/tag/index.tsx b/apps/mobile/app/components/list-items/tag/index.tsxindex 2906c4af8..eabbf3595 100644--- a/apps/mobile/app/components/list-items/tag/index.tsx+++ b/apps/mobile/app/components/list-items/tag/index.tsx@@ -105,7 +105,7 @@ const TagItem = React.memo(Properties.present(item);}}testID={notesnook.ids.tag.menu}- customStyle={{+ style={{justifyContent: "center",height: 35,width: 35,diff --git a/apps/mobile/app/components/list/card.tsx b/apps/mobile/app/components/list/card.tsxindex ea0ec9954..b2c2405f9 100644--- a/apps/mobile/app/components/list/card.tsx+++ b/apps/mobile/app/components/list/card.tsx@@ -24,7 +24,7 @@ import { useMessageStore } from "../../stores/use-message-store";import { useThemeColors } from "@notesnook/theme";import { hexToRGBA } from "../../utils/colors";import { SIZE } from "../../utils/size";-import { PressableButton } from "../ui/pressable";+import { Pressable } from "../ui/pressable";import Paragraph from "../ui/typography/paragraph";export const Card = ({ color }: { color?: string }) => {@@ -41,10 +41,10 @@ export const Card = ({ color }: { color?: string }) => {width: "95%"}}>- <PressableButton+ <PressableonPress={messageBoardState.onPress}- type="gray"- customStyle={{+ type="plain"+ style={{paddingVertical: 12,flexDirection: "row",alignItems: "center",@@ -122,7 +122,7 @@ export const Card = ({ color }: { color?: string }) => {/></View>)}- </PressableButton>+ </Pressable></View>);};diff --git a/apps/mobile/app/components/list/empty.tsx b/apps/mobile/app/components/list/empty.tsxindex b718497eb..529db6fdb 100644--- a/apps/mobile/app/components/list/empty.tsx+++ b/apps/mobile/app/components/list/empty.tsx@@ -98,13 +98,13 @@ export const Empty = React.memo(function Empty({{placeholder?.button && (<ButtontestID={notesnook.buttons.add}- type="grayAccent"+ type="accent"title={placeholder?.button}iconPosition="right"icon="arrow-right"onPress={placeholder?.action}buttonType={{- text: color || colors.primary.accent+ text: "white"}}style={{alignSelf: "flex-start",diff --git a/apps/mobile/app/components/merge-conflicts/index.js b/apps/mobile/app/components/merge-conflicts/index.jsindex 18cff390e..28161113a 100644--- a/apps/mobile/app/components/merge-conflicts/index.js+++ b/apps/mobile/app/components/merge-conflicts/index.js@@ -190,7 +190,7 @@ const MergeConflicts = () => {setDialogVisible(true);}}title="Save a copy"- type="grayBg"+ type="secondary"height={30}style={{borderRadius: 100,diff --git a/apps/mobile/app/components/premium/component.js b/apps/mobile/app/components/premium/component.jsindex 45495cbbd..138267d88 100644--- a/apps/mobile/app/components/premium/component.js+++ b/apps/mobile/app/components/premium/component.js@@ -98,7 +98,7 @@ export const Component = ({ close, promo }) => {onPress={() => {close();}}- customStyle={{+ style={{position: "absolute",right: DDS.isTab ? 30 : 15,top: Platform.OS === "ios" ? 0 : 30,@@ -219,7 +219,7 @@ export const Component = ({ close, promo }) => {title={promo ? promo.text : user ? "See all plans" : "Sign up for free"}- type={userCanRequestTrial ? "grayAccent" : "accent"}+ type={userCanRequestTrial ? "secondaryAccented" : "accent"}width={250}style={{paddingHorizontal: 12,diff --git a/apps/mobile/app/components/premium/expiring.js b/apps/mobile/app/components/premium/expiring.jsindex af99e2d08..23532328f 100644--- a/apps/mobile/app/components/premium/expiring.js+++ b/apps/mobile/app/components/premium/expiring.js@@ -186,7 +186,7 @@ export const Expiring = () => {{status.extend && (<Button- type="gray"+ type="plain"title="Not sure yet? Extend trial for 7 days"textStyle={{textDecorationLine: "underline"diff --git a/apps/mobile/app/components/premium/pricing-item.tsx b/apps/mobile/app/components/premium/pricing-item.tsxindex 2438f1e83..38c147a0d 100644--- a/apps/mobile/app/components/premium/pricing-item.tsx+++ b/apps/mobile/app/components/premium/pricing-item.tsx@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { Platform, View } from "react-native";import { SIZE } from "../../utils/size";-import { PressableButton } from "../ui/pressable";+import { Pressable } from "../ui/pressable";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";import RNIap from "react-native-iap";@@ -42,10 +42,10 @@ export const PricingItem = ({compact?: boolean;}) => {return (- <PressableButton+ <PressableonPress={onPress}- type="grayBg"- customStyle={{+ type="secondary"+ style={{flexDirection: "row",justifyContent: "space-between",alignItems: "center",@@ -95,6 +95,6 @@ export const PricingItem = ({: "/month"}</Paragraph></View>- </PressableButton>+ </Pressable>);};diff --git a/apps/mobile/app/components/premium/pricing-plans.tsx b/apps/mobile/app/components/premium/pricing-plans.tsxindex a136a354e..a50dba3c5 100644--- a/apps/mobile/app/components/premium/pricing-plans.tsx+++ b/apps/mobile/app/components/premium/pricing-plans.tsx@@ -328,7 +328,7 @@ export const PricingPlans = ({}}}title={"Try free for 14 days"}- type="grayAccent"+ type="secondaryAccented"width={250}style={{paddingHorizontal: 12,diff --git a/apps/mobile/app/components/properties/color-tags.tsx b/apps/mobile/app/components/properties/color-tags.tsxindex dfedad84c..6d98e8d6e 100644--- a/apps/mobile/app/components/properties/color-tags.tsx+++ b/apps/mobile/app/components/properties/color-tags.tsx@@ -34,8 +34,8 @@ import { refreshNotesPage } from "../../utils/events";import { SIZE } from "../../utils/size";import ColorPicker from "../dialogs/color-picker";import { Button } from "../ui/button";-import { PressableButton } from "../ui/pressable";import NativeTooltip from "../../utils/tooltip";+import { Pressable } from "../ui/pressable";const ColorItem = ({ item, note }: { item: Color; note: Note }) => {const { colors } = useThemeColors();@@ -64,7 +64,7 @@ const ColorItem = ({ item, note }: { item: Color; note: Note }) => {};return (- <PressableButton+ <Pressabletype="accent"accentColor={item.colorCode}accentText={colors.static.white}@@ -74,7 +74,7 @@ const ColorItem = ({ item, note }: { item: Color; note: Note }) => {onLongPress={(event) => {NativeTooltip.show(event, item.title, NativeTooltip.POSITIONS.TOP);}}- customStyle={{+ style={{width: 35,height: 35,borderRadius: 100,@@ -86,7 +86,7 @@ const ColorItem = ({ item, note }: { item: Color; note: Note }) => {{isLinked ? (<Icon testID="icon-check" name="check" color="white" size={SIZE.lg} />) : null}- </PressableButton>+ </Pressable>);};@@ -143,7 +143,7 @@ export const ColorTags = ({ item }: { item: Note }) => {text: colors.primary.accent}}title="Add color"- type="grayBg"+ type="secondary"icon="plus"iconPosition="right"height={30}@@ -155,8 +155,8 @@ export const ColorTags = ({ item }: { item: Note }) => {}}/>) : (- <PressableButton- customStyle={{+ <Pressable+ style={{width: 35,height: 35,borderRadius: 100,@@ -164,7 +164,7 @@ export const ColorTags = ({ item }: { item: Note }) => {alignItems: "center",marginRight: 5}}- type="grayBg"+ type="secondary"onPress={() => {useSettingStore.getState().setSheetKeyboardHandler(false);setVisible(true);@@ -176,7 +176,7 @@ export const ColorTags = ({ item }: { item: Note }) => {color={colors.primary.icon}size={SIZE.lg}/>- </PressableButton>+ </Pressable>)}/>diff --git a/apps/mobile/app/components/properties/items.js b/apps/mobile/app/components/properties/items.jsindex 4dec64c4c..7b063a4e2 100644--- a/apps/mobile/app/components/properties/items.js+++ b/apps/mobile/app/components/properties/items.js@@ -26,7 +26,7 @@ import { useSettingStore } from "../../stores/use-setting-store";import { useThemeColors } from "@notesnook/theme";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";-import { PressableButton } from "../ui/pressable";+import { Pressable } from "../ui/pressable";import Paragraph from "../ui/typography/paragraph";export const Items = ({ item, buttons, close }) => {@@ -54,10 +54,10 @@ export const Items = ({ item, buttons, close }) => {marginBottom: 10}}>- <PressableButton+ <PressableonPress={item.func}- type={item.on ? "shade" : "grayBg"}- customStyle={{+ type={item.on ? "shade" : "secondary"}+ style={{height: columnItemWidth - 12,width: columnItemWidth - 12,borderRadius: 10,@@ -80,7 +80,7 @@ export const Items = ({ item, buttons, close }) => {: colors.secondary.icon}/>- </PressableButton>+ </Pressable><Paragraphsize={SIZE.xs}@@ -105,7 +105,7 @@ export const Items = ({ item, buttons, close }) => {onPress={item.func}title={item.title}icon={item.icon}- type={item.on ? "shade" : "gray"}+ type={item.on ? "shade" : "plain"}fontSize={SIZE.sm}style={{borderRadius: 0,@@ -119,22 +119,22 @@ export const Items = ({ item, buttons, close }) => {const renderTopBarItem = (item, index) => {const isLast = index === topBarItems.length;return (- <PressableButton+ <PressableonPress={item.func}key={item.id}testID={"icon-" + item.id}activeOpacity={1}- customStyle={{+ style={{alignSelf: "flex-start",marginRight: isLast ? 0 : 10,paddingHorizontal: 0,width: topBarItemWidth}}>- <PressableButton+ <PressableonPress={item.func}- type={item.on ? "shade" : "gray"}- customStyle={{+ type={item.on ? "shade" : "plain"}+ style={{height: topBarItemWidth,width: topBarItemWidth,justifyContent: "center",@@ -157,7 +157,7 @@ export const Items = ({ item, buttons, close }) => {: colors.secondary.icon}/>- </PressableButton>+ </Pressable><ParagraphtextBreakStrategy="simple"@@ -166,7 +166,7 @@ export const Items = ({ item, buttons, close }) => {>{item.title}</Paragraph>- </PressableButton>+ </Pressable>);};diff --git a/apps/mobile/app/components/properties/notebooks.js b/apps/mobile/app/components/properties/notebooks.jsindex abbf38221..b680bcbe8 100644--- a/apps/mobile/app/components/properties/notebooks.js+++ b/apps/mobile/app/components/properties/notebooks.js@@ -28,7 +28,7 @@ import { eClearEditor } from "../../utils/events";import { SIZE } from "../../utils/size";import { Button } from "../ui/button";import Heading from "../ui/typography/heading";-import { PressableButton } from "../ui/pressable";+import { Pressable } from "../ui/pressable";export default function Notebooks({ note, close, full }) {const { colors } = useThemeColors();@@ -48,15 +48,15 @@ export default function Notebooks({ note, close, full }) {};const renderItem = (item) => (- <PressableButton+ <Pressablekey={item.id}onPress={() => {navigateNotebook(item.id);eSendEvent(eClearEditor);close();}}- type={full ? "transparent" : "grayBg"}- customStyle={{+ type={full ? "transparent" : "secondary"}+ style={{justifyContent: "flex-start",paddingHorizontal: 12,flexDirection: "row",@@ -85,7 +85,7 @@ export default function Notebooks({ note, close, full }) {>{item.title}</Heading>- </PressableButton>+ </Pressable>);return noteNotebooks.length === 0 ? null : (@@ -110,7 +110,7 @@ export default function Notebooks({ note, close, full }) {paddingHorizontal: 0,backgroundColor: "transparent"}}- type="gray"+ type="plain"textStyle={{textDecorationLine: "underline"}}diff --git a/apps/mobile/app/components/properties/synced.js b/apps/mobile/app/components/properties/synced.jsindex 205ce31b4..1cd2a0871 100644--- a/apps/mobile/app/components/properties/synced.js+++ b/apps/mobile/app/components/properties/synced.js@@ -102,7 +102,7 @@ export const Synced = ({ item, close }) => {title="Learn more"fontSize={SIZE.xs}height={30}- type="grayAccent"+ type="secondaryAccented"/></View>) : null;diff --git a/apps/mobile/app/components/properties/tags.js b/apps/mobile/app/components/properties/tags.jsindex d118aefc2..efc666da7 100644--- a/apps/mobile/app/components/properties/tags.js+++ b/apps/mobile/app/components/properties/tags.js@@ -52,7 +52,7 @@ export const Tags = ({ item, close }) => {text: colors.primary.accent}}title="Add tag"- type="grayBg"+ type="secondary"icon="plus"iconPosition="right"height={30}@@ -103,7 +103,7 @@ const TagItem = ({ tag, close }) => {<ButtononPress={onPress}title={"#" + tag}- type="grayBg"+ type="secondary"height={20}fontSize={SIZE.xs}style={style}diff --git a/apps/mobile/app/components/selection-header/index.tsx b/apps/mobile/app/components/selection-header/index.tsxindex c0170f3a4..197407a76 100644--- a/apps/mobile/app/components/selection-header/index.tsx+++ b/apps/mobile/app/components/selection-header/index.tsx@@ -155,7 +155,7 @@ export const SelectionHeader = React.memo(}}><IconButton- customStyle={{+ style={{justifyContent: "center",alignItems: "center",height: 40,@@ -163,7 +163,7 @@ export const SelectionHeader = React.memo(borderRadius: 100,marginRight: 10}}- type="grayBg"+ type="secondary"onPress={() => {clearSelection();}}@@ -203,7 +203,7 @@ export const SelectionHeader = React.memo(}}tooltipText="Select all"tooltipPosition={4}- customStyle={{+ style={{marginLeft: 10}}color={@@ -220,7 +220,7 @@ export const SelectionHeader = React.memo(await sleep(100);ManageTagsSheet.present(selectedItemsList);}}- customStyle={{+ style={{marginLeft: 10}}color={colors.primary.icon}@@ -236,7 +236,7 @@ export const SelectionHeader = React.memo(}}tooltipText="Export"tooltipPosition={4}- customStyle={{+ style={{marginLeft: 10}}color={colors.primary.paragraph}@@ -248,7 +248,7 @@ export const SelectionHeader = React.memo(onPress={async () => {MoveNoteSheet.present();}}- customStyle={{+ style={{marginLeft: 10}}tooltipText="Add to notebooks"@@ -271,7 +271,7 @@ export const SelectionHeader = React.memo(clearSelection();}}}- customStyle={{+ style={{marginLeft: 10}}tooltipText={`Remove from Notebook`}@@ -286,7 +286,7 @@ export const SelectionHeader = React.memo({focusedRouteId === "Favorites" ? (<IconButtononPress={addToFavorite}- customStyle={{+ style={{marginLeft: 10}}tooltipText="Remove from favorites"@@ -299,7 +299,7 @@ export const SelectionHeader = React.memo({type === "trash" ? null : (<IconButton- customStyle={{+ style={{marginLeft: 10}}onPress={() => {@@ -322,7 +322,7 @@ export const SelectionHeader = React.memo({type === "trash" ? (<><IconButton- customStyle={{+ style={{marginLeft: 10}}color={colors.primary.paragraph}@@ -334,7 +334,7 @@ export const SelectionHeader = React.memo(/><IconButton- customStyle={{+ style={{marginLeft: 10}}color={colors.primary.paragraph}diff --git a/apps/mobile/app/components/sheet-provider/index.js b/apps/mobile/app/components/sheet-provider/index.jsindex db07f89c9..c4f6e917a 100644--- a/apps/mobile/app/components/sheet-provider/index.js+++ b/apps/mobile/app/components/sheet-provider/index.js@@ -177,7 +177,7 @@ const SheetProvider = ({ context = "global" }) => {data.valueArray.map((v) => (<Buttontitle={v}- type="gray"+ type="plain"key={v}textStyle={{ fontWeight: "normal" }}fontSize={SIZE.sm}diff --git a/apps/mobile/app/components/sheets/add-to/index.tsx b/apps/mobile/app/components/sheets/add-to/index.tsxindex 91eef0caf..e6d851428 100644--- a/apps/mobile/app/components/sheets/add-to/index.tsx+++ b/apps/mobile/app/components/sheets/add-to/index.tsx@@ -192,12 +192,12 @@ const MoveNoteSheet = ({><IconButtonname="restore"- type="grayAccent"+ type="secondaryAccented"onPress={() => {const items = note ? [note.id] : selectedItemsList;updateInitialSelectionState(items);}}- customStyle={{+ style={{width: 40,height: 40}}diff --git a/apps/mobile/app/components/sheets/add-to/notebook-item.tsx b/apps/mobile/app/components/sheets/add-to/notebook-item.tsxindex e08f33daf..e1a3b5d8f 100644--- a/apps/mobile/app/components/sheets/add-to/notebook-item.tsx+++ b/apps/mobile/app/components/sheets/add-to/notebook-item.tsx@@ -26,7 +26,7 @@ import { useNotebook } from "../../../hooks/use-notebook";import useNavigationStore from "../../../stores/use-navigation-store";import { SIZE } from "../../../utils/size";import { IconButton } from "../../ui/icon-button";-import { PressableButton } from "../../ui/pressable";+import { Pressable } from "../../ui/pressable";import Paragraph from "../../ui/typography/paragraph";import { AddNotebookSheet } from "../add-notebook";import {@@ -108,7 +108,7 @@ export const NotebookItem = ({width: "100%"}}>- <PressableButton+ <Pressabletype={"transparent"}onLongPress={() => {if (!item) return;@@ -129,7 +129,7 @@ export const NotebookItem = ({}}testID={`add-to-notebook-item-${currentLevel}-${index}`}onPress={onPress}- customStyle={{+ style={{justifyContent: "space-between",width: "100%",alignItems: "center",@@ -158,7 +158,7 @@ export const NotebookItem = ({left={0}bottom={0}right={0}- customStyle={{+ style={{width: 35,height: 35}}@@ -180,7 +180,7 @@ export const NotebookItem = ({left={0}bottom={0}right={0}- customStyle={{+ style={{width: 40,height: 40}}@@ -219,7 +219,7 @@ export const NotebookItem = ({) : null}<IconButtonname="plus"- customStyle={{+ style={{width: 40 * fontScale,height: 40 * fontScale}}@@ -236,7 +236,7 @@ export const NotebookItem = ({size={SIZE.xl}/></View>- </PressableButton>+ </Pressable>{!expanded? nulldiff --git a/apps/mobile/app/components/sheets/export-notes/index.tsx b/apps/mobile/app/components/sheets/export-notes/index.tsxindex 29b429e3d..c4965794f 100644--- a/apps/mobile/app/components/sheets/export-notes/index.tsx+++ b/apps/mobile/app/components/sheets/export-notes/index.tsx@@ -43,7 +43,7 @@ import DialogHeader from "../../dialog/dialog-header";import { ProTag } from "../../premium/pro-tag";import { Button } from "../../ui/button";import { IconButton } from "../../ui/icon-button";-import { PressableButton } from "../../ui/pressable";+import { Pressable } from "../../ui/pressable";import Seperator from "../../ui/seperator";import Heading from "../../ui/typography/heading";import Paragraph from "../../ui/typography/paragraph";@@ -183,9 +183,9 @@ const ExportNotesSheet = ({actions.map((item) => (<Fragment key={item.title}><Seperator half />- <PressableButton+ <PressableonPress={item.func}- customStyle={{+ style={{width: "100%",alignItems: "center",flexDirection: "row",@@ -232,7 +232,7 @@ const ExportNotesSheet = ({{item.desc}</Paragraph></View>- </PressableButton>+ </Pressable></Fragment>))) : (@@ -263,7 +263,7 @@ const ExportNotesSheet = ({name="export"color={colors.primary.icon}size={50}- customStyle={{+ style={{width: 70,height: 70}}@@ -316,7 +316,7 @@ const ExportNotesSheet = ({/><Buttontitle="Share"- type="grayAccent"+ type="secondaryAccented"width={250}fontSize={SIZE.md}style={{@@ -340,7 +340,7 @@ const ExportNotesSheet = ({/><Buttontitle="Export in another format"- type="grayAccent"+ type="secondaryAccented"width={250}fontSize={SIZE.md}style={{diff --git a/apps/mobile/app/components/sheets/manage-tags/index.tsx b/apps/mobile/app/components/sheets/manage-tags/index.tsxindex c386a8265..ea56ce1bc 100644--- a/apps/mobile/app/components/sheets/manage-tags/index.tsx+++ b/apps/mobile/app/components/sheets/manage-tags/index.tsx@@ -44,7 +44,7 @@ import { useRelationStore } from "../../../stores/use-relation-store";import { useTagStore } from "../../../stores/use-tag-store";import { SIZE } from "../../../utils/size";import Input from "../../ui/input";-import { PressableButton } from "../../ui/pressable";+import { Pressable } from "../../ui/pressable";import Heading from "../../ui/typography/heading";import Paragraph from "../../ui/typography/paragraph";@@ -283,9 +283,9 @@ const ManageTagsSheet = (props: {/>{query && !queryExists ? (- <PressableButton+ <Pressablekey={"query_item"}- customStyle={{+ style={{flexDirection: "row",marginVertical: 5,justifyContent: "space-between",@@ -298,7 +298,7 @@ const ManageTagsSheet = (props: {Add {'"' + "#" + query + '"'}</Heading><Icon name="plus" color={colors.selected.icon} size={SIZE.lg} />- </PressableButton>+ </Pressable>) : null}<FlatList@@ -362,9 +362,9 @@ const TagItem = ({);return !tag ? null : (- <PressableButton+ <Pressablekey={tag?.id}- customStyle={{+ style={{flexDirection: "row",marginVertical: 5,justifyContent: "flex-start",@@ -374,7 +374,7 @@ const TagItem = ({if (!tag) return;onPress(tag.id);}}- type="gray"+ type="plain">{!tag ? null : (<Icon@@ -418,6 +418,6 @@ const TagItem = ({}}/>)}- </PressableButton>+ </Pressable>);};diff --git a/apps/mobile/app/components/sheets/move-notes/movenote.tsx b/apps/mobile/app/components/sheets/move-notes/movenote.tsxindex e8dd469ba..fd18fc202 100644--- a/apps/mobile/app/components/sheets/move-notes/movenote.tsx+++ b/apps/mobile/app/components/sheets/move-notes/movenote.tsx@@ -35,7 +35,7 @@ import { Dialog } from "../../dialog";import DialogHeader from "../../dialog/dialog-header";import { Button } from "../../ui/button";import { IconButton } from "../../ui/icon-button";-import { PressableButton } from "../../ui/pressable";+import { Pressable } from "../../ui/pressable";import Seperator from "../../ui/seperator";import Paragraph from "../../ui/typography/paragraph";@@ -166,7 +166,7 @@ const SelectableNoteItem = React.memo();return exists ? null : (- <PressableButton+ <PressabletestID="listitem.select"onPress={() => {if (!item) return;@@ -175,7 +175,7 @@ const SelectableNoteItem = React.memo(.markAs(item, selected ? "deselected" : "selected");}}type={"transparent"}- customStyle={{+ style={{paddingVertical: 12,flexDirection: "row",width: "100%",@@ -186,7 +186,7 @@ const SelectableNoteItem = React.memo({!item ? null : (<><IconButton- customStyle={{+ style={{backgroundColor: "transparent",marginRight: 5}}@@ -227,7 +227,7 @@ const SelectableNoteItem = React.memo(</View></>)}- </PressableButton>+ </Pressable>);});diff --git a/apps/mobile/app/components/sheets/notebook-sheet/index.tsx b/apps/mobile/app/components/sheets/notebook-sheet/index.tsxindex 3c1401f48..3c4bef89c 100644--- a/apps/mobile/app/components/sheets/notebook-sheet/index.tsx+++ b/apps/mobile/app/components/sheets/notebook-sheet/index.tsx@@ -40,7 +40,7 @@ import { findRootNotebookId } from "../../../utils/notebooks";import { SIZE, normalize } from "../../../utils/size";import { Properties } from "../../properties";import { IconButton } from "../../ui/icon-button";-import { PressableButton } from "../../ui/pressable";+import { Pressable } from "../../ui/pressable";import Paragraph from "../../ui/typography/paragraph";import { AddNotebookSheet } from "../add-notebook";import Sort from "../sort";@@ -208,11 +208,11 @@ export const NotebookSheet = () => {marginTop: -80}}>- <PressableButton+ <PressabletestID={notesnook.buttons.add}type="accent"onPress={openEditor}- customStyle={{+ style={{borderRadius: 100}}>@@ -226,7 +226,7 @@ export const NotebookSheet = () => {><Icon name="plus" color="white" size={SIZE.xxl} /></View>- </PressableButton>+ </Pressable></View><Viewstyle={{@@ -254,7 +254,7 @@ export const NotebookSheet = () => {{enabled ? (<><IconButton- customStyle={{+ style={{marginLeft: 10,width: 40 * fontScale,height: 40 * fontScale@@ -279,7 +279,7 @@ export const NotebookSheet = () => {/><IconButton- customStyle={{+ style={{marginLeft: 10,width: 40 * fontScale,height: 40 * fontScale@@ -314,7 +314,7 @@ export const NotebookSheet = () => {testID="group-topic-button"color={colors.primary.icon}size={22}- customStyle={{+ style={{width: 40 * fontScale,height: 40 * fontScale}}@@ -328,7 +328,7 @@ export const NotebookSheet = () => {testID="add-notebook-button"color={colors.primary.icon}size={22}- customStyle={{+ style={{width: 40 * fontScale,height: 40 * fontScale}}@@ -347,7 +347,7 @@ export const NotebookSheet = () => {}}color={colors.primary.icon}size={22}- customStyle={{+ style={{width: 40 * fontScale,height: 40 * fontScale}}@@ -430,7 +430,7 @@ const NotebookItem = ({width: "100%"}}>- <PressableButton+ <Pressabletype={isSelected || isFocused ? "selected" : "transparent"}onLongPress={() => {if (enabled || !item) return;@@ -453,7 +453,7 @@ const NotebookItem = ({}NotebookScreen.navigate(item, true);}}- customStyle={{+ style={{justifyContent: "space-between",width: "100%",alignItems: "center",@@ -480,7 +480,7 @@ const NotebookItem = ({left={0}bottom={0}right={0}- customStyle={{+ style={{width: 35,height: 35}}@@ -503,7 +503,7 @@ const NotebookItem = ({left={0}bottom={0}right={0}- customStyle={{+ style={{width: 35,height: 35,marginRight: 5@@ -540,7 +540,7 @@ const NotebookItem = ({) : null}<IconButtonname="dots-horizontal"- customStyle={{+ style={{width: 40 * fontScale,height: 40 * fontScale}}@@ -556,7 +556,7 @@ const NotebookItem = ({size={SIZE.xl}/></View>- </PressableButton>+ </Pressable>{!expanded? nulldiff --git a/apps/mobile/app/components/sheets/rate-app/index.js b/apps/mobile/app/components/sheets/rate-app/index.jsindex 43d9e74b7..a14c35f6e 100644--- a/apps/mobile/app/components/sheets/rate-app/index.js+++ b/apps/mobile/app/components/sheets/rate-app/index.js@@ -126,7 +126,7 @@ const RateAppSheet = () => {onPress={onClose}fontSize={SIZE.md}width="48%"- type="grayBg"+ type="secondary"title="Later"/></View>diff --git a/apps/mobile/app/components/sheets/recovery-key/index.js b/apps/mobile/app/components/sheets/recovery-key/index.jsindex 49626c798..e61a819a7 100644--- a/apps/mobile/app/components/sheets/recovery-key/index.js+++ b/apps/mobile/app/components/sheets/recovery-key/index.js@@ -292,7 +292,7 @@ class RecoveryKeySheet extends React.Component {icon="content-copy"title="Copy to clipboard"width="100%"- type="grayAccent"+ type="secondaryAccented"fontSize={SIZE.md}/><Seperator />@@ -300,7 +300,7 @@ class RecoveryKeySheet extends React.Component {title="Save QR-Code to gallery"onPress={this.saveQRCODE}width="100%"- type="grayAccent"+ type="secondaryAccented"fontSize={SIZE.md}icon="qrcode"/>@@ -309,7 +309,7 @@ class RecoveryKeySheet extends React.Component {onPress={this.saveToTextFile}title="Save to text file"width="100%"- type="grayAccent"+ type="secondaryAccented"icon="text"fontSize={SIZE.md}/>@@ -319,7 +319,7 @@ class RecoveryKeySheet extends React.Component {onPress={this.shareFile}title="Share to Cloud"width="100%"- type="grayAccent"+ type="secondaryAccented"icon="cloud"fontSize={SIZE.md}/>diff --git a/apps/mobile/app/components/sheets/relations-list/index.tsx b/apps/mobile/app/components/sheets/relations-list/index.tsxindex 804b98a18..62643d560 100644--- a/apps/mobile/app/components/sheets/relations-list/index.tsx+++ b/apps/mobile/app/components/sheets/relations-list/index.tsx@@ -33,7 +33,7 @@ import DialogHeader from "../../dialog/dialog-header";import List from "../../list";import SheetProvider from "../../sheet-provider";import { Button } from "../../ui/button";-import { PressableButtonProps } from "../../ui/pressable";+import { PressableProps } from "../../ui/pressable";import Paragraph from "../../ui/typography/paragraph";import { Item, ItemReference, ItemType } from "@notesnook/core/dist/types";import { VirtualizedGrouping } from "@notesnook/core";@@ -54,7 +54,7 @@ type Button = {onPress?: (() => void) | undefined;loading?: boolean | undefined;title?: string | undefined;- type?: PressableButtonProps["type"];+ type?: PressableProps["type"];icon?: string;};diff --git a/apps/mobile/app/components/sheets/reminder-notify/index.tsx b/apps/mobile/app/components/sheets/reminder-notify/index.tsxindex ec1898146..0caba78f8 100644--- a/apps/mobile/app/components/sheets/reminder-notify/index.tsx+++ b/apps/mobile/app/components/sheets/reminder-notify/index.tsx@@ -138,7 +138,7 @@ export default function ReminderNotify({{QuickActions.map((item) => {return (<Button- type="grayAccent"+ type="secondaryAccented"key={item.title}title={item.title}height={30}diff --git a/apps/mobile/app/components/sheets/reminder/index.tsx b/apps/mobile/app/components/sheets/reminder/index.tsxindex 4ef989b6c..bcf133054 100644--- a/apps/mobile/app/components/sheets/reminder/index.tsx+++ b/apps/mobile/app/components/sheets/reminder/index.tsx@@ -287,8 +287,8 @@ export default function ReminderSheet({ReminderNotificationModes[mode as keyof typeof ReminderNotificationModes]- ? "grayAccent"- : "gray"+ ? "secondaryAccented"+ : "plain"}onPress={() => {const _mode = ReminderNotificationModes[@@ -358,7 +358,7 @@ export default function ReminderSheet({reminderMode ===ReminderModes[mode as keyof typeof ReminderModes]? "selected"- : "gray"+ : "plain"}onPress={() => {if (mode === "Repeat" && !PremiumService.get()) return;@@ -413,8 +413,8 @@ export default function ReminderSheet({type={recurringMode ===RecurringModes[mode as keyof typeof RecurringModes]- ? "selected"- : "gray"+ ? "secondaryAccented"+ : "plain"}onPress={() => {setRecurringMode(@@ -441,7 +441,7 @@ export default function ReminderSheet({index as keyof typeof WeekDayNames].slice(0, 1)}type={- selectedDays.indexOf(index) > -1 ? "accent" : "gray"+ selectedDays.indexOf(index) > -1 ? "accent" : "plain"}fontSize={SIZE.sm - 1}style={{@@ -471,7 +471,9 @@ export default function ReminderSheet({key={index + "monthday"}title={index + 1 + ""}type={- selectedDays.indexOf(index + 1) > -1 ? "accent" : "gray"+ selectedDays.indexOf(index + 1) > -1+ ? "accent"+ : "plain"}fontSize={SIZE.sm - 1}style={{@@ -545,7 +547,7 @@ export default function ReminderSheet({width: "100%"}}title={date ? date.toLocaleDateString() : "Select date"}- type={date ? "grayAccent" : "grayBg"}+ type={date ? "secondaryAccented" : "secondary"}icon="calendar"fontSize={SIZE.md}onPress={() => {diff --git a/apps/mobile/app/components/sheets/sort/index.js b/apps/mobile/app/components/sheets/sort/index.jsindex 6019fc07f..db79d3480 100644--- a/apps/mobile/app/components/sheets/sort/index.js+++ b/apps/mobile/app/components/sheets/sort/index.js@@ -136,7 +136,7 @@ const Sort = ({ type, screen }) => {>{groupOptions.groupBy === "abc" ? (<Button- type={"grayBg"}+ type="secondary"title="Title"height={40}iconPosition="left"@@ -154,7 +154,7 @@ const Sort = ({ type, screen }) => {item === "dateEdited") ? null : (<Buttonkey={item}- type={groupOptions.sortBy === item ? "selected" : "gray"}+ type={groupOptions.sortBy === item ? "selected" : "plain"}title={SORT[item]}height={40}iconPosition="left"@@ -213,7 +213,7 @@ const Sort = ({ type, screen }) => {key={item}testID={"btn-" + item}type={- groupOptions.groupBy === GROUP[item] ? "selected" : "gray"+ groupOptions.groupBy === GROUP[item] ? "selected" : "plain"}buttonType={{text:diff --git a/apps/mobile/app/components/sheets/update/index.js b/apps/mobile/app/components/sheets/update/index.jsindex b0978fc70..02c950885 100644--- a/apps/mobile/app/components/sheets/update/index.js+++ b/apps/mobile/app/components/sheets/update/index.js@@ -32,6 +32,7 @@ import { SvgView } from "../../ui/svg";import { ProgressBarComponent } from "../../ui/svg/lazy";import Heading from "../../ui/typography/heading";import Paragraph from "../../ui/typography/paragraph";+import { getContainerBorder } from "../../../utils/colors";const UPDATE_SVG = (color) =>`<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="774" height="669.5" viewBox="0 0 774 669.5" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M938.2145,322.3829C936.73266,207.5841,878.16775,115.25,806.13079,115.25c-43.29082,0-81.71777,33.346-105.81477,84.87331l28.33157,71.08654-39.15446-43.81576c-9.876,29.64743-15.48115,63.49569-15.48115,99.44475a324.20917,324.20917,0,0,0,9.98686,80.80891l75.92761-12.24058-67.9507,37.99628c22.13728,60.69069,62.59851,102.1414,109.23586,104.87608l-8.988,244.5184,27.81449.99338-5.94527-245.75716c66.41162-6.32443,119.60967-91.20375,123.8712-197.42794l-45.89372-25.66252Z" transform="translate(-213 -115.25)" fill="#f0f0f0"/><rect x="157.51532" y="354.40187" width="6.60151" height="49.25266" fill="${color}"/><polygon points="187.815 376.276 182.98 380.779 160.823 356.936 138.658 380.779 133.823 376.276 160.823 347.243 187.815 376.276" fill="${color}"/><path d="M371.9876,543.6602a52.8121,52.8121,0,1,1,52.8121-52.81209A52.87183,52.87183,0,0,1,371.9876,543.6602Zm0-99.02268a46.21059,46.21059,0,1,0,46.21058,46.21059A46.26275,46.26275,0,0,0,371.9876,444.63752Z" transform="translate(-213 -115.25)" fill="${color}"/><rect x="212.75248" y="253.9314" width="3.63974" height="27.15545" fill="#e4e4e4"/><polygon points="229.458 265.992 226.793 268.475 214.576 255.328 202.356 268.475 199.69 265.992 214.576 249.984 229.458 265.992" fill="#e4e4e4"/><path d="M426.56422,409.9859a29.118,29.118,0,1,1,29.118-29.118A29.15089,29.15089,0,0,1,426.56422,409.9859Zm0-54.59616A25.47821,25.47821,0,1,0,452.04243,380.868,25.507,25.507,0,0,0,426.56422,355.38974Z" transform="translate(-213 -115.25)" fill="#e4e4e4"/><rect x="99.52274" y="186.73872" width="3.63974" height="27.15545" fill="#e4e4e4"/><polygon points="116.229 198.799 113.563 201.282 101.346 188.136 89.126 201.282 86.46 198.799 101.346 182.792 116.229 198.799" fill="#e4e4e4"/><path d="M313.33448,342.79321a29.118,29.118,0,1,1,29.118-29.118A29.15088,29.15088,0,0,1,313.33448,342.79321Zm0-54.59615a25.47821,25.47821,0,1,0,25.47821,25.4782A25.507,25.507,0,0,0,313.33448,288.19706Z" transform="translate(-213 -115.25)" fill="#e4e4e4"/><path d="M518.7325,635.91942a8.22484,8.22484,0,0,1,.958-12.302,9.56322,9.56322,0,0,1,1.26081-.83521l-6.99347-30.13439,16.26512,5.84042,4.14749,27.72073a8.21849,8.21849,0,0,1-2.21462,10.58849A10.12952,10.12952,0,0,1,518.7325,635.91942Z" transform="translate(-213 -115.25)" fill="#ffb8b8"/><path d="M516.88531,612.40706l-.08727-.29605c-8.79267-29.805-17.88169-60.6154-28.97824-94.16236l-.0728-.21977.2448-.13088c6.18493-3.30762,15.48114-3.08736,21.62358.51183,5.68293,3.33,8.55569,9.77159,7.0024,15.68347l8.09328,38.67327c3.29039,12.64158,6.69574,25.72668,9.95036,38.62892l.09229.36576-.504.0295c-5.92592.34536-12.04821.70254-16.95322.89973Z" transform="translate(-213 -115.25)" fill="#ccc"/><polygon points="229.16 657.57 217.627 657.57 212.138 616.801 229.16 616.801 229.16 657.57" fill="#ffb8b8"/><path d="M445.10175,783.06559H407.9141v-.43107c0-7.31472,6.49345-13.26551,14.47493-13.26551h22.71272Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><polygon points="337.837 648.851 326.848 652.06 308.113 614.743 324.331 610.006 337.837 648.851" fill="#ffb8b8"/><path d="M521.60173,783.39141l-.14262-.41086c-2.42325-6.96953,1.79234-14.4459,9.39693-16.66692l21.64062-6.31955,4.53736,13.05Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><ellipse cx="279.46347" cy="354.21043" rx="23.10522" ry="21.17504" fill="#ffb8b8"/><path d="M502.83713,465.536c.13132-8.54065-3.76885-16.99907-9.79916-21.25171a16.77762,16.77762,0,0,0-19.87954.322c-5.937,4.44645-9.65428,13.02823-9.33974,21.56167C477.12124,466.20257,490.42379,466.23726,502.83713,465.536Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M448.74454,759.69687l-.46255-.04125c-10.03358-.90255-20.40891-1.83457-30.21419-1.9415l-.5333-.00589.07281-.48411c2.32311-15.42,3.30793-31.45044,4.26037-46.9538.9405-15.308,1.91269-31.13682,4.17769-46.17039.95818-4.0257,1.892-8.00342,2.82264-11.96682,7.70037-32.79837,14.97378-63.77816,29.98728-94.44433l.14194-.28963.34381.03789c14.08679,1.56221,27.62283,6.27241,38.11391,13.26256l.20326.13513-.00988.23027a131.25944,131.25944,0,0,0-.10174,14.17269,44.82523,44.82523,0,0,1,7.48241,42.489c4.13084,12.65215,8.40154,25.73075,12.75907,38.63212,10.5818,26.587,21.53153,54.10056,32.75594,81.99045l.1842.45717-.51791.11114c-8.07587,1.73775-16.40668,3.52938-24.62518,4.22482l-.31028.0261-.14745-.25174a587.30717,587.30717,0,0,1-50.88262-112.12662c-2.80473,7.83882-6.84508,14.91443-10.75934,21.76819a157.11556,157.11556,0,0,0-9.86087,19.31354c-1.73239,13.0365-2.192,27.16078-2.63591,40.81947-.42007,12.91442-.81671,25.11236-2.19312,36.582Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M484.57528,444.67592c10.01507-1.97751,21.093-.09617,28.95819,6.09651s11.85919,16.9058,8.62805,26.09364-14.20114,15.65236-24.12,13.27969c2.84131-7.33881-.35623-16.34918-7.302-20.57639C482.50242,464.55626,480.23475,452.58775,484.57528,444.67592Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M496.73471,571.62025l-.36633-.15281c-12.77629-5.34207-25.30408-9.441-37.04181-13.18089l-.35989-.07114-.00092-.95644.23358.07451c.04915-.09935.1045-.21217.16008-.32456.16031-.325.26963-.54642.36264-.69292l-.00252-.00126c.97862-1.82742,1.75651-3.59337,2.50868-5.30123.77628-1.76259,1.5776-3.58243,2.61295-5.50793a15.68833,15.68833,0,0,1-4.02289-17.95719c2.593-5.63211,9.20424-10.01859,16.15083-10.74644,2.54543-6.42185,8.21712-19.91552,8.21712-19.91552s11.92674-.30015,16.72316-.85793l.08062-.00926.07923.016c10.4711,2.10273,19.213,11.1834,21.25846,22.08265,1.72665,9.199-.89525,19.721-7.38227,29.62807A128.7532,128.7532,0,0,1,504.93,561.61682c-2.92186,3.34837-5.68157,6.51067-7.97367,9.69571Z" transform="translate(-213 -115.25)" fill="#ccc"/><path d="M519.3919,459.10521v0Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M519.861,457.22412c-7.01076-.95907-12.51527-7.52688-11.71835-13.982s7.76344-11.72977,14.83079-11.22907,13.06654,6.694,12.77147,13.18459S528.81221,458.44864,519.861,457.22412Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M518.76646,453.03852c-7.01067-.95906-12.51516-7.52688-11.71821-13.98194.54524-4.41578,3.9788-8.27657,8.35539-10.11667-5.65378,1.13408-10.51956,5.64916-11.17757,10.97881-.79695,6.45506,4.70754,13.02288,11.71821,13.98195a14.465,14.465,0,0,0,7.6875-.98538A14.866,14.866,0,0,1,518.76646,453.03852Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M382.77632,566.82181a9.99626,9.99626,0,0,1,12.97554-3.271,9.61149,9.61149,0,0,1,1.27935.81118l28.67233-16.08336-.58936,16.00057-27.13738,12.82a10.15042,10.15042,0,0,1-11.63139,1.61428A8.34216,8.34216,0,0,1,382.77632,566.82181Z" transform="translate(-213 -115.25)" fill="#ffb8b8"/><path d="M406.35053,557.3917l.2755-.17406c27.73394-17.52829,56.40359-35.64765,87.2197-56.41349l.20185-.13613.21621.16792c5.46363,4.24233,8.33439,12.34854,6.67808,18.85539-1.5324,6.02009-7.20243,10.64869-13.80215,11.27624L450.049,550.84631c-11.90943,7.05521-24.23685,14.35751-36.42636,21.46865l-.34555.20162-.19828-.42571c-2.32974-5.0055-4.73707-10.17674-6.57422-14.34943Z" transform="translate(-213 -115.25)" fill="#ccc"/><path d="M986,784.75H214a1,1,0,0,1,0-2H986a1,1,0,0,1,0,2Z" transform="translate(-213 -115.25)" fill="#cacaca"/></svg>`;@@ -131,7 +132,8 @@ export const Update = ({ version: appVersion, fwdRef }) => {width: "100%",backgroundColor: colors.secondary.background,borderRadius: 10,- padding: 12+ padding: 12,+ ...getContainerBorder(colors.secondary.background)}}><View>@@ -142,7 +144,11 @@ export const Update = ({ version: appVersion, fwdRef }) => {</Paragraph></View>- <SvgView src={UPDATE_SVG(colors.primary.accent)} width={100} height={100} />+ <SvgView+ src={UPDATE_SVG(colors.primary.accent)}+ width={100}+ height={100}+ /></View><Seperator />diff --git a/apps/mobile/app/components/side-menu/color-section.tsx b/apps/mobile/app/components/side-menu/color-section.tsxindex 11bd30951..5dc8d5b2d 100644--- a/apps/mobile/app/components/side-menu/color-section.tsx+++ b/apps/mobile/app/components/side-menu/color-section.tsx@@ -30,7 +30,7 @@ import { useSettingStore } from "../../stores/use-setting-store";import { SIZE, normalize } from "../../utils/size";import ReorderableList from "../list/reorderable-list";import { Properties } from "../properties";-import { PressableButton } from "../ui/pressable";+import { Pressable } from "../ui/pressable";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";import { useSideBarDraggingStore } from "./dragging-store";@@ -97,14 +97,14 @@ const ColorItem = React.memo(};return (- <PressableButton+ <PressablecustomColor={isFocused ? "rgba(0,0,0,0.04)" : "transparent"}onLongPress={onLongPress}customSelectedColor={item.colorCode}customAlpha={!isDark ? -0.02 : 0.02}customOpacity={0.12}onPress={() => onPress(item)}- customStyle={{+ style={{width: "100%",alignSelf: "center",borderRadius: 5,@@ -150,7 +150,7 @@ const ColorItem = React.memo(</Paragraph>)}</View>- </PressableButton>+ </Pressable>);},(prev, next) => {diff --git a/apps/mobile/app/components/side-menu/pinned-section.tsx b/apps/mobile/app/components/side-menu/pinned-section.tsxindex ce695364a..dc1869740 100644--- a/apps/mobile/app/components/side-menu/pinned-section.tsx+++ b/apps/mobile/app/components/side-menu/pinned-section.tsx@@ -33,7 +33,7 @@ import { SIZE, normalize } from "../../utils/size";import ReorderableList from "../list/reorderable-list";import { Button } from "../ui/button";import { Notice } from "../ui/notice";-import { PressableButton } from "../ui/pressable";+import { Pressable } from "../ui/pressable";import Seperator from "../ui/seperator";import SheetWrapper from "../ui/sheet";import Heading from "../ui/typography/heading";@@ -152,16 +152,16 @@ export const PinItem = React.memo(}}fontSize={SIZE.md}width="95%"- customStyle={{+ style={{marginBottom: 30}}/></SheetWrapper>)}- <PressableButton- type={isFocused ? "selected" : "gray"}+ <Pressable+ type={isFocused ? "selected" : "plain"}onPress={() => onPress(item)}- customStyle={{+ style={{width: "100%",alignSelf: "center",borderRadius: 5,@@ -233,7 +233,7 @@ export const PinItem = React.memo()}</View></View>- </PressableButton>+ </Pressable></>);},diff --git a/apps/mobile/app/components/side-menu/user-status.js b/apps/mobile/app/components/side-menu/user-status.jsindex 4c9ca9968..6fe7c5d9f 100644--- a/apps/mobile/app/components/side-menu/user-status.js+++ b/apps/mobile/app/components/side-menu/user-status.js@@ -17,23 +17,25 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { useThemeColors } from "@notesnook/theme";+import { useNetInfo } from "@react-native-community/netinfo";import React from "react";-import { ActivityIndicator, Platform, View } from "react-native";+import { ActivityIndicator, Image, Platform, View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";import useSyncProgress from "../../hooks/use-sync-progress";import { eSendEvent } from "../../services/event-manager";import Sync from "../../services/sync";-import { useThemeColors } from "@notesnook/theme";import { SyncStatus, useUserStore } from "../../stores/use-user-store";import { eOpenLoginDialog } from "../../utils/events";import { tabBarRef } from "../../utils/global-refs";import { SIZE } from "../../utils/size";-import { PressableButton } from "../ui/pressable";+import { Pressable } from "../ui/pressable";import { TimeSince } from "../ui/time-since";-import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";-import { useNetInfo } from "@react-native-community/netinfo";++const PROFILE_PIC_URL = `https://picsum.photos/id/177/367/267`;+export const UserStatus = () => {const { colors } = useThemeColors();const user = useUserStore((state) => state.user);@@ -61,7 +63,7 @@ export const UserStatus = () => {alignItems: "center"}}>- <PressableButton+ <PressableonPress={async () => {if (user) {Sync.run();@@ -70,22 +72,55 @@ export const UserStatus = () => {eSendEvent(eOpenLoginDialog);}}}- type="gray"- customStyle={{+ type="plain"+ style={{flexDirection: "row",justifyContent: "flex-start",padding: 12,- paddingHorizontal: 20,- borderRadius: 0+ borderRadius: 0,+ alignItems: "center"}}>+ {user ? (+ <Image+ source={{+ uri: PROFILE_PIC_URL+ }}+ style={{+ width: 35,+ height: 35,+ borderRadius: 100,+ backgroundColor: "red",+ marginRight: 10+ }}+ />+ ) : null}+<Viewstyle={{flexShrink: 1,flexGrow: 1}}>- <Heading+ <Paragraph+ style={{+ flexWrap: "wrap"+ }}+ size={SIZE.sm}+ color={colors.primary.heading}+ >+ {!user+ ? "Login to sync your notes."+ : lastSyncStatus === SyncStatus.Failed+ ? "Sync failed, tap to retry"+ : syncing+ ? `Syncing your notes${+ progress ? ` (${progress.current})` : ""+ }`+ : "Ammar Ahmed"}+ </Paragraph>++ <Paragraphstyle={{flexWrap: "wrap"}}@@ -93,17 +128,18 @@ export const UserStatus = () => {color={colors.secondary.heading}>{!user ? (- "You are not logged in"+ "Not logged in") : lastSynced && lastSynced !== "Never" ? (<>- Synced{" "}+ {lastSyncStatus === SyncStatus.Failed+ ? "Sync failed"+ : "Synced"}{" "}<TimeSincestyle={{fontSize: SIZE.xs,color: colors.secondary.paragraph}}time={lastSynced}- bold={true}/>{isOffline ? " (offline)" : ""}</>@@ -122,23 +158,6 @@ export const UserStatus = () => {: colors.success.icon}/>- </Heading>-- <Paragraph- style={{- flexWrap: "wrap"- }}- color={colors.primary.heading}- >- {!user- ? "Login to sync your notes."- : lastSyncStatus === SyncStatus.Failed- ? "Last sync failed, tap to try again"- : syncing- ? `Syncing your notes${- progress ? ` (${progress.current})` : ""- }`- : "Tap here to sync your notes."}</Paragraph></View>@@ -161,7 +180,7 @@ export const UserStatus = () => {/>)) : null}- </PressableButton>+ </Pressable></View></View>);diff --git a/apps/mobile/app/components/tip/index.tsx b/apps/mobile/app/components/tip/index.tsxindex 9cc0fe98c..784ba8379 100644--- a/apps/mobile/app/components/tip/index.tsx+++ b/apps/mobile/app/components/tip/index.tsx@@ -88,7 +88,7 @@ export const Tip = ({{neverShowAgain && (<Buttontitle="Never show again"- type="grayBg"+ type="secondary"icon="close"fontSize={SIZE.xs}iconSize={SIZE.xs}diff --git a/apps/mobile/app/components/ui/animated-button/index.tsx b/apps/mobile/app/components/ui/animated-button/index.tsxindex cd07366f5..d041d71cb 100644--- a/apps/mobile/app/components/ui/animated-button/index.tsx+++ b/apps/mobile/app/components/ui/animated-button/index.tsx@@ -29,7 +29,7 @@ import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { SIZE } from "../../../utils/size";import NativeTooltip from "../../../utils/tooltip";import { ButtonProps } from "../button";-import { PressableButton, useButton } from "../pressable";+import { Pressable, useButton } from "../pressable";import Heading from "../typography/heading";import Paragraph from "../typography/paragraph";const AnimatedIcon = Animated.createAnimatedComponent(Icon);@@ -71,7 +71,7 @@ export const AnimatedButton = ({exiting={FadeOut}layout={Layout.springify()}>- <PressableButton+ <Pressable{...restProps}fwdRef={fwdRef}onPress={onPress}@@ -92,7 +92,7 @@ export const AnimatedButton = ({customSelectedColor={buttonType?.selected}customOpacity={buttonType?.opacity}customAlpha={buttonType?.alpha}- customStyle={{+ style={{height: height,width: (width as DimensionValue) || undefined,paddingHorizontal: 12,@@ -152,7 +152,7 @@ export const AnimatedButton = ({size={iconSize}/>) : null}- </PressableButton>+ </Pressable></Animated.View>);};diff --git a/apps/mobile/app/components/ui/button/index.tsx b/apps/mobile/app/components/ui/button/index.tsxindex ed0a13fbb..76f35743e 100644--- a/apps/mobile/app/components/ui/button/index.tsx+++ b/apps/mobile/app/components/ui/button/index.tsx@@ -32,10 +32,10 @@ import { useUserStore } from "../../../stores/use-user-store";import { SIZE } from "../../../utils/size";import NativeTooltip from "../../../utils/tooltip";import { ProTag } from "../../premium/pro-tag";-import { PressableButton, PressableButtonProps, useButton } from "../pressable";+import { Pressable, PressableProps, useButton } from "../pressable";import Heading from "../typography/heading";import Paragraph from "../typography/paragraph";-export interface ButtonProps extends PressableButtonProps {+export interface ButtonProps extends PressableProps {height?: number;icon?: string;fontSize?: number;@@ -95,7 +95,7 @@ export const Button = ({const Component = bold ? Heading : Paragraph;return (- <PressableButton+ <Pressable{...restProps}fwdRef={fwdRef}onPress={onPress}@@ -116,7 +116,7 @@ export const Button = ({customSelectedColor={buttonType?.selected}customOpacity={buttonType?.opacity}customAlpha={buttonType?.alpha}- customStyle={{+ style={{height: height,width: (width as DimensionValue) || undefined,paddingHorizontal: 12,@@ -176,6 +176,6 @@ export const Button = ({size={iconSize}/>) : null}- </PressableButton>+ </Pressable>);};diff --git a/apps/mobile/app/components/ui/icon-button/index.tsx b/apps/mobile/app/components/ui/icon-button/index.tsxindex 1ae59d26d..8c0bf7560 100644--- a/apps/mobile/app/components/ui/icon-button/index.tsx+++ b/apps/mobile/app/components/ui/icon-button/index.tsx@@ -24,8 +24,8 @@ import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { RGB_Linear_Shade, hexToRGBA } from "../../../utils/colors";import { SIZE } from "../../../utils/size";import NativeTooltip from "../../../utils/tooltip";-import { PressableButton, PressableButtonProps } from "../pressable";-interface IconButtonProps extends PressableButtonProps {+import { Pressable, PressableProps } from "../pressable";+interface IconButtonProps extends PressableProps {name: string;color?: ColorValue;size?: number;@@ -43,7 +43,7 @@ export const IconButton = ({onPress,name,color,- customStyle,+ style: customStyle,size = SIZE.xxl,iconStyle = {},left = 10,@@ -52,7 +52,7 @@ export const IconButton = ({bottom = 10,onLongPress,tooltipText,- type = "gray",+ type = "plain",fwdRef,tooltipPosition = NativeTooltip.POSITIONS.TOP,...restProps@@ -70,14 +70,14 @@ export const IconButton = ({};return (- <PressableButton+ <Pressable{...restProps}fwdRef={fwdRef}onPress={onPress}hitSlop={{ top: top, left: left, right: right, bottom: bottom }}onLongPress={_onLongPress}type={type}- customStyle={{+ style={{width: 40,height: 40,justifyContent: "center",@@ -97,6 +97,6 @@ export const IconButton = ({}size={size}/>- </PressableButton>+ </Pressable>);};diff --git a/apps/mobile/app/components/ui/notice/index.tsx b/apps/mobile/app/components/ui/notice/index.tsxindex 9c145a08b..6be51d4f8 100644--- a/apps/mobile/app/components/ui/notice/index.tsx+++ b/apps/mobile/app/components/ui/notice/index.tsx@@ -17,12 +17,14 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import { useThemeColors } from "@notesnook/theme";import React from "react";import { View } from "react-native";-import { useThemeColors } from "@notesnook/theme";+import { getContainerBorder } from "../../../utils/colors";import { SIZE } from "../../../utils/size";import { IconButton } from "../icon-button";import Paragraph from "../typography/paragraph";+export interface NoticeProps {type?: "alert" | "information";text: string;@@ -46,13 +48,14 @@ export const Notice = ({flexDirection: "row",backgroundColor: colors.secondary.background,borderRadius: isSmall ? 5 : 10,- alignItems: "flex-start"+ alignItems: "flex-start",+ ...getContainerBorder(colors.secondary.background)}}><IconButtonsize={isSmall ? SIZE.lg + 1 : SIZE.xxl}name={type}- customStyle={{+ style={{width: isSmall ? undefined : 40,height: isSmall ? undefined : 40,alignSelf: "flex-start"diff --git a/apps/mobile/app/components/ui/pressable/index.tsx b/apps/mobile/app/components/ui/pressable/index.tsxindex c224dd23f..04268e58e 100644--- a/apps/mobile/app/components/ui/pressable/index.tsx+++ b/apps/mobile/app/components/ui/pressable/index.tsx@@ -17,20 +17,24 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import { useThemeColors } from "@notesnook/theme";+import { VariantsWithStaticColors, useThemeColors } from "@notesnook/theme";import React, { RefObject, useCallback } from "react";import {ColorValue,- Pressable,- PressableProps,+ Pressable as RNPressable,+ PressableProps as RNPressableProps,PressableStateCallbackType,View,ViewStyle} from "react-native";-import { RGB_Linear_Shade, hexToRGBA } from "../../../utils/colors";+import {+ RGB_Linear_Shade,+ getColorLinearShade,+ hexToRGBA+} from "../../../utils/colors";import { br } from "../../../utils/size";-export interface PressableButtonProps extends PressableProps {- customStyle?: ViewStyle;+export interface PressableProps extends RNPressableProps {+ style?: ViewStyle;noborder?: boolean;type?: ButtonTypes;accentColor?: string;@@ -44,18 +48,152 @@ export interface PressableButtonProps extends PressableProps {}type ButtonTypes =+ | "plain"| "transparent"| "accent"| "shade"- | "gray"- | "grayBg"- | "grayAccent"+ | "secondary"+ | "secondaryAccented"| "inverted"| "white"| "error"| "errorShade"| "warn"| "selected";++type ButtonVariant = {+ primary: string;+ text: string;+ selected: string;+ colorOpacity?: number;+ borderWidth?: number;+ borderColor?: string;+ borderSelectedColor?: string;+};++const buttonTypes = (+ colors: VariantsWithStaticColors<true>,+ accent?: string,+ text?: string,+ isDark?: boolean+): {+ [name: string]: ButtonVariant;+} => ({+ plain: {+ primary: "transparent",+ text: colors.primary.paragraph,+ selected: colors.primary.hover,+ borderWidth: 0.8,+ borderSelectedColor: getColorLinearShade(+ colors.selected.background,+ 0.05,+ isDark+ )+ },+ transparent: {+ primary: "transparent",+ text: colors.primary.accent,+ selected: colors.secondary.background,+ borderWidth: 0.8,+ borderSelectedColor: getColorLinearShade(+ colors.selected.background,+ 0.05,+ isDark+ )+ },+ secondary: {+ primary: colors.secondary.background,+ text: colors.secondary.paragraph,+ selected: colors.secondary.background,+ borderWidth: 0.8,+ borderColor: getColorLinearShade(colors.secondary.background, 0.05, isDark),+ borderSelectedColor: getColorLinearShade(+ colors.selected.background,+ 0.05,+ isDark+ )+ },+ selected: {+ primary: colors.selected.background,+ text: colors.selected.paragraph,+ selected: colors.selected.background,+ borderWidth: 0.8,+ borderColor: getColorLinearShade(colors.selected.background, 0.05, isDark),+ borderSelectedColor: getColorLinearShade(+ colors.selected.background,+ 0.05,+ isDark+ )+ },+ secondaryAccented: {+ primary: colors.secondary.background,+ text: colors.primary.accent,+ selected: colors.secondary.background,+ borderWidth: 0.8,+ borderColor: getColorLinearShade(colors.secondary.background, 0.05, isDark),+ borderSelectedColor: getColorLinearShade(+ colors.secondary.background,+ 0.05,+ isDark+ )+ },+ accent: {+ primary: accent || colors.primary.accent,+ text: text || colors.primary.accentForeground,+ selected: accent || colors.primary.accent,+ borderWidth: 0.8,+ borderColor: getColorLinearShade(colors.primary.accent, 0.3, false),+ borderSelectedColor: getColorLinearShade(colors.primary.accent, 0.3, false)+ },+ inverted: {+ primary: colors.primary.background,+ text: colors.primary.accent,+ selected: colors.primary.background+ },+ white: {+ primary: "transparent",+ text: colors.static.white,+ selected: colors.primary.hover+ },+ shade: {+ primary: colors.primary.shade,+ text: colors.primary.accent,+ selected: colors.primary.accent,+ colorOpacity: 0.12,+ borderWidth: 0.8,+ borderColor: getColorLinearShade(colors.primary.shade, 0.3, isDark),+ borderSelectedColor: getColorLinearShade(colors.primary.shade, 0.3, isDark)+ },+ error: {+ primary: colors.error.background,+ text: colors.error.paragraph,+ selected: colors.error.background,+ borderWidth: 0.8,+ borderColor: getColorLinearShade(colors.error.background, 0.05, isDark),+ borderSelectedColor: getColorLinearShade(+ colors.error.background,+ 0.07,+ isDark+ )+ },+ errorShade: {+ primary: "transparent",+ text: colors.error.paragraph,+ selected: colors.error.background,+ borderWidth: 0.8,+ borderSelectedColor: getColorLinearShade(+ colors.error.background,+ 0.05,+ isDark+ )+ },+ warn: {+ primary: colors.static.orange,+ text: colors.static.white,+ selected: colors.static.orange+ }+});+export const useButton = ({type,accent,@@ -64,96 +202,20 @@ export const useButton = ({accent?: string;text?: string;type: ButtonTypes;-}): {- primary: string;- text: string;- selected: string;- colorOpacity?: number;-} => {- const { colors } = useThemeColors();- const buttonTypes: {- [name: string]: {- primary: string;- text: string;- selected: string;- colorOpacity?: number;- };- } = {- transparent: {- primary: "transparent",- text: colors.primary.accent,- selected: colors.secondary.background- },- gray: {- primary: "transparent",- text: colors.secondary.paragraph,- selected: colors.primary.hover- },- grayBg: {- primary: colors.secondary.background,- text: colors.secondary.paragraph,- selected: colors.secondary.background- },- selected: {- primary: colors.selected.background,- text: colors.selected.paragraph,- selected: colors.selected.background- },- grayAccent: {- primary: colors.secondary.background,- text: colors.primary.accent,- selected: colors.secondary.background- },- accent: {- primary: accent || colors.primary.accent,- text: text || colors.primary.accentForeground,- selected: accent || colors.primary.accent- },- inverted: {- primary: colors.primary.background,- text: colors.primary.accent,- selected: colors.primary.background- },- white: {- primary: "transparent",- text: colors.static.white,- selected: colors.primary.hover- },- shade: {- primary: colors.primary.shade,- text: colors.primary.accent,- selected: colors.primary.accent,- colorOpacity: 0.12- },- error: {- primary: colors.error.background,- text: colors.error.paragraph,- selected: colors.error.background- },- errorShade: {- primary: "transparent",- text: colors.error.paragraph,- selected: colors.error.background- },- warn: {- primary: colors.static.orange,- text: colors.static.white,- selected: colors.static.orange- }- };-- return buttonTypes[type];+}): ButtonVariant => {+ const { colors, isDark } = useThemeColors();+ return buttonTypes(colors, accent, text, isDark)[type];};-export const PressableButton = ({+export const Pressable = ({children,onPress,- customStyle = {},+ style = {},onLongPress,hitSlop,testID,disabled,- type = "gray",+ type = "plain",noborder,accentColor,accentText = "#ffffff",@@ -163,9 +225,16 @@ export const PressableButton = ({customOpacity,fwdRef,hidden-}: PressableButtonProps) => {+}: PressableProps) => {const { isDark } = useThemeColors();- const { primary, selected, colorOpacity } = useButton({+ const {+ primary,+ selected,+ colorOpacity,+ borderColor,+ borderSelectedColor,+ borderWidth+ } = useButton({type,accent: accentColor,text: accentText@@ -177,28 +246,42 @@ export const PressableButton = ({: type === "accent"? 1: colorOpacity;- const alpha = customAlpha ? customAlpha : isDark ? 0.04 : -0.04;+ const alpha = customAlpha ? customAlpha : isDark ? 0.03 : -0.03;const getStyle = useCallback(({ pressed }: PressableStateCallbackType): ViewStyle | ViewStyle[] => [{backgroundColor: pressed? RGB_Linear_Shade(alpha, hexToRGBA(selectedColor, opacity || 1))- : hexToRGBA(primaryColor, opacity || 1 - 0.02),+ : hexToRGBA(primaryColor, opacity || 1),width: "100%",alignSelf: "center",borderRadius: noborder ? 0 : br,justifyContent: "center",alignItems: "center",- marginBottom: 0+ marginBottom: 0,+ borderColor: pressed+ ? borderSelectedColor || borderColor+ : borderColor || "transparent",+ borderWidth: borderWidth},- customStyle+ style],- [alpha, selectedColor, opacity, primaryColor, noborder, customStyle]+ [+ alpha,+ selectedColor,+ opacity,+ primaryColor,+ noborder,+ borderSelectedColor,+ borderColor,+ borderWidth,+ style+ ]);return hidden ? null : (- <Pressable+ <RNPressabletestID={testID}ref={fwdRef}disabled={disabled}@@ -208,6 +291,6 @@ export const PressableButton = ({style={getStyle}>{children}- </Pressable>+ </RNPressable>);};diff --git a/apps/mobile/app/components/ui/reminder-time/index.tsx b/apps/mobile/app/components/ui/reminder-time/index.tsxindex 168089d6b..8f4568d5e 100644--- a/apps/mobile/app/components/ui/reminder-time/index.tsx+++ b/apps/mobile/app/components/ui/reminder-time/index.tsx@@ -55,7 +55,7 @@ export const ReminderTime = ({icon="bell"fontSize={SIZE.xs}iconSize={SIZE.sm}- type="grayBg"+ type="secondary"buttonType={isTodayOrTomorrow? {diff --git a/apps/mobile/app/components/walkthroughs/index.tsx b/apps/mobile/app/components/walkthroughs/index.tsxindex 1d7325e97..014d73696 100644--- a/apps/mobile/app/components/walkthroughs/index.tsx+++ b/apps/mobile/app/components/walkthroughs/index.tsx@@ -121,7 +121,7 @@ export const Walkthrough = ({onPress={async () => {eSendEvent(eCloseSheet);}}- type="gray"+ type="plain"title="Skip introduction"/>) : null}diff --git a/apps/mobile/app/components/walkthroughs/walkthroughs.tsx b/apps/mobile/app/components/walkthroughs/walkthroughs.tsxindex 13b831bc5..e3f95b81e 100644--- a/apps/mobile/app/components/walkthroughs/walkthroughs.tsx+++ b/apps/mobile/app/components/walkthroughs/walkthroughs.tsx@@ -40,6 +40,7 @@ import Seperator from "../ui/seperator";import Heading from "../ui/typography/heading";import Paragraph from "../ui/typography/paragraph";import { useThemeColors } from "@notesnook/theme";+import { getContainerBorder } from "../../utils/colors";export type TStep = {text?: string;@@ -82,7 +83,8 @@ const NotebookWelcome = () => {width: "100%",padding: 12,backgroundColor: colors.secondary.background,- borderRadius: 10+ borderRadius: 10,+ ...getContainerBorder(colors.secondary.background)}}><View@@ -135,7 +137,8 @@ const notebooks: { id: string; steps: TStep[] } = {width: "100%",padding: 12,backgroundColor: colors.secondary.background,- borderRadius: 10+ borderRadius: 10,+ ...getContainerBorder(colors.secondary.background)}}><View@@ -257,7 +260,7 @@ const notebooks: { id: string; steps: TStep[] } = {title: "Tasks",type: "topic"}}- onPress={() => { }}+ onPress={() => {}}/><PinItem@@ -267,7 +270,7 @@ const notebooks: { id: string; steps: TStep[] } = {title: "Work and office",type: "notebook"}}- onPress={() => { }}+ onPress={() => {}}/></View>),@@ -399,7 +402,7 @@ const Support = () => {Linking.openURL("https://discord.gg/zQBK97EE22").catch(console.log);}}icon="discord"- type="grayBg"+ type="secondary"title="Join our community on Discord"/>@@ -413,7 +416,7 @@ const Support = () => {Linking.openURL("https://t.me/notesnook").catch(console.log);}}icon="telegram"- type="grayBg"+ type="secondary"title="Join our Telegram group"/><Button@@ -423,7 +426,7 @@ const Support = () => {width: "90%"}}icon="bug"- type="grayBg"+ type="secondary"title="Submit an issue from Settings"/><Button@@ -433,7 +436,7 @@ const Support = () => {width: "90%"}}icon="mail"- type="grayBg"+ type="secondary"title="Email us at [email protected]"/></View>diff --git a/apps/mobile/app/screens/editor/index.tsx b/apps/mobile/app/screens/editor/index.tsxindex d2c314b8e..ce1168d21 100755--- a/apps/mobile/app/screens/editor/index.tsx+++ b/apps/mobile/app/screens/editor/index.tsx@@ -188,10 +188,10 @@ const ReadonlyButton = ({ editor }: { editor: useEditorType }) => {return readonly && !keyboard.keyboardShown ? (<IconButtonname="pencil-lock"- type="grayBg"+ type="secondary"onPress={onPress}color={colors.primary.accent}- customStyle={{+ style={{position: "absolute",bottom: 60,width: 60,diff --git a/apps/mobile/app/screens/editor/loading.js b/apps/mobile/app/screens/editor/loading.jsindex c36bfb70f..bd89c920d 100644--- a/apps/mobile/app/screens/editor/loading.js+++ b/apps/mobile/app/screens/editor/loading.js@@ -216,7 +216,7 @@ const EditorOverlay = ({ editorId = "", editor }) => {</Paragraph><IconButtonsize={20}- customStyle={{+ style={{width: 26,height: 26}}diff --git a/apps/mobile/app/screens/notebook/index.tsx b/apps/mobile/app/screens/notebook/index.tsxindex 72dad6ca3..6478e3d7b 100644--- a/apps/mobile/app/screens/notebook/index.tsx+++ b/apps/mobile/app/screens/notebook/index.tsx@@ -43,7 +43,7 @@ import Paragraph from "../../components/ui/typography/paragraph";import { View } from "react-native";import { SIZE } from "../../utils/size";import { IconButton } from "../../components/ui/icon-button";-import { PressableButton } from "../../components/ui/pressable";+import { Pressable } from "../../components/ui/pressable";import { resolveItems } from "@notesnook/common";const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {@@ -180,7 +180,7 @@ const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {<IconButtonname="notebook-outline"size={16}- customStyle={{ width: 20, height: 25 }}+ style={{ width: 20, height: 25 }}onPress={() => {Navigation.push("Notebooks", {canGoBack: true@@ -189,14 +189,14 @@ const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {/>{breadcrumbs.map((item) => (- <PressableButton+ <PressableonPress={async () => {const notebook = await db.notebooks.notebook(item.id);if (!notebook) return;NotebookScreen.navigate(notebook, true);}}key={item.id}- customStyle={{+ style={{width: undefined,flexDirection: "row",paddingHorizontal: 0,@@ -210,10 +210,10 @@ const NotebookScreen = ({ route, navigation }: NavigationProps<"Notebook">) => {left={0}right={0}bottom={0}- customStyle={{ width: 20, height: 25 }}+ style={{ width: 20, height: 25 }}/><Paragraph size={SIZE.xs + 1}>{item.title}</Paragraph>- </PressableButton>+ </Pressable>))}</View>) : null}diff --git a/apps/mobile/app/screens/search/search-bar.tsx b/apps/mobile/app/screens/search/search-bar.tsxindex 3afb663cc..ae437c057 100644--- a/apps/mobile/app/screens/search/search-bar.tsx+++ b/apps/mobile/app/screens/search/search-bar.tsx@@ -67,8 +67,8 @@ export const SearchBar = ({Navigation.goBack();}}color={colors.primary.paragraph}- type="gray"- customStyle={{+ type="plain"+ style={{paddingLeft: 0,marginLeft: -5,marginRight: DDS.isLargeTablet() ? 10 : 7diff --git a/apps/mobile/app/screens/settings/2fa.tsx b/apps/mobile/app/screens/settings/2fa.tsxindex cad1282e1..e0b22d02c 100644--- a/apps/mobile/app/screens/settings/2fa.tsx+++ b/apps/mobile/app/screens/settings/2fa.tsx@@ -35,7 +35,7 @@ import DialogHeader from "../../components/dialog/dialog-header";import { Button } from "../../components/ui/button";import { IconButton } from "../../components/ui/icon-button";import Input from "../../components/ui/input";-import { PressableButton } from "../../components/ui/pressable";+import { Pressable } from "../../components/ui/pressable";import Seperator from "../../components/ui/seperator";import { SvgView } from "../../components/ui/svg";import Heading from "../../components/ui/typography/heading";@@ -111,12 +111,12 @@ export const MFAMethodsPickerStep = ({ recovery, onSuccess }: MFAStepProps) => {/><Seperator />{getMethods().map((item) => (- <PressableButton+ <Pressablekey={item.title}onPress={() => {onSuccess && onSuccess(item);}}- customStyle={{+ style={{paddingHorizontal: 12,paddingVertical: 12,marginTop: 0,@@ -128,8 +128,8 @@ export const MFAMethodsPickerStep = ({ recovery, onSuccess }: MFAStepProps) => {>{item.icon && (<IconButton- type="grayBg"- customStyle={{+ type="secondary"+ style={{width: 50,height: 50,marginRight: 10@@ -149,7 +149,7 @@ export const MFAMethodsPickerStep = ({ recovery, onSuccess }: MFAStepProps) => {<Heading size={SIZE.md}>{item.title}</Heading><Paragraph size={SIZE.sm}>{item.body}</Paragraph></View>- </PressableButton>+ </Pressable>))}</>);@@ -377,7 +377,7 @@ export const MFASetup = ({<Buttontitle="Select a different 2FA method"- type="gray"+ type="plain"height={25}onPress={() => {setStep &&@@ -617,7 +617,7 @@ const MFASuccess = ({ recovery }: MFAStepProps) => {{!recovery ? (<Buttontitle="Setup secondary 2FA method"- type="gray"+ type="plain"height={25}onPress={() => {MFASheet.present(true);diff --git a/apps/mobile/app/screens/settings/app-lock.js b/apps/mobile/app/screens/settings/app-lock.jsindex 660f17e29..e4f8d2aa6 100644--- a/apps/mobile/app/screens/settings/app-lock.js+++ b/apps/mobile/app/screens/settings/app-lock.js@@ -22,7 +22,7 @@ import React from "react";import { Platform, ScrollView, View } from "react-native";import Animated from "react-native-reanimated";import Icon from "react-native-vector-icons/MaterialCommunityIcons";-import { PressableButton } from "../../components/ui/pressable";+import { Pressable } from "../../components/ui/pressable";import Seperator from "../../components/ui/seperator";import Heading from "../../components/ui/typography/heading";import Paragraph from "../../components/ui/typography/paragraph";@@ -114,9 +114,9 @@ const AppLock = () => {}}>{modes.map((item) => (- <PressableButton+ <Pressablekey={item.title}- type={appLockMode === item.value ? "grayBg" : "transparent"}+ type={appLockMode === item.value ? "secondary" : "transparent"}onPress={async () => {if (!(await BiometicService.isBiometryAvailable()) &&@@ -154,7 +154,7 @@ const AppLock = () => {SettingsService.set({ appLockMode: item.value });}}- customStyle={{+ style={{justifyContent: "flex-start",alignItems: "flex-start",paddingHorizontal: 12,@@ -167,9 +167,6 @@ const AppLock = () => {? item.activeColor: colors.secondary.background}}- style={{- marginBottom: 10- }}><Headingcolor={@@ -193,7 +190,7 @@ const AppLock = () => {>{item.desc}</Paragraph>- </PressableButton>+ </Pressable>))}</ScrollView></>diff --git a/apps/mobile/app/screens/settings/appearance.js b/apps/mobile/app/screens/settings/appearance.jsindex 298110401..fa78b139e 100644--- a/apps/mobile/app/screens/settings/appearance.js+++ b/apps/mobile/app/screens/settings/appearance.js@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";-import { PressableButton } from "../../components/ui/pressable";+import { Pressable } from "../../components/ui/pressable";import { DDS } from "../../services/device-detection";import PremiumService from "../../services/premium";import SettingsService from "../../services/settings";@@ -61,7 +61,7 @@ export const AccentColorPicker = () => {"#FF1744","#B71C1C"].map((item) => (- <PressableButton+ <Pressablekey={item}customColor={colors.primary.accent === item@@ -82,7 +82,7 @@ export const AccentColorPicker = () => {});});}}- customStyle={{+ style={{flexDirection: "row",justifyContent: "center",alignItems: "center",@@ -100,7 +100,7 @@ export const AccentColorPicker = () => {name="check"/>) : null}- </PressableButton>+ </Pressable>))}<View style={{ width: 50 }} /></View>diff --git a/apps/mobile/app/screens/settings/debug.tsx b/apps/mobile/app/screens/settings/debug.tsxindex 84db432ef..90e9a8353 100644--- a/apps/mobile/app/screens/settings/debug.tsx+++ b/apps/mobile/app/screens/settings/debug.tsx@@ -241,7 +241,7 @@ export default function DebugLogs() {<Paragraph>{currentLog.key}</Paragraph><IconButton- customStyle={{+ style={{width: 30,height: 30,marginHorizontal: 5@@ -259,7 +259,7 @@ export default function DebugLogs() {/><IconButton- customStyle={{+ style={{width: 30,height: 30}}@@ -284,7 +284,7 @@ export default function DebugLogs() {<IconButtononPress={copyLogs}size={20}- customStyle={{+ style={{width: 30,height: 30,marginRight: 5@@ -294,7 +294,7 @@ export default function DebugLogs() {/><IconButtononPress={downloadLogs}- customStyle={{+ style={{width: 30,height: 30,marginRight: 5@@ -306,7 +306,7 @@ export default function DebugLogs() {<IconButtononPress={clearLogs}- customStyle={{+ style={{width: 30,height: 30,marginRight: 5diff --git a/apps/mobile/app/screens/settings/editor/configure-toolbar.tsx b/apps/mobile/app/screens/settings/editor/configure-toolbar.tsxindex 2a9e7a9e8..f99f2ba09 100644--- a/apps/mobile/app/screens/settings/editor/configure-toolbar.tsx+++ b/apps/mobile/app/screens/settings/editor/configure-toolbar.tsx@@ -91,7 +91,7 @@ export const ConfigureToolbar = () => {}].map((item) => (<Button- type={preset === item.id ? "accent" : "grayAccent"}+ type={preset === item.id ? "accent" : "secondaryAccented"}style={{borderRadius: 100,height: 35,@@ -129,7 +129,7 @@ export const ConfigureToolbar = () => {><Buttontitle="Create a group"- type="grayAccent"+ type="secondaryAccented"icon="plus"style={{width: "100%"diff --git a/apps/mobile/app/screens/settings/editor/tool-sheet.tsx b/apps/mobile/app/screens/settings/editor/tool-sheet.tsxindex 895eee17c..106b35c3a 100644--- a/apps/mobile/app/screens/settings/editor/tool-sheet.tsx+++ b/apps/mobile/app/screens/settings/editor/tool-sheet.tsx@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { ToolId } from "@notesnook/editor/dist/toolbar";import React, { RefObject } from "react";import { View } from "react-native";-import { PressableButton } from "../../../components/ui/pressable";+import { Pressable } from "../../../components/ui/pressable";import { SvgView } from "../../../components/ui/svg";import Paragraph from "../../../components/ui/typography/paragraph";import { presentSheet } from "../../../services/event-manager";@@ -53,9 +53,9 @@ export default function ToolSheet({: null;if (item === "none") return;return (- <PressableButton+ <Pressablekey={item}- type="grayBg"+ type="secondary"onPress={() => {const _data = useDragState.getState().data.slice();if (group.groupIndex !== undefined) {@@ -67,7 +67,7 @@ export default function ToolSheet({}useDragState.getState().setData(_data);}}- customStyle={{+ style={{marginBottom: 10,width: "100%",height: 50,@@ -98,7 +98,7 @@ export default function ToolSheet({{tool?.title}</Paragraph></View>- </PressableButton>+ </Pressable>);},[diff --git a/apps/mobile/app/screens/settings/licenses.tsx b/apps/mobile/app/screens/settings/licenses.tsxindex 162c51531..d100dfb95 100644--- a/apps/mobile/app/screens/settings/licenses.tsx+++ b/apps/mobile/app/screens/settings/licenses.tsx@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React from "react";import { LICENSES } from "./license-data";import { FlatList, Linking, Platform } from "react-native";-import { PressableButton } from "../../components/ui/pressable";+import { Pressable } from "../../components/ui/pressable";import Heading from "../../components/ui/typography/heading";import { SIZE } from "../../utils/size";import { useThemeColors } from "@notesnook/theme";@@ -41,9 +41,9 @@ export const Licenses = () => {const renderItem = React.useCallback(({ item }: { item: LicenseEntry }) => (- <PressableButton+ <Pressablekey={item.name}- customStyle={{+ style={{alignItems: "flex-start",justifyContent: "flex-start",alignSelf: "flex-start",@@ -61,7 +61,7 @@ export const Licenses = () => {<Paragraph>{item.licenseType} | {item.author?.split("<")[0]}</Paragraph>- </PressableButton>+ </Pressable>),[colors.secondary.background]);diff --git a/apps/mobile/app/screens/settings/picker/index.tsx b/apps/mobile/app/screens/settings/picker/index.tsxindex 2d975d840..000305ad9 100644--- a/apps/mobile/app/screens/settings/picker/index.tsx+++ b/apps/mobile/app/screens/settings/picker/index.tsx@@ -21,7 +21,7 @@ import React, { useRef, useState } from "react";import { TouchableHighlight, View } from "react-native";import Menu, { MenuItem } from "react-native-reanimated-material-menu";import Icon from "react-native-vector-icons/MaterialCommunityIcons";-import { PressableButton } from "../../../components/ui/pressable";+import { Pressable } from "../../../components/ui/pressable";import Paragraph from "../../../components/ui/typography/paragraph";import PremiumService from "../../../services/premium";import { useThemeColors } from "@notesnook/theme";@@ -29,6 +29,7 @@ import { SIZE } from "../../../utils/size";import { sleep } from "../../../utils/time";import { verifyUser } from "../functions";import { Dialog } from "../../../components/dialog";+import { getColorLinearShade } from "../../../utils/colors";interface PickerOptions<T> {getValue: () => T;@@ -55,7 +56,7 @@ export function SettingsPicker<T>({requiresVerification = () => false,onVerify}: PickerOptions<T>) {- const { colors } = useThemeColors("contextMenu");+ const { colors, isDark } = useThemeColors("contextMenu");const menuRef = useRef<any>();const [width, setWidth] = useState(0);const [currentValue, setCurrentValue] = useState(getValue());@@ -99,19 +100,25 @@ export function SettingsPicker<T>({backgroundColor: colors.primary.background,width: width,marginTop: 60,- overflow: "hidden"+ overflow: "hidden",+ borderWidth: 0.7,+ borderColor: getColorLinearShade(+ colors.primary.background,+ 0.07,+ isDark+ )}}onRequestClose={() => {menuRef.current?.hide();}}anchor={- <PressableButton+ <PressableonPress={async () => {if (onVerify && !(await onVerify())) return;menuRef.current?.show();}}- type="grayBg"- customStyle={{+ type="secondary"+ style={{flexDirection: "row",alignItems: "center",marginTop: 10,@@ -122,7 +129,7 @@ export function SettingsPicker<T>({><Paragraph>{formatValue(currentValue)}</Paragraph><Icon color={colors.primary.icon} name="menu-down" size={SIZE.md} />- </PressableButton>+ </Pressable>}><Dialog context="local" />diff --git a/apps/mobile/app/screens/settings/section-item.tsx b/apps/mobile/app/screens/settings/section-item.tsxindex 297ef2ada..03bebd495 100644--- a/apps/mobile/app/screens/settings/section-item.tsx+++ b/apps/mobile/app/screens/settings/section-item.tsx@@ -29,7 +29,7 @@ import Icon from "react-native-vector-icons/MaterialCommunityIcons";import ToggleSwitch from "toggle-switch-react-native";import { IconButton } from "../../components/ui/icon-button";import Input from "../../components/ui/input";-import { PressableButton } from "../../components/ui/pressable";+import { Pressable } from "../../components/ui/pressable";import Seperator from "../../components/ui/seperator";import Paragraph from "../../components/ui/typography/paragraph";import SettingsService from "../../services/settings";@@ -92,9 +92,9 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {};return isHidden ? null : (- <PressableButton+ <Pressabledisabled={item.type === "component"}- customStyle={{+ style={{width: "100%",alignItems: "center",padding: 12,@@ -330,7 +330,7 @@ const _SectionItem = ({ item }: { item: SettingSection }) => {{loading ? (<ActivityIndicator size={SIZE.xxl} color={colors.primary.accent} />) : null}- </PressableButton>+ </Pressable>);};export const SectionItem = React.memo(_SectionItem, () => true);diff --git a/apps/mobile/app/screens/settings/settings-data.tsx b/apps/mobile/app/screens/settings/settings-data.tsxindex 06f456306..dc0489066 100644--- a/apps/mobile/app/screens/settings/settings-data.tsx+++ b/apps/mobile/app/screens/settings/settings-data.tsx@@ -70,6 +70,8 @@ import { useDragState } from "./editor/state";import { verifyUser, verifyUserWithApplock } from "./functions";import { SettingSection } from "./types";import { getTimeLeft } from "./user-section";+import ImagePicker from "react-native-image-crop-picker";+type User = any;export const settingsGroups: SettingSection[] = [@@ -132,6 +134,54 @@ export const settingsGroups: SettingSection[] = [icon: "account-cog",description: "Manage account",sections: [+ {+ id: "change-profile-picture",+ name: "Change profile picture",+ description: "Change your profile picture",+ icon: "account-outline",+ modifer: () => {+ const theme =+ useThemeStore.getState().colorScheme === "dark"+ ? useThemeStore.getState().darkTheme+ : useThemeStore.getState().lightTheme;+ ImagePicker.openPicker({+ compressImageMaxWidth: 512,+ compressImageMaxHeight: 512,+ compressImageQuality: 0.8,+ avoidEmptySpaceAroundImage: true,+ cropping: true,+ cropperCircleOverlay: true,+ mediaType: "photo",+ forceJpg: true,+ includeBase64: true,+ writeTempFile: false,+ cropperToolbarColor: theme.scopes.base.primary.background,+ cropperToolbarTitle: "Edit profile picture",+ cropperActiveWidgetColor: theme.scopes.base.primary.accent,+ cropperToolbarWidgetColor: theme.scopes.base.primary.icon+ }).then((image) => {+ console.log(image);+ });+ }+ },+ {+ id: "change-name",+ name: "Change name",+ description: "Change your name",+ modifer: () => {+ presentDialog({+ title: "Change name",+ paragraph: "Change your name",+ positiveText: "Save",+ input: true,+ inputPlaceholder: "Enter new name",+ defaultValue: "Ammar Ahmed",+ positivePress(value) {+ console.log(value);+ }+ });+ }+ },{id: "recovery-key",name: "Save data recovery key",diff --git a/apps/mobile/app/screens/settings/sound-picker.tsx b/apps/mobile/app/screens/settings/sound-picker.tsxindex 8959a3a00..75ee3c8e1 100644--- a/apps/mobile/app/screens/settings/sound-picker.tsx+++ b/apps/mobile/app/screens/settings/sound-picker.tsx@@ -25,7 +25,7 @@ import NotificationSounds, {} from "react-native-notification-sounds";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { IconButton } from "../../components/ui/icon-button";-import { PressableButton } from "../../components/ui/pressable";+import { Pressable } from "../../components/ui/pressable";import Paragraph from "../../components/ui/typography/paragraph";import Notifications from "../../services/notifications";import SettingsService from "../../services/settings";@@ -49,8 +49,8 @@ const SoundItem = ({const { colors } = useThemeColors();const isPlaying = playingSoundId === item.soundID;return (- <PressableButton- customStyle={{+ <Pressable+ style={{flexDirection: "row",alignItems: "center",justifyContent: "space-between",@@ -96,7 +96,7 @@ const SoundItem = ({{item.soundID === "defaultSound" ? null : (<IconButton- type={isPlaying ? "grayAccent" : "gray"}+ type={isPlaying ? "secondaryAccented" : "plain"}size={22}name={isPlaying ? "pause" : "play"}color={isPlaying ? colors.primary.accent : colors.primary.icon}@@ -114,7 +114,7 @@ const SoundItem = ({}}/>)}- </PressableButton>+ </Pressable>);};diff --git a/apps/mobile/app/screens/settings/subscription.js b/apps/mobile/app/screens/settings/subscription.jsindex 3676a672b..c208a0e73 100644--- a/apps/mobile/app/screens/settings/subscription.js+++ b/apps/mobile/app/screens/settings/subscription.js@@ -142,7 +142,7 @@ export const Subscription = () => {}}fontSize={SIZE.sm}height={30}- type="grayAccent"+ type="secondaryAccented"/>) : null}</View>diff --git a/apps/mobile/app/screens/settings/theme-selector.tsx b/apps/mobile/app/screens/settings/theme-selector.tsxindex ca1635bd2..500981fb0 100644--- a/apps/mobile/app/screens/settings/theme-selector.tsx+++ b/apps/mobile/app/screens/settings/theme-selector.tsx@@ -53,7 +53,8 @@ import { SIZE } from "../../utils/size";import { getElevationStyle } from "../../utils/elevation";import { MenuItemsList } from "../../utils/menu-items";import { IconButton } from "../../components/ui/icon-button";-import { PressableButton } from "../../components/ui/pressable";+import { Pressable } from "../../components/ui/pressable";+import { getColorLinearShade } from "../../utils/colors";const THEME_SERVER_URL = "https://themes-api.notesnook.com";//@ts-ignore@@ -260,8 +261,8 @@ function ThemeSelector() {{darkTheme.id === item.id || lightTheme.id === item.id ? (<IconButtonname="check"- type="gray"- customStyle={{+ type="plain"+ style={{borderRadius: 100,paddingHorizontal: 6,alignSelf: "flex-end",@@ -275,7 +276,7 @@ function ThemeSelector() {<Buttontitle={item.colorScheme === "dark" ? "Dark" : "Light"}- type="grayAccent"+ type="secondaryAccented"height={25}buttonType={{color: item.colorScheme === "dark" ? "black" : "#f0f0f060",@@ -284,7 +285,11 @@ function ThemeSelector() {style={{borderRadius: 100,paddingHorizontal: 12,- alignSelf: "flex-end"+ alignSelf: "flex-end",+ borderColor:+ item.colorScheme === "dark"+ ? getColorLinearShade("#000000", 0.1, true)+ : getColorLinearShade("#f0f0f0", 0.1, true)}}fontSize={SIZE.xxs}/>@@ -361,7 +366,9 @@ function ThemeSelector() {<Buttonheight={30}style={{ borderRadius: 100, minWidth: 60 }}- type={colorScheme === "" || !colorScheme ? "accent" : "grayBg"}+ type={+ colorScheme === "" || !colorScheme ? "accent" : "secondary"+ }title="All"fontSize={SIZE.xs}onPress={() => {@@ -371,7 +378,7 @@ function ThemeSelector() {<Buttonstyle={{ borderRadius: 100, minWidth: 60 }}height={30}- type={colorScheme === "dark" ? "accent" : "grayBg"}+ type={colorScheme === "dark" ? "accent" : "secondary"}title="Dark"fontSize={SIZE.xs}onPress={() => {@@ -382,7 +389,7 @@ function ThemeSelector() {style={{ borderRadius: 100, minWidth: 60 }}height={30}fontSize={SIZE.xs}- type={colorScheme === "light" ? "accent" : "grayBg"}+ type={colorScheme === "light" ? "accent" : "secondary"}title="Light"onPress={() => {setColorScheme("light");@@ -394,7 +401,7 @@ function ThemeSelector() {title="Load from file"style={{ borderRadius: 100, minWidth: 60 }}height={30}- type={"grayAccent"}+ type={"secondaryAccented"}icon="folder"fontSize={SIZE.xs}onPress={() => {@@ -741,10 +748,10 @@ const ThemeSetter = ({</View>{darkTheme.id === theme.id || lightTheme.id === theme.id ? (- <PressableButton+ <PressableonPress={applyTheme}- type="grayAccent"- customStyle={{+ type="secondaryAccented"+ style={{paddingVertical: 12}}>@@ -754,7 +761,7 @@ const ThemeSetter = ({: "Applied as light theme"}</Heading><Paragraph size={SIZE.xs}>(Tap to apply again)</Paragraph>- </PressableButton>+ </Pressable>) : (<Buttonstyle={{@@ -767,7 +774,7 @@ const ThemeSetter = ({? "Set as dark theme": "Set as light theme"}- type="grayAccent"+ type="secondaryAccented"/>)}</View>diff --git a/apps/mobile/app/screens/settings/user-section.js b/apps/mobile/app/screens/settings/user-section.jsindex eaf1292f9..3d90958ce 100644--- a/apps/mobile/app/screens/settings/user-section.js+++ b/apps/mobile/app/screens/settings/user-section.js@@ -19,16 +19,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import dayjs from "dayjs";import React from "react";-import { View } from "react-native";+import { Image, View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { TimeSince } from "../../components/ui/time-since";import Heading from "../../components/ui/typography/heading";import Paragraph from "../../components/ui/typography/paragraph";import { useThemeColors } from "@notesnook/theme";-import { useUserStore } from "../../stores/use-user-store";+import { SyncStatus, useUserStore } from "../../stores/use-user-store";import { SUBSCRIPTION_STATUS_STRINGS } from "../../utils/constants";import { SIZE } from "../../utils/size";import { SectionItem } from "./section-item";+import { useNetInfo } from "@react-native-community/netinfo";+import { IconButton } from "../../components/ui/icon-button";++const PROFILE_PIC_URL = `https://picsum.photos/id/177/367/267`;+export const getTimeLeft = (t2) => {let daysRemaining = dayjs(t2).diff(dayjs(), "days");return {@@ -37,10 +42,41 @@ export const getTimeLeft = (t2) => {};};+const ProfilePicPlaceholder = () => {+ const { colors } = useThemeColors();+ return (+ <View+ style={{+ alignItems: "center"+ }}+ >+ <View+ style={{+ backgroundColor: colors.primary.shade,+ borderRadius: 100,+ width: 50,+ height: 50,+ alignItems: "center",+ justifyContent: "center"+ }}+ >+ <Icon+ size={SIZE.xl}+ color={colors.primary.accent}+ name="account-outline"+ />+ </View>+ </View>+ );+};+const SettingsUserSection = ({ item }) => {const { colors } = useThemeColors();const user = useUserStore((state) => state.user);const lastSynced = useUserStore((state) => state.lastSynced);+ const lastSyncStatus = useUserStore((state) => state.lastSyncStatus);+ const { isInternetReachable } = useNetInfo();+ const isOffline = !isInternetReachable;return (<>@@ -49,86 +85,111 @@ const SettingsUserSection = ({ item }) => {<Viewstyle={{paddingHorizontal: 12,- marginTop: 15+ paddingTop: 50,+ borderBottomWidth: 1,+ paddingBottom: 20,+ borderColor: colors.secondary.background}}><Viewstyle={{- alignSelf: "center",- width: "100%",- paddingVertical: 12,- backgroundColor: colors.primary.background,- borderRadius: 5+ flexDirection: "row",+ justifyContent: "space-between",+ width: "100%"}}>+ {/* <ProfilePicPlaceholder /> */}+<Viewstyle={{- justifyContent: "space-between",- flexDirection: "row",- paddingBottom: 4+ flexDirection: "column",+ alignItems: "center",+ width: "100%"}}><Viewstyle={{- flexDirection: "row",- width: "100%",- justifyContent: "space-between"+ borderWidth: 2,+ borderRadius: 100,+ marginBottom: 10,+ borderColor: colors.primary.accent+ }}+ >+ <Image+ source={{+ uri: PROFILE_PIC_URL+ }}+ style={{+ width: 100,+ height: 100,+ borderRadius: 100,+ backgroundColor: "red"+ }}+ />+ </View>++ <View+ style={{+ alignItems: "center"}}>- <View+ <Heading color={colors.primary.accent} size={SIZE.sm}>+ {SUBSCRIPTION_STATUS_STRINGS[+ user.subscription?.type+ ]?.toUpperCase() || "Basic"}+ </Heading>++ <Paragraph color={colors.primary.heading} size={SIZE.lg}>+ Ammar Ahmed+ </Paragraph>++ <Paragraph color={colors.primary.heading} size={SIZE.xs}>+ {user?.email}+ </Paragraph>++ <Paragraphstyle={{- flexDirection: "row"+ flexWrap: "wrap"}}+ size={SIZE.xs}+ color={colors.secondary.heading}>- <View- style={{- alignItems: "center"- }}- >- <View- style={{- backgroundColor: colors.primary.shade,- borderRadius: 100,- width: 50,- height: 50,- alignItems: "center",- justifyContent: "center"- }}- >- <Icon- size={SIZE.xl}- color={colors.primary.accent}- name="account-outline"- />- </View>- </View>-- <View- style={{- marginLeft: 10,- flexGrow: 1- }}- >- <Heading color={colors.primary.accent} size={SIZE.xs}>- {SUBSCRIPTION_STATUS_STRINGS[- user.subscription?.type- ]?.toUpperCase() || "Basic"}- </Heading>-- <Paragraph color={colors.primary.heading} size={SIZE.sm}>- {user?.email}- </Paragraph>- <Paragraph color={colors.secondary.paragraph} size={SIZE.xs}>- Last synced{" "}+ {!user ? (+ "Not logged in"+ ) : lastSynced && lastSynced !== "Never" ? (+ <>+ {lastSyncStatus === SyncStatus.Failed+ ? "Sync failed"+ : "Synced"}{" "}<TimeSince- style={{ fontSize: SIZE.xs, color: colors.secondary.paragraph }}+ style={{+ fontSize: SIZE.xs,+ color: colors.secondary.paragraph+ }}time={lastSynced}/>- </Paragraph>- </View>- </View>+ {isOffline ? " (offline)" : ""}+ </>+ ) : (+ "never"+ )}{" "}+ <Icon+ name="checkbox-blank-circle"+ size={11}+ allowFontScaling+ color={+ !user || lastSyncStatus === SyncStatus.Failed+ ? colors.error.icon+ : isOffline+ ? colors.static.orange+ : colors.success.icon+ }+ />+ </Paragraph></View></View>++ <IconButton name="pencil" /></View></View>diff --git a/apps/mobile/app/services/backup.js b/apps/mobile/app/services/backup.jsindex 97a99b472..fe5f8949f 100644--- a/apps/mobile/app/services/backup.js+++ b/apps/mobile/app/services/backup.js@@ -136,7 +136,7 @@ async function presentBackupCompleteSheet(backupFilePath) {});},actionText: "Never ask again",- type: "grayBg"+ type: "secondary"}]});diff --git a/apps/mobile/app/utils/colors.js b/apps/mobile/app/utils/colors.jsindex 39bf254f5..850e21f5d 100644--- a/apps/mobile/app/utils/colors.js+++ b/apps/mobile/app/utils/colors.js@@ -29,6 +29,25 @@ export const ColorValues = {gray: "#9E9E9E"};+export function getContainerBorder(+ color,+ borderWidth = 0.8,+ colorDepth = 0.05+) {+ return {+ borderWidth: borderWidth,+ borderColor: getColorLinearShade(+ color,+ colorDepth,+ useThemeStore.getState().colorScheme === "dark"+ )+ };+}++export function getColorLinearShade(color, alpha, isDark) {+ return RGB_Linear_Shade(!isDark ? alpha * -1 : alpha, hexToRGBA(color));+}+export function updateStatusBarColor() {StatusBar.setBarStyle(useThemeStore.getState().colorScheme === "dark"diff --git a/apps/mobile/native/package.json b/apps/mobile/native/package.jsonindex a6f42cb35..7920299cd 100644--- a/apps/mobile/native/package.json+++ b/apps/mobile/native/package.json@@ -65,7 +65,8 @@"react-native-zip-archive": "6.0.9","react-native-quick-sqlite": "^8.0.6","react-native-theme-switch-animation": "^0.6.0",- "@ammarahmed/react-native-background-fetch": "^4.2.2"+ "@ammarahmed/react-native-background-fetch": "^4.2.2",+ "react-native-image-crop-picker": "^0.40.2"},"devDependencies": {"@babel/core": "^7.20.0",diff --git a/apps/mobile/package-lock.json b/apps/mobile/package-lock.jsonindex c27d91018..079df17fa 100644--- a/apps/mobile/package-lock.json+++ b/apps/mobile/package-lock.json@@ -27313,6 +27313,7 @@"react-native-gzip": "1.1.0","react-native-html-to-pdf-lite": "^0.9.1","react-native-iap": "12.11.0",+ "react-native-image-crop-picker": "^0.40.2","react-native-image-picker": "4.1.2","react-native-in-app-review": "4.3.3","react-native-keychain": "4.0.5",@@ -43768,6 +43769,14 @@"react-native": ">=0.65.1"}},+ "node_modules/react-native-image-crop-picker": {+ "version": "0.40.2",+ "resolved": "https://registry.npmjs.org/react-native-image-crop-picker/-/react-native-image-crop-picker-0.40.2.tgz",+ "integrity": "sha512-u9iceozX8985vtZV5ozLMfNuCDjtm00GivExSxKwZmwv2wZYyv30VJkKhVJffVYsujvIzMfSCaWJPBsb5nSfZg==",+ "peerDependencies": {+ "react-native": ">=0.40.0"+ }+ },"node_modules/react-native-image-pan-zoom": {"version": "2.1.12","license": "ISC",@@ -78874,6 +78883,7 @@"react-native-gzip": "1.1.0","react-native-html-to-pdf-lite": "^0.9.1","react-native-iap": "12.11.0",+ "react-native-image-crop-picker": "^0.40.2","react-native-image-picker": "4.1.2","react-native-in-app-review": "4.3.3","react-native-keychain": "4.0.5",@@ -86878,6 +86888,12 @@"@expo/config-plugins": "^6.0.1"}},+ "react-native-image-crop-picker": {+ "version": "0.40.2",+ "resolved": "https://registry.npmjs.org/react-native-image-crop-picker/-/react-native-image-crop-picker-0.40.2.tgz",+ "integrity": "sha512-u9iceozX8985vtZV5ozLMfNuCDjtm00GivExSxKwZmwv2wZYyv30VJkKhVJffVYsujvIzMfSCaWJPBsb5nSfZg==",+ "requires": {}+ },"react-native-image-pan-zoom": {"version": "2.1.12","requires": {}diff --git a/apps/mobile/share/share.js b/apps/mobile/share/share.jsindex 64d5ffe48..c15253113 100644--- a/apps/mobile/share/share.js+++ b/apps/mobile/share/share.js@@ -651,7 +651,7 @@ const ShareView = () => {onPress={() => {useShareStore.getState().setAppendNote(null);}}- type={!appendNote ? "transparent" : "gray"}+ type={!appendNote ? "transparent" : "plain"}title="New note"style={{paddingHorizontal: 12,@@ -669,7 +669,7 @@ const ShareView = () => {onPress={() => {setSearchMode("appendNote");}}- type={appendNote ? "transparent" : "gray"}+ type={appendNote ? "transparent" : "plain"}title={`Append to a note`}style={{paddingHorizontal: 12,