Files
notesnook/apps/mobile/app/utils/constants.js

225 lines
4.8 KiB
JavaScript
Raw Permalink Normal View History

/*
This file is part of the Notesnook project (https://notesnook.com/)
2023-01-16 13:44:52 +05:00
Copyright (C) 2023 Streetwriters (Private) Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2022-08-30 16:13:11 +05:00
import { Platform } from "react-native";
import { Monographs } from "../screens/notes/monographs";
2022-02-28 13:48:59 +05:00
export const STORE_LINK =
Platform.OS === "ios"
? "https://apps.apple.com/us/app/notesnook/id1544027013"
: "https://play.google.com/store/apps/details?id=com.streetwriters.notesnook";
2022-02-28 13:48:59 +05:00
export const GROUP = {
default: "default",
None: "none",
abc: "abc",
year: "year",
week: "week",
month: "month"
2022-02-28 13:48:59 +05:00
};
export const SORT = {
dateModified: "Date modified",
dateEdited: "Date edited",
dateCreated: "Date created",
title: "Title"
2022-02-28 13:48:59 +05:00
};
export const itemSkus = [
"com.streetwriters.notesnook.sub.mo",
"com.streetwriters.notesnook.sub.yr",
"com.streetwriters.notesnook.sub.yr.15",
"com.streetwriters.notesnook.sub.mo.15",
"com.streetwriters.notesnook.sub.mo.ofr",
"com.streetwriters.notesnook.sub.yr.trialoffer",
"com.streetwriters.notesnook.sub.mo.trialoffer",
"com.streetwriters.notesnook.sub.mo.tier1",
"com.streetwriters.notesnook.sub.yr.tier1",
"com.streetwriters.notesnook.sub.mo.tier2",
"com.streetwriters.notesnook.sub.yr.tier2",
"com.streetwriters.notesnook.sub.mo.tier3",
"com.streetwriters.notesnook.sub.yr.tier3"
2022-02-28 13:48:59 +05:00
];
export const SUBSCRIPTION_STATUS = {
BASIC: 0,
TRIAL: 1,
BETA: 2,
PREMIUM: 5,
PREMIUM_EXPIRED: 6,
PREMIUM_CANCELLED: 7
};
export const SUBSCRIPTION_STATUS_STRINGS = {
0: "Basic",
1: "Trial",
2: Platform.OS === "ios" ? "Pro" : "Beta",
5: "Pro",
6: "Expired",
7: "Pro"
2022-02-28 13:48:59 +05:00
};
export const SUBSCRIPTION_PROVIDER = {
0: null,
1: {
type: "iOS",
title: "Subscribed on iOS",
desc: "You subscribed to Notesnook Pro on iOS using Apple In App Purchase. You can cancel anytime with your iTunes Account settings.",
icon: "ios"
2022-02-28 13:48:59 +05:00
},
2: {
type: "Android",
title: "Subscribed on Android",
desc: "You subscribed to Notesnook Pro on Android Phone/Tablet using Google In App Purchase.",
icon: "android"
2022-02-28 13:48:59 +05:00
},
3: {
type: "Web",
title: "Subscribed on Web",
desc: "You subscribed to Notesnook Pro on the Web/Desktop App.",
icon: "web"
2022-02-28 13:48:59 +05:00
}
};
2022-11-18 17:30:29 +05:00
export const WeekDayNames = {
0: "Sunday",
1: "Monday",
2: "Tuesday",
3: "Wednesday",
4: "Thursday",
5: "Friday",
6: "Saturday"
};
2022-02-28 13:48:59 +05:00
export const MenuItemsList = [
{
name: "Notes",
icon: "home-variant-outline",
2022-02-28 13:48:59 +05:00
close: true
},
{
name: "Notebooks",
icon: "book-outline",
2022-02-28 13:48:59 +05:00
close: true
},
{
name: "Favorites",
icon: "star-outline",
2022-02-28 13:48:59 +05:00
close: true
},
{
name: "Tags",
icon: "pound",
2022-02-28 13:48:59 +05:00
close: true
},
2022-11-17 15:48:07 +05:00
{
name: "Reminders",
2023-01-11 17:15:00 +05:00
icon: "bell",
close: true,
2023-01-16 13:44:52 +05:00
isBeta: true
2022-11-17 15:48:07 +05:00
},
2022-02-28 13:48:59 +05:00
{
name: "Monographs",
icon: "text-box-multiple-outline",
2022-02-28 13:48:59 +05:00
close: true,
func: () => {
2022-04-24 05:59:14 +05:00
Monographs.navigate();
2022-02-28 13:48:59 +05:00
}
},
{
name: "Trash",
icon: "delete-outline",
2022-02-28 13:48:59 +05:00
close: true
}
];
export const BUTTON_TYPES = {
transparent: {
primary: "transparent",
text: "accent",
selected: "nav"
2022-02-28 13:48:59 +05:00
},
gray: {
primary: "transparent",
text: "icon",
selected: "transGray"
2022-02-28 13:48:59 +05:00
},
grayBg: {
primary: "nav",
text: "icon",
selected: "nav"
2022-02-28 13:48:59 +05:00
},
grayAccent: {
primary: "nav",
text: "accent",
selected: "nav"
2022-02-28 13:48:59 +05:00
},
accent: (themeColor, text) => ({
primary: themeColor,
text: text,
selected: themeColor
}),
inverted: {
primary: "bg",
text: "accent",
selected: "bg"
2022-02-28 13:48:59 +05:00
},
white: {
primary: "transparent",
text: "light",
selected: "transGray"
2022-02-28 13:48:59 +05:00
},
shade: {
primary: "shade",
text: "accent",
selected: "accent",
2022-02-28 13:48:59 +05:00
opacity: 0.12
},
error: {
primary: "red",
text: "red",
selected: "red",
2022-02-28 13:48:59 +05:00
opacity: 0.12
},
errorShade: {
primary: "transparent",
text: "red",
selected: "red",
2022-02-28 13:48:59 +05:00
opacity: 0.12
},
warn: {
primary: "warningBg",
text: "warningText",
selected: "warningBg",
2022-02-28 13:48:59 +05:00
opacity: 0.12
}
};
export const bgTaskOptions = {
taskName: "notesnookSync",
taskTitle: "Notesnook Sync",
taskDesc: "Syncing your notes.",
2022-02-28 13:48:59 +05:00
taskIcon: {
name: "ic_stat_name",
type: "drawable"
2022-02-28 13:48:59 +05:00
},
color: "#ffffff",
linkingURI: "com.streetwriters.notesnook://launch"
2022-02-28 13:48:59 +05:00
};