mirror of
https://github.com/laurent22/joplin.git
synced 2025-02-07 19:30:04 +02:00
All: Refactored themes to allow using the same ones in both desktop and mobile version
Will also allow using them when exporting HTML or PDF from CLI.
This commit is contained in:
parent
d80cf6bf37
commit
b7f5f848f2
@ -12,7 +12,7 @@ const BaseModel = require('lib/BaseModel.js');
|
|||||||
const { shim } = require('lib/shim');
|
const { shim } = require('lib/shim');
|
||||||
const MdToHtml = require('lib/joplin-renderer/MdToHtml');
|
const MdToHtml = require('lib/joplin-renderer/MdToHtml');
|
||||||
const { enexXmlToMd } = require('lib/import-enex-md-gen.js');
|
const { enexXmlToMd } = require('lib/import-enex-md-gen.js');
|
||||||
const { themeStyle } = require('../../ElectronClient/theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60 * 60 * 1000; // Can run for a while since everything is in the same test unit
|
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60 * 60 * 1000; // Can run for a while since everything is in the same test unit
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const ClipperServer = require('lib/ClipperServer');
|
const ClipperServer = require('lib/ClipperServer');
|
||||||
const Setting = require('lib/models/Setting');
|
const Setting = require('lib/models/Setting');
|
||||||
|
@ -2,7 +2,7 @@ const React = require('react');
|
|||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting.js');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const pathUtils = require('lib/path-utils.js');
|
const pathUtils = require('lib/path-utils.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const SyncTargetRegistry = require('lib/SyncTargetRegistry');
|
const SyncTargetRegistry = require('lib/SyncTargetRegistry');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
function DialogButtonRow(props) {
|
function DialogButtonRow(props) {
|
||||||
const theme = themeStyle(props.theme);
|
const theme = themeStyle(props.theme);
|
||||||
|
@ -2,7 +2,7 @@ const React = require('react');
|
|||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
const { Header } = require('./Header.min.js');
|
const { Header } = require('./Header.min.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const Shared = require('lib/components/shared/dropbox-login-shared');
|
const Shared = require('lib/components/shared/dropbox-login-shared');
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ const React = require('react');
|
|||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const Setting = require('lib/models/Setting');
|
const Setting = require('lib/models/Setting');
|
||||||
const EncryptionService = require('lib/services/EncryptionService');
|
const EncryptionService = require('lib/services/EncryptionService');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { time } = require('lib/time-utils.js');
|
const { time } = require('lib/time-utils.js');
|
||||||
const { shim } = require('lib/shim');
|
const { shim } = require('lib/shim');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
class HelpButtonComponent extends React.Component {
|
class HelpButtonComponent extends React.Component {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
class IconButton extends React.Component {
|
class IconButton extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -2,7 +2,7 @@ const React = require('react');
|
|||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const { Header } = require('./Header.min.js');
|
const { Header } = require('./Header.min.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { filename, basename } = require('lib/path-utils.js');
|
const { filename, basename } = require('lib/path-utils.js');
|
||||||
const { importEnex } = require('lib/import-enex');
|
const { importEnex } = require('lib/import-enex');
|
||||||
|
@ -17,7 +17,7 @@ const Note = require('lib/models/Note.js');
|
|||||||
const { uuid } = require('lib/uuid.js');
|
const { uuid } = require('lib/uuid.js');
|
||||||
const { shim } = require('lib/shim');
|
const { shim } = require('lib/shim');
|
||||||
const Folder = require('lib/models/Folder.js');
|
const Folder = require('lib/models/Folder.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
const eventManager = require('../eventManager');
|
const eventManager = require('../eventManager');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
const { buildStyle } = require('../theme.js');
|
const { buildStyle } = require('lib/theme');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
const NoteListUtils = require('./utils/NoteListUtils');
|
const NoteListUtils = require('./utils/NoteListUtils');
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const DialogButtonRow = require('./DialogButtonRow.min');
|
const DialogButtonRow = require('./DialogButtonRow.min');
|
||||||
const { stripMarkdown } = require('lib/markdownUtils');
|
const { stripMarkdown } = require('lib/markdownUtils');
|
||||||
const Countable = require('countable');
|
const Countable = require('countable');
|
||||||
|
@ -2,7 +2,7 @@ import * as React from 'react';
|
|||||||
|
|
||||||
const ToolbarBase = require('../../../Toolbar.min.js');
|
const ToolbarBase = require('../../../Toolbar.min.js');
|
||||||
const { _ } = require('lib/locale');
|
const { _ } = require('lib/locale');
|
||||||
const { buildStyle, themeStyle } = require('../../../../theme.js');
|
const { buildStyle, themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
interface ToolbarProps {
|
interface ToolbarProps {
|
||||||
theme: number,
|
theme: number,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { NoteBodyEditorProps } from '../../../utils/types';
|
import { NoteBodyEditorProps } from '../../../utils/types';
|
||||||
const { buildStyle } = require('../../../../../theme.js');
|
const { buildStyle } = require('lib/theme');
|
||||||
|
|
||||||
export default function styles(props: NoteBodyEditorProps) {
|
export default function styles(props: NoteBodyEditorProps) {
|
||||||
return buildStyle('AceEditor', props.theme, (theme: any) => {
|
return buildStyle('AceEditor', props.theme, (theme: any) => {
|
||||||
|
@ -2,7 +2,7 @@ import * as React from 'react';
|
|||||||
|
|
||||||
const ToolbarBase = require('../../../Toolbar.min.js');
|
const ToolbarBase = require('../../../Toolbar.min.js');
|
||||||
const { _ } = require('lib/locale');
|
const { _ } = require('lib/locale');
|
||||||
const { buildStyle, themeStyle } = require('../../../../theme.js');
|
const { buildStyle, themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
interface ToolbarProps {
|
interface ToolbarProps {
|
||||||
theme: number,
|
theme: number,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { NoteBodyEditorProps } from '../../../utils/types';
|
import { NoteBodyEditorProps } from '../../../utils/types';
|
||||||
const { buildStyle } = require('../../../../../theme.js');
|
const { buildStyle } = require('lib/theme');
|
||||||
|
|
||||||
export default function styles(props: NoteBodyEditorProps) {
|
export default function styles(props: NoteBodyEditorProps) {
|
||||||
return buildStyle('AceEditor', props.theme, (theme: any) => {
|
return buildStyle('AceEditor', props.theme, (theme: any) => {
|
||||||
|
@ -10,7 +10,7 @@ const { reg } = require('lib/registry.js');
|
|||||||
const { _, closestSupportedLocale } = require('lib/locale');
|
const { _, closestSupportedLocale } = require('lib/locale');
|
||||||
const BaseItem = require('lib/models/BaseItem');
|
const BaseItem = require('lib/models/BaseItem');
|
||||||
const Resource = require('lib/models/Resource');
|
const Resource = require('lib/models/Resource');
|
||||||
const { themeStyle, buildStyle } = require('../../../../theme.js');
|
const { themeStyle, buildStyle } = require('lib/theme');
|
||||||
const { clipboard } = require('electron');
|
const { clipboard } = require('electron');
|
||||||
const supportedLocales = require('./supportedLocales');
|
const supportedLocales = require('./supportedLocales');
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ import styles_ from './styles';
|
|||||||
import { NoteEditorProps, FormNote, ScrollOptions, ScrollOptionTypes, OnChangeEvent, NoteBodyEditorProps } from './utils/types';
|
import { NoteEditorProps, FormNote, ScrollOptions, ScrollOptionTypes, OnChangeEvent, NoteBodyEditorProps } from './utils/types';
|
||||||
import ResourceEditWatcher from '../../lib/services/ResourceEditWatcher';
|
import ResourceEditWatcher from '../../lib/services/ResourceEditWatcher';
|
||||||
|
|
||||||
const { themeStyle } = require('../../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const NoteSearchBar = require('../NoteSearchBar.min.js');
|
const NoteSearchBar = require('../NoteSearchBar.min.js');
|
||||||
const { reg } = require('lib/registry.js');
|
const { reg } = require('lib/registry.js');
|
||||||
const { time } = require('lib/time-utils.js');
|
const { time } = require('lib/time-utils.js');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { NoteEditorProps } from '../utils/types';
|
import { NoteEditorProps } from '../utils/types';
|
||||||
|
|
||||||
const { buildStyle } = require('../../../theme.js');
|
const { buildStyle } = require('lib/theme');
|
||||||
|
|
||||||
export default function styles(props: NoteEditorProps) {
|
export default function styles(props: NoteEditorProps) {
|
||||||
return buildStyle('NoteEditor', props.theme, (theme: any) => {
|
return buildStyle('NoteEditor', props.theme, (theme: any) => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { ResourceInfos } from './types';
|
import { ResourceInfos } from './types';
|
||||||
const { themeStyle } = require('../../../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const Note = require('lib/models/Note');
|
const Note = require('lib/models/Note');
|
||||||
const Setting = require('lib/models/Setting');
|
const Setting = require('lib/models/Setting');
|
||||||
const markupLanguageUtils = require('lib/markupLanguageUtils');
|
const markupLanguageUtils = require('lib/markupLanguageUtils');
|
||||||
|
@ -2,7 +2,7 @@ const { ItemList } = require('./ItemList.min.js');
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { time } = require('lib/time-utils.js');
|
const { time } = require('lib/time-utils.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const BaseModel = require('lib/BaseModel');
|
const BaseModel = require('lib/BaseModel');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { useRef, forwardRef, useImperativeHandle, useCallback } from 'react';
|
import { useRef, forwardRef, useImperativeHandle, useCallback } from 'react';
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const Mark = require('mark.js/dist/mark.min.js');
|
const Mark = require('mark.js/dist/mark.min.js');
|
||||||
const markJsUtils = require('lib/markJsUtils');
|
const markJsUtils = require('lib/markJsUtils');
|
||||||
const Note = require('lib/models/Note');
|
const Note = require('lib/models/Note');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { time } = require('lib/time-utils.js');
|
const { time } = require('lib/time-utils.js');
|
||||||
const DialogButtonRow = require('./DialogButtonRow.min');
|
const DialogButtonRow = require('./DialogButtonRow.min');
|
||||||
const Datetime = require('react-datetime');
|
const Datetime = require('react-datetime');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const NoteTextViewer = require('./NoteTextViewer.min');
|
const NoteTextViewer = require('./NoteTextViewer.min');
|
||||||
const HelpButton = require('./HelpButton.min');
|
const HelpButton = require('./HelpButton.min');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
|
|
||||||
class NoteSearchBarComponent extends React.Component {
|
class NoteSearchBarComponent extends React.Component {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { time } = require('lib/time-utils.js');
|
const { time } = require('lib/time-utils.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
class NoteStatusBarComponent extends React.Component {
|
class NoteStatusBarComponent extends React.Component {
|
||||||
style() {
|
style() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { buildStyle } = require('../../theme.js');
|
const { buildStyle } = require('lib/theme');
|
||||||
const Toolbar = require('../Toolbar.min.js');
|
const Toolbar = require('../Toolbar.min.js');
|
||||||
const Note = require('lib/models/Note');
|
const Note = require('lib/models/Note');
|
||||||
const Folder = require('lib/models/Folder');
|
const Folder = require('lib/models/Folder');
|
||||||
|
@ -4,7 +4,7 @@ const { reg } = require('lib/registry.js');
|
|||||||
const Setting = require('lib/models/Setting');
|
const Setting = require('lib/models/Setting');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
const { Header } = require('./Header.min.js');
|
const { Header } = require('./Header.min.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { OneDriveApiNodeUtils } = require('lib/onedrive-api-node-utils.js');
|
const { OneDriveApiNodeUtils } = require('lib/onedrive-api-node-utils.js');
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { time } = require('lib/time-utils.js');
|
const { time } = require('lib/time-utils.js');
|
||||||
const Datetime = require('react-datetime');
|
const Datetime = require('react-datetime');
|
||||||
const CreatableSelect = require('react-select/lib/Creatable').default;
|
const CreatableSelect = require('react-select/lib/Creatable').default;
|
||||||
|
@ -2,7 +2,7 @@ import * as React from 'react';
|
|||||||
|
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
const { Header } = require('./Header.min.js');
|
const { Header } = require('./Header.min.js');
|
||||||
const prettyBytes = require('pretty-bytes');
|
const prettyBytes = require('pretty-bytes');
|
||||||
@ -53,7 +53,7 @@ const ResourceTable: React.FC<ResourceTable> = (props: ResourceTable) => {
|
|||||||
const sortOrderEngagedMarker = (s: SortingOrder) => {
|
const sortOrderEngagedMarker = (s: SortingOrder) => {
|
||||||
return (
|
return (
|
||||||
<a href="#"
|
<a href="#"
|
||||||
style={{ color: props.theme.htmlLinkColor }}
|
style={{ color: props.theme.urlColor }}
|
||||||
onClick={() => props.onToggleSorting(s)}>{
|
onClick={() => props.onToggleSorting(s)}>{
|
||||||
(props.sorting.order === s && props.sorting.type === 'desc') ? '▾' : '▴'}</a>
|
(props.sorting.order === s && props.sorting.type === 'desc') ? '▾' : '▴'}</a>
|
||||||
);
|
);
|
||||||
@ -97,7 +97,7 @@ const ResourceTable: React.FC<ResourceTable> = (props: ResourceTable) => {
|
|||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td style={titleCellStyle} className="titleCell">
|
<td style={titleCellStyle} className="titleCell">
|
||||||
<a
|
<a
|
||||||
style={{ color: props.theme.htmlLinkColor }}
|
style={{ color: props.theme.urlColor }}
|
||||||
href="#"
|
href="#"
|
||||||
onClick={() => props.onResourceClick(resource)}>{resource.title || `(${_('Untitled')})`}
|
onClick={() => props.onResourceClick(resource)}>{resource.title || `(${_('Untitled')})`}
|
||||||
</a>
|
</a>
|
||||||
|
@ -3,7 +3,7 @@ import { useState, useEffect } from 'react';
|
|||||||
import JoplinServerApi from '../lib/JoplinServerApi';
|
import JoplinServerApi from '../lib/JoplinServerApi';
|
||||||
|
|
||||||
const { _, _n } = require('lib/locale.js');
|
const { _, _n } = require('lib/locale.js');
|
||||||
const { themeStyle, buildStyle } = require('../theme.js');
|
const { themeStyle, buildStyle } = require('lib/theme');
|
||||||
const DialogButtonRow = require('./DialogButtonRow.min');
|
const DialogButtonRow = require('./DialogButtonRow.min');
|
||||||
const Note = require('lib/models/Note');
|
const Note = require('lib/models/Note');
|
||||||
const Setting = require('lib/models/Setting');
|
const Setting = require('lib/models/Setting');
|
||||||
|
@ -8,7 +8,7 @@ const Folder = require('lib/models/Folder.js');
|
|||||||
const Note = require('lib/models/Note.js');
|
const Note = require('lib/models/Note.js');
|
||||||
const Tag = require('lib/models/Tag.js');
|
const Tag = require('lib/models/Tag.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
const Menu = bridge().Menu;
|
const Menu = bridge().Menu;
|
||||||
const MenuItem = bridge().MenuItem;
|
const MenuItem = bridge().MenuItem;
|
||||||
|
@ -3,7 +3,7 @@ const { connect } = require('react-redux');
|
|||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting.js');
|
||||||
const { bridge } = require('electron').remote.require('./bridge');
|
const { bridge } = require('electron').remote.require('./bridge');
|
||||||
const { Header } = require('./Header.min.js');
|
const { Header } = require('./Header.min.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { ReportService } = require('lib/services/report.js');
|
const { ReportService } = require('lib/services/report.js');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
class TagItemComponent extends React.Component {
|
class TagItemComponent extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const TagItem = require('./TagItem.min.js');
|
const TagItem = require('./TagItem.min.js');
|
||||||
|
|
||||||
class TagListComponent extends React.Component {
|
class TagListComponent extends React.Component {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const ToolbarButton = require('./ToolbarButton.min.js');
|
const ToolbarButton = require('./ToolbarButton.min.js');
|
||||||
const ToolbarSpace = require('./ToolbarSpace.min.js');
|
const ToolbarSpace = require('./ToolbarSpace.min.js');
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
class ToolbarButton extends React.Component {
|
class ToolbarButton extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
class ToolbarSpace extends React.Component {
|
class ToolbarSpace extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const { createSelector } = require('reselect');
|
const { createSelector } = require('reselect');
|
||||||
const { themeStyle } = require('../../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
const themeSelector = (state, props) => themeStyle(props.theme);
|
const themeSelector = (state, props) => themeStyle(props.theme);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const { createSelector } = require('reselect');
|
const { createSelector } = require('reselect');
|
||||||
const { themeStyle } = require('../../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
|
|
||||||
const themeSelector = (state, props) => themeStyle(props.theme);
|
const themeSelector = (state, props) => themeStyle(props.theme);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { themeStyle } = require('../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const SearchEngine = require('lib/services/SearchEngine');
|
const SearchEngine = require('lib/services/SearchEngine');
|
||||||
const BaseModel = require('lib/BaseModel');
|
const BaseModel = require('lib/BaseModel');
|
||||||
const Tag = require('lib/models/Tag');
|
const Tag = require('lib/models/Tag');
|
||||||
|
@ -237,10 +237,9 @@ Joplin notes can be opened and edited using an external editor of your choice. I
|
|||||||
|
|
||||||
Any kind of file can be attached to a note. In Markdown, links to these files are represented as a simple ID to the attachment. In the note viewer, these files, if they are images, will be displayed or, if they are other files (PDF, text files, etc.) they will be displayed as links. Clicking on this link will open the file in the default application.
|
Any kind of file can be attached to a note. In Markdown, links to these files are represented as a simple ID to the attachment. In the note viewer, these files, if they are images, will be displayed or, if they are other files (PDF, text files, etc.) they will be displayed as links. Clicking on this link will open the file in the default application.
|
||||||
|
|
||||||
In the **desktop application**, files can be attached either by clicking the "Attach file" icon in the editor or via drag and drop. If you prefer to create a link to a local file instead, hold the ALT key while performing the drag and drop operation.
|
In the **desktop application**, files can be attached either by clicking the "Attach file" icon in the editor or via drag and drop. If you prefer to create a link to a local file instead, hold the ALT key while performing the drag and drop operation. You can also copy and paste images directly in the editor via Ctrl+V.
|
||||||
If the OS-clipboard contains an image you can directly paste it in the editor via Ctrl+V.
|
|
||||||
|
|
||||||
Resources that are not attached to any note will be automatically deleted after 10 days (see [rationale](https://github.com/laurent22/joplin/issues/154#issuecomment-356582366)).
|
Resources that are not attached to any note will be automatically deleted in accordance to the [Note History](#note-history) settings.
|
||||||
|
|
||||||
**Important:** Resources larger than 10 MB are not currently supported on mobile. They will crash the application when synchronising so it is recommended not to attach such resources at the moment. The issue is being looked at.
|
**Important:** Resources larger than 10 MB are not currently supported on mobile. They will crash the application when synchronising so it is recommended not to attach such resources at the moment. The issue is being looked at.
|
||||||
|
|
||||||
@ -478,7 +477,7 @@ Thank you to everyone who've contributed to Joplin's source code!
|
|||||||
|
|
||||||
# Known bugs
|
# Known bugs
|
||||||
|
|
||||||
- Resources larger than 10 MB are not currently supported on mobile. They will crash the application so it is recommended not to attach such resources at the moment. The issue is being looked at.
|
- Resources larger than 10 MB are not currently supported on mobile as they can crash the application.
|
||||||
- Non-alphabetical characters such as Chinese or Arabic might create glitches in the terminal on Windows. This is a limitation of the current Windows console.
|
- Non-alphabetical characters such as Chinese or Arabic might create glitches in the terminal on Windows. This is a limitation of the current Windows console.
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
@ -1,27 +1,11 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
|
|
||||||
const { StyleSheet } = require('react-native');
|
const { StyleSheet } = require('react-native');
|
||||||
const { globalStyle, themeStyle } = require('lib/components/global-style.js');
|
const { themeStyle } = require('lib/components/global-style.js');
|
||||||
|
|
||||||
const styleObject_ = {
|
|
||||||
screen: {
|
|
||||||
flex: 1,
|
|
||||||
backgroundColor: globalStyle.backgroundColor,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
const styles_ = StyleSheet.create(styleObject_);
|
|
||||||
|
|
||||||
const rootStyles_ = {};
|
const rootStyles_ = {};
|
||||||
|
|
||||||
class BaseScreenComponent extends React.Component {
|
class BaseScreenComponent extends React.Component {
|
||||||
styles() {
|
|
||||||
return styles_;
|
|
||||||
}
|
|
||||||
|
|
||||||
styleObject() {
|
|
||||||
return styleObject_;
|
|
||||||
}
|
|
||||||
|
|
||||||
rootStyle(themeId) {
|
rootStyle(themeId) {
|
||||||
const theme = themeStyle(themeId);
|
const theme = themeStyle(themeId);
|
||||||
|
@ -1,56 +1,27 @@
|
|||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting.js');
|
||||||
const { Platform } = require('react-native');
|
const { Platform } = require('react-native');
|
||||||
|
const { themeById } = require('lib/theme');
|
||||||
|
|
||||||
const globalStyle = {
|
const baseStyle = {
|
||||||
|
appearance: 'light',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
noteViewerFontSize: 16,
|
||||||
margin: 15, // No text and no interactive component should be within this margin
|
margin: 15, // No text and no interactive component should be within this margin
|
||||||
itemMarginTop: 10,
|
itemMarginTop: 10,
|
||||||
itemMarginBottom: 10,
|
itemMarginBottom: 10,
|
||||||
backgroundColor: '#ffffff',
|
|
||||||
color: '#555555', // For regular text
|
|
||||||
colorError: 'red',
|
|
||||||
colorWarn: '#9A5B00',
|
|
||||||
colorFaded: '#777777', // For less important text
|
|
||||||
fontSizeSmaller: 14,
|
fontSizeSmaller: 14,
|
||||||
dividerColor: '#dddddd',
|
|
||||||
strongDividerColor: '#aaaaaa',
|
|
||||||
selectedColor: '#e5e5e5',
|
|
||||||
headerBackgroundColor: '#F0F0F0',
|
|
||||||
disabledOpacity: 0.2,
|
disabledOpacity: 0.2,
|
||||||
colorUrl: '#7B81FF',
|
lineHeight: '1.6em',
|
||||||
textSelectionColor: '#0096FF',
|
|
||||||
appearance: 'light',
|
|
||||||
|
|
||||||
raisedBackgroundColor: '#0080EF',
|
|
||||||
raisedColor: '#003363',
|
|
||||||
raisedHighlightedColor: '#ffffff',
|
|
||||||
|
|
||||||
warningBackgroundColor: '#FFD08D',
|
|
||||||
|
|
||||||
// For WebView - must correspond to the properties above
|
|
||||||
htmlFontSize: '16px',
|
|
||||||
htmlColor: '#222222',
|
|
||||||
htmlBackgroundColor: 'white',
|
|
||||||
htmlDividerColor: 'rgb(230,230,230)',
|
|
||||||
htmlLinkColor: 'rgb(80,130,190)',
|
|
||||||
htmlLineHeight: '1.6em',
|
|
||||||
|
|
||||||
htmlCodeBackgroundColor: 'rgb(243, 243, 243)',
|
|
||||||
htmlCodeBorderColor: 'rgb(220, 220, 220)',
|
|
||||||
htmlCodeColor: 'rgb(0,0,0)',
|
|
||||||
|
|
||||||
codeThemeCss: 'atom-one-light.css',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
globalStyle.marginRight = globalStyle.margin;
|
|
||||||
globalStyle.marginLeft = globalStyle.margin;
|
|
||||||
globalStyle.marginTop = globalStyle.margin;
|
|
||||||
globalStyle.marginBottom = globalStyle.margin;
|
|
||||||
globalStyle.htmlMarginLeft = `${((globalStyle.marginLeft / 10) * 0.6).toFixed(2)}em`;
|
|
||||||
|
|
||||||
const themeCache_ = {};
|
const themeCache_ = {};
|
||||||
|
|
||||||
function addExtraStyles(style) {
|
function addExtraStyles(style) {
|
||||||
|
style.marginRight = style.margin;
|
||||||
|
style.marginLeft = style.margin;
|
||||||
|
style.marginTop = style.margin;
|
||||||
|
style.marginBottom = style.margin;
|
||||||
|
|
||||||
style.icon = {
|
style.icon = {
|
||||||
color: style.color,
|
color: style.color,
|
||||||
fontSize: 30,
|
fontSize: 30,
|
||||||
@ -60,7 +31,7 @@ function addExtraStyles(style) {
|
|||||||
color: style.color,
|
color: style.color,
|
||||||
backgroundColor: style.backgroundColor,
|
backgroundColor: style.backgroundColor,
|
||||||
borderBottomWidth: 1,
|
borderBottomWidth: 1,
|
||||||
borderColor: style.strongDividerColor,
|
borderColor: style.dividerColor,
|
||||||
paddingBottom: 0,
|
paddingBottom: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -82,7 +53,7 @@ function addExtraStyles(style) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
style.urlText = {
|
style.urlText = {
|
||||||
color: style.colorUrl,
|
color: style.urlColor,
|
||||||
fontSize: style.fontSize,
|
fontSize: style.fontSize,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -123,80 +94,12 @@ function themeStyle(theme) {
|
|||||||
theme = Setting.THEME_LIGHT;
|
theme = Setting.THEME_LIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (themeCache_[theme]) return themeCache_[theme];
|
const cacheKey = [theme].join('-');
|
||||||
|
if (themeCache_[cacheKey]) return themeCache_[cacheKey];
|
||||||
|
|
||||||
const output = Object.assign({}, globalStyle);
|
const output = Object.assign({}, baseStyle, themeById(theme));
|
||||||
if (theme == Setting.THEME_LIGHT) {
|
themeCache_[cacheKey] = addExtraStyles(output);
|
||||||
return addExtraStyles(output);
|
return themeCache_[cacheKey];
|
||||||
} else if (theme == Setting.THEME_OLED_DARK) {
|
|
||||||
output.backgroundColor = '#000000';
|
|
||||||
output.color = '#dddddd';
|
|
||||||
output.colorFaded = '#777777';
|
|
||||||
output.dividerColor = '#555555';
|
|
||||||
output.strongDividerColor = '#888888';
|
|
||||||
output.selectedColor = '#333333';
|
|
||||||
output.textSelectionColor = '#00AEFF';
|
|
||||||
output.appearance = 'dark';
|
|
||||||
output.headerBackgroundColor = '#2D3136';
|
|
||||||
|
|
||||||
output.raisedBackgroundColor = '#0F2051';
|
|
||||||
output.raisedColor = '#788BC3';
|
|
||||||
output.raisedHighlightedColor = '#ffffff';
|
|
||||||
|
|
||||||
output.htmlColor = 'rgb(220,220,220)';
|
|
||||||
output.htmlBackgroundColor = 'rgb(0,0,0)';
|
|
||||||
output.htmlLinkColor = 'rgb(166,166,255)';
|
|
||||||
|
|
||||||
output.htmlDividerColor = '#3D444E';
|
|
||||||
output.htmlLinkColor = 'rgb(166,166,255)';
|
|
||||||
output.htmlCodeColor = '#ffffff';
|
|
||||||
output.htmlTableBackgroundColor = 'rgb(0, 0, 0)';
|
|
||||||
output.htmlCodeBackgroundColor = 'rgb(47, 48, 49)';
|
|
||||||
output.htmlCodeBorderColor = 'rgb(70, 70, 70)';
|
|
||||||
|
|
||||||
output.codeThemeCss = 'atom-one-dark-reasonable.css';
|
|
||||||
|
|
||||||
output.colorUrl = '#7B81FF';
|
|
||||||
|
|
||||||
output.colorBright = 'rgb(220,220,220)';
|
|
||||||
|
|
||||||
themeCache_[theme] = output;
|
|
||||||
return addExtraStyles(themeCache_[theme]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
output.backgroundColor = '#1D2024';
|
module.exports = { themeStyle, editorFont };
|
||||||
output.color = '#dddddd';
|
|
||||||
output.colorFaded = '#777777';
|
|
||||||
output.dividerColor = '#555555';
|
|
||||||
output.strongDividerColor = '#888888';
|
|
||||||
output.selectedColor = '#333333';
|
|
||||||
output.textSelectionColor = '#00AEFF';
|
|
||||||
output.appearance = 'dark';
|
|
||||||
output.headerBackgroundColor = '#2D3136';
|
|
||||||
|
|
||||||
output.raisedBackgroundColor = '#0F2051';
|
|
||||||
output.raisedColor = '#788BC3';
|
|
||||||
output.raisedHighlightedColor = '#ffffff';
|
|
||||||
|
|
||||||
output.htmlColor = 'rgb(220,220,220)';
|
|
||||||
output.htmlBackgroundColor = 'rgb(29,32,36)';
|
|
||||||
output.htmlLinkColor = 'rgb(166,166,255)';
|
|
||||||
|
|
||||||
output.htmlDividerColor = '#3D444E';
|
|
||||||
output.htmlLinkColor = 'rgb(166,166,255)';
|
|
||||||
output.htmlCodeColor = '#ffffff';
|
|
||||||
output.htmlTableBackgroundColor = 'rgb(40, 41, 42)';
|
|
||||||
output.htmlCodeBackgroundColor = 'rgb(47, 48, 49)';
|
|
||||||
output.htmlCodeBorderColor = 'rgb(70, 70, 70)';
|
|
||||||
|
|
||||||
output.codeThemeCss = 'atom-one-dark-reasonable.css';
|
|
||||||
|
|
||||||
output.colorUrl = '#7B81FF';
|
|
||||||
|
|
||||||
output.colorBright = 'rgb(220,220,220)';
|
|
||||||
|
|
||||||
themeCache_[theme] = output;
|
|
||||||
return addExtraStyles(themeCache_[theme]);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = { globalStyle, themeStyle, editorFont };
|
|
||||||
|
@ -39,7 +39,7 @@ class ScreenHeaderComponent extends React.PureComponent {
|
|||||||
const styleObject = {
|
const styleObject = {
|
||||||
container: {
|
container: {
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
backgroundColor: theme.raisedBackgroundColor,
|
backgroundColor: theme.backgroundColor2,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
shadowColor: '#000000',
|
shadowColor: '#000000',
|
||||||
elevation: 5,
|
elevation: 5,
|
||||||
@ -52,7 +52,7 @@ class ScreenHeaderComponent extends React.PureComponent {
|
|||||||
sideMenuButton: {
|
sideMenuButton: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
backgroundColor: theme.raisedBackgroundColor,
|
backgroundColor: theme.backgroundColor2,
|
||||||
paddingLeft: theme.marginLeft,
|
paddingLeft: theme.marginLeft,
|
||||||
paddingRight: 5,
|
paddingRight: 5,
|
||||||
marginRight: 2,
|
marginRight: 2,
|
||||||
@ -61,7 +61,7 @@ class ScreenHeaderComponent extends React.PureComponent {
|
|||||||
},
|
},
|
||||||
iconButton: {
|
iconButton: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor: theme.raisedBackgroundColor,
|
backgroundColor: theme.backgroundColor2,
|
||||||
paddingLeft: 15,
|
paddingLeft: 15,
|
||||||
paddingRight: 15,
|
paddingRight: 15,
|
||||||
paddingTop: PADDING_V,
|
paddingTop: PADDING_V,
|
||||||
@ -73,18 +73,18 @@ class ScreenHeaderComponent extends React.PureComponent {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
padding: 10,
|
padding: 10,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderColor: theme.raisedHighlightedColor,
|
borderColor: theme.colorBright2,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
marginRight: 8,
|
marginRight: 8,
|
||||||
},
|
},
|
||||||
saveButtonText: {
|
saveButtonText: {
|
||||||
textAlignVertical: 'center',
|
textAlignVertical: 'center',
|
||||||
color: theme.raisedHighlightedColor,
|
color: theme.colorBright2,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
},
|
},
|
||||||
savedButtonIcon: {
|
savedButtonIcon: {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
color: theme.raisedHighlightedColor,
|
color: theme.colorBright2,
|
||||||
width: 18,
|
width: 18,
|
||||||
height: 18,
|
height: 18,
|
||||||
},
|
},
|
||||||
@ -96,11 +96,11 @@ class ScreenHeaderComponent extends React.PureComponent {
|
|||||||
fontSize: 30,
|
fontSize: 30,
|
||||||
paddingLeft: 10,
|
paddingLeft: 10,
|
||||||
paddingRight: theme.marginRight,
|
paddingRight: theme.marginRight,
|
||||||
color: theme.raisedColor,
|
color: theme.color2,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
},
|
},
|
||||||
contextMenu: {
|
contextMenu: {
|
||||||
backgroundColor: theme.raisedBackgroundColor,
|
backgroundColor: theme.backgroundColor2,
|
||||||
},
|
},
|
||||||
contextMenuItem: {
|
contextMenuItem: {
|
||||||
backgroundColor: theme.backgroundColor,
|
backgroundColor: theme.backgroundColor,
|
||||||
@ -120,7 +120,7 @@ class ScreenHeaderComponent extends React.PureComponent {
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
textAlignVertical: 'center',
|
textAlignVertical: 'center',
|
||||||
marginLeft: 10,
|
marginLeft: 10,
|
||||||
color: theme.raisedHighlightedColor,
|
color: theme.colorBright2,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
fontSize: theme.fontSize,
|
fontSize: theme.fontSize,
|
||||||
paddingTop: 15,
|
paddingTop: 15,
|
||||||
@ -136,7 +136,7 @@ class ScreenHeaderComponent extends React.PureComponent {
|
|||||||
styleObject.topIcon = Object.assign({}, theme.icon);
|
styleObject.topIcon = Object.assign({}, theme.icon);
|
||||||
styleObject.topIcon.flex = 1;
|
styleObject.topIcon.flex = 1;
|
||||||
styleObject.topIcon.textAlignVertical = 'center';
|
styleObject.topIcon.textAlignVertical = 'center';
|
||||||
styleObject.topIcon.color = theme.raisedColor;
|
styleObject.topIcon.color = theme.colorBright2;
|
||||||
|
|
||||||
styleObject.backButton = Object.assign({}, styleObject.iconButton);
|
styleObject.backButton = Object.assign({}, styleObject.iconButton);
|
||||||
styleObject.backButton.marginRight = 1;
|
styleObject.backButton.marginRight = 1;
|
||||||
@ -376,7 +376,7 @@ class ScreenHeaderComponent extends React.PureComponent {
|
|||||||
backgroundColor: theme.backgroundColor,
|
backgroundColor: theme.backgroundColor,
|
||||||
}}
|
}}
|
||||||
headerStyle={{
|
headerStyle={{
|
||||||
color: theme.raisedHighlightedColor,
|
color: theme.colorBright2,
|
||||||
fontSize: theme.fontSize,
|
fontSize: theme.fontSize,
|
||||||
opacity: disabled ? theme.disabledOpacity : 1,
|
opacity: disabled ? theme.disabledOpacity : 1,
|
||||||
}}
|
}}
|
||||||
|
@ -222,7 +222,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
|||||||
});
|
});
|
||||||
|
|
||||||
styles.settingControl.borderBottomWidth = 1;
|
styles.settingControl.borderBottomWidth = 1;
|
||||||
styles.settingControl.borderBottomColor = theme.strongDividerColor;
|
styles.settingControl.borderBottomColor = theme.dividerColor;
|
||||||
|
|
||||||
styles.switchSettingText = Object.assign({}, styles.settingText);
|
styles.switchSettingText = Object.assign({}, styles.settingText);
|
||||||
styles.switchSettingText.width = '80%';
|
styles.switchSettingText.width = '80%';
|
||||||
@ -388,7 +388,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
|||||||
<Text key="label" style={this.styles().switchSettingText}>
|
<Text key="label" style={this.styles().switchSettingText}>
|
||||||
{md.label()}
|
{md.label()}
|
||||||
</Text>
|
</Text>
|
||||||
<Switch key="control" style={this.styles().switchSettingControl} trackColor={{ false: theme.strongDividerColor }} value={value} onValueChange={value => updateSettingValue(key, value)} />
|
<Switch key="control" style={this.styles().switchSettingControl} trackColor={{ false: theme.dividerColor }} value={value} onValueChange={value => updateSettingValue(key, value)} />
|
||||||
</View>
|
</View>
|
||||||
{descriptionComp}
|
{descriptionComp}
|
||||||
</View>
|
</View>
|
||||||
|
@ -112,7 +112,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
|
|||||||
|
|
||||||
const inputStyle = { flex: 1, marginRight: 10, color: theme.color };
|
const inputStyle = { flex: 1, marginRight: 10, color: theme.color };
|
||||||
inputStyle.borderBottomWidth = 1;
|
inputStyle.borderBottomWidth = 1;
|
||||||
inputStyle.borderBottomColor = theme.strongDividerColor;
|
inputStyle.borderBottomColor = theme.dividerColor;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View key={mk.id}>
|
<View key={mk.id}>
|
||||||
|
@ -107,7 +107,7 @@ class FolderScreenComponent extends BaseScreenComponent {
|
|||||||
return (
|
return (
|
||||||
<View style={this.rootStyle(this.props.theme).root}>
|
<View style={this.rootStyle(this.props.theme).root}>
|
||||||
<ScreenHeader title={_('Edit notebook')} showSaveButton={true} saveButtonDisabled={saveButtonDisabled} onSaveButtonPress={() => this.saveFolderButton_press()} showSideMenuButton={false} showSearchButton={false} />
|
<ScreenHeader title={_('Edit notebook')} showSaveButton={true} saveButtonDisabled={saveButtonDisabled} onSaveButtonPress={() => this.saveFolderButton_press()} showSideMenuButton={false} showSearchButton={false} />
|
||||||
<TextInput placeholder={_('Enter notebook title')} placeholderTextColor={theme.colorFaded} underlineColorAndroid={theme.strongDividerColor} selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} style={this.styles().textInput} autoFocus={true} value={this.state.folder.title} onChangeText={text => this.title_changeText(text)} />
|
<TextInput placeholder={_('Enter notebook title')} placeholderTextColor={theme.colorFaded} underlineColorAndroid={theme.dividerColor} selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} style={this.styles().textInput} autoFocus={true} value={this.state.folder.title} onChangeText={text => this.title_changeText(text)} />
|
||||||
<dialogs.DialogBox
|
<dialogs.DialogBox
|
||||||
ref={dialogbox => {
|
ref={dialogbox => {
|
||||||
this.dialogbox = dialogbox;
|
this.dialogbox = dialogbox;
|
||||||
|
@ -269,7 +269,7 @@ class NoteScreenComponent extends BaseScreenComponent {
|
|||||||
},
|
},
|
||||||
markdownButtons: {
|
markdownButtons: {
|
||||||
borderColor: theme.dividerColor,
|
borderColor: theme.dividerColor,
|
||||||
color: theme.htmlLinkColor,
|
color: theme.urlColor,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,20 +1,13 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
|
|
||||||
const { StyleSheet, View, Text, Button, FlatList } = require('react-native');
|
const { View, Text, Button, FlatList } = require('react-native');
|
||||||
const Setting = require('lib/models/Setting.js');
|
const Setting = require('lib/models/Setting.js');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const { ScreenHeader } = require('lib/components/screen-header.js');
|
const { ScreenHeader } = require('lib/components/screen-header.js');
|
||||||
const { ReportService } = require('lib/services/report.js');
|
const { ReportService } = require('lib/services/report.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { BaseScreenComponent } = require('lib/components/base-screen.js');
|
const { BaseScreenComponent } = require('lib/components/base-screen.js');
|
||||||
const { globalStyle, themeStyle } = require('lib/components/global-style.js');
|
const { themeStyle } = require('lib/components/global-style.js');
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
body: {
|
|
||||||
flex: 1,
|
|
||||||
margin: globalStyle.margin,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
class StatusScreenComponent extends BaseScreenComponent {
|
class StatusScreenComponent extends BaseScreenComponent {
|
||||||
static navigationOptions() {
|
static navigationOptions() {
|
||||||
@ -38,6 +31,16 @@ class StatusScreenComponent extends BaseScreenComponent {
|
|||||||
this.setState({ report: report });
|
this.setState({ report: report });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
styles() {
|
||||||
|
const theme = themeStyle(this.props.theme);
|
||||||
|
return {
|
||||||
|
body: {
|
||||||
|
flex: 1,
|
||||||
|
margin: theme.margin,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const theme = themeStyle(this.props.theme);
|
const theme = themeStyle(this.props.theme);
|
||||||
|
|
||||||
@ -137,7 +140,7 @@ class StatusScreenComponent extends BaseScreenComponent {
|
|||||||
return (
|
return (
|
||||||
<View style={this.rootStyle(this.props.theme).root}>
|
<View style={this.rootStyle(this.props.theme).root}>
|
||||||
<ScreenHeader title={_('Status')} />
|
<ScreenHeader title={_('Status')} />
|
||||||
<View style={styles.body}>{body}</View>
|
<View style={this.styles().body}>{body}</View>
|
||||||
<Button title={_('Refresh')} onPress={() => this.resfreshScreen()} />
|
<Button title={_('Refresh')} onPress={() => this.resfreshScreen()} />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
@ -3,7 +3,7 @@ const Component = React.Component;
|
|||||||
const { TouchableOpacity, Text, StyleSheet, ScrollView, View } = require('react-native');
|
const { TouchableOpacity, Text, StyleSheet, ScrollView, View } = require('react-native');
|
||||||
const { connect } = require('react-redux');
|
const { connect } = require('react-redux');
|
||||||
const Icon = require('react-native-vector-icons/Ionicons').default;
|
const Icon = require('react-native-vector-icons/Ionicons').default;
|
||||||
const { globalStyle, themeStyle } = require('lib/components/global-style.js');
|
const { themeStyle } = require('lib/components/global-style.js');
|
||||||
|
|
||||||
Icon.loadFont();
|
Icon.loadFont();
|
||||||
|
|
||||||
@ -50,7 +50,8 @@ class SideMenuContentNoteComponent extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderDivider(key) {
|
renderDivider(key) {
|
||||||
return <View style={{ marginTop: 15, marginBottom: 15, flex: -1, borderBottomWidth: 1, borderBottomColor: globalStyle.dividerColor }} key={key}></View>;
|
const theme = themeStyle(this.props.theme);
|
||||||
|
return <View style={{ marginTop: 15, marginBottom: 15, flex: -1, borderBottomWidth: 1, borderBottomColor: theme.dividerColor }} key={key}></View>;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderSideBarButton(key, title, iconName, onPressHandler) {
|
renderSideBarButton(key, title, iconName, onPressHandler) {
|
||||||
@ -89,7 +90,7 @@ class SideMenuContentNoteComponent extends Component {
|
|||||||
const style = {
|
const style = {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
borderRightWidth: 1,
|
borderRightWidth: 1,
|
||||||
borderRightColor: globalStyle.dividerColor,
|
borderRightColor: theme.dividerColor,
|
||||||
backgroundColor: theme.backgroundColor,
|
backgroundColor: theme.backgroundColor,
|
||||||
paddingTop: 10,
|
paddingTop: 10,
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@ const Folder = require('lib/models/Folder.js');
|
|||||||
const { Synchronizer } = require('lib/synchronizer.js');
|
const { Synchronizer } = require('lib/synchronizer.js');
|
||||||
const NavService = require('lib/services/NavService.js');
|
const NavService = require('lib/services/NavService.js');
|
||||||
const { _ } = require('lib/locale.js');
|
const { _ } = require('lib/locale.js');
|
||||||
const { globalStyle, themeStyle } = require('lib/components/global-style.js');
|
const { themeStyle } = require('lib/components/global-style.js');
|
||||||
const shared = require('lib/components/shared/side-menu-shared.js');
|
const shared = require('lib/components/shared/side-menu-shared.js');
|
||||||
|
|
||||||
Icon.loadFont();
|
Icon.loadFont();
|
||||||
@ -298,7 +298,8 @@ class SideMenuContentComponent extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
makeDivider(key) {
|
makeDivider(key) {
|
||||||
return <View style={{ marginTop: 15, marginBottom: 15, flex: -1, borderBottomWidth: 1, borderBottomColor: globalStyle.dividerColor }} key={key}></View>;
|
const theme = themeStyle(this.props.theme);
|
||||||
|
return <View style={{ marginTop: 15, marginBottom: 15, flex: -1, borderBottomWidth: 1, borderBottomColor: theme.dividerColor }} key={key}></View>;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderBottomPanel() {
|
renderBottomPanel() {
|
||||||
@ -354,7 +355,7 @@ class SideMenuContentComponent extends Component {
|
|||||||
|
|
||||||
// HACK: inner height of ScrollView doesn't appear to be calculated correctly when
|
// HACK: inner height of ScrollView doesn't appear to be calculated correctly when
|
||||||
// using padding. So instead creating blank elements for padding bottom and top.
|
// using padding. So instead creating blank elements for padding bottom and top.
|
||||||
items.push(<View style={{ height: globalStyle.marginTop }} key="bottom_top_hack" />);
|
items.push(<View style={{ height: theme.marginTop }} key="bottom_top_hack" />);
|
||||||
|
|
||||||
items.push(this.renderSideBarButton('all_notes', _('All notes'), 'md-document', this.allNotesButton_press, this.props.notesParentType === 'SmartFilter'));
|
items.push(this.renderSideBarButton('all_notes', _('All notes'), 'md-document', this.allNotesButton_press, this.props.notesParentType === 'SmartFilter'));
|
||||||
|
|
||||||
@ -371,7 +372,7 @@ class SideMenuContentComponent extends Component {
|
|||||||
const style = {
|
const style = {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
borderRightWidth: 1,
|
borderRightWidth: 1,
|
||||||
borderRightColor: globalStyle.dividerColor,
|
borderRightColor: theme.dividerColor,
|
||||||
backgroundColor: theme.backgroundColor,
|
backgroundColor: theme.backgroundColor,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ pluginAssets[2] = function(theme:any) {
|
|||||||
height: 1em;
|
height: 1em;
|
||||||
margin-left: -1.3em;
|
margin-left: -1.3em;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
color: ${theme.htmlColor};
|
color: ${theme.color};
|
||||||
}
|
}
|
||||||
|
|
||||||
.joplin-checklist li:not(.checked)::before {
|
.joplin-checklist li:not(.checked)::before {
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
htmlFontSize: '15px',
|
fontSize: 15,
|
||||||
htmlColor: '#222222',
|
color: '#222222',
|
||||||
htmlLineHeight: '1.6em',
|
lineHeight: '1.6em',
|
||||||
htmlBackgroundColor: 'white',
|
backgroundColor: 'white',
|
||||||
paddingBottom: 3,
|
paddingBottom: 3,
|
||||||
colorBright: '#000000', // For important text
|
colorBright: '#000000', // For important text
|
||||||
htmlCodeBorderColor: 'rgb(220, 220, 220)',
|
codeBorderColor: 'rgb(220, 220, 220)',
|
||||||
htmlCodeBackgroundColor: 'rgb(243, 243, 243)',
|
codeBackgroundColor: 'rgb(243, 243, 243)',
|
||||||
htmlDividerColor: 'rgb(230,230,230)',
|
dividerColor: 'rgb(230,230,230)',
|
||||||
htmlLinkColor: 'rgb(80,130,190)',
|
urlColor: 'rgb(80,130,190)',
|
||||||
htmlTableBackgroundColor: 'rgb(247, 247, 247)',
|
tableBackgroundColor: 'rgb(247, 247, 247)',
|
||||||
raisedBackgroundColor: '#e5e5e5',
|
raisedBackgroundColor: '#e5e5e5',
|
||||||
htmlCodeColor: 'rgb(0,0,0)',
|
codeColor: 'rgb(0,0,0)',
|
||||||
htmlCodeFontSize: '.9em',
|
codeFontSize: '.9em',
|
||||||
bodyPaddingTop: '0',
|
bodyPaddingTop: '0',
|
||||||
bodyPaddingBottom: '0',
|
bodyPaddingBottom: '0',
|
||||||
|
|
||||||
|
@ -19,11 +19,11 @@ module.exports = function(theme) {
|
|||||||
b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}
|
b,strong{font-weight:bolder}small{font-size:80%}img{border-style:none}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size: ${theme.htmlFontSize};
|
font-size: ${theme.noteViewerFontSize};
|
||||||
color: ${theme.htmlColor};
|
color: ${theme.color};
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
line-height: ${theme.htmlLineHeight};
|
line-height: ${theme.lineHeight};
|
||||||
background-color: ${theme.htmlBackgroundColor};
|
background-color: ${theme.backgroundColor};
|
||||||
font-family: ${fontFamily};
|
font-family: ${fontFamily};
|
||||||
padding-bottom: ${formatCssSize(theme.bodyPaddingBottom)};
|
padding-bottom: ${formatCssSize(theme.bodyPaddingBottom)};
|
||||||
padding-top: ${formatCssSize(theme.bodyPaddingTop)};
|
padding-top: ${formatCssSize(theme.bodyPaddingTop)};
|
||||||
@ -32,11 +32,11 @@ module.exports = function(theme) {
|
|||||||
color: ${theme.colorBright};
|
color: ${theme.colorBright};
|
||||||
}
|
}
|
||||||
kbd {
|
kbd {
|
||||||
border: 1px solid ${theme.htmlCodeBorderColor};
|
border: 1px solid ${theme.codeBorderColor};
|
||||||
box-shadow: inset 0 -1px 0 ${theme.htmlCodeBorderColor};
|
box-shadow: inset 0 -1px 0 ${theme.codeBorderColor};
|
||||||
padding: 2px 4px;
|
padding: 2px 4px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background-color: ${theme.htmlCodeBackgroundColor};
|
background-color: ${theme.codeBackgroundColor};
|
||||||
}
|
}
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 7px;
|
width: 7px;
|
||||||
@ -85,7 +85,7 @@ module.exports = function(theme) {
|
|||||||
h1 {
|
h1 {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-bottom: 1px solid ${theme.htmlDividerColor};
|
border-bottom: 1px solid ${theme.dividerColor};
|
||||||
padding-bottom: .3em;
|
padding-bottom: .3em;
|
||||||
}
|
}
|
||||||
h2 {
|
h2 {
|
||||||
@ -107,11 +107,11 @@ module.exports = function(theme) {
|
|||||||
margin-bottom: 0.8em;
|
margin-bottom: 0.8em;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
padding-bottom: .35em;
|
padding-bottom: .35em;
|
||||||
border-bottom: 1px solid ${theme.htmlDividerColor};
|
border-bottom: 1px solid ${theme.dividerColor};
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: ${theme.htmlLinkColor};
|
color: ${theme.urlColor};
|
||||||
}
|
}
|
||||||
ul, ol {
|
ul, ol {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
@ -132,7 +132,7 @@ module.exports = function(theme) {
|
|||||||
width: 1.2em;
|
width: 1.2em;
|
||||||
height: 1.4em;
|
height: 1.4em;
|
||||||
margin-right: 0.4em;
|
margin-right: 0.4em;
|
||||||
background-color: ${theme.htmlLinkColor};
|
background-color: ${theme.urlColor};
|
||||||
}
|
}
|
||||||
/* These icons are obtained from the wonderful ForkAwesome project by copying the src svgs
|
/* These icons are obtained from the wonderful ForkAwesome project by copying the src svgs
|
||||||
* into the css classes below.
|
* into the css classes below.
|
||||||
@ -193,7 +193,7 @@ module.exports = function(theme) {
|
|||||||
-webkit-mask-repeat: no-repeat;
|
-webkit-mask-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
blockquote {
|
blockquote {
|
||||||
border-left: 4px solid ${theme.htmlCodeBorderColor};
|
border-left: 4px solid ${theme.codeBorderColor};
|
||||||
padding-left: 1.2em;
|
padding-left: 1.2em;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
opacity: .7;
|
opacity: .7;
|
||||||
@ -203,34 +203,34 @@ module.exports = function(theme) {
|
|||||||
table {
|
table {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border: 1px solid ${theme.htmlCodeBorderColor};
|
border: 1px solid ${theme.codeBorderColor};
|
||||||
background-color: ${theme.htmlBackgroundColor};
|
background-color: ${theme.backgroundColor};
|
||||||
}
|
}
|
||||||
|
|
||||||
.jop-tinymce table td, .jop-tinymce table th,
|
.jop-tinymce table td, .jop-tinymce table th,
|
||||||
table td, th {
|
table td, th {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: .5em 1em .5em 1em;
|
padding: .5em 1em .5em 1em;
|
||||||
font-size: ${theme.htmlFontSize};
|
font-size: ${theme.noteViewerFontSize};
|
||||||
color: ${theme.htmlColor};
|
color: ${theme.color};
|
||||||
font-family: ${fontFamily};
|
font-family: ${fontFamily};
|
||||||
}
|
}
|
||||||
|
|
||||||
.jop-tinymce table td,
|
.jop-tinymce table td,
|
||||||
table td {
|
table td {
|
||||||
border: 1px solid ${theme.htmlCodeBorderColor};
|
border: 1px solid ${theme.codeBorderColor};
|
||||||
}
|
}
|
||||||
|
|
||||||
.jop-tinymce table th,
|
.jop-tinymce table th,
|
||||||
table th {
|
table th {
|
||||||
border: 1px solid ${theme.htmlCodeBorderColor};
|
border: 1px solid ${theme.codeBorderColor};
|
||||||
border-bottom: 2px solid ${theme.htmlCodeBorderColor};
|
border-bottom: 2px solid ${theme.codeBorderColor};
|
||||||
background-color: ${theme.htmlTableBackgroundColor};
|
background-color: ${theme.tableBackgroundColor};
|
||||||
}
|
}
|
||||||
|
|
||||||
.jop-tinymce table tr:nth-child(even),
|
.jop-tinymce table tr:nth-child(even),
|
||||||
table tr:nth-child(even) {
|
table tr:nth-child(even) {
|
||||||
background-color: ${theme.htmlTableBackgroundColor};
|
background-color: ${theme.tableBackgroundColor};
|
||||||
}
|
}
|
||||||
|
|
||||||
.jop-tinymce table tr:hover,
|
.jop-tinymce table tr:hover,
|
||||||
@ -240,7 +240,7 @@ module.exports = function(theme) {
|
|||||||
|
|
||||||
hr {
|
hr {
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: 2px solid ${theme.htmlDividerColor};
|
border-bottom: 2px solid ${theme.dividerColor};
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
@ -249,13 +249,13 @@ module.exports = function(theme) {
|
|||||||
|
|
||||||
.inline-code,
|
.inline-code,
|
||||||
.mce-content-body code {
|
.mce-content-body code {
|
||||||
border: 1px solid ${theme.htmlCodeBorderColor};
|
border: 1px solid ${theme.codeBorderColor};
|
||||||
background-color: ${theme.htmlCodeBackgroundColor};
|
background-color: ${theme.codeBackgroundColor};
|
||||||
padding-right: .2em;
|
padding-right: .2em;
|
||||||
padding-left: .2em;
|
padding-left: .2em;
|
||||||
border-radius: .25em;
|
border-radius: .25em;
|
||||||
color: ${theme.htmlCodeColor};
|
color: ${theme.codeColor};
|
||||||
font-size: ${theme.htmlCodeFontSize};
|
font-size: ${theme.codeFontSize};
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlighted-keyword {
|
.highlighted-keyword {
|
||||||
|
@ -50,14 +50,12 @@ class Setting extends BaseModel {
|
|||||||
const output = {};
|
const output = {};
|
||||||
output[Setting.THEME_LIGHT] = _('Light');
|
output[Setting.THEME_LIGHT] = _('Light');
|
||||||
output[Setting.THEME_DARK] = _('Dark');
|
output[Setting.THEME_DARK] = _('Dark');
|
||||||
if (platform !== mobilePlatform) {
|
|
||||||
output[Setting.THEME_DRACULA] = _('Dracula');
|
output[Setting.THEME_DRACULA] = _('Dracula');
|
||||||
output[Setting.THEME_SOLARIZED_LIGHT] = _('Solarised Light');
|
output[Setting.THEME_SOLARIZED_LIGHT] = _('Solarised Light');
|
||||||
output[Setting.THEME_SOLARIZED_DARK] = _('Solarised Dark');
|
output[Setting.THEME_SOLARIZED_DARK] = _('Solarised Dark');
|
||||||
output[Setting.THEME_NORD] = _('Nord');
|
output[Setting.THEME_NORD] = _('Nord');
|
||||||
} else {
|
output[Setting.THEME_ARITIM_DARK] = _('Aritim Dark');
|
||||||
output[Setting.THEME_OLED_DARK] = _('OLED Dark');
|
output[Setting.THEME_OLED_DARK] = _('OLED Dark');
|
||||||
}
|
|
||||||
return output;
|
return output;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ const Folder = require('lib/models/Folder');
|
|||||||
const Note = require('lib/models/Note');
|
const Note = require('lib/models/Note');
|
||||||
const Setting = require('lib/models/Setting');
|
const Setting = require('lib/models/Setting');
|
||||||
const { shim } = require('lib/shim');
|
const { shim } = require('lib/shim');
|
||||||
const { themeStyle } = require('../../theme.js');
|
const { themeStyle } = require('lib/theme');
|
||||||
const { dirname } = require('lib/path-utils.js');
|
const { dirname } = require('lib/path-utils.js');
|
||||||
const { escapeHtml } = require('lib/string-utils.js');
|
const { escapeHtml } = require('lib/string-utils.js');
|
||||||
const markupLanguageUtils = require('lib/markupLanguageUtils');
|
const markupLanguageUtils = require('lib/markupLanguageUtils');
|
||||||
|
@ -2,35 +2,51 @@ const Setting = require('lib/models/Setting.js');
|
|||||||
const Color = require('color');
|
const Color = require('color');
|
||||||
|
|
||||||
const themes = {
|
const themes = {
|
||||||
[Setting.THEME_LIGHT]: require('./gui/style/theme/light'),
|
[Setting.THEME_LIGHT]: require('./themes/light'),
|
||||||
[Setting.THEME_DARK]: require('./gui/style/theme/dark'),
|
[Setting.THEME_DARK]: require('./themes/dark'),
|
||||||
[Setting.THEME_DRACULA]: require('./gui/style/theme/dracula'),
|
[Setting.THEME_DRACULA]: require('./themes/dracula'),
|
||||||
[Setting.THEME_SOLARIZED_LIGHT]: require('./gui/style/theme/solarizedLight'),
|
[Setting.THEME_SOLARIZED_LIGHT]: require('./themes/solarizedLight'),
|
||||||
[Setting.THEME_SOLARIZED_DARK]: require('./gui/style/theme/solarizedDark'),
|
[Setting.THEME_SOLARIZED_DARK]: require('./themes/solarizedDark'),
|
||||||
[Setting.THEME_NORD]: require('./gui/style/theme/nord'),
|
[Setting.THEME_NORD]: require('./themes/nord'),
|
||||||
[Setting.THEME_ARITIM_DARK]: require('./gui/style/theme/aritimDark'),
|
[Setting.THEME_ARITIM_DARK]: require('./themes/aritimDark'),
|
||||||
|
[Setting.THEME_OLED_DARK]: require('./themes/oledDark'),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function themeById(themeId) {
|
||||||
|
if (!themes[themeId]) throw new Error(`Invalid theme ID: ${themeId}`);
|
||||||
|
const output = Object.assign({}, themes[themeId]);
|
||||||
|
|
||||||
|
if (!output.headerBackgroundColor) {
|
||||||
|
output.headerBackgroundColor = output.appearance === 'light' ? '#F0F0F0' : '#2D3136';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!output.textSelectionColor) {
|
||||||
|
output.textSelectionColor = output.appearance === 'light' ? '#0096FF' : '#00AEFF';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!output.colorBright2) {
|
||||||
|
output.colorBright2 = output.appearance === 'light' ? '#ffffff' : '#ffffff';
|
||||||
|
}
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
// globalStyle should be used for properties that do not change across themes
|
// globalStyle should be used for properties that do not change across themes
|
||||||
// i.e. should not be used for colors
|
// i.e. should not be used for colors
|
||||||
const globalStyle = {
|
const globalStyle = {
|
||||||
fontSize: 12,
|
|
||||||
fontFamily: 'sans-serif',
|
fontFamily: 'sans-serif',
|
||||||
margin: 15, // No text and no interactive component should be within this margin
|
margin: 15, // No text and no interactive component should be within this margin
|
||||||
itemMarginTop: 10,
|
itemMarginTop: 10,
|
||||||
itemMarginBottom: 10,
|
itemMarginBottom: 10,
|
||||||
fontSizeSmaller: 14,
|
|
||||||
disabledOpacity: 0.3,
|
disabledOpacity: 0.3,
|
||||||
buttonMinWidth: 50,
|
buttonMinWidth: 50,
|
||||||
buttonMinHeight: 30,
|
buttonMinHeight: 30,
|
||||||
editorFontSize: 12,
|
editorFontSize: 12,
|
||||||
textAreaLineHeight: 17,
|
textAreaLineHeight: 17,
|
||||||
|
lineHeight: '1.6em',
|
||||||
headerHeight: 35,
|
headerHeight: 35,
|
||||||
headerButtonHPadding: 6,
|
headerButtonHPadding: 6,
|
||||||
|
|
||||||
toolbarHeight: 35,
|
toolbarHeight: 35,
|
||||||
|
|
||||||
appearance: 'light',
|
appearance: 'light',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -38,7 +54,6 @@ globalStyle.marginRight = globalStyle.margin;
|
|||||||
globalStyle.marginLeft = globalStyle.margin;
|
globalStyle.marginLeft = globalStyle.margin;
|
||||||
globalStyle.marginTop = globalStyle.margin;
|
globalStyle.marginTop = globalStyle.margin;
|
||||||
globalStyle.marginBottom = globalStyle.margin;
|
globalStyle.marginBottom = globalStyle.margin;
|
||||||
globalStyle.htmlMarginLeft = `${((globalStyle.marginLeft / 10) * 0.6).toFixed(2)}em`;
|
|
||||||
|
|
||||||
globalStyle.icon = {
|
globalStyle.icon = {
|
||||||
fontSize: 30,
|
fontSize: 30,
|
||||||
@ -248,20 +263,15 @@ function themeStyle(theme) {
|
|||||||
// and computed here to allow them to respond to settings changes
|
// and computed here to allow them to respond to settings changes
|
||||||
// without the need to restart
|
// without the need to restart
|
||||||
const fontSizes = {
|
const fontSizes = {
|
||||||
fontSize: Math.round(globalStyle.fontSize * zoomRatio),
|
fontSize: Math.round(12 * zoomRatio),
|
||||||
editorFontSize: editorFontSize,
|
editorFontSize: editorFontSize,
|
||||||
textAreaLineHeight: Math.round(globalStyle.textAreaLineHeight * editorFontSize / 12),
|
textAreaLineHeight: Math.round(globalStyle.textAreaLineHeight * editorFontSize / 12),
|
||||||
|
|
||||||
// For WebView - must correspond to the properties above
|
|
||||||
htmlFontSize: `${Math.round(15 * zoomRatio)}px`,
|
|
||||||
htmlLineHeight: '1.6em', // Math.round(20 * zoomRatio) + 'px'
|
|
||||||
|
|
||||||
htmlCodeFontSize: '.9em',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fontSizes.noteViewerFontSize = Math.round(fontSizes.fontSize * 1.25);
|
||||||
|
|
||||||
let output = {};
|
let output = {};
|
||||||
output.zoomRatio = zoomRatio;
|
output.zoomRatio = zoomRatio;
|
||||||
output.editorFontSize = editorFontSize;
|
|
||||||
|
|
||||||
// All theme are based on the light style, and just override the
|
// All theme are based on the light style, and just override the
|
||||||
// relevant properties
|
// relevant properties
|
||||||
@ -341,4 +351,4 @@ function buildStyle(cacheKey, themeId, callback) {
|
|||||||
return cachedStyles_[cacheKey].style;
|
return cachedStyles_[cacheKey].style;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { themeStyle, buildStyle };
|
module.exports = { themeStyle, buildStyle, themeById };
|
@ -14,7 +14,6 @@ const aritimStyle = {
|
|||||||
urlColor: '#356693', // Links to external sites (e.g. in settings)
|
urlColor: '#356693', // Links to external sites (e.g. in settings)
|
||||||
|
|
||||||
backgroundColor2: '#141a21', // Notebooks main background
|
backgroundColor2: '#141a21', // Notebooks main background
|
||||||
depthColor: '#141a21', // Notebooks background color
|
|
||||||
color2: '#d3dae3', // Notebook sidebar text color
|
color2: '#d3dae3', // Notebook sidebar text color
|
||||||
selectedColor2: '#10151a', // Selected notebook (or settings icon in settings)
|
selectedColor2: '#10151a', // Selected notebook (or settings icon in settings)
|
||||||
colorError2: '#9a2f2f',
|
colorError2: '#9a2f2f',
|
||||||
@ -24,15 +23,10 @@ const aritimStyle = {
|
|||||||
|
|
||||||
warningBackgroundColor: '#9a2f2f', // Info / Warning boxes bg color
|
warningBackgroundColor: '#9a2f2f', // Info / Warning boxes bg color
|
||||||
|
|
||||||
// Markdown rendered
|
tableBackgroundColor: '#141a21', // Table (even) background color
|
||||||
htmlColor: '#d3dae3', // Text color
|
codeBackgroundColor: '#141a21', // Single line code bg
|
||||||
htmlBackgroundColor: '#10151a', // BG Color
|
codeBorderColor: '#141a21', // Single line code border, and tables
|
||||||
htmlDividerColor: '#d3dae3', // Lines e.g. ---
|
codeColor: '#005b47', // Single line code text
|
||||||
htmlLinkColor: '#356693', // Normal links
|
|
||||||
htmlTableBackgroundColor: '#141a21', // Table (even) background color
|
|
||||||
htmlCodeBackgroundColor: '#141a21', // Single line code bg
|
|
||||||
htmlCodeBorderColor: '#141a21', // Single line code border, and tables
|
|
||||||
htmlCodeColor: '#005b47', // Single line code text
|
|
||||||
|
|
||||||
aceEditorTheme: 'chaos',
|
aceEditorTheme: 'chaos',
|
||||||
codeMirrorTheme: 'monokai',
|
codeMirrorTheme: 'monokai',
|
@ -14,7 +14,6 @@ const darkStyle = {
|
|||||||
urlColor: '#4E87EE',
|
urlColor: '#4E87EE',
|
||||||
|
|
||||||
backgroundColor2: '#181A1D',
|
backgroundColor2: '#181A1D',
|
||||||
depthColor: 'rgb(200, 200, 200, OPACITY)',
|
|
||||||
color2: '#ffffff',
|
color2: '#ffffff',
|
||||||
selectedColor2: '#013F74',
|
selectedColor2: '#013F74',
|
||||||
colorError2: '#ff6c6c',
|
colorError2: '#ff6c6c',
|
||||||
@ -24,14 +23,10 @@ const darkStyle = {
|
|||||||
|
|
||||||
warningBackgroundColor: '#CC6600',
|
warningBackgroundColor: '#CC6600',
|
||||||
|
|
||||||
htmlColor: 'rgb(220,220,220)',
|
codeColor: '#ffffff',
|
||||||
htmlBackgroundColor: 'rgb(29,32,36)',
|
tableBackgroundColor: 'rgb(40, 41, 42)',
|
||||||
htmlDividerColor: '#3D444E',
|
codeBackgroundColor: 'rgb(47, 48, 49)',
|
||||||
htmlCodeColor: '#ffffff',
|
codeBorderColor: 'rgb(70, 70, 70)',
|
||||||
htmlLinkColor: 'rgb(166,166,255)',
|
|
||||||
htmlTableBackgroundColor: 'rgb(40, 41, 42)',
|
|
||||||
htmlCodeBackgroundColor: 'rgb(47, 48, 49)',
|
|
||||||
htmlCodeBorderColor: 'rgb(70, 70, 70)',
|
|
||||||
|
|
||||||
aceEditorTheme: 'twilight',
|
aceEditorTheme: 'twilight',
|
||||||
codeMirrorTheme: 'material-darker',
|
codeMirrorTheme: 'material-darker',
|
@ -14,7 +14,6 @@ const draculaStyle = {
|
|||||||
urlColor: '#8be9fd',
|
urlColor: '#8be9fd',
|
||||||
|
|
||||||
backgroundColor2: '#21222C',
|
backgroundColor2: '#21222C',
|
||||||
depthColor: 'rgb(200, 200, 200, OPACITY)',
|
|
||||||
color2: '#bd93f9',
|
color2: '#bd93f9',
|
||||||
selectedColor2: '#44475a',
|
selectedColor2: '#44475a',
|
||||||
colorError2: '#ff5555',
|
colorError2: '#ff5555',
|
||||||
@ -24,14 +23,10 @@ const draculaStyle = {
|
|||||||
|
|
||||||
warningBackgroundColor: '#ffb86c',
|
warningBackgroundColor: '#ffb86c',
|
||||||
|
|
||||||
htmlColor: '#f8f8f2',
|
tableBackgroundColor: '#6272a4',
|
||||||
htmlBackgroundColor: '#282a36',
|
codeBackgroundColor: '#44475a',
|
||||||
htmlDividerColor: '#f8f8f2',
|
codeBorderColor: '#f8f8f2',
|
||||||
htmlLinkColor: '#8be9fd',
|
codeColor: '#50fa7b',
|
||||||
htmlTableBackgroundColor: '#6272a4',
|
|
||||||
htmlCodeBackgroundColor: '#44475a',
|
|
||||||
htmlCodeBorderColor: '#f8f8f2',
|
|
||||||
htmlCodeColor: '#50fa7b',
|
|
||||||
|
|
||||||
aceEditorTheme: 'dracula',
|
aceEditorTheme: 'dracula',
|
||||||
codeMirrorTheme: 'dracula',
|
codeMirrorTheme: 'dracula',
|
@ -1,9 +1,11 @@
|
|||||||
// This is the default theme in Joplin
|
// This is the default theme in Joplin
|
||||||
const lightStyle = {
|
const lightStyle = {
|
||||||
|
appearance: 'light',
|
||||||
|
|
||||||
backgroundColor: '#ffffff',
|
backgroundColor: '#ffffff',
|
||||||
backgroundColorTransparent: 'rgba(255,255,255,0.9)',
|
backgroundColorTransparent: 'rgba(255,255,255,0.9)',
|
||||||
oddBackgroundColor: '#dddddd',
|
oddBackgroundColor: '#dddddd',
|
||||||
color: '#222222', // For regular text
|
color: '#555555', // For regular text
|
||||||
colorError: 'red',
|
colorError: 'red',
|
||||||
colorWarn: '#9A5B00',
|
colorWarn: '#9A5B00',
|
||||||
colorFaded: '#777777', // For less important text
|
colorFaded: '#777777', // For less important text
|
||||||
@ -13,7 +15,6 @@ const lightStyle = {
|
|||||||
urlColor: '#155BDA',
|
urlColor: '#155BDA',
|
||||||
|
|
||||||
backgroundColor2: '#162B3D',
|
backgroundColor2: '#162B3D',
|
||||||
depthColor: 'rgb(100, 182, 253, OPACITY)',
|
|
||||||
color2: '#f5f5f5',
|
color2: '#f5f5f5',
|
||||||
selectedColor2: '#0269C2',
|
selectedColor2: '#0269C2',
|
||||||
colorError2: '#ff6c6c',
|
colorError2: '#ff6c6c',
|
||||||
@ -23,14 +24,10 @@ const lightStyle = {
|
|||||||
|
|
||||||
warningBackgroundColor: '#FFD08D',
|
warningBackgroundColor: '#FFD08D',
|
||||||
|
|
||||||
htmlColor: '#222222',
|
tableBackgroundColor: 'rgb(247, 247, 247)',
|
||||||
htmlBackgroundColor: 'white',
|
codeBackgroundColor: 'rgb(243, 243, 243)',
|
||||||
htmlDividerColor: 'rgb(230,230,230)',
|
codeBorderColor: 'rgb(220, 220, 220)',
|
||||||
htmlLinkColor: 'rgb(80,130,190)',
|
codeColor: 'rgb(0,0,0)',
|
||||||
htmlTableBackgroundColor: 'rgb(247, 247, 247)',
|
|
||||||
htmlCodeBackgroundColor: 'rgb(243, 243, 243)',
|
|
||||||
htmlCodeBorderColor: 'rgb(220, 220, 220)',
|
|
||||||
htmlCodeColor: 'rgb(0,0,0)',
|
|
||||||
|
|
||||||
aceEditorTheme: 'chrome',
|
aceEditorTheme: 'chrome',
|
||||||
codeMirrorTheme: 'default',
|
codeMirrorTheme: 'default',
|
@ -60,7 +60,6 @@ const nordStyle = {
|
|||||||
urlColor: nord[8],
|
urlColor: nord[8],
|
||||||
|
|
||||||
backgroundColor2: nord[2],
|
backgroundColor2: nord[2],
|
||||||
depthColor: 'rgb(200, 200, 200, OPACITY)',
|
|
||||||
color2: nord[8],
|
color2: nord[8],
|
||||||
selectedColor2: nord[10],
|
selectedColor2: nord[10],
|
||||||
colorError2: nord[11],
|
colorError2: nord[11],
|
||||||
@ -70,14 +69,10 @@ const nordStyle = {
|
|||||||
|
|
||||||
warningBackgroundColor: nord[13],
|
warningBackgroundColor: nord[13],
|
||||||
|
|
||||||
htmlColor: nord[4],
|
tableBackgroundColor: nord[0],
|
||||||
htmlBackgroundColor: nord[1],
|
codeBackgroundColor: nord[0],
|
||||||
htmlDividerColor: nord[2],
|
codeBorderColor: nord[2],
|
||||||
htmlLinkColor: nord[10],
|
codeColor: nord[13],
|
||||||
htmlTableBackgroundColor: nord[0],
|
|
||||||
htmlCodeBackgroundColor: nord[0],
|
|
||||||
htmlCodeBorderColor: nord[2],
|
|
||||||
htmlCodeColor: nord[13],
|
|
||||||
|
|
||||||
aceEditorTheme: 'terminal',
|
aceEditorTheme: 'terminal',
|
||||||
codeMirrorTheme: 'nord',
|
codeMirrorTheme: 'nord',
|
20
ReactNativeClient/lib/themes/oledDark.js
Normal file
20
ReactNativeClient/lib/themes/oledDark.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
const darkBase = require('./dark');
|
||||||
|
|
||||||
|
module.exports = Object.assign({}, darkBase, {
|
||||||
|
appearance: 'dark',
|
||||||
|
backgroundColor: '#000000',
|
||||||
|
color: '#dddddd',
|
||||||
|
colorFaded: '#777777',
|
||||||
|
dividerColor: '#3D444E',
|
||||||
|
selectedColor: '#333333',
|
||||||
|
urlColor: 'rgb(166,166,255)',
|
||||||
|
codeColor: '#ffffff',
|
||||||
|
raisedBackgroundColor: '#0F2051',
|
||||||
|
raisedColor: '#788BC3',
|
||||||
|
raisedHighlightedColor: '#ffffff',
|
||||||
|
tableBackgroundColor: 'rgb(0, 0, 0)',
|
||||||
|
codeBackgroundColor: 'rgb(47, 48, 49)',
|
||||||
|
codeBorderColor: 'rgb(70, 70, 70)',
|
||||||
|
codeThemeCss: 'atom-one-dark-reasonable.css',
|
||||||
|
colorBright: 'rgb(220,220,220)',
|
||||||
|
});
|
@ -14,7 +14,6 @@ const solarizedDarkStyle = {
|
|||||||
urlColor: '#268bd2',
|
urlColor: '#268bd2',
|
||||||
|
|
||||||
backgroundColor2: '#073642',
|
backgroundColor2: '#073642',
|
||||||
depthColor: 'rgb(200, 200, 200, OPACITY)',
|
|
||||||
color2: '#eee8d5',
|
color2: '#eee8d5',
|
||||||
selectedColor2: '#6c71c4',
|
selectedColor2: '#6c71c4',
|
||||||
colorError2: '#cb4b16',
|
colorError2: '#cb4b16',
|
||||||
@ -24,14 +23,10 @@ const solarizedDarkStyle = {
|
|||||||
|
|
||||||
warningBackgroundColor: '#b5890055',
|
warningBackgroundColor: '#b5890055',
|
||||||
|
|
||||||
htmlColor: '#93a1a1',
|
tableBackgroundColor: '#002b36',
|
||||||
htmlBackgroundColor: '#002b36',
|
codeBackgroundColor: '#002b36',
|
||||||
htmlDividerColor: '#073642',
|
codeBorderColor: '#696969',
|
||||||
htmlLinkColor: '#268bd2',
|
codeColor: '#fdf6e3',
|
||||||
htmlTableBackgroundColor: '#002b36',
|
|
||||||
htmlCodeBackgroundColor: '#002b36',
|
|
||||||
htmlCodeBorderColor: '#696969',
|
|
||||||
htmlCodeColor: '#fdf6e3',
|
|
||||||
|
|
||||||
aceEditorTheme: 'twilight',
|
aceEditorTheme: 'twilight',
|
||||||
codeMirrorTheme: 'solarized dark',
|
codeMirrorTheme: 'solarized dark',
|
@ -1,4 +1,6 @@
|
|||||||
const solarizedLightStyle = {
|
const solarizedLightStyle = {
|
||||||
|
appearance: 'light',
|
||||||
|
|
||||||
backgroundColor: '#fdf6e3',
|
backgroundColor: '#fdf6e3',
|
||||||
backgroundColorTransparent: 'rgba(253, 246, 227, 0.9)',
|
backgroundColorTransparent: 'rgba(253, 246, 227, 0.9)',
|
||||||
oddBackgroundColor: '#eee8d5',
|
oddBackgroundColor: '#eee8d5',
|
||||||
@ -12,7 +14,6 @@ const solarizedLightStyle = {
|
|||||||
urlColor: '#268bd2',
|
urlColor: '#268bd2',
|
||||||
|
|
||||||
backgroundColor2: '#002b36',
|
backgroundColor2: '#002b36',
|
||||||
depthColor: 'rgb(100, 182, 253, OPACITY)',
|
|
||||||
color2: '#eee8d5',
|
color2: '#eee8d5',
|
||||||
selectedColor2: '#6c71c4',
|
selectedColor2: '#6c71c4',
|
||||||
colorError2: '#cb4b16',
|
colorError2: '#cb4b16',
|
||||||
@ -22,14 +23,10 @@ const solarizedLightStyle = {
|
|||||||
|
|
||||||
warningBackgroundColor: '#b5890055',
|
warningBackgroundColor: '#b5890055',
|
||||||
|
|
||||||
htmlColor: '#657b83',
|
tableBackgroundColor: '#fdf6e3',
|
||||||
htmlBackgroundColor: '#fdf6e3',
|
codeBackgroundColor: '#fdf6e3',
|
||||||
htmlDividerColor: '#eee8d5',
|
codeBorderColor: '#eee8d5',
|
||||||
htmlLinkColor: '#268bd2',
|
codeColor: '#002b36',
|
||||||
htmlTableBackgroundColor: '#fdf6e3',
|
|
||||||
htmlCodeBackgroundColor: '#fdf6e3',
|
|
||||||
htmlCodeBorderColor: '#eee8d5',
|
|
||||||
htmlCodeColor: '#002b36',
|
|
||||||
|
|
||||||
aceEditorTheme: 'tomorrow',
|
aceEditorTheme: 'tomorrow',
|
||||||
codeMirrorTheme: 'solarized light',
|
codeMirrorTheme: 'solarized light',
|
33
ReactNativeClient/package-lock.json
generated
33
ReactNativeClient/package-lock.json
generated
@ -3195,6 +3195,15 @@
|
|||||||
"object-visit": "^1.0.0"
|
"object-visit": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"color": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/color/-/color-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==",
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^1.9.1",
|
||||||
|
"color-string": "^1.5.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"color-convert": {
|
"color-convert": {
|
||||||
"version": "1.9.3",
|
"version": "1.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||||
@ -3208,6 +3217,15 @@
|
|||||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
|
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
|
||||||
},
|
},
|
||||||
|
"color-string": {
|
||||||
|
"version": "1.5.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz",
|
||||||
|
"integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==",
|
||||||
|
"requires": {
|
||||||
|
"color-name": "^1.0.0",
|
||||||
|
"simple-swizzle": "^0.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"color-support": {
|
"color-support": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
|
||||||
@ -9770,6 +9788,21 @@
|
|||||||
"plist": "^3.0.1"
|
"plist": "^3.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"simple-swizzle": {
|
||||||
|
"version": "0.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||||
|
"integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=",
|
||||||
|
"requires": {
|
||||||
|
"is-arrayish": "^0.3.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"is-arrayish": {
|
||||||
|
"version": "0.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
||||||
|
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"slash": {
|
"slash": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
"async-mutex": "^0.1.3",
|
"async-mutex": "^0.1.3",
|
||||||
"base-64": "^0.1.0",
|
"base-64": "^0.1.0",
|
||||||
"buffer": "^5.0.8",
|
"buffer": "^5.0.8",
|
||||||
|
"color": "^3.1.2",
|
||||||
"diacritics": "^1.3.0",
|
"diacritics": "^1.3.0",
|
||||||
"diff-match-patch": "^1.0.4",
|
"diff-match-patch": "^1.0.4",
|
||||||
"events": "^1.1.1",
|
"events": "^1.1.1",
|
||||||
|
@ -444,7 +444,7 @@ async function initialize(dispatch) {
|
|||||||
if (Setting.value('env') == 'prod') {
|
if (Setting.value('env') == 'prod') {
|
||||||
await db.open({ name: 'joplin.sqlite' });
|
await db.open({ name: 'joplin.sqlite' });
|
||||||
} else {
|
} else {
|
||||||
await db.open({ name: 'joplin-70.sqlite' });
|
await db.open({ name: 'joplin-71.sqlite' });
|
||||||
|
|
||||||
// await db.clearForTesting();
|
// await db.clearForTesting();
|
||||||
}
|
}
|
||||||
@ -722,7 +722,10 @@ class AppComponent extends React.Component {
|
|||||||
Config: { screen: ConfigScreen },
|
Config: { screen: ConfigScreen },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const statusBarStyle = theme.appearance === 'light' ? 'dark-content' : 'light-content';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<View style={{ flex: 1, backgroundColor: theme.backgroundColor }}>
|
||||||
<SideMenu
|
<SideMenu
|
||||||
menu={sideMenuContent}
|
menu={sideMenuContent}
|
||||||
edgeHitWidth={5}
|
edgeHitWidth={5}
|
||||||
@ -735,7 +738,7 @@ class AppComponent extends React.Component {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<StatusBar barStyle="dark-content" />
|
<StatusBar barStyle={statusBarStyle} />
|
||||||
<MenuContext style={{ flex: 1, backgroundColor: theme.backgroundColor }}>
|
<MenuContext style={{ flex: 1, backgroundColor: theme.backgroundColor }}>
|
||||||
<SafeAreaView style={{ flex: 1 }}>
|
<SafeAreaView style={{ flex: 1 }}>
|
||||||
<View style={{ flex: 1, backgroundColor: theme.backgroundColor }}>
|
<View style={{ flex: 1, backgroundColor: theme.backgroundColor }}>
|
||||||
@ -746,6 +749,7 @@ class AppComponent extends React.Component {
|
|||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
</MenuContext>
|
</MenuContext>
|
||||||
</SideMenu>
|
</SideMenu>
|
||||||
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
"strictFunctionTypes": true,
|
"strictFunctionTypes": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
|
"skipLibCheck": true,
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"ReactNativeClient/**/*",
|
"ReactNativeClient/**/*",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user