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
mobile: add oss licenses (#2018)
Ammar Ahmedeff2e475ff55
diff --git a/apps/mobile/app/screens/settings/components.tsx b/apps/mobile/app/screens/settings/components.tsxindex b8559d26b..4e8071a7a 100644--- a/apps/mobile/app/screens/settings/components.tsx+++ b/apps/mobile/app/screens/settings/components.tsx@@ -22,6 +22,7 @@ import { AccentColorPicker, HomagePageSelector } from "./appearance";import { AutomaticBackupsSelector } from "./backup-restore";import DebugLogs from "./debug";import { ConfigureToolbar } from "./editor/configure-toolbar";+import { Licenses } from "./licenses";import SoundPicker from "./sound-picker";import { Subscription } from "./subscription";export const components: { [name: string]: ReactElement } = {@@ -31,5 +32,6 @@ export const components: { [name: string]: ReactElement } = {subscription: <Subscription />,configuretoolbar: <ConfigureToolbar />,"debug-logs": <DebugLogs />,- "sound-picker": <SoundPicker />+ "sound-picker": <SoundPicker />,+ licenses: <Licenses />};diff --git a/apps/mobile/app/screens/settings/license-data.js b/apps/mobile/app/screens/settings/license-data.jsnew file mode 100644index 000000000..9ad9ff277--- /dev/null+++ b/apps/mobile/app/screens/settings/license-data.js@@ -0,0 +1,466 @@+/* eslint-disable header/header */+export const LICENSES = [+ {+ name: "@callstack/repack",+ licenseType: "MIT",+ author: "zamotany <[email protected]>",+ link: "https://github.com/callstack/repack"+ },+ {+ name: "@react-native-clipboard/clipboard",+ licenseType: "MIT",+ author: "M.Haris Baig <[email protected]>",+ link: "https://github.com/react-native-clipboard/clipboard"+ },+ {+ name: "@react-native-community/checkbox",+ licenseType: "MIT",+ author: "Nicholas Lee <[email protected]>",+ link: "https://github.com/react-native-community/react-native-checkbox"+ },+ {+ name: "@react-native-community/netinfo",+ licenseType: "MIT",+ author: "Matt Oakes <[email protected]>",+ link: "https://github.com/react-native-netinfo/react-native-netinfo"+ },+ {+ name: "@react-native-community/toolbar-android",+ licenseType: "MIT",+ author: "Connectdotz <[email protected]>",+ link: "https://github.com/react-native-community/toolbar-android"+ },+ {+ name: "@react-native-masked-view/masked-view",+ licenseType: "MIT",+ author: "Mike Nedosekin <[email protected]>",+ link: "https://github.com/react-native-masked-view/masked-view"+ },+ {+ name: "@react-navigation/elements",+ licenseType: "MIT",+ author: "n/a",+ link: "https://github.com/react-navigation/react-navigation"+ },+ {+ name: "@react-navigation/native",+ licenseType: "MIT",+ author: "n/a",+ link: "https://github.com/react-navigation/react-navigation"+ },+ {+ name: "@react-navigation/native-stack",+ licenseType: "MIT",+ author: "n/a",+ link: "https://github.com/react-navigation/react-navigation"+ },+ {+ name: "@sayem314/react-native-keep-awake",+ licenseType: "MIT",+ author: "Sayem Chowdhury",+ link: "https://github.com/sayem314/react-native-keep-awake"+ },+ {+ name: "deprecated-react-native-prop-types",+ licenseType: "MIT",+ author: "n/a",+ link: "[email protected]:facebookarchive/react-native-deprecated-modules"+ },+ {+ name: "react",+ licenseType: "MIT",+ author: "n/a",+ link: "https://github.com/facebook/react"+ },+ {+ name: "react-native",+ licenseType: "MIT",+ author: "n/a",+ link: "https://github.com/facebook/react-native"+ },+ {+ name: "react-native-background-actions",+ licenseType: "MIT",+ author: "Rapsssito [email protected]",+ link: "https://github.com/Rapsssito/react-native-background-actions"+ },+ {+ name: "react-native-begin-background-task",+ licenseType: "MIT",+ author: "Ivan Zotov <[email protected]>",+ link: "n/a"+ },+ {+ name: "react-native-bootsplash",+ licenseType: "MIT",+ author: "Mathieu Acthernoene <[email protected]>",+ link: "https://github.com/zoontek/react-native-bootsplash"+ },+ {+ name: "react-native-config",+ licenseType: "MIT",+ author: "Pedro Belo",+ link: "https://github.com/luggit/react-native-config"+ },+ {+ name: "react-native-device-info",+ licenseType: "MIT",+ author:+ "Rebecca Hughes <[email protected]> (https://github.com/rebeccahughes)",+ link: "https://github.com/react-native-device-info/react-native-device-info"+ },+ {+ name: "react-native-document-picker",+ licenseType: "MIT",+ author:+ "Elyx0 <[email protected]> (https://github.com/rnmods), Vojtech Novak ([email protected])",+ link: "https://github.com/rnmods/react-native-document-picker"+ },+ {+ name: "react-native-eventsource",+ licenseType: "MIT",+ author: "João Ribeiro [email protected]",+ link: "n/a"+ },+ {+ name: "react-native-exit-app",+ licenseType: "MIT",+ author: "Wumke",+ link: "n/a"+ },+ {+ name: "react-native-file-viewer",+ licenseType: "MIT",+ author: "Vincenzo Scamporlino",+ link: "git://github.com/vinzscam/react-native-file-viewer"+ },+ {+ name: "react-native-fingerprint-scanner",+ licenseType: "MIT",+ author: "Hieu Van (https://github.com/hieuvp)",+ link: "n/a"+ },+ {+ name: "react-native-gesture-handler",+ licenseType: "MIT",+ author: "Krzysztof Magiera [email protected]",+ link: "https://github.com/software-mansion/react-native-gesture-handler"+ },+ {+ name: "react-native-get-random-values",+ licenseType: "MIT",+ author: "n/a",+ link: "https://github.com/LinusU/react-native-get-random-values"+ },+ {+ name: "react-native-html-to-pdf-lite",+ licenseType: "MIT",+ author: "Oni Benjamin <[email protected]>",+ link: "https://github.com/Onibenjo/react-native-html-to-pdf"+ },+ {+ name: "react-native-iap",+ licenseType: "MIT",+ author: "dooboolab",+ link: "https://github.com/dooboolab/react-native-iap"+ },+ {+ name: "react-native-image-picker",+ licenseType: "MIT",+ author: "Johan du Toit (Johan-dutoit)",+ link: "https://github.com/react-native-image-picker/react-native-image-picker"+ },+ {+ name: "react-native-keychain",+ licenseType: "MIT",+ author: "Joel Arvidsson [email protected]",+ link: "git://github.com/oblador/react-native-keychain"+ },+ {+ name: "react-native-mmkv-storage",+ licenseType: "MIT",+ author: "Ammar Ahmed for @ammarahm-ed",+ link: "https://github.com/ammarahm-ed/react-native-mmkv-storage"+ },+ {+ name: "react-native-orientation",+ licenseType: "ISC",+ author: "Yamill Vallecillo <[email protected]> (github.com/yamill)",+ link: "n/a"+ },+ {+ name: "react-native-privacy-snapshot",+ licenseType: "MIT",+ author: "Roger Chapman",+ link: "n/a"+ },+ {+ name: "react-native-reanimated",+ licenseType: "MIT",+ author: "Krzysztof Magiera [email protected]",+ link: "https://github.com/software-mansion/react-native-reanimated"+ },+ {+ name: "react-native-safe-area-context",+ licenseType: "MIT",+ author: "Janic Duplessis <[email protected]>",+ link: "https://github.com/th3rdwave/react-native-safe-area-context"+ },+ {+ name: "react-native-scoped-storage",+ licenseType: "MIT",+ author: "Ammar Ahmed @ammarahm-ed",+ link: "https://github.com/ammarahm-ed/react-native-scoped-storage"+ },+ {+ name: "react-native-screens",+ licenseType: "MIT",+ author: "Krzysztof Magiera [email protected]",+ link: "https://github.com/software-mansion/react-native-screens"+ },+ {+ name: "react-native-securerandom",+ licenseType: "MIT",+ author: "Rob Hogan [email protected] https://github.com/robhogan",+ link: "https://github.com/robhogan/react-native-securerandom"+ },+ {+ name: "react-native-share",+ licenseType: "MIT",+ author: "Esteban Fuentealba [email protected]",+ link: "https://github.com/react-native-community/react-native-share"+ },+ {+ name: "@ammarahmed/react-native-sodium",+ licenseType: "n/a",+ author: "n/a",+ link: "https://github.com/lyubo/react-native-sodium"+ },+ {+ name: "react-native-svg",+ licenseType: "MIT",+ author: "n/a",+ link: "https://github.com/react-native-community/react-native-svg"+ },+ {+ name: "react-native-tooltips",+ licenseType: "Apache License",+ author: "Pranav Raj Singh Chauhan",+ link: "https://github.com/prscX/react-native-tooltips"+ },+ {+ name: "react-native-vector-icons",+ licenseType: "MIT",+ author: "Joel Arvidsson [email protected]",+ link: "git://github.com/oblador/react-native-vector-icons"+ },+ {+ name: "react-native-webview",+ licenseType: "MIT",+ author: "Jamon Holmgren <[email protected]>",+ link: "https://github.com/react-native-webview/react-native-webview"+ },+ {+ name: "rn-extensions-share",+ licenseType: "MIT",+ author:+ "Djorkaeff Alexandre [email protected] http://github.com/djorkaeffalexandre",+ link: "https://github.com/RocketChat/rn-extensions-share"+ },+ {+ name: "rn-fetch-blob",+ licenseType: "MIT",+ author: "Joltup",+ link: "https://github.com/joltup/rn-fetch-blob"+ },+ {+ name: "react-native-gzip",+ licenseType: "MIT",+ author:+ "ammarahm-ed <[email protected]> (https://github.com/ammarahm-ed)",+ link: "https://github.com/ammarahm-ed/react-native-gzip"+ },+ {+ name: "@shopify/flash-list",+ licenseType: "MIT",+ author: "shopify",+ link: "https://github.com/Shopify/flash-list"+ },+ {+ name: "@notifee/react-native",+ licenseType: "Apache-2.0",+ author: "Invertase <[email protected]> (http://invertase.io)",+ link: "https://github.com/invertase/notifee"+ },+ {+ name: "react-native-modal-datetime-picker",+ licenseType: "MIT",+ author: "Mazzarolo Matteo",+ link: "https://github.com/mmazzarolo/react-native-modal-datetime-picker"+ },+ {+ name: "@react-native-community/datetimepicker",+ licenseType: "MIT",+ author:+ "Martijn Swaagman <[email protected]> (https://github.com/swaagie)",+ link: "https://github.com/react-native-community/datetimepicker"+ },+ {+ name: "react-native-date-picker",+ licenseType: "MIT",+ author: "henninghall",+ link: "ssh://[email protected]/henninghall/react-native-date-picker"+ },+ {+ name: "react-native-notification-sounds",+ licenseType: "MIT",+ author: "Asad Iqbal [email protected]",+ link: "https://github.com/saadqbal/react-native-notification-sounds"+ },+ {+ name: "@flyerhq/react-native-link-preview",+ licenseType: "MIT",+ author: "Oleksandr Demchenko <[email protected]>",+ link: "https://github.com/flyerhq/react-native-link-preview#readme"+ },+ {+ name: "@mdi/js",+ licenseType: "Apache-2.0",+ author: "Austin Andrews",+ link: "https://github.com/Templarian/MaterialDesign-JS"+ },+ {+ name: "absolutify",+ licenseType: "MIT",+ author:+ "Beau Sorensen <[email protected]> (http://github.com/sorensen)",+ link: "git://github.com/sorensen/absolutify"+ },+ {+ name: "buffer",+ licenseType: "MIT",+ author: "Feross Aboukhadijeh [email protected] https://feross.org",+ link: "git://github.com/feross/buffer"+ },+ {+ name: "dayjs",+ licenseType: "MIT",+ author: "iamkun",+ link: "https://github.com/iamkun/dayjs"+ },+ {+ name: "entities",+ licenseType: "BSD-2-Clause",+ author: "Felix Boehm <[email protected]>",+ link: "git://github.com/fb55/entities"+ },+ {+ name: "html-to-text",+ licenseType: "MIT",+ author: "Malte Legenhausen [email protected]",+ link: "git://github.com/html-to-text/node-html-to-text"+ },+ {+ name: "phone",+ licenseType: "MIT",+ author: "AfterShip",+ link: "https://github.com/aftership/phone"+ },+ {+ name: "qclone",+ licenseType: "MIT",+ author: "Yuriy Khomenko",+ link: "https://github.com/Yuriy-Khomenko/qclone"+ },+ {+ name: "react-native-actions-sheet",+ licenseType: "MIT",+ author: "ammarahm-ed",+ link: "https://github.com/ammarahm-ed/react-native-actions-sheet"+ },+ {+ name: "react-native-check-version",+ licenseType: "MIT",+ author: "Flexible Agency <[email protected]>",+ link: "n/a"+ },+ {+ name: "react-native-drax",+ licenseType: "MIT",+ author: "Joe Lafiosca <[email protected]>",+ link: "ssh://[email protected]/nuclearpasta/react-native-drax"+ },+ {+ name: "react-native-image-zoom-viewer",+ licenseType: "MIT",+ author: "ascoders",+ link: "https://github.com/ascoders/react-native-image-viewer"+ },+ {+ name: "react-native-progress",+ licenseType: "MIT",+ author: "Joel Arvidsson [email protected]",+ link: "git://github.com/oblador/react-native-progress"+ },+ {+ name: "react-native-qrcode-svg",+ licenseType: "MIT",+ author: "awesomejerry",+ link: "ssh://[email protected]/awesomejerry/react-native-qrcode-svg"+ },+ {+ name: "react-native-reanimated-material-menu",+ licenseType: "MIT",+ author:+ "Maksim Milyutin <[email protected]> (https://github.com/mxck) & Ammar Ahmed <[email protected]> (https://github.com/ammarahm-ed/)",+ link: "n/a"+ },+ {+ name: "react-native-reanimated-progress-bar",+ licenseType: "MIT",+ author: "Serhii Tanskiy",+ link: "https://github.com/serzmerz/react-native-progress-bar"+ },+ {+ name: "@streetwriters/showdown",+ licenseType: "MIT",+ author: "Estevão Santos",+ link: "https://github.com/showdownjs/showdown"+ },+ {+ name: "toggle-switch-react-native",+ licenseType: "MIT",+ author: "aminebenkeroum",+ link: "https://github.com/aminebenkeroum/toggle-switch-react-native"+ },+ {+ name: "url",+ licenseType: "MIT",+ author: "n/a",+ link: "https://github.com/defunctzombie/node-url"+ },+ {+ name: "validator",+ licenseType: "MIT",+ author: "Chris O'Hara <[email protected]>",+ link: "https://github.com/validatorjs/validator.js"+ },+ {+ name: "zustand",+ licenseType: "MIT",+ author: "Paul Henschel",+ link: "https://github.com/pmndrs/zustand"+ },+ {+ name: "fflate",+ licenseType: "MIT",+ author: "Arjun Barrett <[email protected]>",+ link: "https://github.com/101arrowz/fflate"+ },+ {+ name: "timeago.js",+ licenseType: "MIT",+ author: "hustcc https://timeago.org",+ link: "https://github.com/hustcc/timeago.js"+ }+];diff --git a/apps/mobile/app/screens/settings/licenses.tsx b/apps/mobile/app/screens/settings/licenses.tsxnew file mode 100644index 000000000..df3025dfa--- /dev/null+++ b/apps/mobile/app/screens/settings/licenses.tsx@@ -0,0 +1,71 @@+/*+This file is part of the Notesnook project (https://notesnook.com/)++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/>.+*/+import React from "react";+import { LICENSES } from "./license-data";+import { FlatList, Linking } from "react-native";+import { PressableButton } from "../../components/ui/pressable";+import Heading from "../../components/ui/typography/heading";+import { SIZE } from "../../utils/size";+import { useThemeStore } from "../../stores/use-theme-store";+import Paragraph from "../../components/ui/typography/paragraph";++type LicenseEntry = {+ name: string;+ licenseType: string;+ author: string;+ link: string;+};++export const Licenses = () => {+ const colors = useThemeStore((state) => state.colors);+ const renderItem = React.useCallback(+ ({ item }: { item: LicenseEntry }) => (+ <PressableButton+ key={item.name}+ customStyle={{+ alignItems: "flex-start",+ justifyContent: "flex-start",+ alignSelf: "flex-start",+ padding: 12,+ borderBottomWidth: 1,+ borderBottomColor: colors.nav,+ borderRadius: 0+ }}+ onPress={() => {+ Linking.openURL(item.link).catch(console.log);+ }}+ >+ <Heading size={SIZE.sm}>{item.name}</Heading>+ <Paragraph>+ {item.licenseType} | {item.author?.split("<")[0]}+ </Paragraph>+ </PressableButton>+ ),+ [colors.nav]+ );+ return (+ <FlatList+ data={LICENSES}+ style={{+ width: "100%"+ }}+ renderItem={renderItem}+ />+ );+};diff --git a/apps/mobile/app/screens/settings/settings-data.tsx b/apps/mobile/app/screens/settings/settings-data.tsxindex 6134f0eb5..e9224c05e 100644--- a/apps/mobile/app/screens/settings/settings-data.tsx+++ b/apps/mobile/app/screens/settings/settings-data.tsx@@ -1088,6 +1088,14 @@ export const settingsGroups: SettingSection[] = [}},description: "Read our privacy policy"+ },+ {+ id: "licenses",+ name: "Open source Licenses",+ type: "screen",+ component: "licenses",+ description: "Open source libraries used in Notesnook",+ icon: "open-source-initiative"}]},