Files
notesnook/apps/mobile/app/components/sheets/update/index.js

223 lines
14 KiB
JavaScript
Raw 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
2022-08-29 16:19:17 +05:00
import React, { useEffect, useState } from "react";
import { Linking, View } from "react-native";
2023-03-16 21:22:21 +05:00
import { ScrollView } from "react-native-actions-sheet";
2022-08-29 16:19:17 +05:00
import { checkVersion } from "react-native-check-version";
import Config from "react-native-config";
import deviceInfoModule from "react-native-device-info";
global: implement the new theme engine (#2196) * mobile: theme * theme: add theme engine * mobile: migrate app colors to new theme engine * mobile: fixed some colors * mobile: fix colors * mobile: store theme info in store * theme: `ColorsType` -> `Variants` * theme: use explicit return type for `useThemeColors` * theme: add `backdrop` color * mobile: `const colors` -> `const {colors} * theme: add default pitch-black theme * mobile: manage theme state via theme-engine * mobile: add theme scopes * mobile: commit * mobile: fix button width on applock screen * mobile: fix typings * mobile: fix theme definition * web: add partial support for custom themes only context menus & popups are left. * theme: add dialog & sheet scopes * global: sync with master branch and make everything work again * mobile: fix theme-engine usage in editor & app * mobile: fix colors * mobile: fix colors * mobile: cleanup * mobile: fix status bar color incorrect on entering foreground * mobile: fix dark color scheme * web: move emotion theme provider to @notesnook/theme * editor: add support for theme enging * web: adjust hover & focus colors on list item * mobile: migrate share ext to theme engine * mobile: fix editor theme provider * clipper: add support for the new theme engine * mobile: fix statusbar color on switch from bg * misc: fix build * mobile: fix build * misc: fix colors * mobile: fix theme colors * mobile: fix bottom padding * server: add theme server * theme: add previewColors * server: support themes query pagination * mobile: add client from theme server * server: reset cache on sync repo * server: fix types * server: show ip & port on start server * server: theme updates * web: finalize new theme engine on web * editor: fix build * global: fix @emotion/react version to 11.11.1 * editor: update katex patch * web: fix imports * global: fix @trpc/* versions * global: a huge set of changes 1. get rid of ThemeVariant. All variants can now be accessed anywhere. 2. remove unnecessary button variants 3. make buttons more responsive 4. implement themes server * web: add support for theme search and theme switching * global: update lockfiles * mobile: fix error * theme: use vite-plugin-react to start theme server * web: add support for auto updating themes * mobile: update theme selector * mobile: update theme if new verison available * theme: add `isomorphic-fetch` package * global: update lockfiles * web: add theme details dialog * setup: add scope for themes server in bootstrap script * web: add production server url * web: update lockfile * web: update lockfile * mobile: remove `react-native-blob-util` * web: add support for endless scrolling in themes * web: bring back dark/light mode option in settings * web: fix colors in places * theme: add selected variant * global: use single typescript version across the projects * web: fix sort & group options not having submenus * web: apply selected variant where appropriate * ui: use unique id for all menu items * config: add ui scope for commits * theme: export button variant creation fn * web: fix only 1 theme showing in theme selector * web: fix navigation item hover & other colors * mobile: update theme * editor: fix toolbar group alignments * editor: set theme provider at app level * theme: use scope name to get current scope * mobile: fix color usage in message card * theme: remove caching * editor: bring back icons in table menus * theme: use zustand to manage theme engine state * web: fix login/signup theming * mobile: fix webpack build * misc: remove ThemeProvider usage * editor: adjust theming and styling of editor toolbar * mobile: refactor * editor: fix toolbar group padding everywhere * web: fix settings sidebar is not scrollable * web: add loading indicator for themes loading * mobile: fix warning * mobile: fix ui issues * web: fix Loader errors on build * theme: add getPreviewColors & validateTheme * theme: fix theme validation * mobile: load theme from file * mobile: fix share extension crash * mobile: rename state * theme: add sourceURL property * theme: refactor theme-engine * web: add support for loading theme from file * web: improve button hover interaction * mobile: fix floating button color * mobile: update theme * mobile: fix border radius of context menu * mobile: set sheet overlay color to theme backdrop * mobile: set sidemenu backdrop to theme backdrop --------- Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2023-08-01 12:07:21 +05:00
import { useThemeColors } from "@notesnook/theme";
import { STORE_LINK } from "../../../utils/constants";
import { SIZE } from "../../../utils/size";
import { Button } from "../../ui/button";
import Seperator from "../../ui/seperator";
2022-08-29 16:19:17 +05:00
import { SvgView } from "../../ui/svg";
import { ProgressBarComponent } from "../../ui/svg/lazy";
import Heading from "../../ui/typography/heading";
import Paragraph from "../../ui/typography/paragraph";
2024-02-05 12:14:45 +05:00
import { getContainerBorder } from "../../../utils/colors";
const UPDATE_SVG = (color) =>
2022-01-04 13:08:02 +05:00
`<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="774" height="669.5" viewBox="0 0 774 669.5" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M938.2145,322.3829C936.73266,207.5841,878.16775,115.25,806.13079,115.25c-43.29082,0-81.71777,33.346-105.81477,84.87331l28.33157,71.08654-39.15446-43.81576c-9.876,29.64743-15.48115,63.49569-15.48115,99.44475a324.20917,324.20917,0,0,0,9.98686,80.80891l75.92761-12.24058-67.9507,37.99628c22.13728,60.69069,62.59851,102.1414,109.23586,104.87608l-8.988,244.5184,27.81449.99338-5.94527-245.75716c66.41162-6.32443,119.60967-91.20375,123.8712-197.42794l-45.89372-25.66252Z" transform="translate(-213 -115.25)" fill="#f0f0f0"/><rect x="157.51532" y="354.40187" width="6.60151" height="49.25266" fill="${color}"/><polygon points="187.815 376.276 182.98 380.779 160.823 356.936 138.658 380.779 133.823 376.276 160.823 347.243 187.815 376.276" fill="${color}"/><path d="M371.9876,543.6602a52.8121,52.8121,0,1,1,52.8121-52.81209A52.87183,52.87183,0,0,1,371.9876,543.6602Zm0-99.02268a46.21059,46.21059,0,1,0,46.21058,46.21059A46.26275,46.26275,0,0,0,371.9876,444.63752Z" transform="translate(-213 -115.25)" fill="${color}"/><rect x="212.75248" y="253.9314" width="3.63974" height="27.15545" fill="#e4e4e4"/><polygon points="229.458 265.992 226.793 268.475 214.576 255.328 202.356 268.475 199.69 265.992 214.576 249.984 229.458 265.992" fill="#e4e4e4"/><path d="M426.56422,409.9859a29.118,29.118,0,1,1,29.118-29.118A29.15089,29.15089,0,0,1,426.56422,409.9859Zm0-54.59616A25.47821,25.47821,0,1,0,452.04243,380.868,25.507,25.507,0,0,0,426.56422,355.38974Z" transform="translate(-213 -115.25)" fill="#e4e4e4"/><rect x="99.52274" y="186.73872" width="3.63974" height="27.15545" fill="#e4e4e4"/><polygon points="116.229 198.799 113.563 201.282 101.346 188.136 89.126 201.282 86.46 198.799 101.346 182.792 116.229 198.799" fill="#e4e4e4"/><path d="M313.33448,342.79321a29.118,29.118,0,1,1,29.118-29.118A29.15088,29.15088,0,0,1,313.33448,342.79321Zm0-54.59615a25.47821,25.47821,0,1,0,25.47821,25.4782A25.507,25.507,0,0,0,313.33448,288.19706Z" transform="translate(-213 -115.25)" fill="#e4e4e4"/><path d="M518.7325,635.91942a8.22484,8.22484,0,0,1,.958-12.302,9.56322,9.56322,0,0,1,1.26081-.83521l-6.99347-30.13439,16.26512,5.84042,4.14749,27.72073a8.21849,8.21849,0,0,1-2.21462,10.58849A10.12952,10.12952,0,0,1,518.7325,635.91942Z" transform="translate(-213 -115.25)" fill="#ffb8b8"/><path d="M516.88531,612.40706l-.08727-.29605c-8.79267-29.805-17.88169-60.6154-28.97824-94.16236l-.0728-.21977.2448-.13088c6.18493-3.30762,15.48114-3.08736,21.62358.51183,5.68293,3.33,8.55569,9.77159,7.0024,15.68347l8.09328,38.67327c3.29039,12.64158,6.69574,25.72668,9.95036,38.62892l.09229.36576-.504.0295c-5.92592.34536-12.04821.70254-16.95322.89973Z" transform="translate(-213 -115.25)" fill="#ccc"/><polygon points="229.16 657.57 217.627 657.57 212.138 616.801 229.16 616.801 229.16 657.57" fill="#ffb8b8"/><path d="M445.10175,783.06559H407.9141v-.43107c0-7.31472,6.49345-13.26551,14.47493-13.26551h22.71272Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><polygon points="337.837 648.851 326.848 652.06 308.113 614.743 324.331 610.006 337.837 648.851" fill="#ffb8b8"/><path d="M521.60173,783.39141l-.14262-.41086c-2.42325-6.96953,1.79234-14.4459,9.39693-16.66692l21.64062-6.31955,4.53736,13.05Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><ellipse cx="279.46347" cy="354.21043" rx="23.10522" ry="21.17504" fill="#ffb8b8"/><path d="M502.83713,465.536c.13132-8.54065-3.76885-16.99907-9.79916-21.25171a16.77762,16.77762,0,0,0-19.87954.322c-5.937,4.44645-9.65428,13.02823-9.33974,21.56167C477.12124,466.20257,490.42379,466.23726,502.83713,465.536Z" transform="translate(-213 -115.25)" fill="#2f2e41"/><path d="M448.74454,759.69687l-.46255-.04125c-10.03358-.90255-20.40891-1.83457-30.21419-1.9415l-.5333-.00589.07281-.48411c2.32311-15.42,3.30793-31.45044,4.26037-46.9538.9405-15.308,1.91269-31.13682,4.17769-46.17039.95818-4.0257,1.892-8.00342,2.82264-11.96682,7.70037-32.79837,14.97378-63.77816,29.98728-94.44433l.14194-.28963.34381.03789c14.08679,1.562
2022-07-05 14:33:48 +05:00
export const Update = ({ version: appVersion, fwdRef }) => {
global: implement the new theme engine (#2196) * mobile: theme * theme: add theme engine * mobile: migrate app colors to new theme engine * mobile: fixed some colors * mobile: fix colors * mobile: store theme info in store * theme: `ColorsType` -> `Variants` * theme: use explicit return type for `useThemeColors` * theme: add `backdrop` color * mobile: `const colors` -> `const {colors} * theme: add default pitch-black theme * mobile: manage theme state via theme-engine * mobile: add theme scopes * mobile: commit * mobile: fix button width on applock screen * mobile: fix typings * mobile: fix theme definition * web: add partial support for custom themes only context menus & popups are left. * theme: add dialog & sheet scopes * global: sync with master branch and make everything work again * mobile: fix theme-engine usage in editor & app * mobile: fix colors * mobile: fix colors * mobile: cleanup * mobile: fix status bar color incorrect on entering foreground * mobile: fix dark color scheme * web: move emotion theme provider to @notesnook/theme * editor: add support for theme enging * web: adjust hover & focus colors on list item * mobile: migrate share ext to theme engine * mobile: fix editor theme provider * clipper: add support for the new theme engine * mobile: fix statusbar color on switch from bg * misc: fix build * mobile: fix build * misc: fix colors * mobile: fix theme colors * mobile: fix bottom padding * server: add theme server * theme: add previewColors * server: support themes query pagination * mobile: add client from theme server * server: reset cache on sync repo * server: fix types * server: show ip & port on start server * server: theme updates * web: finalize new theme engine on web * editor: fix build * global: fix @emotion/react version to 11.11.1 * editor: update katex patch * web: fix imports * global: fix @trpc/* versions * global: a huge set of changes 1. get rid of ThemeVariant. All variants can now be accessed anywhere. 2. remove unnecessary button variants 3. make buttons more responsive 4. implement themes server * web: add support for theme search and theme switching * global: update lockfiles * mobile: fix error * theme: use vite-plugin-react to start theme server * web: add support for auto updating themes * mobile: update theme selector * mobile: update theme if new verison available * theme: add `isomorphic-fetch` package * global: update lockfiles * web: add theme details dialog * setup: add scope for themes server in bootstrap script * web: add production server url * web: update lockfile * web: update lockfile * mobile: remove `react-native-blob-util` * web: add support for endless scrolling in themes * web: bring back dark/light mode option in settings * web: fix colors in places * theme: add selected variant * global: use single typescript version across the projects * web: fix sort & group options not having submenus * web: apply selected variant where appropriate * ui: use unique id for all menu items * config: add ui scope for commits * theme: export button variant creation fn * web: fix only 1 theme showing in theme selector * web: fix navigation item hover & other colors * mobile: update theme * editor: fix toolbar group alignments * editor: set theme provider at app level * theme: use scope name to get current scope * mobile: fix color usage in message card * theme: remove caching * editor: bring back icons in table menus * theme: use zustand to manage theme engine state * web: fix login/signup theming * mobile: fix webpack build * misc: remove ThemeProvider usage * editor: adjust theming and styling of editor toolbar * mobile: refactor * editor: fix toolbar group padding everywhere * web: fix settings sidebar is not scrollable * web: add loading indicator for themes loading * mobile: fix warning * mobile: fix ui issues * web: fix Loader errors on build * theme: add getPreviewColors & validateTheme * theme: fix theme validation * mobile: load theme from file * mobile: fix share extension crash * mobile: rename state * theme: add sourceURL property * theme: refactor theme-engine * web: add support for loading theme from file * web: improve button hover interaction * mobile: fix floating button color * mobile: update theme * mobile: fix border radius of context menu * mobile: set sheet overlay color to theme backdrop * mobile: set sidemenu backdrop to theme backdrop --------- Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2023-08-01 12:07:21 +05:00
const { colors } = useThemeColors();
2022-07-05 14:33:48 +05:00
const [version, setVersion] = useState(appVersion);
let notes = version?.notes
? version.notes.replace("Thank you for using Notesnook!", "").split("- ")
: ["Bug fixes and performance improvements"];
notes = notes?.map((n) => n.replace(/\n/g, ""));
const isGithubRelease = Config.GITHUB_RELEASE === "true";
2022-03-09 13:20:06 +05:00
const getSupportedAbi = () => {
let abi = deviceInfoModule.supportedAbisSync();
let armv8a = abi.find((a) => a === "arm64-v8a");
let armv7 = abi.find((a) => a === "armeabi-v7a");
2022-03-09 13:20:06 +05:00
return armv8a || armv7 || abi[0];
};
2022-07-05 14:33:48 +05:00
const GITHUB_URL =
!version || !version.needsUpdate
? null
: `https://github.com/streetwriters/notesnook/releases/download/${
version.version
}-android/notesnook-${getSupportedAbi()}.apk`;
const GITHUB_PAGE_URL =
!version || !version.needsUpdate
? null
: `https://github.com/streetwriters/notesnook/releases/tag/${version.version}-android`;
useEffect(() => {
if (!version) {
(async () => {
try {
let v = await checkVersion();
setVersion(v);
} catch (e) {
setVersion({
needsUpdate: false
});
}
})();
}
2022-08-30 18:27:09 +05:00
}, [version]);
2022-01-04 13:08:02 +05:00
return (
<View
style={{
alignSelf: "center",
alignItems: "center",
width: "100%",
paddingHorizontal: 12,
maxHeight: "97%"
2022-01-22 12:57:05 +05:00
}}
>
2022-07-05 14:33:48 +05:00
{!version || !version?.needsUpdate ? (
<>
<View
style={{
paddingVertical: 60,
justifyContent: "center",
alignItems: "center"
2022-07-05 14:33:48 +05:00
}}
>
{!version ? (
<>
2022-07-07 23:43:29 +05:00
<ProgressBarComponent
size={SIZE.xxl}
indeterminate={true}
global: implement the new theme engine (#2196) * mobile: theme * theme: add theme engine * mobile: migrate app colors to new theme engine * mobile: fixed some colors * mobile: fix colors * mobile: store theme info in store * theme: `ColorsType` -> `Variants` * theme: use explicit return type for `useThemeColors` * theme: add `backdrop` color * mobile: `const colors` -> `const {colors} * theme: add default pitch-black theme * mobile: manage theme state via theme-engine * mobile: add theme scopes * mobile: commit * mobile: fix button width on applock screen * mobile: fix typings * mobile: fix theme definition * web: add partial support for custom themes only context menus & popups are left. * theme: add dialog & sheet scopes * global: sync with master branch and make everything work again * mobile: fix theme-engine usage in editor & app * mobile: fix colors * mobile: fix colors * mobile: cleanup * mobile: fix status bar color incorrect on entering foreground * mobile: fix dark color scheme * web: move emotion theme provider to @notesnook/theme * editor: add support for theme enging * web: adjust hover & focus colors on list item * mobile: migrate share ext to theme engine * mobile: fix editor theme provider * clipper: add support for the new theme engine * mobile: fix statusbar color on switch from bg * misc: fix build * mobile: fix build * misc: fix colors * mobile: fix theme colors * mobile: fix bottom padding * server: add theme server * theme: add previewColors * server: support themes query pagination * mobile: add client from theme server * server: reset cache on sync repo * server: fix types * server: show ip & port on start server * server: theme updates * web: finalize new theme engine on web * editor: fix build * global: fix @emotion/react version to 11.11.1 * editor: update katex patch * web: fix imports * global: fix @trpc/* versions * global: a huge set of changes 1. get rid of ThemeVariant. All variants can now be accessed anywhere. 2. remove unnecessary button variants 3. make buttons more responsive 4. implement themes server * web: add support for theme search and theme switching * global: update lockfiles * mobile: fix error * theme: use vite-plugin-react to start theme server * web: add support for auto updating themes * mobile: update theme selector * mobile: update theme if new verison available * theme: add `isomorphic-fetch` package * global: update lockfiles * web: add theme details dialog * setup: add scope for themes server in bootstrap script * web: add production server url * web: update lockfile * web: update lockfile * mobile: remove `react-native-blob-util` * web: add support for endless scrolling in themes * web: bring back dark/light mode option in settings * web: fix colors in places * theme: add selected variant * global: use single typescript version across the projects * web: fix sort & group options not having submenus * web: apply selected variant where appropriate * ui: use unique id for all menu items * config: add ui scope for commits * theme: export button variant creation fn * web: fix only 1 theme showing in theme selector * web: fix navigation item hover & other colors * mobile: update theme * editor: fix toolbar group alignments * editor: set theme provider at app level * theme: use scope name to get current scope * mobile: fix color usage in message card * theme: remove caching * editor: bring back icons in table menus * theme: use zustand to manage theme engine state * web: fix login/signup theming * mobile: fix webpack build * misc: remove ThemeProvider usage * editor: adjust theming and styling of editor toolbar * mobile: refactor * editor: fix toolbar group padding everywhere * web: fix settings sidebar is not scrollable * web: add loading indicator for themes loading * mobile: fix warning * mobile: fix ui issues * web: fix Loader errors on build * theme: add getPreviewColors & validateTheme * theme: fix theme validation * mobile: load theme from file * mobile: fix share extension crash * mobile: rename state * theme: add sourceURL property * theme: refactor theme-engine * web: add support for loading theme from file * web: improve button hover interaction * mobile: fix floating button color * mobile: update theme * mobile: fix border radius of context menu * mobile: set sheet overlay color to theme backdrop * mobile: set sidemenu backdrop to theme backdrop --------- Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2023-08-01 12:07:21 +05:00
color={colors.primary.accent}
2022-07-07 23:43:29 +05:00
borderWidth={0}
height={5}
width={250}
/>
2022-07-05 14:33:48 +05:00
<Paragraph
style={{
marginTop: 5
}}
size={SIZE.md}
>
Checking for new version
</Paragraph>
</>
) : (
<Paragraph size={SIZE.md}>No new updates are available</Paragraph>
)}
</View>
</>
) : (
<>
<View
style={{
flexDirection: "row",
alignItems: "flex-end",
justifyContent: "space-between",
width: "100%",
global: implement the new theme engine (#2196) * mobile: theme * theme: add theme engine * mobile: migrate app colors to new theme engine * mobile: fixed some colors * mobile: fix colors * mobile: store theme info in store * theme: `ColorsType` -> `Variants` * theme: use explicit return type for `useThemeColors` * theme: add `backdrop` color * mobile: `const colors` -> `const {colors} * theme: add default pitch-black theme * mobile: manage theme state via theme-engine * mobile: add theme scopes * mobile: commit * mobile: fix button width on applock screen * mobile: fix typings * mobile: fix theme definition * web: add partial support for custom themes only context menus & popups are left. * theme: add dialog & sheet scopes * global: sync with master branch and make everything work again * mobile: fix theme-engine usage in editor & app * mobile: fix colors * mobile: fix colors * mobile: cleanup * mobile: fix status bar color incorrect on entering foreground * mobile: fix dark color scheme * web: move emotion theme provider to @notesnook/theme * editor: add support for theme enging * web: adjust hover & focus colors on list item * mobile: migrate share ext to theme engine * mobile: fix editor theme provider * clipper: add support for the new theme engine * mobile: fix statusbar color on switch from bg * misc: fix build * mobile: fix build * misc: fix colors * mobile: fix theme colors * mobile: fix bottom padding * server: add theme server * theme: add previewColors * server: support themes query pagination * mobile: add client from theme server * server: reset cache on sync repo * server: fix types * server: show ip & port on start server * server: theme updates * web: finalize new theme engine on web * editor: fix build * global: fix @emotion/react version to 11.11.1 * editor: update katex patch * web: fix imports * global: fix @trpc/* versions * global: a huge set of changes 1. get rid of ThemeVariant. All variants can now be accessed anywhere. 2. remove unnecessary button variants 3. make buttons more responsive 4. implement themes server * web: add support for theme search and theme switching * global: update lockfiles * mobile: fix error * theme: use vite-plugin-react to start theme server * web: add support for auto updating themes * mobile: update theme selector * mobile: update theme if new verison available * theme: add `isomorphic-fetch` package * global: update lockfiles * web: add theme details dialog * setup: add scope for themes server in bootstrap script * web: add production server url * web: update lockfile * web: update lockfile * mobile: remove `react-native-blob-util` * web: add support for endless scrolling in themes * web: bring back dark/light mode option in settings * web: fix colors in places * theme: add selected variant * global: use single typescript version across the projects * web: fix sort & group options not having submenus * web: apply selected variant where appropriate * ui: use unique id for all menu items * config: add ui scope for commits * theme: export button variant creation fn * web: fix only 1 theme showing in theme selector * web: fix navigation item hover & other colors * mobile: update theme * editor: fix toolbar group alignments * editor: set theme provider at app level * theme: use scope name to get current scope * mobile: fix color usage in message card * theme: remove caching * editor: bring back icons in table menus * theme: use zustand to manage theme engine state * web: fix login/signup theming * mobile: fix webpack build * misc: remove ThemeProvider usage * editor: adjust theming and styling of editor toolbar * mobile: refactor * editor: fix toolbar group padding everywhere * web: fix settings sidebar is not scrollable * web: add loading indicator for themes loading * mobile: fix warning * mobile: fix ui issues * web: fix Loader errors on build * theme: add getPreviewColors & validateTheme * theme: fix theme validation * mobile: load theme from file * mobile: fix share extension crash * mobile: rename state * theme: add sourceURL property * theme: refactor theme-engine * web: add support for loading theme from file * web: improve button hover interaction * mobile: fix floating button color * mobile: update theme * mobile: fix border radius of context menu * mobile: set sheet overlay color to theme backdrop * mobile: set sidemenu backdrop to theme backdrop --------- Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2023-08-01 12:07:21 +05:00
backgroundColor: colors.secondary.background,
2022-07-05 14:33:48 +05:00
borderRadius: 10,
2024-02-05 12:14:45 +05:00
padding: 12,
...getContainerBorder(colors.secondary.background)
2022-07-05 14:33:48 +05:00
}}
>
<View>
<Heading>Update available</Heading>
<Paragraph>
v{version.version} has been released{" "}
{isGithubRelease ? "on Github" : ""}
2022-07-05 14:33:48 +05:00
</Paragraph>
</View>
2024-02-05 12:14:45 +05:00
<SvgView
src={UPDATE_SVG(colors.primary.accent)}
width={100}
height={100}
/>
2022-07-05 14:33:48 +05:00
</View>
2022-01-04 13:08:02 +05:00
2022-07-05 14:33:48 +05:00
<Seperator />
<ScrollView
nestedScrollEnabled={true}
style={{
width: "100%"
2022-07-05 14:33:48 +05:00
}}
>
<Heading size={SIZE.md}>Release notes:</Heading>
{version.body ? (
<Paragraph
global: implement the new theme engine (#2196) * mobile: theme * theme: add theme engine * mobile: migrate app colors to new theme engine * mobile: fixed some colors * mobile: fix colors * mobile: store theme info in store * theme: `ColorsType` -> `Variants` * theme: use explicit return type for `useThemeColors` * theme: add `backdrop` color * mobile: `const colors` -> `const {colors} * theme: add default pitch-black theme * mobile: manage theme state via theme-engine * mobile: add theme scopes * mobile: commit * mobile: fix button width on applock screen * mobile: fix typings * mobile: fix theme definition * web: add partial support for custom themes only context menus & popups are left. * theme: add dialog & sheet scopes * global: sync with master branch and make everything work again * mobile: fix theme-engine usage in editor & app * mobile: fix colors * mobile: fix colors * mobile: cleanup * mobile: fix status bar color incorrect on entering foreground * mobile: fix dark color scheme * web: move emotion theme provider to @notesnook/theme * editor: add support for theme enging * web: adjust hover & focus colors on list item * mobile: migrate share ext to theme engine * mobile: fix editor theme provider * clipper: add support for the new theme engine * mobile: fix statusbar color on switch from bg * misc: fix build * mobile: fix build * misc: fix colors * mobile: fix theme colors * mobile: fix bottom padding * server: add theme server * theme: add previewColors * server: support themes query pagination * mobile: add client from theme server * server: reset cache on sync repo * server: fix types * server: show ip & port on start server * server: theme updates * web: finalize new theme engine on web * editor: fix build * global: fix @emotion/react version to 11.11.1 * editor: update katex patch * web: fix imports * global: fix @trpc/* versions * global: a huge set of changes 1. get rid of ThemeVariant. All variants can now be accessed anywhere. 2. remove unnecessary button variants 3. make buttons more responsive 4. implement themes server * web: add support for theme search and theme switching * global: update lockfiles * mobile: fix error * theme: use vite-plugin-react to start theme server * web: add support for auto updating themes * mobile: update theme selector * mobile: update theme if new verison available * theme: add `isomorphic-fetch` package * global: update lockfiles * web: add theme details dialog * setup: add scope for themes server in bootstrap script * web: add production server url * web: update lockfile * web: update lockfile * mobile: remove `react-native-blob-util` * web: add support for endless scrolling in themes * web: bring back dark/light mode option in settings * web: fix colors in places * theme: add selected variant * global: use single typescript version across the projects * web: fix sort & group options not having submenus * web: apply selected variant where appropriate * ui: use unique id for all menu items * config: add ui scope for commits * theme: export button variant creation fn * web: fix only 1 theme showing in theme selector * web: fix navigation item hover & other colors * mobile: update theme * editor: fix toolbar group alignments * editor: set theme provider at app level * theme: use scope name to get current scope * mobile: fix color usage in message card * theme: remove caching * editor: bring back icons in table menus * theme: use zustand to manage theme engine state * web: fix login/signup theming * mobile: fix webpack build * misc: remove ThemeProvider usage * editor: adjust theming and styling of editor toolbar * mobile: refactor * editor: fix toolbar group padding everywhere * web: fix settings sidebar is not scrollable * web: add loading indicator for themes loading * mobile: fix warning * mobile: fix ui issues * web: fix Loader errors on build * theme: add getPreviewColors & validateTheme * theme: fix theme validation * mobile: load theme from file * mobile: fix share extension crash * mobile: rename state * theme: add sourceURL property * theme: refactor theme-engine * web: add support for loading theme from file * web: improve button hover interaction * mobile: fix floating button color * mobile: update theme * mobile: fix border radius of context menu * mobile: set sheet overlay color to theme backdrop * mobile: set sidemenu backdrop to theme backdrop --------- Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2023-08-01 12:07:21 +05:00
color={colors.secondary.paragraph}
style={{
marginBottom: 5,
fontFamily: "monospace",
fontSize: 12,
lineHeight: 20,
marginTop: 10
}}
2024-04-26 11:29:18 +05:00
selectable
>
{version.body}
</Paragraph>
) : null}
{notes.map((item) => (
2022-07-05 14:33:48 +05:00
<Paragraph
key={item}
global: implement the new theme engine (#2196) * mobile: theme * theme: add theme engine * mobile: migrate app colors to new theme engine * mobile: fixed some colors * mobile: fix colors * mobile: store theme info in store * theme: `ColorsType` -> `Variants` * theme: use explicit return type for `useThemeColors` * theme: add `backdrop` color * mobile: `const colors` -> `const {colors} * theme: add default pitch-black theme * mobile: manage theme state via theme-engine * mobile: add theme scopes * mobile: commit * mobile: fix button width on applock screen * mobile: fix typings * mobile: fix theme definition * web: add partial support for custom themes only context menus & popups are left. * theme: add dialog & sheet scopes * global: sync with master branch and make everything work again * mobile: fix theme-engine usage in editor & app * mobile: fix colors * mobile: fix colors * mobile: cleanup * mobile: fix status bar color incorrect on entering foreground * mobile: fix dark color scheme * web: move emotion theme provider to @notesnook/theme * editor: add support for theme enging * web: adjust hover & focus colors on list item * mobile: migrate share ext to theme engine * mobile: fix editor theme provider * clipper: add support for the new theme engine * mobile: fix statusbar color on switch from bg * misc: fix build * mobile: fix build * misc: fix colors * mobile: fix theme colors * mobile: fix bottom padding * server: add theme server * theme: add previewColors * server: support themes query pagination * mobile: add client from theme server * server: reset cache on sync repo * server: fix types * server: show ip & port on start server * server: theme updates * web: finalize new theme engine on web * editor: fix build * global: fix @emotion/react version to 11.11.1 * editor: update katex patch * web: fix imports * global: fix @trpc/* versions * global: a huge set of changes 1. get rid of ThemeVariant. All variants can now be accessed anywhere. 2. remove unnecessary button variants 3. make buttons more responsive 4. implement themes server * web: add support for theme search and theme switching * global: update lockfiles * mobile: fix error * theme: use vite-plugin-react to start theme server * web: add support for auto updating themes * mobile: update theme selector * mobile: update theme if new verison available * theme: add `isomorphic-fetch` package * global: update lockfiles * web: add theme details dialog * setup: add scope for themes server in bootstrap script * web: add production server url * web: update lockfile * web: update lockfile * mobile: remove `react-native-blob-util` * web: add support for endless scrolling in themes * web: bring back dark/light mode option in settings * web: fix colors in places * theme: add selected variant * global: use single typescript version across the projects * web: fix sort & group options not having submenus * web: apply selected variant where appropriate * ui: use unique id for all menu items * config: add ui scope for commits * theme: export button variant creation fn * web: fix only 1 theme showing in theme selector * web: fix navigation item hover & other colors * mobile: update theme * editor: fix toolbar group alignments * editor: set theme provider at app level * theme: use scope name to get current scope * mobile: fix color usage in message card * theme: remove caching * editor: bring back icons in table menus * theme: use zustand to manage theme engine state * web: fix login/signup theming * mobile: fix webpack build * misc: remove ThemeProvider usage * editor: adjust theming and styling of editor toolbar * mobile: refactor * editor: fix toolbar group padding everywhere * web: fix settings sidebar is not scrollable * web: add loading indicator for themes loading * mobile: fix warning * mobile: fix ui issues * web: fix Loader errors on build * theme: add getPreviewColors & validateTheme * theme: fix theme validation * mobile: load theme from file * mobile: fix share extension crash * mobile: rename state * theme: add sourceURL property * theme: refactor theme-engine * web: add support for loading theme from file * web: improve button hover interaction * mobile: fix floating button color * mobile: update theme * mobile: fix border radius of context menu * mobile: set sheet overlay color to theme backdrop * mobile: set sidemenu backdrop to theme backdrop --------- Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2023-08-01 12:07:21 +05:00
color={colors.secondary.paragraph}
2022-07-05 14:33:48 +05:00
style={{
marginBottom: 5
}}
2024-04-26 11:29:18 +05:00
selectable
2022-07-05 14:33:48 +05:00
>
{item}
</Paragraph>
))}
</ScrollView>
<Seperator />
<Button
title={isGithubRelease ? "Download update" : "Update now"}
2022-07-05 14:33:48 +05:00
onPress={() => {
Linking.openURL(isGithubRelease ? GITHUB_URL : STORE_LINK).catch(
console.log
);
2022-07-05 14:33:48 +05:00
}}
type="accent"
style={{
width: "100%"
2022-07-05 14:33:48 +05:00
}}
/>
2022-01-04 13:08:02 +05:00
<Paragraph
2022-07-05 14:33:48 +05:00
size={12}
global: implement the new theme engine (#2196) * mobile: theme * theme: add theme engine * mobile: migrate app colors to new theme engine * mobile: fixed some colors * mobile: fix colors * mobile: store theme info in store * theme: `ColorsType` -> `Variants` * theme: use explicit return type for `useThemeColors` * theme: add `backdrop` color * mobile: `const colors` -> `const {colors} * theme: add default pitch-black theme * mobile: manage theme state via theme-engine * mobile: add theme scopes * mobile: commit * mobile: fix button width on applock screen * mobile: fix typings * mobile: fix theme definition * web: add partial support for custom themes only context menus & popups are left. * theme: add dialog & sheet scopes * global: sync with master branch and make everything work again * mobile: fix theme-engine usage in editor & app * mobile: fix colors * mobile: fix colors * mobile: cleanup * mobile: fix status bar color incorrect on entering foreground * mobile: fix dark color scheme * web: move emotion theme provider to @notesnook/theme * editor: add support for theme enging * web: adjust hover & focus colors on list item * mobile: migrate share ext to theme engine * mobile: fix editor theme provider * clipper: add support for the new theme engine * mobile: fix statusbar color on switch from bg * misc: fix build * mobile: fix build * misc: fix colors * mobile: fix theme colors * mobile: fix bottom padding * server: add theme server * theme: add previewColors * server: support themes query pagination * mobile: add client from theme server * server: reset cache on sync repo * server: fix types * server: show ip & port on start server * server: theme updates * web: finalize new theme engine on web * editor: fix build * global: fix @emotion/react version to 11.11.1 * editor: update katex patch * web: fix imports * global: fix @trpc/* versions * global: a huge set of changes 1. get rid of ThemeVariant. All variants can now be accessed anywhere. 2. remove unnecessary button variants 3. make buttons more responsive 4. implement themes server * web: add support for theme search and theme switching * global: update lockfiles * mobile: fix error * theme: use vite-plugin-react to start theme server * web: add support for auto updating themes * mobile: update theme selector * mobile: update theme if new verison available * theme: add `isomorphic-fetch` package * global: update lockfiles * web: add theme details dialog * setup: add scope for themes server in bootstrap script * web: add production server url * web: update lockfile * web: update lockfile * mobile: remove `react-native-blob-util` * web: add support for endless scrolling in themes * web: bring back dark/light mode option in settings * web: fix colors in places * theme: add selected variant * global: use single typescript version across the projects * web: fix sort & group options not having submenus * web: apply selected variant where appropriate * ui: use unique id for all menu items * config: add ui scope for commits * theme: export button variant creation fn * web: fix only 1 theme showing in theme selector * web: fix navigation item hover & other colors * mobile: update theme * editor: fix toolbar group alignments * editor: set theme provider at app level * theme: use scope name to get current scope * mobile: fix color usage in message card * theme: remove caching * editor: bring back icons in table menus * theme: use zustand to manage theme engine state * web: fix login/signup theming * mobile: fix webpack build * misc: remove ThemeProvider usage * editor: adjust theming and styling of editor toolbar * mobile: refactor * editor: fix toolbar group padding everywhere * web: fix settings sidebar is not scrollable * web: add loading indicator for themes loading * mobile: fix warning * mobile: fix ui issues * web: fix Loader errors on build * theme: add getPreviewColors & validateTheme * theme: fix theme validation * mobile: load theme from file * mobile: fix share extension crash * mobile: rename state * theme: add sourceURL property * theme: refactor theme-engine * web: add support for loading theme from file * web: improve button hover interaction * mobile: fix floating button color * mobile: update theme * mobile: fix border radius of context menu * mobile: set sheet overlay color to theme backdrop * mobile: set sidemenu backdrop to theme backdrop --------- Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
2023-08-01 12:07:21 +05:00
color={colors.secondary.paragraph}
2022-01-04 13:08:02 +05:00
style={{
textDecorationLine: "underline",
2022-07-05 14:33:48 +05:00
marginTop: 10
}}
onPress={() => {
Linking.openURL(GITHUB_PAGE_URL).catch(console.log);
2022-01-22 12:57:05 +05:00
}}
>
2022-07-05 14:33:48 +05:00
Read full release notes on Github
2022-01-04 13:08:02 +05:00
</Paragraph>
2022-07-05 14:33:48 +05:00
</>
)}
2022-01-04 13:08:02 +05:00
</View>
);
};