mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Various improvements on mobile app
This commit is contained in:
parent
97c73b22d1
commit
1da06734f1
@ -28,6 +28,7 @@ class Application {
|
||||
this.commandMetadata_ = null;
|
||||
this.activeCommand_ = null;
|
||||
this.allCommandsLoaded_ = false;
|
||||
this.showStackTraces_ = false;
|
||||
}
|
||||
|
||||
currentFolder() {
|
||||
@ -129,7 +130,7 @@ class Application {
|
||||
}
|
||||
|
||||
if (arg == '--stack-trace-enabled') {
|
||||
//vorpalUtils.setStackTraceEnabled(true);
|
||||
this.showStackTraces_ = true;
|
||||
argv.splice(0, 1);
|
||||
continue;
|
||||
}
|
||||
@ -428,7 +429,11 @@ class Application {
|
||||
try {
|
||||
await this.execCommand(argv);
|
||||
} catch (error) {
|
||||
console.info(error);
|
||||
if (this.showStackTraces_) {
|
||||
console.info(error);
|
||||
} else {
|
||||
console.info(error.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
"url": "https://github.com/laurent22/joplin"
|
||||
},
|
||||
"url": "git://github.com/laurent22/joplin.git",
|
||||
"version": "0.9.10",
|
||||
"version": "0.9.11",
|
||||
"bin": {
|
||||
"joplin": "./main.js"
|
||||
},
|
||||
|
@ -1 +1 @@
|
||||
6aa2be3698aa3b5cf8e0875bf37c7851
|
||||
7863f7005a6fd4ec83c3b2a8df8a5f60
|
@ -51,7 +51,7 @@ class LogScreenComponent extends BaseScreenComponent {
|
||||
styles.rowTextError = Object.assign({}, styles.rowText);
|
||||
styles.rowTextError.color = theme.colorError;
|
||||
|
||||
styles.rowTextWarn = Object.assign({}, styles.rowWarn);
|
||||
styles.rowTextWarn = Object.assign({}, styles.rowText);
|
||||
styles.rowTextWarn.color = theme.colorWarn;
|
||||
|
||||
this.styles_[this.props.theme] = StyleSheet.create(styles);
|
||||
|
@ -76,14 +76,6 @@ class NoteScreenComponent extends BaseScreenComponent {
|
||||
this.styles_ = {};
|
||||
|
||||
let styles = {
|
||||
// titleTextInput: {
|
||||
// flex: 1,
|
||||
// paddingLeft: 0,
|
||||
// color: theme.color,
|
||||
// backgroundColor: theme.backgroundColor,
|
||||
// fontWeight: 'bold',
|
||||
// fontSize: theme.fontSize,
|
||||
// },
|
||||
bodyTextInput: {
|
||||
flex: 1,
|
||||
paddingLeft: theme.marginLeft,
|
||||
@ -117,6 +109,7 @@ class NoteScreenComponent extends BaseScreenComponent {
|
||||
};
|
||||
|
||||
styles.titleContainerTodo = Object.assign({}, styles.titleContainer);
|
||||
styles.titleContainerTodo.paddingLeft = 0;
|
||||
|
||||
this.styles_[themeId] = StyleSheet.create(styles);
|
||||
return this.styles_[themeId];
|
||||
@ -459,9 +452,15 @@ class NoteScreenComponent extends BaseScreenComponent {
|
||||
|
||||
titleTextInputStyle.height = this.state.titleTextInputHeight;
|
||||
|
||||
let checkboxStyle = {
|
||||
color: theme.color,
|
||||
paddingRight: 10,
|
||||
paddingLeft: theme.marginLeft,
|
||||
}
|
||||
|
||||
const titleComp = (
|
||||
<View style={titleContainerStyle}>
|
||||
{ isTodo && <Checkbox style={{ color: theme.color }} checked={!!Number(note.todo_completed)} onChange={(checked) => { this.todoCheckbox_change(checked) }} /> }
|
||||
{ isTodo && <Checkbox style={checkboxStyle} checked={!!Number(note.todo_completed)} onChange={(checked) => { this.todoCheckbox_change(checked) }} /> }
|
||||
<TextInput
|
||||
onContentSizeChange={(event) => this.titleTextInput_contentSizeChange(event)}
|
||||
autoFocus={isNew}
|
||||
|
@ -57,7 +57,7 @@ class Synchronizer {
|
||||
if (report.deleteLocal) lines.push(_('Deleted local items: %d.', report.deleteLocal));
|
||||
if (report.deleteRemote) lines.push(_('Deleted remote items: %d.', report.deleteRemote));
|
||||
if (!report.completedTime && report.state) lines.push(_('State: "%s".', report.state));
|
||||
if (report.errors && report.errors.length) lines.push(_('Last error: %s (stacktrace in log).', report.errors[report.errors.length-1].message));
|
||||
//if (report.errors && report.errors.length) lines.push(_('Last error: %s (stacktrace in log).', report.errors[report.errors.length-1].message));
|
||||
if (report.cancelling && !report.completedTime) lines.push(_('Cancelling...'));
|
||||
if (report.completedTime) lines.push(_('Completed: %s', time.unixMsToLocalDateTime(report.completedTime)));
|
||||
|
||||
|
@ -218,7 +218,7 @@ const reducer = (state = defaultState, action) => {
|
||||
|
||||
const modNote = action.note;
|
||||
|
||||
let newNotes = state.notes.splice(0);
|
||||
let newNotes = state.notes.slice();
|
||||
var found = false;
|
||||
for (let i = 0; i < newNotes.length; i++) {
|
||||
let n = newNotes[i];
|
||||
@ -227,7 +227,13 @@ const reducer = (state = defaultState, action) => {
|
||||
if (!('parent_id' in modNote) || modNote.parent_id == n.parent_id) {
|
||||
// Merge the properties that have changed (in modNote) into
|
||||
// the object we already have.
|
||||
newNotes[i] = Object.assign(newNotes[i], action.note);
|
||||
newNotes[i] = Object.assign({}, newNotes[i]);
|
||||
|
||||
for (let n in modNote) {
|
||||
if (!modNote.hasOwnProperty(n)) continue;
|
||||
newNotes[i][n] = modNote[n];
|
||||
}
|
||||
|
||||
} else {
|
||||
newNotes.splice(i, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user