mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
add GetPremium Dialog to ActionSheet
This commit is contained in:
@@ -499,6 +499,7 @@ export default class ActionSheet extends Component {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
]}>
|
]}>
|
||||||
|
{this.props.premium}
|
||||||
<FlatList
|
<FlatList
|
||||||
bounces={false}
|
bounces={false}
|
||||||
keyboardShouldPersistTaps={keyboardShouldPersistTaps}
|
keyboardShouldPersistTaps={keyboardShouldPersistTaps}
|
||||||
|
|||||||
@@ -480,7 +480,7 @@ export const ActionSheetComponent = ({
|
|||||||
backgroundColor: colors.bg,
|
backgroundColor: colors.bg,
|
||||||
paddingHorizontal: 0,
|
paddingHorizontal: 0,
|
||||||
}}>
|
}}>
|
||||||
<GetPremium context="sheet" close={close} offset={-110} />
|
|
||||||
{!note.id && !note.dateCreated ? (
|
{!note.id && !note.dateCreated ? (
|
||||||
<Paragraph style={{marginVertical: 10}}>
|
<Paragraph style={{marginVertical: 10}}>
|
||||||
Start writing to save your note.
|
Start writing to save your note.
|
||||||
|
|||||||
@@ -41,11 +41,12 @@ import RecoveryKeyDialog from '../RecoveryKeyDialog';
|
|||||||
import RestoreDialog from '../RestoreDialog';
|
import RestoreDialog from '../RestoreDialog';
|
||||||
import {VaultDialog} from '../VaultDialog';
|
import {VaultDialog} from '../VaultDialog';
|
||||||
import {TEMPLATE_DELETE, TEMPLATE_PERMANANT_DELETE} from './Templates';
|
import {TEMPLATE_DELETE, TEMPLATE_PERMANANT_DELETE} from './Templates';
|
||||||
import {hexToRGBA} from "../../utils/ColorUtils";
|
import {hexToRGBA} from '../../utils/ColorUtils';
|
||||||
import {DDS} from "../../services/DeviceDetection";
|
import {DDS} from '../../services/DeviceDetection';
|
||||||
import ResultDialog from '../ResultDialog';
|
import ResultDialog from '../ResultDialog';
|
||||||
import SortDialog from "../SortDialog";
|
import SortDialog from '../SortDialog';
|
||||||
import JumpToDialog from '../JumpToDialog';
|
import JumpToDialog from '../JumpToDialog';
|
||||||
|
import {GetPremium,translatePrem} from '../ActionSheetComponent/GetPremium';
|
||||||
|
|
||||||
export class DialogManager extends Component {
|
export class DialogManager extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -295,6 +296,13 @@ export class DialogManager extends Component {
|
|||||||
? hexToRGBA(colors.accent + '19')
|
? hexToRGBA(colors.accent + '19')
|
||||||
: hexToRGBA(colors.shade)
|
: hexToRGBA(colors.shade)
|
||||||
}
|
}
|
||||||
|
premium={
|
||||||
|
<GetPremium
|
||||||
|
context="sheet"
|
||||||
|
close={() => this.actionSheet._hideModal()}
|
||||||
|
offset={50}
|
||||||
|
/>
|
||||||
|
}
|
||||||
keyboardShouldPersistTaps="always"
|
keyboardShouldPersistTaps="always"
|
||||||
delayActionSheetDraw={true}
|
delayActionSheetDraw={true}
|
||||||
delayActionSheetDrawTime={10}
|
delayActionSheetDrawTime={10}
|
||||||
@@ -312,6 +320,7 @@ export class DialogManager extends Component {
|
|||||||
bounceOnOpen={true}
|
bounceOnOpen={true}
|
||||||
gestureEnabled={true}
|
gestureEnabled={true}
|
||||||
onClose={() => {
|
onClose={() => {
|
||||||
|
translatePrem.setValue(-800)
|
||||||
this.onActionSheetHide();
|
this.onActionSheetHide();
|
||||||
}}>
|
}}>
|
||||||
<ActionSheetComponent
|
<ActionSheetComponent
|
||||||
@@ -372,7 +381,6 @@ export class DialogManager extends Component {
|
|||||||
<MoveNoteDialog colors={colors} />
|
<MoveNoteDialog colors={colors} />
|
||||||
<SortDialog colors={colors} />
|
<SortDialog colors={colors} />
|
||||||
<JumpToDialog />
|
<JumpToDialog />
|
||||||
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user