Commit Graph

442 Commits

Author SHA1 Message Date
Jonatan Heyman
15ee6b9194 Change "Preferences" to "Settings" in the application menu (#100) 2024-01-12 14:29:36 +01:00
Jonatan Heyman
5adbbc72ec
Add prev variable to Math blocks that holds the previous value (#156)
Moved documentation on Math blocks from the FAQ into it's own section in the Readme.
2024-01-11 21:28:11 +01:00
Jonatan Heyman
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
Jonatan Heyman
c645b0bac8 Avoid zoom in on input focus, in the webapp on mobile devices
Set LanguageSelector's input font-size to 16px on mobile devices.

Add SASS mixins "webapp" and "webapp-mobile" to write specific CSS for those clients.
2024-01-11 21:05:15 +01:00
Jonatan Heyman
54e390eeec Set text color for language selector's input in dark mode
(in Electron it has a good default since the native UI gets it's theme set, but this does not happen in a browser where the user selects the dark theme)
2024-01-11 21:05:15 +01:00
Jonatan Heyman
922aa83a10 Fix "white flash" effect when resizing window in dark mode
* Fix so that the background color of the page gets properly set according to the current theme.

* Change so that we add the theme attribute to the <html> element instead of <body>, making it possible to use the +dark-mode SASS mixin in body CSS selectors

* Introduce CSS variables for the status bar's background and text colors
2024-01-11 16:58:21 +01:00
Jonatan Heyman
195a00a783 Add info on how to override format() in Math blocks 2024-01-10 18:05:31 +01:00
Jonatan Heyman
96667a9d3c Bump version to 1.6.0 2024-01-10 13:00:14 +01:00
Jonatan Heyman
85274103fc Bump version to 1.6.0-beta.5 2024-01-10 09:57:47 +01:00
Jonatan Heyman
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
Jonatan Heyman
73c3d12e38 Bump version to 1.6.0-beta.4 2024-01-09 00:46:57 +01:00
Jonatan Heyman
e1287d795e Remove AltGr from global hotkey setting on Windows
Did not work. On windows pressing Ctrl+Alt is the same as AltGr, so setting the hotkey to Ctrl+Alt+H will make the hotkey AltGr+H work.
2024-01-09 00:45:53 +01:00
Jonatan Heyman
090b6fc1dd Add tests for custom fonts 2024-01-09 00:35:33 +01:00
Jonatan Heyman
f0927add74 Fix broken Settings dialog in browsers that doesn't support queryLocalFonts() 2024-01-09 00:35:33 +01:00
Jonatan Heyman
780a949a73 Fix so that Settings dialog work when browser doesn't support queryLocalFonts() 2024-01-09 00:35:33 +01:00
Jonatan Heyman
09539f9cd8 Remove invalid code (copy & paste error) 2024-01-09 00:35:33 +01:00
Jonatan Heyman
a56a267e06 Add support for changing font family and font size 2024-01-09 00:35:33 +01:00
Jonathon Hodges
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
Noah Andrews
bb7c4168da
Explicitly document that Math blocks use math.js expressions (#143)
* Explicitly document that Math blocks use math.js expressions
* Links to general docs instead of reference docs
* Adds explicit link to docs about expression syntax
2024-01-07 01:09:09 +01:00
Jonatan Heyman
ff7323ed63 Bump version to 1.6.0-beta.3 2024-01-06 21:31:42 +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
fcbf1733c4 Bump version to 1.6.0-beta.2 2024-01-06 03:13:07 +01:00
Jonatan Heyman
2a2703d6d3 Check showInMenu checkbox when showInDock is deselected 2024-01-06 03:11:15 +01:00
Jonatan Heyman
46b2ee0522 Use correct OS terminology for Tray in settings label 2024-01-06 03:11:15 +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
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
Jonatan Heyman
17091d323c Remove debug log 2024-01-06 01:51:07 +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
1b0b2d55b1 Support setting preventDefault to false in keymapFromSpec spec 2024-01-06 01:51:07 +01:00
Jonatan Heyman
37265d7796
Change title format in issue template 2024-01-05 02:13:41 +01:00
Jonatan Heyman
8b5ff99af7
Change title format in issue template 2024-01-05 02:13:18 +01:00
Jonatan Heyman
2ed2909f45
Better example values 2024-01-05 02:10:37 +01:00
Jonatan Heyman
787e0447d7
Minor formatting improvement to issue template 2024-01-05 02:09:23 +01:00
Jonatan Heyman
002ad64a2d
Update issue templates 2024-01-05 02:07:58 +01:00
Jonatan Heyman
efe78f7959 Fix broken windows build by adding old favicon.ico as icon.ico and pointing to it in electron-builder config 2024-01-05 01:16:34 +01:00
Jonatan Heyman
7841a91e3c Bump version to 1.6.0-beta 2024-01-05 01:01:38 +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
Jonatan Heyman
a94415ab65 Change order of key bindings in help text 2024-01-04 16:16:21 +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
Hojun Lee
b80230454d
Add Groovy language support (#111) 2024-01-04 15:18:28 +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
0b6a1a49e8
Add support for specifying a custom format function within a math block (#99) 2023-12-31 10:43:42 +01:00
Laeyoung
b0f3bdd19e
Add Swift and Kotlin language support #10 (#96)
* Add Swift language support

* Add Kotlin language support
2023-12-31 10:07:21 +01:00
Jonatan Heyman
a1cad5b335
Don't display string quotes for math results that are strings. (#92)
Fix bug that could cause the cursor to be positioned immediately to the left of the widget (within its margin) making it look like there was a space character in the buffer when there was not.
Add tests for math blocks.

Fixes #21.
2023-12-29 10:47:02 +01:00