mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-02 12:47:41 +02:00
Don't allow deleting sync folder
This commit is contained in:
parent
be77f15ef7
commit
71a97bd45b
@ -90,6 +90,8 @@ class SideBarComponent extends React.Component {
|
|||||||
|
|
||||||
itemContextMenu(event) {
|
itemContextMenu(event) {
|
||||||
const itemId = event.target.getAttribute('data-id');
|
const itemId = event.target.getAttribute('data-id');
|
||||||
|
if (itemId === Folder.conflictFolderId()) return;
|
||||||
|
|
||||||
const itemType = Number(event.target.getAttribute('data-type'));
|
const itemType = Number(event.target.getAttribute('data-type'));
|
||||||
if (!itemId || !itemType) throw new Error('No data on element');
|
if (!itemId || !itemType) throw new Error('No data on element');
|
||||||
|
|
||||||
@ -103,7 +105,6 @@ class SideBarComponent extends React.Component {
|
|||||||
const menu = new Menu();
|
const menu = new Menu();
|
||||||
|
|
||||||
menu.append(new MenuItem({label: _('Delete'), click: async () => {
|
menu.append(new MenuItem({label: _('Delete'), click: async () => {
|
||||||
|
|
||||||
const ok = bridge().showConfirmMessageBox(deleteMessage);
|
const ok = bridge().showConfirmMessageBox(deleteMessage);
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user