- fixed chat word wrapping

- added sounds for sent, received, whisper chats ('/sound' to turn on)
- /timestamp to turn chat time stamps on and off now
This commit is contained in:
lklynet
2026-01-11 16:41:10 -05:00
parent 28a2014c01
commit 5d5217ee81
7 changed files with 25 additions and 58 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<div align="center">
<img src="hypermind2.svg" width="150" alt="Hypermind Logo" />
<img src="hypernode.svg" width="150" alt="Hypermind Logo" />
<h1>Hypermind</h1>
</div>
+1
View File
@@ -0,0 +1 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" width="700" height="700"><style>.a{opacity:.99;fill:#b5bd68}</style><path fill-rule="evenodd" class="a" d="m337.9 0.8c12.3 0.3 19.6 1.2 27.3 3.3 5.7 1.6 14.5 4.7 19.5 7 5 2.3 12 6.2 15.6 8.7 3.5 2.4 10.3 8 14.9 12.4 4.6 4.4 11.4 12.3 15.1 17.6 3.7 5.3 8.1 12.5 9.9 16.1 1.8 3.6 4.8 11.4 6.6 17.5 1.9 6.1 4 16 4.8 22.1 1.1 8.1 1.1 14.4 0.1 23.4-0.8 6.9-3.7 19.5-6.5 28.6-2.8 8.9-5.7 20.6-6.4 26-0.9 6.4-0.9 13.8-0.1 21.4 0.6 6.5 2.1 16.4 3.3 22.1 1.1 5.8 3.8 16.1 5.8 23.1 2.1 7 6.2 19 9.1 26.7 2.9 7.6 8.1 20.4 11.6 28.2 3.5 7.9 9.8 21 14 29.3 4.2 8.2 11.7 21.6 16.6 29.9 4.8 8.2 11.7 19.3 15.3 24.6 3.6 5.4 10.3 14.8 15 20.8 4.7 6.1 11.2 14.2 14.4 18.1 3.3 3.8 11.5 11.6 18.3 17.2 6.8 5.7 16.1 12.3 20.8 14.8 4.6 2.4 14.4 5.9 21.7 7.7 7.4 1.8 17 4.7 21.5 6.4 4.4 1.6 12.5 5.6 17.8 8.7 5.4 3.1 13.9 9.6 18.9 14.3 5 4.8 12.1 13 15.7 18.3 3.7 5.2 8 12.2 9.6 15.4 1.7 3.2 4.1 9.1 5.5 13 1.3 3.9 3.3 11.3 4.4 16.3 1.1 5 2 15.2 2 22.7 0 7.9-0.9 18-2.1 24-1.2 5.8-3.4 13.7-5 17.6-1.6 3.9-5.5 11.7-8.7 17.3-3.2 5.6-9.4 14.1-13.7 18.9-4.4 4.7-12 11.6-16.9 15.3-5 3.7-13.4 8.9-18.8 11.5-5.3 2.7-14.1 6-19.4 7.4-5.4 1.4-16.5 2.9-24.7 3.3-11.2 0.5-18 0.1-26.7-1.5-6.4-1.2-16.1-3.9-21.4-6-5.4-2.1-14.2-6.7-19.5-10.3-5.4-3.5-13-9.3-16.9-12.8-4-3.4-11.3-12-16.4-19.1-5.1-7.1-13.2-17.1-18.2-22.1-4.9-5-12.8-11.9-17.4-15.2-4.7-3.3-14-9-20.8-12.7-6.8-3.7-17.9-9.1-24.7-11.9-6.8-2.8-18.2-7.2-25.3-9.7-7.2-2.5-20.9-6.8-30.6-9.5-9.6-2.8-27.2-7.1-39-9.7-11.8-2.5-29.9-5.9-40.3-7.5-15.6-2.4-24.3-2.9-50.7-2.9-29 0-32.7 0.2-42.2 2.9-5.7 1.6-13.9 4.6-18.2 6.7-4.3 2.1-13.1 7.2-19.5 11.4-7.4 4.8-15.9 8.9-23.4 11.4-10.5 3.5-13.3 3.9-28.6 3.9-14.2 0-18.3-0.5-26-3.1-5-1.7-13.2-5.1-18.2-7.7-6.3-3.3-12.4-8.1-20.1-15.8-7.5-7.6-12.6-14-15.8-20.2-2.6-5-6.1-13.5-7.8-18.9-2.6-8.2-3-12.4-3-27.3 0.1-15.7 0.4-18.6 3.7-27.9 1.9-5.7 6-14.5 8.9-19.5 3-5 9.3-12.9 14.1-17.6 4.8-4.6 11.8-10.3 15.7-12.6 3.8-2.3 10.4-5.7 14.7-7.4 4.3-1.8 15.1-4.5 24.1-6 8.9-1.5 18.9-3.8 22.1-5 3.2-1.2 10.5-4.9 16.2-8.2 5.7-3.4 15.1-10.1 20.7-14.9 5.7-4.9 15.6-15 21.9-22.5 6.4-7.5 16.9-21.6 23.3-31.2 6.4-9.7 15.3-24.9 19.8-33.8 4.6-9 10.4-22.1 13.1-29.3 2.6-7.1 6.3-19.1 8.2-26.6 2.9-11.7 3.4-16.3 3.3-31.9-0.1-16.7-0.5-19.6-5-36.3-4.3-16.2-4.9-20.5-5.5-37.7-0.5-16.9-0.2-21.1 2.2-31.2 1.5-6.5 4.7-15.8 7-20.8 2.3-5 7.1-13.4 10.6-18.7 3.6-5.3 10.6-13.5 15.6-18.2 5-4.8 11.7-10.5 14.9-12.7 3.2-2.2 8.8-5.5 12.4-7.3 3.6-1.7 10.6-4.6 15.6-6.2 5-1.7 12.3-3.8 16.2-4.7 4.5-1 13.5-1.5 24.1-1.2zm-41.6 249.7c-6.5 4-15.8 10.6-20.7 14.7-4.9 4-13.1 11.7-18.1 17.1-5 5.3-12.6 14.1-16.9 19.5-4.3 5.3-12.4 16.7-18.1 25.3-5.7 8.6-15.2 25.6-21.1 37.7-6 12.2-12.6 27.4-14.7 33.8-2.1 6.4-4.6 15.8-5.5 20.8-0.9 5-1.3 13.8-1 19.5 0.4 7.3 1.5 12.5 3.8 17.5 1.8 4 5.8 10 9 13.5 3.2 3.5 9 8.6 12.9 11.2 4 2.7 11.3 6.9 16.3 9.4 5 2.6 12.9 6.2 17.5 8.2 4.7 2 14.3 5.6 21.5 8 7.1 2.5 20.9 6.4 30.5 8.8 9.7 2.4 23.7 5.6 31.2 7.1 7.5 1.5 20.4 3.5 28.6 4.6 8.2 1 23.7 2.6 34.5 3.4 10.7 0.8 24.7 1.1 31.1 0.6 6.5-0.4 15.5-1.4 20.2-2.2 4.6-0.7 12.5-2.5 17.5-3.9 5-1.5 10.7-3.5 12.7-4.5 2-1 6-4 9-6.7 2.9-2.6 6.6-7.5 8.1-10.7 2.4-5.1 2.7-8.2 2.6-25.3-0.1-18-0.5-20.9-4.7-37.1-2.5-9.6-7.5-25.4-11.2-35.1-3.6-9.6-9.2-23.3-12.3-30.5-3.1-7.1-10.5-22.1-16.4-33.1-6-11.1-15.3-27.2-20.7-35.8-5.5-8.6-13.3-20.1-17.4-25.6-4.1-5.6-13.2-15.9-20.2-23-9.4-9.7-14.6-13.9-20.4-16.6-6.9-3.2-9.6-3.7-22.1-4-12.2-0.3-15.8 0.2-24.1 2.9-5.3 1.7-15 6.5-21.4 10.5z"/></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hypermind",
"version": "0.9.1",
"version": "0.10.0",
"description": "A decentralized P2P counter of active deployments",
"main": "server.js",
"scripts": {
+1
View File
@@ -0,0 +1 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 700" width="700" height="700"><style>.a{opacity:.99;fill:#b5bd68}</style><path fill-rule="evenodd" class="a" d="m337.9 0.8c12.3 0.3 19.6 1.2 27.3 3.3 5.7 1.6 14.5 4.7 19.5 7 5 2.3 12 6.2 15.6 8.7 3.5 2.4 10.3 8 14.9 12.4 4.6 4.4 11.4 12.3 15.1 17.6 3.7 5.3 8.1 12.5 9.9 16.1 1.8 3.6 4.8 11.4 6.6 17.5 1.9 6.1 4 16 4.8 22.1 1.1 8.1 1.1 14.4 0.1 23.4-0.8 6.9-3.7 19.5-6.5 28.6-2.8 8.9-5.7 20.6-6.4 26-0.9 6.4-0.9 13.8-0.1 21.4 0.6 6.5 2.1 16.4 3.3 22.1 1.1 5.8 3.8 16.1 5.8 23.1 2.1 7 6.2 19 9.1 26.7 2.9 7.6 8.1 20.4 11.6 28.2 3.5 7.9 9.8 21 14 29.3 4.2 8.2 11.7 21.6 16.6 29.9 4.8 8.2 11.7 19.3 15.3 24.6 3.6 5.4 10.3 14.8 15 20.8 4.7 6.1 11.2 14.2 14.4 18.1 3.3 3.8 11.5 11.6 18.3 17.2 6.8 5.7 16.1 12.3 20.8 14.8 4.6 2.4 14.4 5.9 21.7 7.7 7.4 1.8 17 4.7 21.5 6.4 4.4 1.6 12.5 5.6 17.8 8.7 5.4 3.1 13.9 9.6 18.9 14.3 5 4.8 12.1 13 15.7 18.3 3.7 5.2 8 12.2 9.6 15.4 1.7 3.2 4.1 9.1 5.5 13 1.3 3.9 3.3 11.3 4.4 16.3 1.1 5 2 15.2 2 22.7 0 7.9-0.9 18-2.1 24-1.2 5.8-3.4 13.7-5 17.6-1.6 3.9-5.5 11.7-8.7 17.3-3.2 5.6-9.4 14.1-13.7 18.9-4.4 4.7-12 11.6-16.9 15.3-5 3.7-13.4 8.9-18.8 11.5-5.3 2.7-14.1 6-19.4 7.4-5.4 1.4-16.5 2.9-24.7 3.3-11.2 0.5-18 0.1-26.7-1.5-6.4-1.2-16.1-3.9-21.4-6-5.4-2.1-14.2-6.7-19.5-10.3-5.4-3.5-13-9.3-16.9-12.8-4-3.4-11.3-12-16.4-19.1-5.1-7.1-13.2-17.1-18.2-22.1-4.9-5-12.8-11.9-17.4-15.2-4.7-3.3-14-9-20.8-12.7-6.8-3.7-17.9-9.1-24.7-11.9-6.8-2.8-18.2-7.2-25.3-9.7-7.2-2.5-20.9-6.8-30.6-9.5-9.6-2.8-27.2-7.1-39-9.7-11.8-2.5-29.9-5.9-40.3-7.5-15.6-2.4-24.3-2.9-50.7-2.9-29 0-32.7 0.2-42.2 2.9-5.7 1.6-13.9 4.6-18.2 6.7-4.3 2.1-13.1 7.2-19.5 11.4-7.4 4.8-15.9 8.9-23.4 11.4-10.5 3.5-13.3 3.9-28.6 3.9-14.2 0-18.3-0.5-26-3.1-5-1.7-13.2-5.1-18.2-7.7-6.3-3.3-12.4-8.1-20.1-15.8-7.5-7.6-12.6-14-15.8-20.2-2.6-5-6.1-13.5-7.8-18.9-2.6-8.2-3-12.4-3-27.3 0.1-15.7 0.4-18.6 3.7-27.9 1.9-5.7 6-14.5 8.9-19.5 3-5 9.3-12.9 14.1-17.6 4.8-4.6 11.8-10.3 15.7-12.6 3.8-2.3 10.4-5.7 14.7-7.4 4.3-1.8 15.1-4.5 24.1-6 8.9-1.5 18.9-3.8 22.1-5 3.2-1.2 10.5-4.9 16.2-8.2 5.7-3.4 15.1-10.1 20.7-14.9 5.7-4.9 15.6-15 21.9-22.5 6.4-7.5 16.9-21.6 23.3-31.2 6.4-9.7 15.3-24.9 19.8-33.8 4.6-9 10.4-22.1 13.1-29.3 2.6-7.1 6.3-19.1 8.2-26.6 2.9-11.7 3.4-16.3 3.3-31.9-0.1-16.7-0.5-19.6-5-36.3-4.3-16.2-4.9-20.5-5.5-37.7-0.5-16.9-0.2-21.1 2.2-31.2 1.5-6.5 4.7-15.8 7-20.8 2.3-5 7.1-13.4 10.6-18.7 3.6-5.3 10.6-13.5 15.6-18.2 5-4.8 11.7-10.5 14.9-12.7 3.2-2.2 8.8-5.5 12.4-7.3 3.6-1.7 10.6-4.6 15.6-6.2 5-1.7 12.3-3.8 16.2-4.7 4.5-1 13.5-1.5 24.1-1.2zm-41.6 249.7c-6.5 4-15.8 10.6-20.7 14.7-4.9 4-13.1 11.7-18.1 17.1-5 5.3-12.6 14.1-16.9 19.5-4.3 5.3-12.4 16.7-18.1 25.3-5.7 8.6-15.2 25.6-21.1 37.7-6 12.2-12.6 27.4-14.7 33.8-2.1 6.4-4.6 15.8-5.5 20.8-0.9 5-1.3 13.8-1 19.5 0.4 7.3 1.5 12.5 3.8 17.5 1.8 4 5.8 10 9 13.5 3.2 3.5 9 8.6 12.9 11.2 4 2.7 11.3 6.9 16.3 9.4 5 2.6 12.9 6.2 17.5 8.2 4.7 2 14.3 5.6 21.5 8 7.1 2.5 20.9 6.4 30.5 8.8 9.7 2.4 23.7 5.6 31.2 7.1 7.5 1.5 20.4 3.5 28.6 4.6 8.2 1 23.7 2.6 34.5 3.4 10.7 0.8 24.7 1.1 31.1 0.6 6.5-0.4 15.5-1.4 20.2-2.2 4.6-0.7 12.5-2.5 17.5-3.9 5-1.5 10.7-3.5 12.7-4.5 2-1 6-4 9-6.7 2.9-2.6 6.6-7.5 8.1-10.7 2.4-5.1 2.7-8.2 2.6-25.3-0.1-18-0.5-20.9-4.7-37.1-2.5-9.6-7.5-25.4-11.2-35.1-3.6-9.6-9.2-23.3-12.3-30.5-3.1-7.1-10.5-22.1-16.4-33.1-6-11.1-15.3-27.2-20.7-35.8-5.5-8.6-13.3-20.1-17.4-25.6-4.1-5.6-13.2-15.9-20.2-23-9.4-9.7-14.6-13.9-20.4-16.6-6.9-3.2-9.6-3.7-22.1-4-12.2-0.3-15.8 0.2-24.1 2.9-5.3 1.7-15 6.5-21.4 10.5z"/></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

+1 -1
View File
@@ -4,7 +4,7 @@
<head>
<title>Hypermind</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.ico" />
<link rel="icon" href="/hypernode.svg" />
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&icon_names=palette" />
<script>
+16 -55
View File
@@ -1,4 +1,3 @@
class SoundManager {
constructor() {
this.ctx = null;
@@ -12,7 +11,7 @@ class SoundManager {
this.ctx = new AudioContext();
}
}
// Resume context if it's suspended (browsers auto-suspend)
if (this.ctx && this.ctx.state === "suspended") {
this.ctx.resume();
}
@@ -24,72 +23,34 @@ class SoundManager {
return this.enabled;
}
// Helper to play a tone
playTone(freq, type, duration, volume = 0.1) {
blip(freq, dur) {
if (!this.enabled) return;
this.init();
if (!this.ctx) return;
const osc = this.ctx.createOscillator();
const gain = this.ctx.createGain();
osc.type = type;
osc.frequency.setValueAtTime(freq, this.ctx.currentTime);
gain.gain.setValueAtTime(volume, this.ctx.currentTime);
gain.gain.exponentialRampToValueAtTime(0.01, this.ctx.currentTime + duration);
osc.connect(gain);
gain.connect(this.ctx.destination);
osc.start();
osc.stop(this.ctx.currentTime + duration);
const o = this.ctx.createOscillator();
const g = this.ctx.createGain();
o.type = "sine";
o.frequency.value = freq;
o.connect(g);
g.connect(this.ctx.destination);
g.gain.setValueAtTime(0.0001, this.ctx.currentTime);
g.gain.exponentialRampToValueAtTime(0.2, this.ctx.currentTime + 0.005);
g.gain.exponentialRampToValueAtTime(0.0001, this.ctx.currentTime + dur);
o.start();
o.stop(this.ctx.currentTime + dur);
}
playSent() {
// Satisfying "pop" or "click" for sending
// Sine wave starting at 600Hz dropping fast
if (!this.enabled) return;
this.playTone(600, "sine", 0.15, 0.1);
this.blip(832, 0.05);
}
playReceived() {
// Soft "bloop" for receiving
// Sine wave starting at 400Hz
if (!this.enabled) return;
this.playTone(400, "sine", 0.15, 0.1);
this.blip(624, 0.05);
}
playWhisper() {
// Distinct "ding" for whispers
// Two tones slightly separated
if (!this.enabled) return;
this.init();
if (!this.ctx) return;
const now = this.ctx.currentTime;
// Tone 1
const osc1 = this.ctx.createOscillator();
const gain1 = this.ctx.createGain();
osc1.frequency.setValueAtTime(800, now);
gain1.gain.setValueAtTime(0.1, now);
gain1.gain.exponentialRampToValueAtTime(0.01, now + 0.3);
osc1.connect(gain1);
gain1.connect(this.ctx.destination);
osc1.start(now);
osc1.stop(now + 0.3);
// Tone 2 (higher)
const osc2 = this.ctx.createOscillator();
const gain2 = this.ctx.createGain();
osc2.frequency.setValueAtTime(1200, now + 0.1);
gain2.gain.setValueAtTime(0.1, now + 0.1);
gain2.gain.exponentialRampToValueAtTime(0.01, now + 0.4);
osc2.connect(gain2);
gain2.connect(this.ctx.destination);
osc2.start(now + 0.1);
osc2.stop(now + 0.4);
this.blip(1872, 1.5);
}
}
+4
View File
@@ -282,6 +282,8 @@ a { color: var(--color-text-anchor-link); text-decoration: none; border-bottom:
gap: 2px;
scrollbar-width: thin;
scrollbar-color: var(--color-terminal-scrollbar) transparent;
word-wrap: break-word;
overflow-wrap: break-word;
}
.terminal-output::-webkit-scrollbar {
@@ -336,6 +338,8 @@ a { color: var(--color-text-anchor-link); text-decoration: none; border-bottom:
.msg-content {
color: var(--color-terminal-output-message);
word-wrap: break-word;
overflow-wrap: break-word;
}
.timestamp {