Commit Graph

568 Commits

Author SHA1 Message Date
sawka
43138f754c fix double model creation 2024-08-22 16:25:53 -07:00
sawka
9237208e49 quick edits to help 2024-08-22 11:36:35 -07:00
sawka
9e7df9787d move widgets back to right hand side 2024-08-22 11:36:35 -07:00
Evan Simkowitz
d8f4292a38
generate task depends on wtype.go 2024-08-22 10:43:45 -07:00
Evan Simkowitz
d5140129cd
Fix block numbering and switching with arrow keys (#258) 2024-08-21 17:43:11 -07:00
Mike Sawka
dedfc31344
implement Cmd-I and restructure block viewmodels (#257) 2024-08-21 15:49:23 -07:00
Evan Simkowitz
7df91de2e5
use unauthorized instead of internalservererror for failed authkey validation 2024-08-21 15:23:15 -07:00
Evan Simkowitz
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 Simkowitz
23261a7a98
Add flag for specifying a new node as magnified on insert (#253) 2024-08-20 20:14:14 -07:00
Evan Simkowitz
bd4bf93d4a
Update copyright indicators on a bunch of files (#255) 2024-08-20 17:01:29 -07:00
Evan Simkowitz
65d50a772a
Optimize taskfile dependencies to remove duplicate generate tasks (#254) 2024-08-20 16:48:38 -07:00
Evan Simkowitz
b3de31d0c9
don't register event handler for window controls overlay on darwin 2024-08-20 15:58:21 -07:00
Mike Sawka
037497e7f1
wsh edit working (#252) 2024-08-20 14:56:48 -07:00
Evan Simkowitz
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
Sylvie Crowe
5cbf2673f4
windows ssh fixes (#250)
a couple small bug fixes
- wsh not being executable in windows (this doesn't add it to the path
yet)
- windows using the wrong slash for the path to wsh on the remote
2024-08-20 12:42:43 -07:00
sawka
2f020099ec cmd:n and cmd:t 2024-08-19 22:39:52 -07:00
sawka
e70e08e531 implement history functions for preview 2024-08-19 22:07:35 -07:00
sawka
9a06b43266 implement a viewmodel keydown handler 2024-08-19 18:41:47 -07:00
sawka
f535c5c1ab default file to ~ 2024-08-19 18:33:52 -07:00
sawka
a0734a3bbe implement cmd+t 2024-08-19 18:28:28 -07:00
sawka
a639fc3c8d implement defaultwidgets 2024-08-19 17:21:44 -07:00
Evan Simkowitz
ca3f418dc5
add sharp requirements to asarUnpack 2024-08-19 16:17:14 -07:00
Red J Adaya
964c422a02
about modal (#244) 2024-08-19 15:49:40 -07:00
Mike Sawka
534fcc5d0a
client support for rpc cancel (#249) 2024-08-19 15:44:30 -07:00
sawka
00958b8fed refactor 2024-08-19 15:01:00 -07:00
Mike Sawka
0d8c159101
remote file preview (streaming) working (#248) 2024-08-19 14:37:52 -07:00
Evan Simkowitz
319d84d0b5
remove layout Dimensions declaration in favor of global 2024-08-19 14:33:44 -07:00
Evan Simkowitz
bdfd7b22d9
increase debounce time 2024-08-19 14:29:58 -07:00
Evan Simkowitz
fd375b95d8
uselayouteffect for window controls overlay callback 2024-08-19 14:28:01 -07:00
Evan Simkowitz
a52e5c6c9b
remove unused declarations in app.tsx 2024-08-19 14:23:58 -07:00
Evan Simkowitz
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
sawka
3f37837394 fix term keydown handler 2024-08-19 12:24:08 -07:00
sawka
b412f72f6b remove unsafe btoa calls 2024-08-19 11:54:54 -07:00
Mike Sawka
8651659c02
get remote preview working (#246)
almost all there -- just need to fix streamfile for web urls.
2024-08-19 11:02:40 -07:00
Mike Sawka
85874f92ca
set up remote connserver (#245) 2024-08-18 21:26:44 -07:00
Sylvie Crowe
c30188552f
Add Unix Domain Socket Listener when Establishing Connections (#243)
This makes it possible to send wsh commands from wsh on a remote session
to wavesrv running locally. The exact behavior of running those commands
isn't implemented, but the underlying interface is added here.
2024-08-17 11:21:25 -07:00
Evan Simkowitz
6df50a5790
use one multiply instead of two divide for minnodesize calc 2024-08-17 00:15:03 -07:00
Evan Simkowitz
c8d32c1668
set min resize size for nodes 2024-08-17 00:13:55 -07:00
Evan Simkowitz
07a843f7bd
render resize handles first so they can't interfere with a magnified block 2024-08-17 00:02:08 -07:00
Evan Simkowitz
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 Simkowitz
4a782f2747
make app menu button cursor a pointer and add a hover text color 2024-08-16 23:41:31 -07:00
Mike Sawka
a451743937
POC showing how statfile can call the conn wshclient to get file info (#242) 2024-08-16 18:45:45 -07:00
Evan Simkowitz
e4c74a58bb
update readme 2024-08-16 18:17:10 -07:00
Evan Simkowitz
ab8a2350a6
fix another bash typo 2024-08-16 18:16:19 -07:00
Evan Simkowitz
bc500490e9
fix context menu 2024-08-16 18:01:31 -07:00
Evan Simkowitz
7a1a3a2bea
fix addl props nullref 2024-08-16 17:59:53 -07:00
Mike Sawka
ae7d85630b
two level routing (based on how network switches work) (#241) 2024-08-16 16:49:49 -07:00
Evan Simkowitz
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
sawka
18e2c7ed92 OSC 7 parsing to track and restore the terminal working directory 2024-08-16 13:42:16 -07:00
sawka
040a6db0e7 fix bash typo 2024-08-16 13:22:54 -07:00