diff --git a/docs/branding.md b/docs/branding.md index 5867bee..d0f1a74 100644 --- a/docs/branding.md +++ b/docs/branding.md @@ -16,7 +16,7 @@ Everything that ties Orbit to a particular network or brand lives in "url": "https://example.org", "tagline": "Chat with", "taglineEm": "everyone.", - "subtitle": "Public rooms, private messages, no signup required." + "subtitle": "Public rooms, private messages, and moderation that works." } } ``` diff --git a/docs/overview.md b/docs/overview.md index c054706..ff34b8d 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -3,16 +3,18 @@ Order: 10 # Overview -**Orbit** is a modern web client for **IRC** — the open chat protocol that has quietly run -communities for decades. It runs entirely in the browser: pick a nick and you're talking, with -**no install and no signup**. +**Orbit** is a modern web client for **IRC**, the open chat protocol that has quietly run +communities for decades. It runs entirely in the browser, with nothing to install, and handles +everything from a quick guest nick to a full account (SASL login and in-app registration). +Whether a deployment lets people in as guests or asks them to register is its own choice, not +the client's. It powers [tchatou.fr](https://tchatou.fr/app/), and is built to be **re-pointed at any IRCv3 -network** and **rebranded** from a single `config.json` — without recompiling. +network** and **rebranded** from a single `config.json`, without recompiling. ## What makes it different -- **Full IRCv3.** Orbit negotiates 24 capabilities — SASL, message-tags, reactions, typing +- **Full IRCv3.** Orbit negotiates 25 capabilities: SASL, message-tags, reactions, typing indicators, read-markers, multi-line messages, server-side history, account registration, and Web Push. See [IRCv3 capabilities](https://orbit.tchatou.fr/docs/ircv3/). - **Pluggable at runtime.** A static `config.json` is fetched on startup and sets the server, @@ -25,11 +27,11 @@ network** and **rebranded** from a single `config.json` — without recompiling. Brazilian + European Portuguese). Pin a default with `defaults.lang`. - **Self-hostable.** A static build behind any web server. The project even runs its own git server with [push-to-deploy](https://orbit.tchatou.fr/docs/push-to-deploy/). -- **Free software.** AGPL-3.0 — use it, modify it, self-host it. +- **Free software.** AGPL-3.0: use it, modify it, self-host it. ## Tech -React 19 · TypeScript · Vite · zustand. Tested with Vitest, linted, and built in CI. The codebase -is a clean modular tree — see [Architecture](https://orbit.tchatou.fr/docs/architecture/). +React 19, TypeScript, Vite and zustand. Tested with Vitest, linted, and built in CI. The codebase +is a clean modular tree; see [Architecture](https://orbit.tchatou.fr/docs/architecture/). -> New here? Jump to the [Quick start](https://orbit.tchatou.fr/docs/quick-start/) to run your own in a minute. +> New here? Jump to the [Quick start](https://orbit.tchatou.fr/docs/quick-start/) to run your own. diff --git a/docs/plugins.md b/docs/plugins.md index 1f46075..b12b623 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -21,7 +21,14 @@ Add script URLs to `plugins` in [`config.json`](https://orbit.tchatou.fr/docs/co ``` They load in order, after the app boots. Host them anywhere the page can reach -(same-origin recommended). +(same-origin recommended). For a third-party origin, pin the file with +Subresource Integrity by giving an object instead of a URL: + +```json +{ "plugins": [{ "url": "https://cdn.example/x.js", "integrity": "sha384-…" }] } +``` + +(`crossorigin` defaults to `anonymous` when an `integrity` hash is set.) ## A quick plugin @@ -79,6 +86,8 @@ instead. See **[Compiled plugins](https://orbit.tchatou.fr/docs/compiled-plugins | `orbit.i18n.pick(table)` | pick a string from a `{ lang: text }` table by the current language | | `orbit.addUi(slot, render)` | add UI to a slot (returns a remover) | | `orbit.addSettingsSection({label, icon?, render})` | add a whole Settings section | +| `orbit.addMessageDecorator(m => …)` | inline UI after every message's text; `m` = `{id, nick, text, raw, kind, ts, mine}` (`text` is formatting-stripped, `raw` keeps mIRC codes) | +| `orbit.addMessageAction(m => …)` | a button in every message's hover action toolbar (next to reply/react); same `m` | | `orbit.h / orbit.html` | render helpers | | `log(…)` | namespaced console logger | @@ -93,10 +102,16 @@ instead. See **[Compiled plugins](https://orbit.tchatou.fr/docs/compiled-plugins | Slot | Where | |---|---| | `composer_button` | a button in the message composer toolbar | +| `topbar_item` | an item in the channel topbar action row (next to search / notifications) | +| `sidebar_item` | an item in the conversation sidebar header (next to the compose button) | | `settings_section` | a whole section in Settings (own nav entry + pane) — use `orbit.addSettingsSection()` | -More slots (message decorators, side panels) will be added as the core grows -stable homes for them. +Two per-message hooks run for every rendered message: +`orbit.addMessageDecorator(m => …)` appends inline UI after the text, and +`orbit.addMessageAction(m => …)` adds a button to the hover action toolbar next +to reply/react. Every contributed slot, action and decorator renders inside its +own error boundary, so a crashing plugin renders nothing instead of taking down +the app. ### Localization (i18n)