Commit Graph

64 Commits

Author SHA1 Message Date
Jonatan Heyman
b1746c58cb Implement functionality for deleting notes 2024-09-10 16:22:30 +02:00
Jonatan Heyman
c010df083c WIP: Multiple notes support
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).
2024-09-10 13:34:23 +02:00
Jonatan Heyman
d5dc4760d8 Implement support for editing notes' metadata, and ability to move notes into other directories.
Create separate pinia store for the editor cache functionality.
2024-09-04 15:22:06 +02:00
Jonatan Heyman
4b39078689 WIP: Implement ability to create new notes.
Support cache of multiple Editor instances.

Change so that current note name is included in the event data dispatched by emitCursorChange.
2024-07-26 11:30:25 +02:00
Jonatan Heyman
dbf675a28a WIP: Create new node dialog
Implement folder selector UI element.
Retrieve actual folder structure from Notes library.
2024-07-25 13:25:19 +02:00
Jonatan Heyman
f11f360496 WIP: Implement support for multiple notes
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.
2024-07-24 13:53:44 +02:00
Jonatan Heyman
f156320601 Add a way to display error dialogs 2024-07-24 12:31:19 +02:00
Jonatan Heyman
4890cd6a6b Add menu item to Help menu that opens documentation page 2024-07-08 14:14:21 +02:00
Jonatan Heyman
2f22951e9f Add "Always on top" setting which makes Heynote stay on top of other programs 2024-02-09 16:07:27 +01:00
Jonatan Heyman
a5088a48af Open the Heynote window when menu bar icon is left-clicked on Mac 2024-01-26 01:42:29 +01:00
Jonatan Heyman
91f80ff84a Check that stored screen position and size are still valid (not larger than screen or outside screen), and if not, reset them. 2024-01-25 14:31:02 +01:00
ImKaashif
5e169a1927 added x and y co-ordinates to windowConfig 2024-01-25 14:31:02 +01:00
Jonatan Heyman
295e55552b Add version number to settings dialog.
For the web app we also display the git hash.
2024-01-12 15:09:13 +01:00
Jonatan Heyman
15ee6b9194 Change "Preferences" to "Settings" in the application menu (#100) 2024-01-12 14:29:36 +01:00
Jonatan Heyman
e887d7e35f Automatically remove/add window from Taskbar in Windows, when Show in tray is turned on.
Call setForceQuite() before autoUpdater.quitAndInstall() to make sure auto updating works when Tray/Menu Bar setting is turned on.
2024-01-06 21:30:41 +01:00
Jonatan Heyman
05aba1ac65 Make close button just hide the window if "Show in menu bar" is active on Mac 2024-01-06 03:11:15 +01:00
Jonatan Heyman
bb5975455c Hide Heynote from taskbar on Windows when Tray icon has been turned on. Make close button just hide the window, and require using the Tray menu to quit for real. Fixes 137. 2024-01-06 03:11:15 +01:00
Joshua Blum
aa420acd1d Resolve ~ to homedir 2024-01-06 02:10:45 +01:00
Fernando Pinedo
d055db1831
FIX: fixed trayicon on linux not appearing (#136)
* Fix trayicon on linux not appearing

---------

Co-authored-by: Fernando Pinedo <fernando.pinedo@luizalabs.com>
Co-authored-by: Jonatan Heyman <jonatan@heyman.info>
2024-01-06 02:04:50 +01:00
Jonatan Heyman
957b22c70e Refactor the way we handle copy/cut/paste in Emacs mode
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.
2024-01-06 01:51:07 +01:00
Jonatan Heyman
b9fd161551
Add functionality for selecting a custom path for the buffer file. (#130)
Automatically reload the buffer file (if one exists) when buffer path is changed.
Move code buffer related code from main/index.ts into buffer.js
2024-01-05 00:41:46 +01:00
Florian Labarre
d0d8f872a6
Add key bindings for inserting new blocks at the end/top of the buffer, as well as before the current block (#85)
* 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>
2024-01-04 16:11:26 +01:00
Tanuj Pancholi
0ba5820cf4
Added Show in Dock Toggle and System Tray Feature (#90)
* 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>
2024-01-01 20:02:30 +01:00
Jonatan Heyman
4274e6237b
Watch buffer file for changes, and automatically reload it if changed (#76)
* 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
2024-01-01 19:04:40 +01:00
TimTrademark
b706b89dcb
Fix zoom in key binding (#80) 2023-12-27 14:21:52 +01:00
Joshua Blum
f532c7939b
Add bufferPath to config, support bufferPath symlink (#27)
* 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>
2023-12-23 11:17:13 +01:00
Jonatan Heyman
eb886a39e5 Add beta channel info to about window
To avoid confusion for users on beta channel when the latest released version is a non-beta version.
2023-12-12 17:26:48 +01:00
Jonatan Heyman
388f2e1cc0 Fix hotkey hiding on Windows 2023-12-11 00:31:40 +01:00
Jonatan Heyman
f8678a91ec Hide Heynote when global hotkey is pressed if the window is already focused 2023-12-10 23:44:58 +01:00
Jonatan Heyman
9e50446417 Restore window if minimized when global hotkey is pressed 2023-12-10 23:32:17 +01:00
Jonatan Heyman
198ce3066b Add global hotkey functionality 2023-12-10 22:59:42 +01:00
Jonatan Heyman
3c4008f7f7 Set autoUpdater.allowDowngrade to True in order to allow switching from beta version back to stable 2023-12-07 01:51:23 +01:00
Jonatan Heyman
6e9195c835 Fix auto updating beta versions by setting autoUpdater.allowPrerelease instead of autoUpdater.channel 2023-12-07 00:42:53 +01:00
Jonatan Heyman
0c55dcecb0 Add release channels (Stable and Beta) 2023-12-06 13:31:47 +01:00
Jonatan Heyman
4b73d8d35c Fix typo 2023-12-06 11:56:10 +01:00
Jonatan Heyman
2102892776 Fix About dialog UI issues on Windows 2023-07-17 11:57:25 +02:00
Jonatan Heyman
534f4f0b9b Fix About dialog on Windows 2023-07-11 11:24:34 +02:00
Jonatan Heyman
459fcd7c4c Add About dialog
The about dialog contains version info as well as the timestamp for the currency exchange rates.
2023-07-08 16:47:25 +02:00
Jonatan Heyman
a4e9ce6893 Add currency conversion support to Math blocks 2023-03-20 11:09:56 +01:00
Jonatan Heyman
a106159a9a Save selected theme in config 2023-03-09 09:46:21 +01:00
Jonatan Heyman
c3e0539601 Underline https:// and http:// links, and make C+Click open them 2023-03-08 13:07:58 +01:00
Jonatan Heyman
93bf1e9036 Improve auto update
Add titles to status bar buttons
Bump version to 1.0.7
2023-03-07 01:45:23 +01:00
Jonatan Heyman
1df255032c Check for updates once every 24 hours.
Bump version.
2023-03-06 10:24:23 +01:00
Jonatan Heyman
19dc637dee Make auto update on Windows silent.
Bump version.
2023-03-06 09:44:24 +01:00
Jonatan Heyman
7ce91016d6 Add auto update support 2023-03-06 01:30:37 +01:00
Jonatan Heyman
f2462b203d Update changed config key 2023-01-29 12:49:54 +01:00
Jonatan Heyman
5f98323586 Add setting for turning on/off line number gutters and fold gutters 2023-01-27 17:18:31 +01:00
Jonatan Heyman
751dfa0a73 Add File menu on Windows 2023-01-24 17:08:38 +01:00
Jonatan Heyman
924fd4b226 Replace block separators with "\n\n" when copying text.
Add Settings dialog.
Started implementing Emacs-like keymap.
2023-01-20 15:33:26 +01:00
Jonatan Heyman
ddc184fb24 Restore fullscreen mode if the program was in fullscreen when quitting
Read specific keys from CONFIG.windowConfig instead of using Object.assign for whatever is in the config file.
2023-01-19 11:45:40 +01:00