Skip to content

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

add button in header to show premium dialog

ammarahm-ed04c46d235d84
diff --git a/apps/mobile/src/views/Editor/EditorHeader.js b/apps/mobile/src/views/Editor/EditorHeader.js
index 0fb85550a..4fc140f9b 100644
--- a/apps/mobile/src/views/Editor/EditorHeader.js
+++ b/apps/mobile/src/views/Editor/EditorHeader.js
@@ -24,7 +24,7 @@ import {
ToastEvent
} from '../../services/EventManager';
import Navigation from '../../services/Navigation';
-import {editing} from '../../utils';
+import {editing, SUBSCRIPTION_STATUS} from '../../utils';
import {db} from '../../utils/database';
import {
eClearEditor,
@@ -32,6 +32,7 @@ import {
eOnLoadNote,
eOpenFullscreenEditor,
eOpenLoginDialog,
+ eOpenPremiumDialog,
eOpenPublishNoteDialog
} from '../../utils/Events';
import {tabBarRef} from '../../utils/Refs';
@@ -284,6 +285,26 @@ const EditorHeader = () => {
flexDirection: 'row'
}}>
<>
+ {!user ||
+ user?.subscription.type === SUBSCRIPTION_STATUS.BASIC ||
+ user?.subscription.type === SUBSCRIPTION_STATUS.TRIAL ? (
+ <ActionIcon
+ name="crown"
+ color={colors.yellow}
+ customStyle={{
+ marginLeft: 10,
+ borderRadius: 5
+ }}
+ top={50}
+ onPress={() => {
+ if (editing.isFocused) {
+ safeKeyboardDismiss();
+ editing.isFocused = true;
+ }
+ eSendEvent(eOpenPremiumDialog);
+ }}
+ />
+ ) : null}
{currentlyEditingNote && (
<ActionIcon
name="cloud-upload-outline"