mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-02 12:14:48 +02:00
web: treat mac app store build specially
This commit is contained in:
@@ -40,7 +40,7 @@ import { db } from "../../../common/db";
|
||||
import { useCheckoutStore } from "./store";
|
||||
import { getCurrencySymbol } from "./helpers";
|
||||
import { Theme } from "@notesnook/theme";
|
||||
import { isMacApp } from "../../../utils/platform";
|
||||
import { isMacStoreApp } from "../../../utils/platform";
|
||||
|
||||
type BuyDialogProps = {
|
||||
couponCode?: string;
|
||||
@@ -284,7 +284,7 @@ function TrialOrUpgrade(props: TrialOrUpgradeProps) {
|
||||
{formatPeriod(plan.period)}
|
||||
</Text>
|
||||
)}
|
||||
{isMacApp() ? (
|
||||
{isMacStoreApp() ? (
|
||||
<>
|
||||
<Text variant={"subBody"} mt={2} sx={{ textAlign: "center" }}>
|
||||
You cannot upgrade from the macOS app.
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Text, Flex, Box } from "@theme-ui/components";
|
||||
import { isMacApp } from "../../../utils/platform";
|
||||
import { isMacStoreApp } from "../../../utils/platform";
|
||||
import {
|
||||
Accent,
|
||||
Android,
|
||||
@@ -122,7 +122,7 @@ const sections: Section[] = [
|
||||
title: "100% cross platform",
|
||||
detail: "Notesnook is available on all major platforms — for everyone.",
|
||||
columns: 8,
|
||||
isVisible: () => !isMacApp(),
|
||||
isVisible: () => !isMacStoreApp(),
|
||||
features: [
|
||||
{
|
||||
id: "ios",
|
||||
|
||||
@@ -126,8 +126,8 @@ export function isDesktop() {
|
||||
return "api" in window;
|
||||
}
|
||||
|
||||
export function isMacApp() {
|
||||
return true; // window.os === "darwin";
|
||||
export function isMacStoreApp() {
|
||||
return window.os === "mas";
|
||||
}
|
||||
|
||||
export function isTesting() {
|
||||
|
||||
@@ -54,7 +54,7 @@ import { appVersion } from "../utils/version";
|
||||
import { CHECK_IDS } from "@notesnook/core/common";
|
||||
import Tip from "../components/tip";
|
||||
import Toggle from "../components/toggle";
|
||||
import { isDesktop, isMacApp } from "../utils/platform";
|
||||
import { isDesktop, isMacStoreApp } from "../utils/platform";
|
||||
import Vault from "../common/vault";
|
||||
import { isUserPremium } from "../hooks/use-is-user-premium";
|
||||
import { Slider } from "@theme-ui/components";
|
||||
@@ -103,11 +103,11 @@ const otherItems = [
|
||||
link: "https://discord.com/invite/zQBK97EE22"
|
||||
},
|
||||
{
|
||||
title: isMacApp() ? "Download for iOS" : "Download for iOS & Android",
|
||||
description: isMacApp()
|
||||
title: isMacStoreApp() ? "Download for iOS" : "Download for iOS & Android",
|
||||
description: isMacStoreApp()
|
||||
? "Notesnook is also available on iOS"
|
||||
: "Notesnook is available on Android & iOS",
|
||||
link: isMacApp()
|
||||
link: isMacStoreApp()
|
||||
? "https://apps.apple.com/us/app/notesnook-take-private-notes/id1544027013"
|
||||
: "https://notesnook.com/"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user