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

Desktop: Added openProfileDirectory command and menu item

This commit is contained in:
Laurent Cozic 2020-10-21 22:10:21 +01:00
parent adad406696
commit c33a8250ee
7 changed files with 26 additions and 4 deletions

View File

@ -81,6 +81,7 @@ ElectronClient/app.js
ElectronClient/bridge.js
ElectronClient/commands/copyDevCommand.js
ElectronClient/commands/focusElement.js
ElectronClient/commands/openProfileDirectory.js
ElectronClient/commands/startExternalEditing.js
ElectronClient/commands/stopExternalEditing.js
ElectronClient/commands/toggleExternalEditing.js

1
.gitignore vendored
View File

@ -75,6 +75,7 @@ ElectronClient/app.js
ElectronClient/bridge.js
ElectronClient/commands/copyDevCommand.js
ElectronClient/commands/focusElement.js
ElectronClient/commands/openProfileDirectory.js
ElectronClient/commands/startExternalEditing.js
ElectronClient/commands/stopExternalEditing.js
ElectronClient/commands/toggleExternalEditing.js

View File

@ -24,6 +24,7 @@ ElectronClient/app.js
ElectronClient/bridge.js
ElectronClient/commands/copyDevCommand.js
ElectronClient/commands/focusElement.js
ElectronClient/commands/openProfileDirectory.js
ElectronClient/commands/startExternalEditing.js
ElectronClient/commands/stopExternalEditing.js
ElectronClient/commands/toggleExternalEditing.js

View File

@ -77,6 +77,7 @@ const globalCommands = [
require('./commands/stopExternalEditing'),
require('./commands/toggleExternalEditing'),
require('./commands/copyDevCommand'),
require('./commands/openProfileDirectory'),
require('lib/commands/synchronize'),
require('lib/commands/historyBackward'),
require('lib/commands/historyForward'),

View File

@ -0,0 +1,17 @@
import { CommandRuntime, CommandDeclaration } from '../lib/services/CommandService';
import { _ } from 'lib/locale';
import bridge from '../services/bridge';
import Setting from 'lib/models/Setting';
export const declaration:CommandDeclaration = {
name: 'openProfileDirectory',
label: () => _('Open profile directory'),
};
export const runtime = ():CommandRuntime => {
return {
execute: async () => {
bridge().openItem(Setting.value('profileDir'));
},
};
};

View File

@ -116,6 +116,7 @@ const commandNames:string[] = [
'setTags',
'showNoteContentProperties',
'copyDevCommand',
'openProfileDirectory',
];
function menuItemSetChecked(id:string, checked:boolean) {
@ -658,6 +659,7 @@ function useMenu(props:Props) {
},
},
menuItemDic.openProfileDirectory,
menuItemDic.copyDevCommand,
{

View File

@ -4,7 +4,7 @@ It is possible to get the apps to display or log more information that might hel
## Desktop application
- Add a file named "flags.txt" in the config directory (should be `~/.config/joplin-desktop` or `c:\Users\YOUR_NAME\.config\joplin-desktop`) with the following content: `--open-dev-tools --debug --log-level debug`
- Click on menu **Help > Open Profile Directory** and add a file named "flags.txt" in your directory with the following content: `--open-dev-tools --debug --log-level debug`
- Restart the application
- The development tools should now be opened. Click the "Console" tab
- Now repeat the action that was causing problem. The console might output warnings or errors - please add them to the GitHub issue. Also open log.txt in the config folder and if there is any error or warning, please also add them to the issue.
@ -12,12 +12,11 @@ It is possible to get the apps to display or log more information that might hel
## CLI application
- Start the app with `joplin --debug --log-level debug`
- Check the log.txt as specified above for the desktop application and attach the log to the GitHub issue (or just the warnings/errors if any)
- Check log.txt as specified above for the desktop application and attach the log to the GitHub issue (or just the warnings/errors if any). The profile directory would be in `~/.config/joplin`.
## Mobile application
- In the options, enable Advanced Option
- Open the log in the top right hand corner menu and post a screenshot of any error/warning.
- In the Configuration screen, press on the **Log button** and post a screenshot of any error/warning.
# Creating a low-level bug report on Android