termites 1.0.32 → 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 (2) hide show
  1. package/package.json +1 -1
  2. package/server.js +7 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termites",
3
- "version": "1.0.32",
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');