Redux DevTools Chrome extension is required for development!
git clone [email protected]:taniarascia/takenote
cd vnote
npm i
npm start- View all notes
- View notes by cateogory
- Add note
- Update note
- Delete note
- Download note
- Add category
- Delete category -> prune notes of deleted category
- Add note to category
- Sync (save) notes and categories to local storage
- Keybindings for add, delete, download, sync
- Add frontmatter to md files
- Delete notes to trash first
- Add "all" and "trash" folders
- Put all options in note dropdown options
- App sidebar link for add link
- Permanent scratchpad
- Add favorites folder
- Search notes
- Drag and drop notes into categories
- Add syntax highlighting for multi-language support
- Basic settings
- Light/dark mode
- Frequency of polling for sync (polling or inactivity?)
- Keyboard shortcuts
- Add authentication (GitHub 0Auth)
- Hook up Gist API for storage
- Style app
- Example note of what you can do
- New note from cat is in cat
- Note options in "all notes" displays category its already in
- Moving note to category does not swap to proper note
- Do not view trash notes after deleting in categories
- Note not focused if new note keybind event outside of editor
- Options does not close after change category
- No new note from trash
- Restore deleted note
- Permanently delete note
- Can't make keybinding for add category
- Tabs for notes?
- Dropbox integration?
// types/enums
export enum Actions {
...
ADD_CATEGORY_TO_NOTE = 'ADD_CATEGORY_TO_NOTE',
...
}// actions/index.ts
export const addCategoryToNote = (categoryId: string, noteId: string) => ({
type: Actions.ADD_CATEGORY_TO_NOTE,
payload: { categoryId, noteId },
})// types/index.ts
export interface AddCategoryToNoteAction {
type: typeof Actions.ADD_CATEGORY_TO_NOTE
payload: {
categoryId: string
noteId: string
}
}
export type NotesActionTypes = AddCategoryToNoteAction | ...// reducers/index.ts
case Actions.ADD_CATEGORY_TO_NOTE:
return {
...state,
notes: state.notes.map(note =>
note.id === action.payload.noteId
? {
id: note.id,
text: note.text,
created: note.created,
lastUpdated: note.lastUpdated,
category: action.payload.categoryId,
}
: note
),
}// containers/Component.tsx
import { addCategoryToNote } from 'actions'// containers/Component.tsx
interface NoteListProps {
addCategoryToNote: () => void
...
}
const NoteList: React.FC<NoteListProps> = ({
...
addCategoryToNote,
}) => {// containers/Component.tsx
const mapDispatchToProps = (dispatch: Dispatch) => ({
addCategoryToNote: (categoryId: string, noteId: string) =>
dispatch(addCategoryToNote(categoryId, noteId)),
})// containers/Component.tsx
<div
key={category.id}
onClick={() => {
addCategoryToNote(category.id, note.id)
}}
>
{category.name}
</div>