feat(editor): F4.6d the web browser and web server on a computer's desktop
The oracle BrowserWindowRun uses Java's browser and web server windows as a person does; the room keeps a browser window per computer and sends a program window's view, the start names the person's language. The editor shows the page in a sandboxed frame, links and forms go to the room, the web server has its button, virtual hosts and lines. Better than Java: relative images and links count from the page's folder, a mark stays in the page, the error page from Java's template, the virtual hosts' file with complete rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// A server's lines as Java's server windows write them (ServerAnwendung,
|
||||
// ServerMitarbeiter, TCPSocket's failures), in the person's language: one
|
||||
// line each, as Java appends them to its window's text area.
|
||||
|
||||
import type { ServerLogEntry } from '@mdg-filius/core';
|
||||
import type { Translate } from '../i18n/i18n.js';
|
||||
|
||||
export function serverLine(entry: ServerLogEntry, t: Translate): string {
|
||||
switch (entry.kind) {
|
||||
case 'acceptingStarted':
|
||||
case 'acceptingStopped':
|
||||
case 'serverSocketClosed':
|
||||
case 'serverSocketFailed':
|
||||
return t(`server.${entry.kind}`);
|
||||
case 'connectionAccepted':
|
||||
case 'connectionClosed':
|
||||
return t(`server.${entry.kind}`, { address: `${entry.address}:${entry.port}` });
|
||||
case 'received':
|
||||
return `>>${entry.text}`;
|
||||
case 'sent':
|
||||
return `<<${entry.text}`;
|
||||
case 'sendFailed':
|
||||
return t(`server.sendFailed.${entry.failure}`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user