Commit Graph

65 Commits

Author SHA1 Message Date
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
Florian Labarre
0f3c714d56
CloseBrackets setting toggle (#102)
* Add a setting to toggle the auto bracket-closing of CodeMirror

* Move Auto-close brackets setting into new settings tab Editing

* Add tests for Auto-close bracket setting

---------

Co-authored-by: Jonatan Heyman <jonatan@heyman.info>
2024-01-04 14:52:41 +01:00
Jonatan Heyman
acb7ddf189
Add Settings to web app (#125)
* Add support for opening settings dialog in the webapp

* Add tests for settings dialog

* Hide stand-alone app specific settings in web app

* Remove debug log
2024-01-04 14:27:04 +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
Jonatan Heyman
6022356478
Settings improvements (#88)
* Organize Settings in different tabs

* Add setting for turning off/on auto updates.

* Remove debug log

* Use a better variable name (systemTheme -> themeSetting)

* Store theme setting for Heynote webapp in local storage
2023-12-28 16:48:56 +01:00
TimTrademark
b706b89dcb
Fix zoom in key binding (#80) 2023-12-27 14:21:52 +01:00
Jonatan Heyman
079fa666d6
Implement web version of Heynote (#63)
* Move windows.darkMode -> window.heynote.themeMode

* Only add UpdateStatusItem if window.heynote.autoUpdate is set

* Update Vite

* Implement web version of Heynote.

Add a child vite project in ./webapp/ that is Heynote running within a browser. Imports almost all code from ../src/ and only adds a thin bridge that corresponds to the API between the Electron main process and the app code.

* Remove commented out tag

* Specify publicDir in vite config, instead of using a symlink

* Add webapp_dev npm command to package.json

* Add npm run command: webapp:build

* Add resolve alias '@' that points to project root.
Move assets file from public to assets in order to let Vite/Rollup handle bundling.
2023-12-25 14:18:44 +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
d1ea17c197 Fix keyboard shortcut help text in the initial buffer text 2023-12-23 00:52:14 +01:00
Jonatan Heyman
8d261571b3 Improve help text of initial buffer content 2023-12-22 20:07:42 +01:00
Jonatan Heyman
49d3e5cd7d
Add Linux support (#6)
* Add linux AppImage build target
* Add ubuntu to Github Actions build matrix
* Show help text on how to open Menu, on Linux
2023-12-21 19:18:04 +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
6ec64ed3ee Add help text about showing menu with the Alt key, to the initial buffer text on windows 2023-12-12 15:39:01 +01:00
Jonatan Heyman
6f5348fe3b Change default global hotkey 2023-12-11 14:30:26 +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
9b5c168b5f Tweak initial buffer content 2023-07-12 18:20:29 +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
0c567384ee Refresh Math blocks when new exchange rates are loaded 2023-07-04 14:01:59 +02:00
Jonatan Heyman
182c6f295e Use a separate config file in development mode 2023-07-04 12:16:26 +02:00
Jonatan Heyman
2d3a20e4cd Change currency data stale time to 12 hours instead of 24 2023-03-20 14:30:43 +01: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
294b6eb2bc Add example Markup block to initial data 2023-03-07 22:46:08 +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
85a5bc95a7 Change key binding for format code 2023-03-03 13:28:51 +01:00
Jonatan Heyman
f3c5a49fbf Add ability to format code for JSON, JS, CSS, HTML and Markdown blocks 2023-03-03 00:57:33 +01:00
Jonatan Heyman
4d12404d77 Add support for Math blocks 2023-03-02 18:40:44 +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
97d4f6294a Add ability to change Emacs meta key on Mac 2023-01-25 10:11:51 +01:00
Jonatan Heyman
659f853102 Tab size 2023-01-25 10:10:11 +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
aa628a4f08 Add new command for adding a new block after the current one, and moving the cursor to it. Change default Mod-Enter keybinding to use the new command, and added a new Mod-Shift-Enter keybinding to use the old command that inserts a new block separator at the cursor position (e.g. splits the current block).
#windows-build
2023-01-19 14:29:14 +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
Jonatan Heyman
00c2f21b93 Add some comments 2023-01-19 02:47:57 +01:00