Add support for migrating old buffer file to new library.
Add support for changing location for the notes library.
Replace theme toggle in status bar with a dropdown in Appearance settings.
Improve New Note and Update Note dialogs.
Implement UI for confirming note delete (the actualal deltion is still to be implemented).
Refactor Vue <-> Editor <-> CodeMirror code.
Introduce Pinia store to keep global state, in order to get rid of a lot of event juggling between Editor class/child components and the root App component.
* Fix trayicon on linux not appearing
---------
Co-authored-by: Fernando Pinedo <fernando.pinedo@luizalabs.com>
Co-authored-by: Jonatan Heyman <jonatan@heyman.info>
Previously we listened for the key bindings for copy, cut and paste in the Electron main process, and triggered the event using copy(), paste() and cut() methods on win.webContent. Now this is fully handled within the renderer process using the window.navigator.clipboard API.
This will make it simpler to implement fully customizable key bindings.
* Add functionality to insert new block after the last block
- Update key bindings in `initial-content.ts` to include `Alt + Enter` for adding a new block after the last block.
- Implement `getLastNoteBlock` function in `block.js` to retrieve the last block in the note.
- Add `addNewBlockAfterLast` command in `commands.js` to handle the insertion of a new block after the last one.
- Integrate `addNewBlockAfterLast` command into the keymap in `keymap.js`.
* Add block insertion before/after current, before first and after last. Also, tests.
- Added `getFirstNoteBlock` in `block.js` for accessing the first text block.
- Implemented new functions in `commands.js` like `addNewBlockBeforeCurrent` and `addNewBlockBeforeFirst`.
- Updated `keymap.js` with new key bindings to facilitate block creation.
- Introduced `block-creation.spec.js` for testing the new block manipulation features.
* Fix visual bug when inserting new block at the top
* Update help text and Readme
* Fix wrong cursor position after inserting new blocks at the top of the buffer, when the previous first block's delimiter is long (e.g. Markdown)
* Make RegEx more generic
* Fix import
* Auto-generate the README.md and initial-content documentation
- Add a documentation generator
- Add an option to force the initial content to be erased with an env variable
* Add more specific tests
* Fix Mod key on Mac in test
---------
Co-authored-by: Jonatan Heyman <jonatan@heyman.info>
* Issue #62 Added Show in Dock, System Tray Toggle
* show dock toggle for mac only
* Add Open Heynote and Quit Heynote to Tray context menu
* Add Template Image as menu bar icon on MacOS
https://www.electronjs.org/docs/latest/api/native-image#template-image
* Use isMac, isWindows and isLinux for platform checks
* Add new tray/favicon
* Use favicon.ico as windows tray icon
* Show window on Tray double-click
* Open window when Tray is single clicked on non Mac platforms
* Fix indentation
* Remove unused import
---------
Co-authored-by: Jonatan Heyman <jonatan@heyman.info>
* Implement Buffer class in main process that watches for changes to the file, and notifies the editor in the renderer process so that it can update the buffer.
* Add Editor.setReadOnly() method
* Add dummy onChangeCallback function
* Remove debug logging
* Add bufferPath to config, support bufferPath symlink
* defaultPath before checking realpath
* Move code for retrieving buffer path into its own file
* Do the realpathSync() call for the whole final file path, to allow the buffer file to be a symlink
---------
Co-authored-by: Jonatan Heyman <jonatan@heyman.info>