A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
add button types to utils
ammarahm-edcaa4170840fa
diff --git a/apps/mobile/src/utils/ColorUtils.js b/apps/mobile/src/utils/ColorUtils.jsindex f1a14f069..613d5df44 100644--- a/apps/mobile/src/utils/ColorUtils.js+++ b/apps/mobile/src/utils/ColorUtils.js@@ -1,8 +1,8 @@-import {Appearance, Platform, StatusBar} from "react-native";-import {COLOR_SCHEME, COLOR_SCHEME_DARK, COLOR_SCHEME_LIGHT, setAccentColor, setColorScheme} from "./Colors";-import {eSendEvent, eSubscribeEvent, eUnSubscribeEvent} from "../services/EventManager";-import {eThemeUpdated} from "./Events";-import {MMKV} from "./MMKV";+import { Appearance } from "react-native";+import { eSendEvent, eSubscribeEvent, eUnSubscribeEvent } from "../services/EventManager";+import { COLOR_SCHEME, COLOR_SCHEME_DARK, COLOR_SCHEME_LIGHT, setAccentColor, setColorScheme } from "./Colors";+import { eThemeUpdated } from "./Events";+import { MMKV } from "./MMKV";const isValidHex = (hex) => /^#([A-Fa-f0-9]{3,4}){1,2}$/.test(hex);const getChunksFromString = (st, chunkSize) =>diff --git a/apps/mobile/src/utils/index.js b/apps/mobile/src/utils/index.jsindex cea2b3eb3..f8675389f 100755--- a/apps/mobile/src/utils/index.js+++ b/apps/mobile/src/utils/index.js@@ -64,7 +64,6 @@ export const history = {};export async function showContext(event, title) {-event._targetInst.ref.current?.measureInWindow((x, y, w, h) => {dummyRef.current.setNativeProps({style: {@@ -99,7 +98,7 @@ export let dHeight = Dimensions.get('window').height;export function setWidthHeight(size) {dWidth = size.width;- dHeight = size.height+ dHeight = size.height;}export const itemSkus = Platform.select({@@ -144,10 +143,43 @@ export const SUBSCRIPTION_STATUS = {};export const SUBSCRIPTION_STATUS_STRINGS = {- 0: "Expired",- 1: "Trial",- 2: "Pro",- 3: "Pro",- 4: "Cancelled",+ 0: 'Expired',+ 1: 'Trial',+ 2: 'Pro',+ 3: 'Pro',+ 4: 'Cancelled',};+export const BUTTON_TYPES = {+ transparent: {+ primary: 'transparent',+ text: 'accent',+ selected: 'shade',+ },+ gray: {+ primary: 'transparent',+ text: 'icon',+ selected: 'nav',+ },+ grayBg: {+ primary: 'nav',+ text: 'icon',+ selected: 'nav',+ },+ accent: (themeColor, text) => ({+ primary: themeColor,+ text: text,+ selected: 'accent',+ }),+ inverted: {+ primary: 'bg',+ text: 'accent',+ selected: 'bg',+ },+ shade: {+ primary: 'shade',+ text: 'accent',+ selected: 'accent',+ opacity: 0.12,+ },+};