mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 16:09:42 +01:00
mobile: minor improvements
This commit is contained in:
committed by
Abdullah Atta
parent
322f6b7aae
commit
cfe0cded15
@@ -206,13 +206,15 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo, onCancel }) => {
|
||||
code.current = value;
|
||||
//onNext();
|
||||
}}
|
||||
cursorColor={colors.selected.accent}
|
||||
selectionHandleColor={colors.selected.accent}
|
||||
selectionColor={colors.selected.accent}
|
||||
onSubmitEditing={onNext}
|
||||
caretHidden
|
||||
height={60}
|
||||
inputStyle={{
|
||||
fontSize: AppFontSize.lg,
|
||||
textAlign: "center",
|
||||
letterSpacing: 10,
|
||||
letterSpacing: 7,
|
||||
width: 250
|
||||
}}
|
||||
keyboardType={
|
||||
@@ -220,8 +222,6 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo, onCancel }) => {
|
||||
}
|
||||
enablesReturnKeyAutomatically
|
||||
containerStyle={{
|
||||
borderWidth: 0,
|
||||
width: undefined,
|
||||
minWidth: "50%"
|
||||
}}
|
||||
wrapperStyle={{
|
||||
|
||||
@@ -27,7 +27,6 @@ import * as RNIap from "react-native-iap";
|
||||
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
|
||||
import { WebView } from "react-native-webview";
|
||||
import { db } from "../../../common/database";
|
||||
import useGlobalSafeAreaInsets from "../../../hooks/use-global-safe-area-insets";
|
||||
import usePricingPlans from "../../../hooks/use-pricing-plans";
|
||||
import { openLinkInBrowser } from "../../../utils/functions";
|
||||
import { AppFontSize, defaultBorderRadius } from "../../../utils/size";
|
||||
@@ -44,7 +43,6 @@ export const BuyPlan = (props: {
|
||||
goNext: () => void;
|
||||
}) => {
|
||||
const { colors } = useThemeColors();
|
||||
const insets = useGlobalSafeAreaInsets();
|
||||
const [checkoutUrl, setCheckoutUrl] = useState<string>();
|
||||
const pricingPlans = usePricingPlans({
|
||||
planId: props.planId,
|
||||
@@ -66,6 +64,8 @@ export const BuyPlan = (props: {
|
||||
: (pricingPlans.selectedProduct as RNIap.Product)?.productId
|
||||
)?.includes("5");
|
||||
|
||||
console.log(checkoutUrl);
|
||||
|
||||
return checkoutUrl ? (
|
||||
<View
|
||||
style={{
|
||||
@@ -98,11 +98,12 @@ export const BuyPlan = (props: {
|
||||
`
|
||||
}}
|
||||
onMessage={(message) => {
|
||||
const data = JSON.parse(message.nativeEvent.data);
|
||||
if (data.success) {
|
||||
props.goNext();
|
||||
}
|
||||
return;
|
||||
try {
|
||||
const data = JSON.parse(message.nativeEvent.data);
|
||||
if (data.success) {
|
||||
props.goNext();
|
||||
}
|
||||
} catch (e) {}
|
||||
}}
|
||||
domStorageEnabled
|
||||
javaScriptEnabled
|
||||
|
||||
@@ -305,7 +305,8 @@ const SettingsUserSection = ({ item }) => {
|
||||
style={{
|
||||
paddingVertical: DefaultAppStyles.GAP_SMALL,
|
||||
gap: DefaultAppStyles.GAP_VERTICAL,
|
||||
borderRadius: 10
|
||||
borderRadius: 10,
|
||||
marginBottom: 10
|
||||
}}
|
||||
>
|
||||
<View
|
||||
@@ -402,8 +403,7 @@ const SettingsUserSection = ({ item }) => {
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{user.subscription.plan === SubscriptionPlan.FREE ||
|
||||
user.subscription.type === SubscriptionType.BASIC ? null : (
|
||||
{user.subscription.plan === SubscriptionPlan.FREE ? null : (
|
||||
<Notice
|
||||
size="small"
|
||||
text={getSubscriptionStatus()}
|
||||
|
||||
@@ -90,15 +90,6 @@ async function loadProductsAndSubs() {
|
||||
|
||||
function get() {
|
||||
// if (__DEV__ || Config.isTesting === "true") return true;
|
||||
if (
|
||||
SubscriptionType.BASIC !==
|
||||
useUserStore.getState().user?.subscription.type &&
|
||||
(!useUserStore.getState().user?.subscription?.plan ||
|
||||
useUserStore.getState().user?.subscription?.plan ===
|
||||
SubscriptionPlan.FREE)
|
||||
)
|
||||
return true;
|
||||
|
||||
return (
|
||||
useUserStore.getState().user?.subscription?.plan !== undefined &&
|
||||
useUserStore.getState().user?.subscription?.plan !== SubscriptionPlan.FREE
|
||||
|
||||
Reference in New Issue
Block a user