Commit Graph
101 Commits
Author SHA1 Message Date
Evan SimkowitzandGitHub e527e2ab77 Add authkey header for requests to the backend (#256)
With this PR, Electron will generate a new authorization key that the Go
backend will look for in any incoming requests. The Electron backend
will inject this header with all requests to the backend to ensure no
additional work is required on the frontend.

This also adds a `fetchutil` abstraction that will use the Electron
`net` module when calls are made from the Electron backend to the Go
backend. When using the `node:fetch` module, Electron can't inject
headers to requests. The Electron `net` module is also faster than the
Node module.

This also breaks out platform functions in emain into their own file so
other emain modules can import them.
2024-08-21 15:04:39 -07:00
Evan SimkowitzandGitHub bd4bf93d4a Update copyright indicators on a bunch of files (#255) 2024-08-20 17:01:29 -07:00
Evan Simkowitz b3de31d0c9 don't register event handler for window controls overlay on darwin 2024-08-20 15:58:21 -07:00
Evan SimkowitzandGitHub 5c00fc6e78 Fix sharp import issue (#251)
This PR updates the window controls overlay code to remove the
dependency on `sharp`, which is a natively-compiled Node library that is
really hard to package for Electron given the way that we strip node
modules after bundling. I've replaced this with `pngjs`, which has a
smaller footprint and is still relatively fast (it doesn't need to be
perfect since it runs on the Node process instead of the browser
process).
2024-08-20 13:18:47 -07:00
sawka 2f020099ec cmd:n and cmd:t 2024-08-19 22:39:52 -07:00
Red J AdayaandGitHub 964c422a02 about modal (#244) 2024-08-19 15:49:40 -07:00
Evan SimkowitzandGitHub e6003c310e Set background color for window controls on Linux (#247)
The Window Controls Overlay API applies a transparent overlay on
Windows, but not on Linux. This PR addresses this by capturing the area
underneath the overlay, averaging the color of the area, and setting
this as the overlay background color.

It will also detect whether to make the control symbols white or black,
depending on how dark the background color is.

On Linux, this will set both the background color and the symbol color,
on Windows it will just set the symbol color.

<img width="721" alt="image"
src="https://github.com/user-attachments/assets/e6f9f8f8-a49f-41b6-984e-09e7d52c631d">
2024-08-19 14:16:09 -07:00
Evan SimkowitzandGitHub edfe711eda Use Window Controls Overlay API for native-like experience on Windows and Linux (#240)
This PR implements the [Window Controls Overlay
API](https://web.dev/articles/window-controls-overlay) to let us hide
the menu bar on Windows and Linux and directly embed the window controls
in our tab bar. With #239 merged, we no longer need the menu bar on
these platforms.

The overlaid window controls are transparent so they will take on the
background from the app. I've updated the tab bar to flow properly using
the API's CSS environment variables.

At some point, we may want to update the logic around the symbolColor so
that it can ensure a proper contrast between the background and the
symbols in the window controls. For now, setting them to white works for
all the backgrounds we currently support.

![image
(2)](https://github.com/user-attachments/assets/7610f10b-9696-435c-9a2d-a435bee9fadb)


https://github.com/user-attachments/assets/8d19b512-5281-42b9-8abb-ccb9b850061f
2024-08-16 23:45:22 -07:00
Evan SimkowitzandGitHub 03587184a0 Replace logo with platform-dependent button to open app menu (#239)
Replace the logo in the tab bar with an ellipsis icon that shows on
Linux and Windows and, when clicked, opens up the system menus. This
also fixes an issue I noticed where the context menus were set to the
wrong coordinates when a window was zoomed in.


![image](https://github.com/user-attachments/assets/1be77cad-73a6-4cb8-b545-08ec908f1d9a)

![image](https://github.com/user-attachments/assets/0beef938-15f8-4084-b7bd-7d9f995187ef)
2024-08-16 16:18:42 -07:00
Sylvie CroweandGitHub c192fe2663 Windows Pty (#206)
Add Windows Pty support, so the terminal works properly on windows
machines
2024-08-09 18:49:35 -07:00
Mike SawkaandGitHub ed0279ad72 adding telemetry updates (#209) 2024-08-08 18:24:54 -07:00
sawka 4641271bfa show the buildtimes in the about page 2024-08-08 13:39:17 -07:00
Evan SimkowitzandGitHub b8124bbc2e Clean up the Updater class and fix a runaway interval (#207) 2024-08-08 11:55:44 -07:00
sawka 3c8bac6bf9 add console logs in front of all GetSettingsConfig calls in emain 2024-08-07 14:10:14 -07:00
sawka 4e88a27d9e fix zoom in/out to affect webcontents not webview 2024-08-06 19:47:02 -07:00
Evan SimkowitzandGitHub 8ebdb58f4b Use button for update available banner (#202) 2024-08-06 16:48:25 -07:00
Evan Simkowitz 21684b0995 use native install on quit instead 2024-08-06 16:30:42 -07:00
Evan Simkowitz 61f02b27d2 get update status on start, install update on quit 2024-08-06 16:19:55 -07:00
Evan Simkowitz 5f229048be restart interval in checkForUpdates if update setting changes 2024-08-06 16:13:14 -07:00
Evan Simkowitz acb6a87ca4 fix comment 2024-08-06 16:09:24 -07:00
Evan Simkowitz 2f2bbd0a27 Check for updates always if user requests it, add comments 2024-08-06 16:08:49 -07:00
Evan Simkowitz bc26d643ca don't set lastupdatecheck time if requested by user 2024-08-06 15:36:21 -07:00
Evan Simkowitz 5187150e3f await more async functions in emain 2024-08-06 15:32:29 -07:00
Evan Simkowitz 335ab6d55d fix check for updates, ensure quitAndInstall is not interrupted 2024-08-06 15:13:59 -07:00
Evan Simkowitz 7420044f2f fix check-for-updates 2024-08-06 14:51:06 -07:00