1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

All: Minor tweaks regarding encryption

This commit is contained in:
Laurent Cozic 2017-01-29 19:29:34 +01:00
parent 685f541bb4
commit 0115e74163
9 changed files with 19 additions and 8 deletions

View File

@ -19,6 +19,7 @@ const { defaultState } = require('lib/reducer.js');
const packageInfo = require('./packageInfo.js');
const AlarmService = require('lib/services/AlarmService.js');
const AlarmServiceDriverNode = require('lib/services/AlarmServiceDriverNode');
const DecryptionWorker = require('lib/services/DecryptionWorker');
const { bridge } = require('electron').remote.require('./bridge');
const Menu = bridge().Menu;

View File

@ -70,7 +70,9 @@ class StatusScreenComponent extends React.Component {
for (let n in section.body) {
if (!section.body.hasOwnProperty(n)) continue;
itemsHtml.push(<div style={theme.textStyle} key={'item_' + n}>{section.body[n]}</div>);
let text = section.body[n];
if (!text) text = '\xa0';
itemsHtml.push(<div style={theme.textStyle} key={'item_' + n}>{text}</div>);
}
return (

View File

@ -65,6 +65,7 @@ globalStyle.textStyle = {
color: globalStyle.color,
fontFamily: globalStyle.fontFamily,
fontSize: globalStyle.fontSize,
lineHeight: '1.6em',
};
globalStyle.textStyle2 = Object.assign({}, globalStyle.textStyle, {

View File

@ -3,4 +3,6 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$ROOT_DIR"
./build.sh || exit 1
cd "$ROOT_DIR/app"
./node_modules/.bin/electron . --env dev --log-level debug --open-dev-tools "$@"
./node_modules/.bin/electron . --env dev --log-level debug --open-dev-tools "$@"
#./node_modules/.bin/electron . --profile c:\\Users\\Laurent\\.config\\joplin-desktop --log-level debug --open-dev-tools "$@"

View File

@ -58,7 +58,7 @@ Enabling/disabling E2EE while two clients are in sync might have an unintuitive
- If client 1 enables E2EE, all items will be synced to target and will appear encrypted on target. Although all items have been re-uploaded to the target, their timestamps did *not* change (because the item data itself has not changed, only its representation). Because of this, client 2 will not re-download the items - it does not need to do so anyway since it has already the item data.
- When a client sync and download a master key for the first time, encryption will be automatically enabled (user will need to supply the master key password). In that case, all items that are not encrypted will be re-synced. Uploading only non-encrypted items is an optimisation since if an item is already encrypted locally it means it's encrytped on target too.
- When a client sync and download a master key for the first time, encryption will be automatically enabled (user will need to supply the master key password). In that case, all items that are not encrypted will be re-synced. Uploading only non-encrypted items is an optimisation since if an item is already encrypted locally it means it's encrypted on target too.
- If both clients are in sync with E2EE enabled: if client 1 disable E2EE, it's going to re-upload all the items unencrypted. Client 2 again will not re-download the items for the same reason as above (data did not change, only representation). Note that user *must* manually disable E2EE on all clients otherwise some will continue to upload encrypted items. Since synchronisation is stateless, clients do not know whether other clients use E2EE or not so this step has to be manual.

View File

@ -90,8 +90,8 @@ android {
applicationId "net.cozic.joplin"
minSdkVersion 16
targetSdkVersion 22
versionCode 81
versionName "0.10.66"
versionCode 83
versionName "0.10.68"
ndk {
abiFilters "armeabi-v7a", "x86"
}

View File

@ -65,7 +65,7 @@ reg.scheduleSync = async (delay = null) => {
const timeoutCallback = async () => {
reg.scheduleSyncId_ = null;
reg.logger().info('Doing scheduled sync');
reg.logger().info('Preparing scheduled sync');
const syncTargetId = Setting.value('sync.target');
@ -82,6 +82,7 @@ reg.scheduleSync = async (delay = null) => {
let context = Setting.value(contextKey);
context = context ? JSON.parse(context) : {};
try {
reg.logger().info('Starting scheduled sync');
let newContext = await sync.start({ context: context });
Setting.setValue(contextKey, JSON.stringify(newContext));
} catch (error) {

View File

@ -118,8 +118,12 @@ class ReportService {
for (let i = 0; i < disabledItems.length; i++) {
const row = disabledItems[i];
section.body.push(_('"%s": "%s"', row.item.title, row.syncInfo.sync_disabled_reason));
section.body.push(_('%s (%s): %s', row.item.title, row.item.id, row.syncInfo.sync_disabled_reason));
}
section.body.push('');
section.body.push(_('These items will remain on the device but will not be uploaded to the sync target. In order to find these items, either search for the title or the ID (which is displayed in brackets above).'));
sections.push(section);
}

View File

@ -191,7 +191,7 @@ class Synchronizer {
let synchronizationId = time.unixMs().toString();
let outputContext = Object.assign({}, lastContext);
this.dispatch({ type: 'SYNC_STARTED' });
this.logSyncOperation('starting', null, null, 'Starting synchronisation to target ' + syncTargetId + '... [' + synchronizationId + ']');