You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-23 23:33:01 +02:00
Compare commits
34 Commits
server-v2.
...
close-stal
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afd63aa3c8 | ||
|
|
04c3c218b9 | ||
|
|
088ae44c63 | ||
|
|
4aa9339fbb | ||
|
|
7edcbc5c27 | ||
|
|
f3650097a0 | ||
|
|
6a4326e2db | ||
|
|
50dc656f65 | ||
|
|
b36cf46a06 | ||
|
|
1781334374 | ||
|
|
71140a638f | ||
|
|
6ba0fce237 | ||
|
|
c033a343c1 | ||
|
|
898c96a566 | ||
|
|
b83fa133b2 | ||
|
|
ec7fec8b59 | ||
|
|
b2fb4f2ea2 | ||
|
|
c74e51a58e | ||
|
|
7cba4be498 | ||
|
|
19b396f2ec | ||
|
|
4ed7c340a0 | ||
|
|
fe770917fd | ||
|
|
f2168d3bca | ||
|
|
5d4ebc6e14 | ||
|
|
3cf0841775 | ||
|
|
e5b6ecc50b | ||
|
|
f451633a51 | ||
|
|
e813d15ef2 | ||
|
|
b5b02d8d7b | ||
|
|
2660ff3af6 | ||
|
|
59cdcaf8d1 | ||
|
|
9426a2170c | ||
|
|
b47a541976 | ||
|
|
4df5ad5c7a |
1
.github/scripts/run_ci.sh
vendored
1
.github/scripts/run_ci.sh
vendored
@@ -37,6 +37,7 @@ echo "GITHUB_EVENT_NAME=$GITHUB_EVENT_NAME"
|
||||
echo "GITHUB_REF=$GITHUB_REF"
|
||||
echo "RUNNER_OS=$RUNNER_OS"
|
||||
echo "GIT_TAG_NAME=$GIT_TAG_NAME"
|
||||
echo "BUILD_SEQUENCIAL=$BUILD_SEQUENCIAL"
|
||||
|
||||
echo "IS_CONTINUOUS_INTEGRATION=$IS_CONTINUOUS_INTEGRATION"
|
||||
echo "IS_PULL_REQUEST=$IS_PULL_REQUEST"
|
||||
|
||||
25
.github/stale.yml
vendored
25
.github/stale.yml
vendored
@@ -1,25 +0,0 @@
|
||||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 30
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- "good first issue"
|
||||
- "upstream"
|
||||
- "backlog"
|
||||
- "high"
|
||||
- "medium"
|
||||
- "spec"
|
||||
- "cannot reproduce"
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: stale
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs.
|
||||
You may comment on the issue and I will leave it open.
|
||||
Thank you for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: >
|
||||
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
|
||||
only: issues
|
||||
22
.github/workflows/close-stale-issues.yml
vendored
Normal file
22
.github/workflows/close-stale-issues.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: 'Close stale issues'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 16 * * *'
|
||||
permissions:
|
||||
issues: write
|
||||
jobs:
|
||||
ProcessStaleIssues:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v4
|
||||
with:
|
||||
# Use this to do a dry run from a pull request
|
||||
# debug-only: true
|
||||
stale-issue-message: "Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions."
|
||||
days-before-stale: 30
|
||||
days-before-close: 7
|
||||
exempt-issue-labels: 'good first issue,upstream,backlog,high,medium,spec,cannot reproduce'
|
||||
stale-issue-label: 'stale'
|
||||
close-issue-message: 'Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.'
|
||||
# Don't process pull requests at all
|
||||
days-before-pr-stale: -1
|
||||
4
.github/workflows/github-actions-main.yml
vendored
4
.github/workflows/github-actions-main.yml
vendored
@@ -74,6 +74,7 @@ jobs:
|
||||
CSC_LINK: ${{ secrets.APPLE_CSC_LINK }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
IS_CONTINUOUS_INTEGRATION: 1
|
||||
BUILD_SEQUENCIAL: 1
|
||||
run: |
|
||||
"${GITHUB_WORKSPACE}/.github/scripts/run_ci.sh"
|
||||
|
||||
@@ -84,6 +85,7 @@ jobs:
|
||||
CSC_LINK: ${{ secrets.WINDOWS_CSC_LINK }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
IS_CONTINUOUS_INTEGRATION: 1
|
||||
BUILD_SEQUENCIAL: 1
|
||||
run: |
|
||||
yarn install
|
||||
cd packages/app-desktop
|
||||
@@ -122,6 +124,8 @@ jobs:
|
||||
corepack enable
|
||||
|
||||
- name: Build Docker Image
|
||||
env:
|
||||
BUILD_SEQUENCIAL: 1
|
||||
run: |
|
||||
yarn install
|
||||
yarn run buildServerDocker --tag-name server-v0.0.0
|
||||
|
||||
2
BUILD.md
2
BUILD.md
@@ -60,7 +60,7 @@ Normally the **bundler** should start automatically with the application. If it
|
||||
## Building the clipper
|
||||
|
||||
cd packages/app-clipper/popup
|
||||
yarn run watch # To watch for changes
|
||||
npm run watch # To watch for changes
|
||||
|
||||
To test the extension please refer to the relevant pages for each browser: [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#Trying_it_out) / [Chrome](https://developer.chrome.com/docs/extensions/mv3/getstarted/). Please note that the extension in dev mode will only connect to a dev instance of the desktop app (and vice-versa).
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@ Joplin is available in multiple languages thanks to the help of its users. You c
|
||||
|
||||
If you want to start contributing to the project's code, please follow these guidelines before creating a pull request:
|
||||
|
||||
- Explain WHY you want to add this change. Explain it inside the pull request and you may link to an issue for additional information, but the PR should gives a clear overview of why you want to add this.
|
||||
- Explain WHY you want to add this change. Explain it inside the pull request and you may link to an issue for additional information, but the PR should give a clear overview of why you want to add this.
|
||||
- Bug fixes are always welcome. Start by reviewing the [list of bugs](https://github.com/laurent22/joplin/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
|
||||
- A good way to easily start contributing is to pick and work on a [good first issue](https://github.com/laurent22/joplin/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). We try to make these issues as clear as possible and provide basic info on how the code should be changed, and if something is unclear feel free to ask for more information on the issue.
|
||||
- Before adding a new feature, ask about it in the [Github Issue Tracker](https://github.com/laurent22/joplin/issues?utf8=%E2%9C%93&q=is%3Aissue) or the [Joplin Forum](https://discourse.joplinapp.org/), or check if existing discussions exist to make sure the new functionality is desired.
|
||||
- **Changes that will consist in more than 50 lines of code should be discussed the [Joplin Forum](https://discourse.joplinapp.org/)**, so that you don't spend too much time implementing something that might not be accepted.
|
||||
- All the applications share the same backend (database, synchronisation, settings, models, business logic, etc.) so if you change something in the backend in one app, makes sure it still work in the other apps. Usually it does, but keep this in mind.
|
||||
- **Changes that will consist of more than 50 lines of code should be discussed on the [Joplin Forum](https://discourse.joplinapp.org/)**, so that you don't spend too much time implementing something that might not be accepted.
|
||||
- All the applications share the same backend (database, synchronisation, settings, models, business logic, etc.) so if you change something in the backend in one app, make sure it still works in the other apps. Usually it does, but keep this in mind.
|
||||
- Pull requests that make many changes using an automated tool, like for spell fixing, styling, etc. will not be accepted. An exception would be if the changes have been discussed in the forum and someone has agreed to review **and test** the pull request.
|
||||
- Pull requests that make address multiple issues will most likely stall and eventually be closed. This is because we might be fine with one of the changes but not with others and untangling that kind of pull request is too much hassle both for maintainers and the person who submitted it. So most of the time someone gives up and the PR gets closed. So please keep the pull request focused on one issue.
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ COPY --chown=$user:$user package*.json ./
|
||||
COPY --chown=$user:$user .yarn ./.yarn
|
||||
COPY --chown=$user:$user .yarnrc.yml .
|
||||
COPY --chown=$user:$user yarn.lock .
|
||||
COPY --chown=$user:$user gulpfile.js .
|
||||
|
||||
RUN yarn install --inline-builds --mode=skip-build
|
||||
|
||||
@@ -75,9 +76,14 @@ COPY --chown=$user:$user packages/tools ./packages/tools
|
||||
COPY --chown=$user:$user packages/lib ./packages/lib
|
||||
COPY --chown=$user:$user packages/server ./packages/server
|
||||
|
||||
# Finally build everything, in particular the TypeScript files.
|
||||
# Finally build everything, in particular the TypeScript files. We can't just
|
||||
# run `yarn run build` because that wouldn't run the postinstall scripts in
|
||||
# dependencies (for example the sqlite3 native module would not be built). So
|
||||
# instead we run `yarn install`, which is going to install again all the
|
||||
# packages (but because it's already done it should be fast), and then run the
|
||||
# postinstall scripts, as well as build scripts.
|
||||
|
||||
RUN yarn run build
|
||||
RUN BUILD_SEQUENCIAL=1 yarn install --inline-builds
|
||||
|
||||
ENV RUNNING_IN_DOCKER=1
|
||||
EXPOSE ${APP_PORT}
|
||||
|
||||
@@ -219,6 +219,7 @@ then
|
||||
Type=Application
|
||||
Categories=Office;
|
||||
MimeType=x-scheme-handler/joplin;
|
||||
X-GNOME-SingleWindow=true
|
||||
EOF
|
||||
|
||||
# Update application icons
|
||||
|
||||
10
LICENSE
10
LICENSE
@@ -1,9 +1,9 @@
|
||||
All code in this repository is licensed under the MIT License **unless a
|
||||
directory contains a LICENSE file**, in which case that LICENSE file applies to
|
||||
the code in that sub-directory.
|
||||
directory contains a LICENSE or LICENSE.md file**, in which case that file
|
||||
applies to the code in that sub-directory.
|
||||
|
||||
For example, packages/fork-sax contains a ISC LICENSE file, thus all code under
|
||||
the packages/fork-sax directory is licensed under ISC.
|
||||
For example, packages/server contains a LICENSE.md file, thus all code under the
|
||||
packages/server directory is licensed under that license.
|
||||
|
||||
For example, packages/app-cli does NOT contain a LICENSE file, thus all code
|
||||
under that directory is licensed under the default license, which is MIT.
|
||||
@@ -20,7 +20,7 @@ icons please contact the author in order to get a permission.
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016-2021 Laurent Cozic
|
||||
Copyright (c) 2016-2022 Laurent Cozic
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
||||
@@ -304,6 +304,7 @@ To add a **Bucket Policy** from the AWS S3 Web Console, navigate to the **Permis
|
||||
"Action": [
|
||||
"s3:ListBucket",
|
||||
"s3:GetBucketLocation",
|
||||
"s3:GetObject",
|
||||
"s3:DeleteObject",
|
||||
"s3:DeleteObjectVersion",
|
||||
"s3:PutObject"
|
||||
|
||||
16
gulpfile.js
16
gulpfile.js
@@ -20,6 +20,22 @@ const tasks = {
|
||||
await utils.execCommandVerbose('git', ['push']);
|
||||
},
|
||||
},
|
||||
build: {
|
||||
fn: async () => {
|
||||
// Building everything in parallel seems to be unreliable on CI as
|
||||
// certain scripts randomly fail with missing files or folder, or
|
||||
// cannot delete certain directories (eg. copyPluginAssets or
|
||||
// copyApplicationAssets). Because of this, on CI, we run the build
|
||||
// sequencially. Locally we run it in parallel, which is much
|
||||
// faster, especially when having to rebuild after adding a
|
||||
// dependency.
|
||||
if (process.env.BUILD_SEQUENCIAL === '1') {
|
||||
await utils.execCommandVerbose('yarn', ['run', 'buildSequential']);
|
||||
} else {
|
||||
await utils.execCommandVerbose('yarn', ['run', 'buildParallel']);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
utils.registerGulpTasks(gulp, tasks);
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"node": ">=16"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn workspaces foreach --verbose --interlaced --parallel run build && yarn run tsc",
|
||||
"buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 run build && yarn run tsc",
|
||||
"buildSequential": "yarn workspaces foreach --verbose --interlaced run build && yarn run tsc",
|
||||
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
|
||||
"buildCommandIndex": "gulp buildCommandIndex",
|
||||
"buildPluginDoc": "typedoc --name 'Joplin Plugin API Documentation' --mode file -theme './Assets/PluginDocTheme/' --readme './Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out ../joplin-website/docs/api/references/plugin_api packages/lib/services/plugins/api/",
|
||||
@@ -28,9 +29,9 @@
|
||||
"linter-ci": "eslint --resolve-plugins-relative-to . --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
|
||||
"linter-precommit": "eslint --resolve-plugins-relative-to . --fix --ext .js --ext .jsx --ext .ts --ext .tsx",
|
||||
"linter": "eslint --resolve-plugins-relative-to . --fix --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
|
||||
"postinstall": "yarn run build",
|
||||
"publishAll": "git pull && yarn run build && lerna version --yes --no-private --no-git-tag-version && gulp completePublishAll",
|
||||
"releaseAndroid": "yarn run build && export PATH=\"/usr/local/opt/openjdk@11/bin:$PATH\" && node packages/tools/release-android.js",
|
||||
"postinstall": "gulp build",
|
||||
"publishAll": "git pull && yarn run buildParallel && lerna version --yes --no-private --no-git-tag-version && gulp completePublishAll",
|
||||
"releaseAndroid": "yarn run buildParallel && export PATH=\"/usr/local/opt/openjdk@11/bin:$PATH\" && node packages/tools/release-android.js",
|
||||
"releaseAndroidClean": "node packages/tools/release-android.js",
|
||||
"releaseCli": "node packages/tools/release-cli.js",
|
||||
"releaseClipper": "node packages/tools/release-clipper.js",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>React App</title>
|
||||
<title>Joplin Web Clipper</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
||||
2
packages/app-desktop/.gitignore
vendored
2
packages/app-desktop/.gitignore
vendored
@@ -12,5 +12,5 @@ runForSharingCommands-*
|
||||
runForTestingCommands-*
|
||||
style.min.css
|
||||
build/lib/
|
||||
vendor/
|
||||
vendor/*
|
||||
!vendor/loadEmojiLib.js
|
||||
|
||||
@@ -24,7 +24,6 @@ import ExternalEditWatcher from '@joplin/lib/services/ExternalEditWatcher';
|
||||
import appReducer, { createAppDefaultState } from './app.reducer';
|
||||
const { FoldersScreenUtils } = require('@joplin/lib/folders-screen-utils.js');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
const fs = require('fs-extra');
|
||||
import Tag from '@joplin/lib/models/Tag';
|
||||
import { reg } from '@joplin/lib/registry';
|
||||
const packageInfo = require('./packageInfo.js');
|
||||
@@ -63,6 +62,7 @@ import ShareService from '@joplin/lib/services/share/ShareService';
|
||||
import checkForUpdates from './checkForUpdates';
|
||||
import { AppState } from './app.reducer';
|
||||
import syncDebugLog from '@joplin/lib/services/synchronizer/syncDebugLog';
|
||||
import eventManager from '@joplin/lib/eventManager';
|
||||
// import { runIntegrationTests } from '@joplin/lib/services/e2ee/ppkTestUtils';
|
||||
|
||||
const pluginClasses = [
|
||||
@@ -234,23 +234,6 @@ class Application extends BaseApplication {
|
||||
});
|
||||
}
|
||||
|
||||
async loadCustomCss(filePath: string) {
|
||||
let cssString = '';
|
||||
if (await fs.pathExists(filePath)) {
|
||||
try {
|
||||
cssString = await fs.readFile(filePath, 'utf-8');
|
||||
|
||||
} catch (error) {
|
||||
let msg = error.message ? error.message : '';
|
||||
msg = `Could not load custom css from ${filePath}\n${msg}`;
|
||||
error.message = msg;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
return cssString;
|
||||
}
|
||||
|
||||
private async checkForLegacyTemplates() {
|
||||
const templatesDir = `${Setting.value('profileDir')}/templates`;
|
||||
if (await shim.fsDriver().exists(templatesDir)) {
|
||||
@@ -523,6 +506,12 @@ class Application extends BaseApplication {
|
||||
|
||||
ResourceEditWatcher.instance().initialize(reg.logger(), (action: any) => { this.store().dispatch(action); }, (path: string) => bridge().openItem(path));
|
||||
|
||||
// Forwards the local event to the global event manager, so that it can
|
||||
// be picked up by the plugin manager.
|
||||
ResourceEditWatcher.instance().on('resourceChange', (event: any) => {
|
||||
eventManager.emit('resourceChange', event);
|
||||
});
|
||||
|
||||
RevisionService.instance().runInBackground();
|
||||
|
||||
// Make it available to the console window - useful to call revisionService.collectRevisions()
|
||||
|
||||
@@ -8,25 +8,31 @@ import StyledInput from '../style/StyledInput';
|
||||
import { IconSelector, ChangeEvent } from './IconSelector';
|
||||
import useAsyncEffect, { AsyncEffectEvent } from '@joplin/lib/hooks/useAsyncEffect';
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import { FolderIcon } from '@joplin/lib/services/database/types';
|
||||
import { FolderEntity, FolderIcon } from '@joplin/lib/services/database/types';
|
||||
import Button from '../Button/Button';
|
||||
import bridge from '../../services/bridge';
|
||||
|
||||
interface Props {
|
||||
themeId: number;
|
||||
dispatch: Function;
|
||||
folderId: string;
|
||||
parentId: string;
|
||||
}
|
||||
|
||||
export default function(props: Props) {
|
||||
const [folderTitle, setFolderTitle] = useState('');
|
||||
const [folderIcon, setFolderIcon] = useState<FolderIcon>();
|
||||
|
||||
const isNew = !props.folderId;
|
||||
|
||||
useAsyncEffect(async (event: AsyncEffectEvent) => {
|
||||
if (isNew) return;
|
||||
|
||||
const folder = await Folder.load(props.folderId);
|
||||
if (event.cancelled) return;
|
||||
setFolderTitle(folder.title);
|
||||
setFolderIcon(Folder.unserializeIcon(folder.icon));
|
||||
}, [props.folderId]);
|
||||
}, [props.folderId, isNew]);
|
||||
|
||||
const onClose = useCallback(() => {
|
||||
props.dispatch({
|
||||
@@ -42,15 +48,29 @@ export default function(props: Props) {
|
||||
}
|
||||
|
||||
if (event.buttonName === 'ok') {
|
||||
await Folder.save({
|
||||
id: props.folderId,
|
||||
const folder: FolderEntity = {
|
||||
title: folderTitle,
|
||||
icon: Folder.serializeIcon(folderIcon),
|
||||
});
|
||||
onClose();
|
||||
};
|
||||
|
||||
if (!isNew) folder.id = props.folderId;
|
||||
if (props.parentId) folder.parent_id = props.parentId;
|
||||
|
||||
try {
|
||||
const savedFolder = await Folder.save(folder, { userSideValidation: true });
|
||||
onClose();
|
||||
|
||||
props.dispatch({
|
||||
type: 'FOLDER_SELECT',
|
||||
id: savedFolder.id,
|
||||
});
|
||||
} catch (error) {
|
||||
bridge().showErrorMessageBox(error.message);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}, [onClose, folderTitle, folderIcon, props.folderId]);
|
||||
}, [onClose, folderTitle, folderIcon, props.folderId, props.parentId]);
|
||||
|
||||
const onFolderTitleChange = useCallback((event: any) => {
|
||||
setFolderTitle(event.target.value);
|
||||
@@ -96,10 +116,12 @@ export default function(props: Props) {
|
||||
);
|
||||
}
|
||||
|
||||
const dialogTitle = isNew ? _('Create notebook') : _('Edit notebook');
|
||||
|
||||
function renderDialogWrapper() {
|
||||
return (
|
||||
<div className="dialog-root">
|
||||
<DialogTitle title={_('Edit notebook')}/>
|
||||
<DialogTitle title={dialogTitle}/>
|
||||
{renderContent()}
|
||||
<DialogButtonRow
|
||||
themeId={props.themeId}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { CommandContext, CommandDeclaration, CommandRuntime } from '@joplin/lib/services/CommandService';
|
||||
import CommandService, { CommandContext, CommandDeclaration, CommandRuntime } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
const bridge = require('@electron/remote').require('./bridge').default;
|
||||
import { Options } from './openFolderDialog';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'newFolder',
|
||||
@@ -9,35 +8,15 @@ export const declaration: CommandDeclaration = {
|
||||
iconName: 'fa-book',
|
||||
};
|
||||
|
||||
export const runtime = (comp: any): CommandRuntime => {
|
||||
export const runtime = (): CommandRuntime => {
|
||||
return {
|
||||
execute: async (_context: CommandContext, parentId: string = null) => {
|
||||
comp.setState({
|
||||
promptOptions: {
|
||||
label: _('Notebook title:'),
|
||||
onClose: async (answer: string) => {
|
||||
if (answer) {
|
||||
let folder = null;
|
||||
try {
|
||||
const toSave: any = { title: answer };
|
||||
if (parentId) toSave.parent_id = parentId;
|
||||
folder = await Folder.save(toSave, { userSideValidation: true });
|
||||
} catch (error) {
|
||||
bridge().showErrorMessageBox(error.message);
|
||||
}
|
||||
const options: Options = {
|
||||
isNew: true,
|
||||
parentId: parentId,
|
||||
};
|
||||
|
||||
if (folder) {
|
||||
comp.props.dispatch({
|
||||
type: 'FOLDER_SELECT',
|
||||
id: folder.id,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
comp.setState({ promptOptions: null });
|
||||
},
|
||||
},
|
||||
});
|
||||
void CommandService.instance().execute('openFolderDialog', options);
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
|
||||
export interface Options {
|
||||
isNew?: boolean;
|
||||
folderId?: string;
|
||||
parentId?: string;
|
||||
}
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'openFolderDialog',
|
||||
label: () => _('Edit'),
|
||||
@@ -8,13 +14,22 @@ export const declaration: CommandDeclaration = {
|
||||
|
||||
export const runtime = (): CommandRuntime => {
|
||||
return {
|
||||
execute: async (context: CommandContext, folderId: string) => {
|
||||
execute: async (context: CommandContext, options: Options = null) => {
|
||||
options = {
|
||||
isNew: false,
|
||||
...options,
|
||||
};
|
||||
|
||||
if (options.isNew && !('parentId' in options)) throw new Error('parentId mst be specified when creating a new folder');
|
||||
if (!options.isNew && !('folderId' in options)) throw new Error('folderId property is required');
|
||||
|
||||
context.dispatch({
|
||||
type: 'DIALOG_OPEN',
|
||||
name: 'editFolder',
|
||||
isOpen: true,
|
||||
props: {
|
||||
folderId,
|
||||
folderId: options.folderId,
|
||||
parentId: options.parentId,
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
@@ -89,6 +89,7 @@ interface Props {
|
||||
['spellChecker.language']: string;
|
||||
plugins: PluginStates;
|
||||
customCss: string;
|
||||
locale: string;
|
||||
}
|
||||
|
||||
const commandNames: string[] = menuCommandNames();
|
||||
@@ -249,7 +250,11 @@ function useMenu(props: Props) {
|
||||
const keymapService = KeymapService.instance();
|
||||
|
||||
const pluginCommandNames = props.pluginMenuItems.map((view: any) => view.commandName);
|
||||
const menuItemDic = menuUtils.commandsToMenuItems(commandNames.concat(pluginCommandNames), (commandName: string) => onMenuItemClickRef.current(commandName));
|
||||
const menuItemDic = menuUtils.commandsToMenuItems(
|
||||
commandNames.concat(pluginCommandNames),
|
||||
(commandName: string) => onMenuItemClickRef.current(commandName),
|
||||
props.locale
|
||||
);
|
||||
|
||||
const quitMenuItem = {
|
||||
label: _('Quit'),
|
||||
@@ -830,7 +835,7 @@ function useMenu(props: Props) {
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = null;
|
||||
};
|
||||
}, [props.routeName, props.pluginMenuItems, props.pluginMenus, keymapLastChangeTime, modulesLastChangeTime, props['spellChecker.language'], props['spellChecker.enabled'], props.plugins, props.customCss]);
|
||||
}, [props.routeName, props.pluginMenuItems, props.pluginMenus, keymapLastChangeTime, modulesLastChangeTime, props['spellChecker.language'], props['spellChecker.enabled'], props.plugins, props.customCss, props.locale]);
|
||||
|
||||
useMenuStates(menu, props);
|
||||
|
||||
@@ -872,6 +877,7 @@ const mapStateToProps = (state: AppState) => {
|
||||
|
||||
return {
|
||||
menuItemProps: menuUtils.commandsToMenuItemProps(commandNames.concat(pluginCommandNames(state.pluginService.plugins)), whenClauseContext),
|
||||
locale: state.settings.locale,
|
||||
routeName: state.route.routeName,
|
||||
selectedFolderId: state.selectedFolderId,
|
||||
layoutButtonSequence: state.settings.layoutButtonSequence,
|
||||
|
||||
@@ -56,7 +56,15 @@ function editorCommandRuntime(declaration: CommandDeclaration, editorRef: any, s
|
||||
});
|
||||
}
|
||||
},
|
||||
enabledCondition: '!modalDialogVisible && markdownEditorPaneVisible && oneNoteSelected && noteIsMarkdown',
|
||||
|
||||
// We disable the editor commands whenever a modal dialog is visible,
|
||||
// otherwise the user might type something in a dialog and accidentally
|
||||
// change something in the editor. However, we still enable them for
|
||||
// GotoAnything so that it's possible to type eg `textBold` and bold the
|
||||
// currently selected text.
|
||||
//
|
||||
// https://github.com/laurent22/joplin/issues/5707
|
||||
enabledCondition: '(!modalDialogVisible || gotoAnythingVisible) && markdownEditorPaneVisible && oneNoteSelected && noteIsMarkdown',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ class SidebarComponent extends React.Component<Props, State> {
|
||||
);
|
||||
|
||||
if (itemType === BaseModel.TYPE_FOLDER && !item.encryption_applied) {
|
||||
menu.append(new MenuItem(menuUtils.commandToStatefulMenuItem('openFolderDialog', itemId)));
|
||||
menu.append(new MenuItem(menuUtils.commandToStatefulMenuItem('openFolderDialog', { folderId: itemId })));
|
||||
|
||||
menu.append(new MenuItem({ type: 'separator' }));
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ if [ "$USER_NUM" = "1a" ]; then
|
||||
USER_PROFILE_NUM=1a
|
||||
fi
|
||||
|
||||
if [ "$USER_NUM" = "1b" ]; then
|
||||
USER_NUM=1
|
||||
USER_PROFILE_NUM=1b
|
||||
fi
|
||||
|
||||
COMMANDS=($(echo $2 | tr "," "\n"))
|
||||
PROFILE_DIR=~/.config/joplindev-desktop-$USER_PROFILE_NUM
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ export default function stateToWhenClauseContext(state: AppState, options: WhenC
|
||||
markdownEditorPaneVisible: state.settings['editor.codeView'] && state.noteVisiblePanes.includes('editor'),
|
||||
markdownViewerPaneVisible: state.settings['editor.codeView'] && state.noteVisiblePanes.includes('viewer'),
|
||||
modalDialogVisible: !!Object.keys(state.visibleDialogs).length,
|
||||
gotoAnythingVisible: !!state.visibleDialogs['gotoAnything'],
|
||||
sidebarVisible: !!state.mainLayout && layoutItemProp(state.mainLayout, 'sideBar', 'visible'),
|
||||
noteListHasNotes: !!state.notes.length,
|
||||
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
const { copy, mkdirp, remove } = require('fs-extra');
|
||||
|
||||
const msleep = async (ms) => {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve();
|
||||
}, ms);
|
||||
});
|
||||
};
|
||||
|
||||
// Same as copyApplicationAssets - probably both scripts should be merged in
|
||||
// one.
|
||||
const withRetry = async (fn) => {
|
||||
for (let i = 0; i < 5; i++) {
|
||||
try {
|
||||
await fn();
|
||||
return;
|
||||
} catch (error) {
|
||||
console.warn(`withRetry: Failed calling function - will retry (${i})`, error);
|
||||
await msleep(1000 + i * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
throw new Error('withRetry: Could not run function after multiple attempts');
|
||||
};
|
||||
|
||||
async function main() {
|
||||
const rootDir = `${__dirname}/..`;
|
||||
|
||||
@@ -12,11 +36,11 @@ async function main() {
|
||||
for (const action of ['delete', 'copy']) {
|
||||
for (const destDir of destDirs) {
|
||||
if (action === 'delete') {
|
||||
await remove(destDir);
|
||||
await withRetry(() => remove(destDir));
|
||||
} else {
|
||||
console.info(`Copying to ${destDir}`);
|
||||
await mkdirp(destDir);
|
||||
await copy(sourceDir, destDir, { overwrite: true });
|
||||
await withRetry(() => mkdirp(destDir));
|
||||
await withRetry(() => copy(sourceDir, destDir, { overwrite: true }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
packages/app-desktop/vendor/loadEmojiLib.js
vendored
Normal file
2
packages/app-desktop/vendor/loadEmojiLib.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { EmojiButton } from './lib/@joeattardi/emoji-button/dist/index.js';
|
||||
window.EmojiButton = EmojiButton;
|
||||
@@ -163,6 +163,7 @@ describe('services_CommandService', function() {
|
||||
it('should create menu items from commands', (async () => {
|
||||
const service = newService();
|
||||
const utils = new MenuUtils(service);
|
||||
const locale = 'fr_FR';
|
||||
|
||||
registerCommand(service, createCommand('test1', {
|
||||
execute: () => {},
|
||||
@@ -178,7 +179,7 @@ describe('services_CommandService', function() {
|
||||
clickedCommands.push(commandName);
|
||||
};
|
||||
|
||||
const menuItems = utils.commandsToMenuItems(['test1', 'test2'], onClick);
|
||||
const menuItems = utils.commandsToMenuItems(['test1', 'test2'], onClick, locale);
|
||||
|
||||
menuItems.test1.click();
|
||||
menuItems.test2.click();
|
||||
@@ -186,7 +187,10 @@ describe('services_CommandService', function() {
|
||||
expect(clickedCommands.join('_')).toBe('test1_test2');
|
||||
|
||||
// Also check that the same commands always return strictly the same menu
|
||||
expect(utils.commandsToMenuItems(['test1', 'test2'], onClick)).toBe(utils.commandsToMenuItems(['test1', 'test2'], onClick));
|
||||
expect(utils.commandsToMenuItems(['test1', 'test2'], onClick, locale)).toBe(utils.commandsToMenuItems(['test1', 'test2'], onClick, locale));
|
||||
|
||||
// And check that if the locale changes, new menu items are returned
|
||||
expect(utils.commandsToMenuItems(['test1', 'test2'], onClick, locale)).not.toBe(utils.commandsToMenuItems(['test1', 'test2'], onClick, 'en_GB'));
|
||||
}));
|
||||
|
||||
it('should give menu item props from state', (async () => {
|
||||
|
||||
@@ -97,8 +97,8 @@ export default class MenuUtils {
|
||||
});
|
||||
}
|
||||
|
||||
public commandsToMenuItems(commandNames: string[], onClick: Function): MenuItems {
|
||||
const key: string = `${this.keymapService.lastSaveTime}_${commandNames.join('_')}`;
|
||||
public commandsToMenuItems(commandNames: string[], onClick: Function, locale: string): MenuItems {
|
||||
const key: string = `${this.keymapService.lastSaveTime}_${commandNames.join('_')}_${locale}`;
|
||||
if (this.menuItemCache_[key]) return this.menuItemCache_[key];
|
||||
|
||||
const output: MenuItems = {};
|
||||
@@ -107,7 +107,9 @@ export default class MenuUtils {
|
||||
output[commandName] = this.commandToMenuItem(commandName, onClick);
|
||||
}
|
||||
|
||||
this.menuItemCache_[key] = output;
|
||||
this.menuItemCache_ = {
|
||||
[key]: output,
|
||||
};
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -38,8 +38,13 @@ interface SyncStartEvent {
|
||||
withErrors: boolean;
|
||||
}
|
||||
|
||||
interface ResourceChangeEvent {
|
||||
id: string;
|
||||
}
|
||||
|
||||
type ItemChangeHandler = (event: ItemChangeEvent)=> void;
|
||||
type SyncStartHandler = (event: SyncStartEvent)=> void;
|
||||
type ResourceChangeHandler = (event: ResourceChangeEvent)=> void;
|
||||
|
||||
/**
|
||||
* The workspace service provides access to all the parts of Joplin that
|
||||
@@ -54,7 +59,7 @@ export default class JoplinWorkspace {
|
||||
|
||||
private store: any;
|
||||
|
||||
constructor(store: any) {
|
||||
public constructor(store: any) {
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
@@ -98,6 +103,14 @@ export default class JoplinWorkspace {
|
||||
return makeListener(eventManager, 'itemChange', wrapperHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a resource is changed. Currently this handled will not be
|
||||
* called when a resource is added or deleted.
|
||||
*/
|
||||
public async onResourceChange(handler: ResourceChangeHandler): Promise<void> {
|
||||
makeListener(eventManager, 'resourceChange', handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when an alarm associated with a to-do is triggered.
|
||||
*/
|
||||
|
||||
@@ -51,6 +51,8 @@ async function extractPluginFilesFromPackage(existingManifests: any, workDir: st
|
||||
|
||||
const pluginDir = resolveRelativePathWithinDir(workDir, 'node_modules', packageName, 'publish');
|
||||
|
||||
if (!(await fs.pathExists(pluginDir))) throw new Error(`Could not find publish directory at ${pluginDir}`);
|
||||
|
||||
const files = await fs.readdir(pluginDir);
|
||||
const manifestFilePath = path.resolve(pluginDir, files.find((f: any) => path.extname(f) === '.json'));
|
||||
const pluginFilePath = path.resolve(pluginDir, files.find((f: any) => path.extname(f) === '.jpl'));
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
Copyright (c) 2017-2021 Laurent Cozic
|
||||
|
||||
Personal Use License
|
||||
|
||||
Joplin Server is available for personal use only. For example you may host the software on your own server for non-commercial activity.
|
||||
|
||||
To obtain a license for commercial purposes, please contact us.
|
||||
282
packages/server/LICENSE.md
Normal file
282
packages/server/LICENSE.md
Normal file
@@ -0,0 +1,282 @@
|
||||
**JOPLIN SERVER PERSONAL USE LICENSE**
|
||||
|
||||
v.1: 21 December 2021
|
||||
|
||||
This Joplin Server Personal Use License (the "**License**") is a legally binding
|
||||
agreement between Cozic Ltd. registered under the laws of England and Wales
|
||||
(the "**Licensor**"), the owner of the server entitled ‘Joplin Server,’ the
|
||||
related software applications, and services (collectively, the "**Software**")
|
||||
and an individual user accessing the Software (the "**Licensee**") (each
|
||||
individually a "**Party**" and collectively, the "**Parties**").
|
||||
|
||||
# 1. Acceptance of the License
|
||||
|
||||
* **1.1** By accessing or otherwise using the Software, the Licensee confirms
|
||||
that the Licensee has read the License, accepts the terms of the License, and
|
||||
agrees to become legally bound by the License.
|
||||
|
||||
* **1.2** If the Licensee is entering into the License on behalf of a legal
|
||||
entity, the Licensee represents that the Licensee has the authority and the
|
||||
necessary capacity to bind such entity and its affiliates to the terms of the
|
||||
License.
|
||||
|
||||
* **1.3** If the Licensee does not have the authority specified in section 1.2
|
||||
or if the Licensee does not agree with one or more provisions of the License,
|
||||
the Licensee is not allowed to access the Software and the Licensee must not
|
||||
accept the License.
|
||||
|
||||
* **1.4** By using the Software, the Licensee acknowledges, agrees, and warrants
|
||||
that the Licensee:
|
||||
|
||||
* i. Shall comply with the terms of the License and all applicable local,
|
||||
state, national and foreign laws, treaties, and regulations;
|
||||
|
||||
* ii. Shall provide only true, accurate, complete, and up-to-date
|
||||
information; and
|
||||
|
||||
* iii. Has the capacity to conclude legally binding contracts with the
|
||||
Licensor.
|
||||
|
||||
# 2. Grant of RIGHTS
|
||||
|
||||
* **2.1** The Licensor hereby grants the Licensee a worldwide, non-exclusive,
|
||||
royalty free, and revocable license to access and use the Software in
|
||||
accordance with the terms of this License and the applicable laws.
|
||||
|
||||
* **2.2** Subject to the terms of the License, the Licensee is entitled to
|
||||
access and use the Software for non-commercial purposes for taking personal
|
||||
and professional notes, sharing notes with other users of the Software, and
|
||||
synchronising data.
|
||||
|
||||
* **2.3** Unless authorised by the Licensor in writing, the Software may be used
|
||||
for personal non-commercial purposes only. The Licensee is allowed to grant
|
||||
access to the Software to others for non-commercial purposes, provided that
|
||||
(i) the Licensee is not a business entity, (ii) the Licensee or the third
|
||||
party to which the access is granted does not use the Software to generate
|
||||
profits of any kind, and (iii) the Software is used for non-commercial
|
||||
purposes only. The Licensee is not allowed to: (i) use the Software for
|
||||
commercial purposes and (ii) grant others the right to use the Software for a
|
||||
fee or for any commercial purposes, including, without limitation, copying,
|
||||
reproducing, publishing, transmitting, transferring, selling, renting,
|
||||
modifying, creating derivative works from, distributing, reposting,
|
||||
performing, displaying, or in any other way commercially exploiting the
|
||||
Software without prior written authorisation from the Licensor. By way of
|
||||
illustration, the Licensee is not allowed to:
|
||||
|
||||
1. Install the Software on Licensee’s infrastructure and charge others for
|
||||
the use of the Software;
|
||||
|
||||
2. Install the Software behind a proxy and charge others for the use of the
|
||||
Software;
|
||||
|
||||
3. Install the Software on a Licensee’s or third party’s server and provide
|
||||
access to the Software to third parties (a) for a fee or (b) free of
|
||||
charge, if the said third parties may use the Software for commercial
|
||||
purposes;
|
||||
|
||||
4. Grant access to the Software to others for a fee or for any commercial
|
||||
purposes;
|
||||
|
||||
5. Grant access to the Software to others for a fee or free of charge if
|
||||
the Licensee is a legal or natural person engaged in commercial
|
||||
activities; or
|
||||
|
||||
6. Use the Software or grant other the right to use the Software in a way
|
||||
that generates income or commercial profits.
|
||||
|
||||
* **2.4** This License does not govern any commercial use of the Software, as
|
||||
authorised by the Licensor.
|
||||
|
||||
* **2.5** The Software is licensed and not sold. By accepting the License, the
|
||||
Licensee obtains the right to use the Software and not the ownership of the
|
||||
Software.
|
||||
|
||||
* **2.6** The Licensor reserves any rights not expressly granted to the
|
||||
Licensee under this License.
|
||||
|
||||
* **2.7** The Licensee is allowed to make a reasonable number of copies of the
|
||||
Software, as and if necessary for the purposes set forth herein, provided that
|
||||
only complete copies of the Software are made, including without limitation
|
||||
all ‘read me’ files, copyright notices, and other legal notices and terms
|
||||
included in the Software.
|
||||
|
||||
* **2.8** The Licensee is permitted to load and run the Software on any device,
|
||||
network or cloud virtual machines under Licensee’s control (collectively, the
|
||||
"**Devices**"), if such Devices are compatible with the Software. The Licensee
|
||||
is solely responsible for assessing the compatibility of the Devices to be
|
||||
used with the Software.
|
||||
|
||||
* **2.9** It is Licensee’s sole responsibility to verify and assess the
|
||||
suitability, validity and integrity of the Software prior to using it and to
|
||||
decide whether or not the Software fits for the intended use.
|
||||
|
||||
* **2.10** The Licensor reserves the right to grant the right to use the
|
||||
Software to third parties.
|
||||
|
||||
* **2.11** The Licensee acknowledges and agrees that any use of the Software
|
||||
that is prohibited by this License may be unlawful and may result in
|
||||
Licensee’s criminal liability.
|
||||
|
||||
# 3. Covered Software and services
|
||||
|
||||
* **3.1** The License applies only to the Software as provided to the Licensee
|
||||
by the Licensor. The License also applies to updates, supplements, and support
|
||||
services related to the Software, or any other services provided in relation
|
||||
to the Software, unless other terms and conditions have been provided thereto.
|
||||
|
||||
* **3.2** Any software or services that are not provided by the Licensor are
|
||||
not covered by this License. Such Software and services are subject to the
|
||||
terms and conditions set by the respective third party and the Licensee is
|
||||
solely responsible for obtaining, agreeing to, and complying with the
|
||||
respective terms and conditions at its own cost and expense.
|
||||
|
||||
* **3.3** The Licensor reserves the right, but is not under any obligation, to
|
||||
provide paid or free-of-charge updates and technical support services with
|
||||
regard to the Software, including fixing bugs and errors, and the possibility
|
||||
to use new versions of the Software.
|
||||
|
||||
# 4. Intellectual property and ownership
|
||||
|
||||
* **4.1** All title and copyright in and to the Software (including, but not
|
||||
limited to, any source code, images, graphics, photographs, animations, video,
|
||||
audio, music, text, and applets, incorporated in the Software) are owned by
|
||||
the Licensor. The Software is protected by the English copyright laws and
|
||||
international treaties. The Licensee is not allowed to incorporate any portion
|
||||
of the Software into other programs or compile any portion of it in
|
||||
combination with other programs, or otherwise copy (except to exercise rights
|
||||
granted in this License), modify, create derivative works of, distribute,
|
||||
assign any rights to, or license the Software in whole or in part.
|
||||
|
||||
* **4.2** The Licensee is not permitted to, without obtaining prior written
|
||||
authorisation from the Licensor, to use the trade names, trademarks, service
|
||||
marks or product names of the Licensor, except as required for the use of the
|
||||
Software.
|
||||
|
||||
* **4.3** The Licensor has made all efforts possible to avoid the Software
|
||||
being subject to the rights of third parties, in particular that its use does
|
||||
not infringe patents, copyrights or other intellectual property rights of
|
||||
third parties. However, the Licensor does not guarantee that the Software is
|
||||
not subject to the rights of third parties. The Licensee agrees to notify the
|
||||
Licensor immediately and in writing if any third party asserts an infringement
|
||||
claim against the Licensee in connection with the Software.
|
||||
|
||||
* **4.4** By submitting any content through the Software (the "Licensee’s
|
||||
Content"), the Licensee grants the Licensor unrestricted, sub-licensable,
|
||||
royalty-free, perpetual, and irrevocable rights to process the Licensee’s
|
||||
Content for the purposes of providing the Licensee with the Software and
|
||||
carrying out Licensor’s legitimate business interests.
|
||||
|
||||
* **4.5** The Licensee is not permitted to remove any copyright or other
|
||||
proprietary notices and legends.
|
||||
|
||||
# 5. PRIVACY AND DATA PROTECTION
|
||||
|
||||
* **5.1** The Licensor does not have access in any manner to the Licensee’s
|
||||
Content. Therefore, the Licensee is solely responsible for creating, keeping
|
||||
and maintaining any backup copies of any Licensee’s Content or other
|
||||
information submitted to, through, or in relation to the Software.
|
||||
|
||||
The Parties agree to individually comply with the applicable data protection
|
||||
laws pertaining to the Software.
|
||||
|
||||
# 6. AVAILABILITY
|
||||
|
||||
* **6.1** The availability of the Software may be affected by factors, which
|
||||
the Licensor cannot reasonably control, such as bandwidth problems, equipment
|
||||
failure, acts and omissions of our third-party service providers, or *force
|
||||
majeure* events. The Licensor takes no responsibility for the unavailability
|
||||
of the Software caused by such factors.
|
||||
|
||||
# 7. Limitation of liability and disclaimer of warranties
|
||||
|
||||
* **7.1** To the extent permitted by the applicable law, the Licensor expressly
|
||||
disclaims all warranties, express or implied, for the Software. The Licensor
|
||||
provides the Software on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
||||
ANY KIND, either express or implied, including, without limitation, any
|
||||
warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. The entire risk arising out of use or
|
||||
performance of the Software remains with the Licensee.
|
||||
|
||||
* **7.2** In no event shall the Licensor be liable for any damages whatsoever
|
||||
(including, without limitation, damages for loss of business profits, business
|
||||
interruption, loss of business information, or any other pecuniary loss)
|
||||
arising out of the Licensee’s Content, the use of or inability to use the
|
||||
Software, even if the Licensor has been advised of the possibility of such
|
||||
damages.
|
||||
|
||||
* **7.3** The Licensee is solely responsible for determining the
|
||||
appropriateness of the Software and assumes any risks associated with
|
||||
Licensee’s exercise of permissions under the License.
|
||||
|
||||
* **7.4** Third-party content or services are not covered by this License. The
|
||||
Licensee shall ensure Licensee’s compliance with any terms set forth by the
|
||||
respective third parties at its own risk, cost and expense. To the maximum
|
||||
extent permitted by law, the Licensor excludes any liability for any loss or
|
||||
damage resulting from the acts and omissions of such third-party service
|
||||
providers.
|
||||
|
||||
# 8. Governing Law AND DISPUTE RESOLUTION
|
||||
|
||||
* 8.1 This License and any disputes arising out of or in connection with the
|
||||
License and the Software shall be governed by and construed in accordance with
|
||||
the laws of England and Wales. Unless otherwise provided by the applicable
|
||||
law, all disputes arising out of or in connection with the License shall be
|
||||
submitted to the exclusive jurisdiction of the courts in London, the United
|
||||
Kingdom.
|
||||
|
||||
# 9. FINAL PROVISIONS
|
||||
|
||||
* **9.1** **Indemnification.** The Licensee shall indemnify the Licensor at
|
||||
Licensee’s expense if any claims are asserted by a third party against the
|
||||
Licensor by reason of Licensee’s misconduct or breach of any terms of the
|
||||
License, including failed adherence by the Licensee with any applicable laws,
|
||||
including, whether express or implied.
|
||||
|
||||
* **9.2** **Severability.** The unenforceability of any single provision of
|
||||
this License shall not affect any other provision hereof. Where such a
|
||||
provision is held to be unenforceable, the Parties shall use their best
|
||||
endeavours to negotiate and agree upon an enforceable provision, which
|
||||
achieves, to the greatest extent possible, the economic, legal and commercial
|
||||
objectives of the unenforceable provision.
|
||||
|
||||
* **9.3** **Waiver.** A failure of either Party to enforce strictly a provision
|
||||
of this License shall in no event be considered a waiver of any part of such
|
||||
provision. No waiver by either Party of any breach or default by the other
|
||||
party shall operate as a waiver of any succeeding breach or other default or
|
||||
breach by such other Party. No waiver shall have any effect unless it is
|
||||
specific, irrevocable and in writing.
|
||||
|
||||
* **9.4** **Term and termination.** The License shall commence upon Licensee’s
|
||||
access to the Software and continue until terminated by the Licensor. Upon
|
||||
termination of the License, the Licensee agrees to (i) stop all access and use
|
||||
of the Software and (ii) destroy all copies of the Software and all its
|
||||
component parts (if any) stored on the Devices. The provisions of the License
|
||||
that, by their nature, continue and survive will survive any termination of
|
||||
the License.
|
||||
|
||||
* **9.5** **Amendments.** The Licensor reserves the right, at its sole
|
||||
discretion, to change or modify this License at any time by sending a prior
|
||||
notification to the Licensee (if the contact details of the Licensee are
|
||||
available to the Licensor). Any modifications to the License shall become
|
||||
effective on the date indicated at the top of the amended License. By
|
||||
continuing to use the Software after the date on which the modifications were
|
||||
communicated, the Licensee agrees to be bound by the modified License. The
|
||||
Licensor reserves the right to change or discontinue the Software and any
|
||||
feature thereof with or without a prior notice to the Licensee.
|
||||
|
||||
* **9.6** **Entire agreement.** This License constitutes the entire
|
||||
understanding between the Parties with respect to the subject matter thereof
|
||||
and supersedes all prior agreements, negotiations and discussions between the
|
||||
Parties relating thereto.
|
||||
|
||||
* **9.7** **Transfer of rights.** The Licensee is not allowed to assign
|
||||
Licensee’s rights under the License. The Licensor is entitled to transfer its
|
||||
rights and obligations under the License entirely or partially to a third
|
||||
party by giving a prior notice to the Licensee. If the Licensee does not agree
|
||||
to the transfer, the Licensee can terminate this License by ceasing to use the
|
||||
Software.
|
||||
|
||||
* **9.8** **Contact.** For general enquiries and commercial licenses to use the
|
||||
Software, please contact the Licensor directly.
|
||||
|
||||
***
|
||||
@@ -157,10 +157,4 @@ From `packages/server`, run `npm run start-dev`
|
||||
|
||||
# License
|
||||
|
||||
Copyright (c) 2017-2021 Laurent Cozic
|
||||
|
||||
Personal Use License
|
||||
|
||||
Joplin Server is available for personal use only. For example you may host the software on your own server for non-commercial activity.
|
||||
|
||||
To obtain a license for commercial purposes, please contact us.
|
||||
See LICENSE.md in this directory
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@joplin/server",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start-dev": "yarn run build && JOPLIN_IS_TESTING=1 nodemon --config nodemon.json --ext ts,js,mustache,css,tsx dist/app.js --env dev",
|
||||
|
||||
@@ -20,6 +20,10 @@ To switch between yearly and monthly payments, or to change from a Basic to Pro
|
||||
|
||||
Note that if you downgrade from Pro to Basic, new limitations will apply so for example you may have to delete some notes so that your account is below the required limit.
|
||||
|
||||
## Can my subscription be refunded?
|
||||
|
||||
We offer a 14 days trial when the subscription starts so that you can evaluate the service and potentially change your mind - if you cancel during that period you will not be charged. After 14 days your card will be charged and it will not be possible to issue a refund.
|
||||
|
||||
## How can I cancel my account?
|
||||
|
||||
Click on the [Profile button](#how-can-i-change-my-details), then scroll down and click on "Manage subscription".
|
||||
|
||||
@@ -19,6 +19,7 @@ utils.execCommandVerbose = function(commandName, args = []) {
|
||||
console.info(`> ${commandName}`, args && args.length ? args : '');
|
||||
const promise = execa(commandName, args);
|
||||
promise.stdout.pipe(process.stdout);
|
||||
promise.stderr.pipe(process.stderr);
|
||||
return promise;
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,8 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.4.2\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
|
||||
#: packages/app-mobile/components/screens/ConfigScreen.tsx:565
|
||||
msgid "- Camera: to allow taking a picture and attaching it to a note."
|
||||
@@ -33,8 +35,8 @@ msgid ""
|
||||
"- Storage: to allow attaching files to notes and to enable filesystem "
|
||||
"synchronisation."
|
||||
msgstr ""
|
||||
"- Lagring: för att tillåta att du bifoga filer till anteckningar och för att "
|
||||
"aktivera filsystemsynkronisering."
|
||||
"- Lagring: för att tillåta att du bifogar filer till anteckningar och för "
|
||||
"att aktivera filsystemsynkronisering."
|
||||
|
||||
#: packages/lib/services/KeymapService.ts:308
|
||||
#: packages/lib/services/KeymapService.ts:314
|
||||
@@ -844,6 +846,8 @@ msgid ""
|
||||
"Could not verify the share status of this notebook - aborting. Please try "
|
||||
"again when you are connected to the internet."
|
||||
msgstr ""
|
||||
"Det gick inte att verifiera delningsstatusen för den här anteckningsboken - "
|
||||
"avbryter. Vänligen försök igen när du är ansluten till internet."
|
||||
|
||||
#: packages/app-mobile/components/note-list.js:101
|
||||
msgid "Create a notebook"
|
||||
@@ -1536,7 +1540,7 @@ msgstr "Exportera felsökningsrapport"
|
||||
|
||||
#: packages/app-mobile/components/screens/ConfigScreen.tsx:528
|
||||
msgid "Export profile"
|
||||
msgstr "Exportera profilen"
|
||||
msgstr "Exportera profil"
|
||||
|
||||
#: packages/app-mobile/components/screens/ConfigScreen.tsx:528
|
||||
msgid "Exporting profile..."
|
||||
@@ -1657,7 +1661,7 @@ msgstr ""
|
||||
|
||||
#: packages/lib/models/Setting.ts:568
|
||||
msgid "Force path style"
|
||||
msgstr ""
|
||||
msgstr "Tvinga sökvägsstil"
|
||||
|
||||
#: packages/lib/commands/historyForward.ts:6
|
||||
msgid "Forward"
|
||||
@@ -1726,7 +1730,6 @@ msgid "Heading"
|
||||
msgstr "Rubrik"
|
||||
|
||||
#: packages/server/src/services/MustacheService.ts:201
|
||||
#, fuzzy
|
||||
msgid "Help"
|
||||
msgstr "Hjälp"
|
||||
|
||||
@@ -1748,7 +1751,7 @@ msgstr "Markera"
|
||||
|
||||
#: packages/server/src/services/MustacheService.ts:196
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
msgstr "Hem"
|
||||
|
||||
#: packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts:78
|
||||
msgid "Horizontal Rule"
|
||||
@@ -1961,9 +1964,8 @@ msgid "Invalid option value: \"%s\". Possible values are: %s."
|
||||
msgstr "Ogiltigt inställningsvärde: \"%s\". Möjliga värden är: %s."
|
||||
|
||||
#: packages/app-cli/app/command-e2ee.ts:46
|
||||
#, fuzzy
|
||||
msgid "Invalid password"
|
||||
msgstr "Ogiltigt svar: %s"
|
||||
msgstr "Ogiltigt lösenord"
|
||||
|
||||
#: packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts:38
|
||||
msgid "Italic"
|
||||
@@ -2192,7 +2194,7 @@ msgstr "Logga in med OneDrive"
|
||||
|
||||
#: packages/server/src/services/MustacheService.ts:202
|
||||
msgid "Logout"
|
||||
msgstr ""
|
||||
msgstr "Logga ut"
|
||||
|
||||
#: packages/app-desktop/gui/MenuBar.tsx:705
|
||||
#: packages/app-mobile/components/screens/ConfigScreen.tsx:583
|
||||
@@ -2521,9 +2523,8 @@ msgid "Note&book"
|
||||
msgstr "Antecknings&bok"
|
||||
|
||||
#: packages/lib/models/Setting.ts:2143
|
||||
#, fuzzy
|
||||
msgid "Notebook"
|
||||
msgstr "Anteckningsböcker"
|
||||
msgstr "Anteckningsbok"
|
||||
|
||||
#: packages/lib/models/Setting.ts:1378
|
||||
msgid "Notebook list growth factor"
|
||||
@@ -2549,9 +2550,8 @@ msgstr ""
|
||||
|
||||
#: packages/app-desktop/gui/MainScreen/commands/toggleNotesSortOrderField.ts:8
|
||||
#: packages/app-desktop/gui/MainScreen/commands/toggleNotesSortOrderReverse.ts:9
|
||||
#, fuzzy
|
||||
msgid "Notes"
|
||||
msgstr "Anteckning"
|
||||
msgstr "Anteckningar"
|
||||
|
||||
#: packages/lib/models/Setting.ts:2159
|
||||
msgid "Notes and settings are stored in: %s"
|
||||
@@ -3034,31 +3034,27 @@ msgstr "Kör kommandona i textfilen. Det ska finnas ett kommando per rad."
|
||||
|
||||
#: packages/lib/SyncTargetAmazonS3.js:28
|
||||
msgid "S3"
|
||||
msgstr ""
|
||||
msgstr "S3"
|
||||
|
||||
#: packages/lib/models/Setting.ts:546
|
||||
#, fuzzy
|
||||
msgid "S3 access key"
|
||||
msgstr "AWS-nyckel"
|
||||
msgstr "S3 åtkomstnyckel"
|
||||
|
||||
#: packages/lib/models/Setting.ts:506
|
||||
#, fuzzy
|
||||
msgid "S3 bucket"
|
||||
msgstr "AWS S3"
|
||||
msgstr "S3 bucket"
|
||||
|
||||
#: packages/lib/models/Setting.ts:535
|
||||
msgid "S3 region"
|
||||
msgstr ""
|
||||
|
||||
#: packages/lib/models/Setting.ts:557
|
||||
#, fuzzy
|
||||
msgid "S3 secret key"
|
||||
msgstr "AWS-hemlighet"
|
||||
msgstr "S3 hemlig nyckel"
|
||||
|
||||
#: packages/lib/models/Setting.ts:521
|
||||
#, fuzzy
|
||||
msgid "S3 URL"
|
||||
msgstr "AWS S3 URL"
|
||||
msgstr "S3 URL"
|
||||
|
||||
#: packages/app-desktop/gui/MainScreen/MainScreen.tsx:579
|
||||
msgid ""
|
||||
@@ -3224,9 +3220,8 @@ msgid "Show note counts"
|
||||
msgstr "Visa anteckningsantal"
|
||||
|
||||
#: packages/lib/models/Setting.ts:866
|
||||
#, fuzzy
|
||||
msgid "Show sort order buttons"
|
||||
msgstr "Visa anteckningsantal"
|
||||
msgstr "Visa sorteringsordningsknappar"
|
||||
|
||||
#: packages/lib/models/Setting.ts:1042
|
||||
msgid "Show tray icon"
|
||||
@@ -3557,7 +3552,7 @@ msgstr "Ta ett foto"
|
||||
|
||||
#: packages/server/src/services/MustacheService.ts:200
|
||||
msgid "Tasks"
|
||||
msgstr ""
|
||||
msgstr "Uppgifter"
|
||||
|
||||
#: packages/lib/models/Setting.ts:1228
|
||||
msgid "Text editor command"
|
||||
@@ -4035,9 +4030,8 @@ msgid "Toggle note list"
|
||||
msgstr "Växla anteckningslista"
|
||||
|
||||
#: packages/app-desktop/gui/MainScreen/commands/togglePerFolderSortOrder.ts:7
|
||||
#, fuzzy
|
||||
msgid "Toggle own sort order"
|
||||
msgstr "Växla säkert läge"
|
||||
msgstr "Växla egen sorteringsordning"
|
||||
|
||||
#: packages/app-desktop/commands/toggleSafeMode.ts:8
|
||||
msgid "Toggle safe mode"
|
||||
@@ -4048,9 +4042,8 @@ msgid "Toggle sidebar"
|
||||
msgstr "Växla sidofältet"
|
||||
|
||||
#: packages/app-desktop/gui/MainScreen/commands/toggleNotesSortOrderField.ts:7
|
||||
#, fuzzy
|
||||
msgid "Toggle sort order field"
|
||||
msgstr "Växla säkert läge"
|
||||
msgstr "Växla sorteringsordningsfält"
|
||||
|
||||
#: packages/app-desktop/gui/ClipperConfigScreen.min.js:40
|
||||
#: packages/app-desktop/gui/ClipperConfigScreen.tsx:41
|
||||
@@ -4257,7 +4250,7 @@ msgstr ""
|
||||
|
||||
#: packages/server/src/services/MustacheService.ts:197
|
||||
msgid "Users"
|
||||
msgstr ""
|
||||
msgstr "Användare"
|
||||
|
||||
#: packages/app-desktop/gui/EncryptionConfigScreen/EncryptionConfigScreen.tsx:182
|
||||
msgid "Valid"
|
||||
@@ -4411,11 +4404,12 @@ msgid "Your master password is needed to decrypt some of your data."
|
||||
msgstr "Ditt huvudlösenord behövs för att dekryptera några av dina data."
|
||||
|
||||
#: packages/app-cli/app/command-sync.ts:242
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Your password is needed to decrypt some of your data. Type `:e2ee decrypt` "
|
||||
"to set it."
|
||||
msgstr "Ditt huvudlösenord behövs för att dekryptera några av dina data."
|
||||
msgstr ""
|
||||
"Ditt lösenord behövs för att dekryptera en del av dina data. Skriv `:e2ee "
|
||||
"decrypt` för att ställa in det."
|
||||
|
||||
#: packages/app-mobile/components/CameraView.tsx:189
|
||||
msgid "Your permission to use your camera is required."
|
||||
|
||||
@@ -147,7 +147,7 @@ export function execCommand(command: string, options: any = null): Promise<strin
|
||||
});
|
||||
}
|
||||
|
||||
export function resolveRelativePathWithinDir(baseDir: string, ...relativePath: string[]) {
|
||||
export function resolveRelativePathWithinDir(baseDir: string, ...relativePath: string[]): string {
|
||||
const path = require('path');
|
||||
const resolvedBaseDir = path.resolve(baseDir);
|
||||
const resolvedPath = path.resolve(baseDir, ...relativePath);
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# Joplin Server Changelog
|
||||
|
||||
## [server-v2.7.2](https://github.com/laurent22/joplin/releases/tag/server-v2.7.2) - 2021-12-29T11:21:04Z
|
||||
|
||||
- Improved: Allow deleting complete user data (#5824)
|
||||
- Improved: Changed ID length from 32 to 22 characters (e9ce3d1)
|
||||
- Improved: Disable logs and items pages for end-user (83a46e5)
|
||||
- Improved: Display NTP server domain and port when there is an error, and display message when NTP check is skipped (4a1bc07)
|
||||
- Improved: Increase default MAX_TIME_DRIFT to 2000 (35f684a)
|
||||
- Improved: Setup localisation (aa42ceb)
|
||||
|
||||
## [server-v2.6.14](https://github.com/laurent22/joplin/releases/tag/server-v2.6.14) - 2021-12-02T16:29:54Z
|
||||
|
||||
- Improved: Improved storage command (122afd6)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# GSoC 2022 Ideas
|
||||
|
||||
2022 is Joplin second round at Google Summer of Code. Detailed information on how to get involved and apply are given in the [general Summer of Code introduction](https://joplinapp.org/gsoc2022/index/)
|
||||
2022 is Joplin third round at Google Summer of Code. Detailed information on how to get involved and apply are given in the [general Summer of Code introduction](https://joplinapp.org/gsoc2022/index/)
|
||||
|
||||
**These are all proposals! We are open to new ideas you might have!!** Do you have an awesome idea you want to work on with Joplin but that is not among the ideas below? That's cool. We love that! But please do us a favour: Get in touch with a mentor early on and make sure your project is realistic and within the scope of Joplin. Just make sure your idea is within this year's theme:
|
||||
|
||||
@@ -81,6 +81,46 @@ Difficulty level: High
|
||||
|
||||
Skills Required: Typescript, Javascript, CSS, HTML, Markdown rendering. You will also need to learn about TinyMCE if you're not already familiar with it.
|
||||
|
||||
## 7. Improve PDF export
|
||||
|
||||
Joplin uses Chrome's built-in print to PDF function which is very limited. This can be improved by using a 3rd party library to convert notes to PDF. Applies to desktop and CLI versions.
|
||||
|
||||
Potential benefits:
|
||||
* Export multiple notes as a single PDF
|
||||
* Embedding attachments (see https://github.com/laurent22/joplin/issues/5943)
|
||||
* Delay export until the note is fully rendered (https://discourse.joplinapp.org/t/ability-to-delay-pdf-export-to-allow-plugins-to-render/22159)
|
||||
|
||||
Difficulty level: Medium
|
||||
|
||||
Skills Required: Typescript, Javascript.
|
||||
|
||||
## 8. Replace built-in PDF renderer with a library
|
||||
|
||||
Just like with export, Joplin relies on the built-in PDF renderer to show PDF attachments. Replacing it with a 3rd-party library has a number of advantages:
|
||||
* Joplin can preserve PDF viewer state when a note is re-rendered. For instance currently after opening and closing settings, PDF are reset to the 1st page.
|
||||
* It may be possible to link to a specific page or even a location within a PDF document.
|
||||
* Annotate PDF documents from Joplin
|
||||
|
||||
Difficulty level: Medium
|
||||
|
||||
Skills Required: Typescript, Javascript.
|
||||
|
||||
## 9. Rebuild file system sync on Android
|
||||
|
||||
A recent update broke file system synchronization on Android, as applications are now required to use a new API to access storage. Currently there are no libraries that would proxy this API for React Native. If we want to get file system sync working again it has to be written from scratch.
|
||||
|
||||
Difficulty level: High
|
||||
|
||||
Skills Required: Android, Java/Kotlin, Typescript.
|
||||
|
||||
## 10. Tablet layout
|
||||
|
||||
On wide screens devices like tables Joplin could use a different layout, e.g. with note list always showing, or have both editor and viewer visible at the same time.
|
||||
|
||||
Difficulty Level: Medium
|
||||
|
||||
Skills Required: React, Typescript, CSS.
|
||||
|
||||
# More info
|
||||
|
||||
- Make sure you read the [Joplin Google Summer of Code Introduction](https://joplinapp.org/gsoc2022/index/)
|
||||
|
||||
@@ -19,7 +19,7 @@ Length | 6 chars (Hexa string)
|
||||
Encryption method | 2 chars (Hexa string)
|
||||
Master key ID | 32 chars (Hexa string)
|
||||
|
||||
See `lib/services/EncryptionService.js` for the list of available encryption methods.
|
||||
See `lib/services/e2ee/EncryptionService.ts` for the list of available encryption methods.
|
||||
|
||||
### Data chunk
|
||||
|
||||
@@ -32,7 +32,7 @@ Data | ("Length" bytes) (ASCII)
|
||||
|
||||
## Master Keys
|
||||
|
||||
The master keys are used to encrypt and decrypt data. They can be generated from the Encryption Service and are saved to the database. They are themselves encrypted via a user password using a [strong encryption method](https://github.com/laurent22/joplin/blob/f21199a7f38b43d1f350ee81f84d4f335cb285b3/packages/lib/services/EncryptionService.js#L374).
|
||||
The master keys are used to encrypt and decrypt data. They can be generated from the Encryption Service and are saved to the database. They are themselves encrypted via a user password using a [strong encryption method](https://github.com/laurent22/joplin/blob/b5b02d8d7bce2c07c89fef50103e1399d792b75e/packages/lib/services/e2ee/EncryptionService.ts#L373).
|
||||
|
||||
These encrypted master keys are transmitted with the sync data so that they can be available to each client. Each client will need to supply the user password to decrypt each key.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user