mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-02 20:21:19 +02:00
fix: #74
This commit is contained in:
@@ -5,6 +5,7 @@ import { store as nbStore } from "../stores/notebook-store";
|
||||
import { store as editorStore } from "../stores/editor-store";
|
||||
import { db } from "./index";
|
||||
import { showMoveNoteDialog } from "../components/dialogs/movenotedialog";
|
||||
import { confirm } from "../components/dialogs/confirm";
|
||||
|
||||
function createOption(icon, onClick) {
|
||||
return {
|
||||
@@ -21,6 +22,10 @@ function createOptions(options = []) {
|
||||
}
|
||||
|
||||
const DeleteOption = createOption(Icon.Trash2, async function(state) {
|
||||
if (
|
||||
!(await confirm(Icon.Trash2, "Delete", "Are you sure you want to proceed?"))
|
||||
)
|
||||
return;
|
||||
const item = state.selectedItems[0];
|
||||
var isAnyNoteOpened = false;
|
||||
const editorState = editorStore.getState();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import createStore from "../common/store";
|
||||
import { db } from "../common";
|
||||
import { showPasswordDialog } from "../components/dialogs/passworddialog";
|
||||
|
||||
function tagStore(set, get) {
|
||||
return {
|
||||
|
||||
@@ -2,7 +2,6 @@ import React, { useEffect } from "react";
|
||||
import { Flex, Text } from "rebass";
|
||||
import ListContainer from "../components/list-container";
|
||||
import ListItem from "../components/list-item";
|
||||
import { db } from "../common";
|
||||
import { useStore as useNotesStore } from "../stores/note-store";
|
||||
import { useStore, store } from "../stores/tag-store";
|
||||
import TagsPlaceholder from "../components/placeholders/tags-placeholder";
|
||||
|
||||
Reference in New Issue
Block a user