termites 1.0.31 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +25 -42
  2. package/package.json +1 -1
  3. package/server.js +7 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Termites
2
2
 
3
- A web-based terminal with server-client architecture for remote shell access.
3
+ Local multi-terminal manager with web interface.
4
4
 
5
5
  ```bash
6
6
  npm install -g termites
@@ -9,58 +9,41 @@ npm install -g termites
9
9
  ## Architecture
10
10
 
11
11
  ```
12
- ┌─────────────────┐ WebSocket ┌─────────────────┐
13
- Client 1 │◄──────────────────►│
14
- (node-pty) │ │
15
- └─────────────────┘ Server
16
- │ (Web UI) │◄──► Browser
17
- ┌─────────────────┐ WebSocket
18
- Client 2 │◄──────────────────►│
19
- (node-pty) └─────────────────┘
20
- └─────────────────┘
21
- ```
22
-
23
- ## Installation
24
-
25
- ```bash
26
- npm install -g termites
12
+ ┌─────────────────────────────────────────────────────┐
13
+ Server
14
+ ┌─────────┐ ┌─────────┐ ┌─────────┐
15
+ Terminal│ │ Terminal│ │ Terminal│ ... │
16
+ (PTY) │ │ (PTY) │ │ (PTY) │ │
17
+ └─────────┘ └─────────┘ └─────────┘
18
+
19
+ WebSocket + HTTP
20
+ └─────────────────────┼───────────────────────────────┘
21
+
22
+
23
+ Browser
27
24
  ```
28
25
 
29
26
  ## Usage
30
27
 
31
- ### Start Server
32
-
33
28
  ```bash
34
- termites server
35
- ```
29
+ # Start server (default port 6789)
30
+ termites
36
31
 
37
- The server starts on port 6789 by default. Access the web UI at `http://localhost:6789`.
38
-
39
- To use a different port:
40
-
41
- ```bash
42
- PORT=8080 termites server
32
+ # Or with custom port
33
+ PORT=8080 termites
43
34
  ```
44
35
 
45
- ### Connect Client
46
-
47
- ```bash
48
- # Connect to localhost:6789
49
- termites client
50
-
51
- # Connect to a remote server
52
- termites client 192.168.1.100:6789
53
- termites client ws://example.com:6789
54
- ```
36
+ Open browser at `http://localhost:6789`
55
37
 
56
38
  ## Features
57
39
 
58
- - Multi-client support - manage multiple shell sessions from one web interface
59
- - Mobile-friendly UI with collapsible drawer menu
60
- - Multiple color themes (Solarized, Monokai, Dracula, Nord, GitHub Dark)
61
- - Customizable font family and size
62
- - Auto-reconnect for clients
63
- - Output buffering for terminal history
40
+ - **Multi-terminal** - Create and manage multiple terminals from one web interface
41
+ - **Auto hostname detection** - Panel updates automatically when SSH to different machines
42
+ - **Mobile-friendly** - Touch support, virtual keyboard buttons, long-press to select
43
+ - **History scrollback** - iTerm-like history overlay (scroll up or tap Hist button)
44
+ - **Themes** - Solarized Light/Dark, Monokai, Dracula, Nord, GitHub Dark
45
+ - **Customizable** - Font family, font size, toolbar visibility
46
+ - **Password protection** - Set password on first visit
64
47
 
65
48
  ## License
66
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termites",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "Local multi-terminal manager with web interface",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server.js CHANGED
@@ -619,11 +619,13 @@ class TermitesServer {
619
619
  <head>
620
620
  <meta charset="UTF-8">
621
621
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
622
+ <meta name="color-scheme" content="light dark">
622
623
  <title>Termites</title>
623
624
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@5.3.0/css/xterm.css">
624
625
  <style>
626
+ :root { color-scheme: light dark; }
625
627
  * { margin: 0; padding: 0; box-sizing: border-box; }
626
- html { height: 100%; overflow: hidden; }
628
+ html { height: 100%; overflow: hidden; background-color: inherit; }
627
629
  body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; transition: background 0.3s; font-family: monospace; overflow: hidden; position: fixed; width: 100%; }
628
630
  .header {
629
631
  padding: 10px 12px; display: flex; align-items: center; gap: 12px;
@@ -946,6 +948,10 @@ class TermitesServer {
946
948
  const t = themes[themeName];
947
949
  if (!t) return;
948
950
  currentTheme = themeName;
951
+ // Set color-scheme to prevent browser auto dark mode
952
+ const isLightTheme = themeName === 'solarized-light';
953
+ document.documentElement.style.colorScheme = isLightTheme ? 'only light' : 'only dark';
954
+ document.documentElement.style.background = t.background;
949
955
  document.body.style.background = t.background;
950
956
  document.getElementById('terminal-container').style.background = t.background;
951
957
  const header = document.querySelector('.header');