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
update ui of notesnook pro button in menu
ammarahm-ed369b149f820a
diff --git a/apps/mobile/src/components/Menu/MenuListItem.js b/apps/mobile/src/components/Menu/MenuListItem.jsindex 86a55bc5e..faa9674f2 100644--- a/apps/mobile/src/components/Menu/MenuListItem.js+++ b/apps/mobile/src/components/Menu/MenuListItem.js@@ -83,7 +83,13 @@ export const MenuListItem = ({item, index, noTextMode, testID, rightBtn}) => {textAlign: 'left'}}name={item.icon}- color={isFocused ? colors.accent : colors.pri}+ color={+ item.icon === 'crown'+ ? colors.yellow+ : isFocused+ ? colors.accent+ : colors.pri+ }size={SIZE.lg - 2}/>{isFocused ? (diff --git a/apps/mobile/src/components/Menu/index.js b/apps/mobile/src/components/Menu/index.jsindex eda265d9a..d5133dc85 100644--- a/apps/mobile/src/components/Menu/index.js+++ b/apps/mobile/src/components/Menu/index.js@@ -7,6 +7,7 @@ import {useTracked} from '../../provider';import {Actions} from '../../provider/Actions';import {useSettingStore, useUserStore} from '../../provider/stores';import {DDS} from '../../services/DeviceDetection';+import { eSendEvent } from '../../services/EventManager';import {DrawerScale} from '../../utils/Animations';import {ACCENT,@@ -15,6 +16,7 @@ import {COLOR_SCHEME_LIGHT,setColorScheme} from '../../utils/Colors';+import { eOpenPremiumDialog } from '../../utils/Events';import {MenuItemsList, SUBSCRIPTION_STATUS} from '../../utils/index';import {MMKV} from '../../utils/mmkv';import {ColorSection} from './ColorSection';@@ -52,6 +54,14 @@ export const Menu = React.memo(on: !!colors.night,close: false},++ {+ name: 'Notesnook Pro',+ icon: 'crown',+ func: () => {+ eSendEvent(eOpenPremiumDialog);+ }+ },{name: 'Settings',icon: 'cog-outline',@@ -117,21 +127,29 @@ export const Menu = React.memo(style={{paddingHorizontal: 12}}>- {BottomItemsList.slice(DDS.isLargeTablet() ? 0 : 1, 2).map(- (item, index) => (- <MenuListItem- testID={- item.name == 'Night mode'- ? notesnook.ids.menu.nightmode- : item.name- }- key={item.name}- item={item}- index={index}- ignore={true}- rightBtn={DDS.isLargeTablet() ? null : BottomItemsList[0]}- />- )+ {BottomItemsList.slice(DDS.isLargeTablet() ? 0 : 1, 3).map(+ (item, index) =>+ item.name === 'Notesnook Pro' &&+ (user?.subscription?.type === SUBSCRIPTION_STATUS.TRIAL ||+ user?.subscription?.type ===+ SUBSCRIPTION_STATUS.BASIC) ? null : (+ <MenuListItem+ testID={+ item.name == 'Night mode'+ ? notesnook.ids.menu.nightmode+ : item.name+ }+ key={item.name}+ item={item}+ index={index}+ ignore={true}+ rightBtn={+ DDS.isLargeTablet() || item.name === 'Notesnook Pro'+ ? null+ : BottomItemsList[0]+ }+ />+ ))}</View>