Commit Graph

102 Commits

Author SHA1 Message Date
203f966a3b Set window title to name of current buffer
#build
2024-12-07 00:01:22 +01:00
87246e2cd3 Add code comment 2024-12-06 12:11:22 +01:00
0a963dd1b9 Use FileLibrary.load() method to make sure tracking of current buffer content works 2024-12-06 12:11:22 +01:00
d11e90d075 Check all open buffer files for changes when window gets focus
The reason we do this is because fs.watch() is unreliable in some case.

#build
2024-12-06 12:06:15 +01:00
5cf766b7fc #build 2024-12-06 12:06:15 +01:00
47d8da190d Don't trigger buffer:change event when file is removed 2024-12-06 12:06:15 +01:00
03dd4d2934 Remove unused import 2024-12-06 12:06:15 +01:00
1102b89b42 Remove debug log 2024-12-06 12:06:15 +01:00
6772a4579d Implement functionality for deleting notes 2024-12-06 12:01:48 +01:00
aefe44fd2a 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-12-06 12:01:48 +01:00
fcec9ece3b Implement support for editing notes' metadata, and ability to move notes into other directories.
Create separate pinia store for the editor cache functionality.
2024-12-06 12:01:48 +01:00
0a18360fc8 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-12-06 12:01:30 +01:00
8d6dd4514d WIP: Create new node dialog
Implement folder selector UI element.
Retrieve actual folder structure from Notes library.
2024-12-06 12:01:30 +01:00
a9ea48954d 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-12-06 12:01:30 +01:00
7d7f680377 Add a way to display error dialogs 2024-12-06 12:01:30 +01:00
372ce351b4 Improve handling of global hotkey in Linux. 2024-07-24 16:42:34 +02:00
d82b3920d7 Add setting for configuring the default block language and language auto detection 2024-07-14 12:19:29 +02:00
4890cd6a6b Add menu item to Help menu that opens documentation page 2024-07-08 14:14:21 +02:00
2f22951e9f Add "Always on top" setting which makes Heynote stay on top of other programs 2024-02-09 16:07:27 +01:00
a5088a48af Open the Heynote window when menu bar icon is left-clicked on Mac 2024-01-26 01:42:29 +01:00
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
5e169a1927 added x and y co-ordinates to windowConfig 2024-01-25 14:31:02 +01:00
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
37b62d416e Move window.heynote.isWebApp to window.heynote.platform.isWebApp 2024-01-12 14:42:37 +01:00
15ee6b9194 Change "Preferences" to "Settings" in the application menu (#100) 2024-01-12 14:29:36 +01:00
66e7082786 Set default font size to 16px in webapp for mobile devices in order to avoid auto zoom in when the keyboard appears on iOS Safari 2024-01-11 21:05:15 +01:00
fea7e3cec2 Fix bug causing crash when starting the app for the first time (without a config file) 2024-01-10 09:55:38 +01:00
a56a267e06 Add support for changing font family and font size 2024-01-09 00:35:33 +01:00
fb62652847 Update initial-content.ts
Fixed typo in initial content

## Why
The area of a circle is pi times the radius squared (A = π r²), not the volume.
2024-01-09 00:27:00 +01:00
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
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
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
aa420acd1d Resolve ~ to homedir 2024-01-06 02:10:45 +01:00
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
554e04ea67 Fix test on linux/windows
Change Playwright reporter when running in Github action

Change default emacs meta key to Alt on non Linux and Windows

Always set emacsMetaKey to "alt" if not on Mac, since the option is only available on Mac
2024-01-06 01:51:07 +01:00
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
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
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
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
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
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
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
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
b706b89dcb Fix zoom in key binding (#80) 2023-12-27 14:21:52 +01:00
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
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
d1ea17c197 Fix keyboard shortcut help text in the initial buffer text 2023-12-23 00:52:14 +01:00
8d261571b3 Improve help text of initial buffer content 2023-12-22 20:07:42 +01:00
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
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