Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/assets/img/anonymous-dark-1200.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/img/anonymous-dark-2000.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/img/anonymous-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/img/anonymous-light-1200.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/img/anonymous-light-2000.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/img/anonymous-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 17 additions & 1 deletion frontend/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@
import { initEventListeners, destroyEventListeners } from './lib/events';
import { activeView, serverStatus } from './lib/stores';
import { anonymous, toggleAnonymous } from './lib/anonymize';
import AnonymousBanner from './components/AnonymousBanner.svelte';

// The mode can be switched from the sidebar button or from the settings
// panel, and the sidebar button sits directly above the settings one —
// which is how someone turns it on without meaning to. Saying so at the
// moment it changes is what turns a mystery back into a mode.
let lastAnonymous = $anonymous;
$: if ($anonymous !== lastAnonymous) {
lastAnonymous = $anonymous;
if ($anonymous) {
toastInfo($_('anonymous.active'));
} else {
toastSuccess($_('anonymous.off'));
}
}
import { theme, toggleTheme } from './lib/theme';
import ServerControls from './components/ServerControls.svelte';
import FilterBar from './components/FilterBar.svelte';
Expand All @@ -19,7 +34,7 @@
import CloseDialog from './components/CloseDialog.svelte';
import UnlockScreen from './components/UnlockScreen.svelte';
import { isEncryptionLocked, getUpdateConfig, isCAKeyUnencrypted } from './lib/api';
import { toastError } from './lib/toast';
import { toastError, toastInfo, toastSuccess } from './lib/toast';
import { updateStore } from './lib/updateStore';
import UpdateBanner from './components/UpdateBanner.svelte';

Expand Down Expand Up @@ -205,6 +220,7 @@
<div class="main-area">
<UpdateBanner />
<ServerControls onTLSConfig={() => showTLSConfig = true} />
<AnonymousBanner />

{#if $activeView === 'logs'}
<FilterBar />
Expand Down
73 changes: 73 additions & 0 deletions frontend/src/components/AnonymousBanner.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<script lang="ts">
/**
* Says, while it is on, that what is on screen is not what was received.
*
* Anonymous mode replaces hostnames, addresses, user names and domains
* with stand-ins, everywhere a log is displayed, and it persists across
* restarts. Until this banner existed the only sign of it was a 16 px icon
* at the bottom of the sidebar tinted with the accent colour — so someone
* who turned it on, or hit it on the way to the settings button below it,
* came back to an application quietly showing 192.0.2.1 where their
* collector had recorded 10.211.8.13.
*
* That is how #49 was reported: not as a mode left on, but as the
* application identifying sources wrongly since v1.4. A display that
* rewrites what it shows has to say so where the rewriting is read, and
* offer the way back in the same place.
*/
import { _ } from 'svelte-i18n';
import { anonymous } from '../lib/anonymize';
</script>

{#if $anonymous}
<div class="anon-banner" role="status">
<svg class="anon-icon" width="16" height="16" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
aria-hidden="true">
<path d="M9 21c0 .5-.4 1-1 1s-1-.5-1-1v-1.5a5 5 0 0 1-2-4V9a7 7 0 0 1 14 0v6.5a5 5 0 0 1-2 4V21c0 .5-.4 1-1 1s-1-.5-1-1-.4-1-1-1-1 .5-1 1-.4 1-1 1-1-.5-1-1-.4-1-1-1-1 .5-1 1z"/>
<circle cx="9" cy="10" r="1.2" fill="currentColor"/>
<circle cx="15" cy="10" r="1.2" fill="currentColor"/>
</svg>

<span class="anon-title">{$_('anonymous.active')}</span>
<span class="anon-text">{$_('anonymous.banner')}</span>

<button class="anon-off" on:click={() => anonymous.set(false)}>
{$_('anonymous.showReal')}
</button>
</div>
{/if}

<style>
.anon-banner {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 16px;
flex-shrink: 0;
background: var(--warning-bg, rgba(240, 198, 116, 0.14));
border-bottom: 1px solid var(--border-color);
font-size: 11px;
color: var(--text-primary);
}

.anon-icon { flex-shrink: 0; color: var(--severity-warning, #f0c674); }
.anon-title { font-weight: 600; flex-shrink: 0; }
.anon-text {
color: var(--text-secondary);
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.anon-off {
margin-left: auto;
flex-shrink: 0;
padding: 3px 10px;
font-size: 11px;
cursor: pointer;
background: var(--bg-secondary);
color: var(--text-primary);
border: 1px solid var(--border-color);
border-radius: 3px;
}
.anon-off:hover { background: var(--bg-hover); }
</style>
3 changes: 3 additions & 0 deletions frontend/src/lib/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@
},
"anonymous": {
"active": "Anonymer Modus ist aktiv",
"banner": "Hostnamen, Adressen, Benutzernamen und Domains auf dem Bildschirm sind Platzhalter, nicht die empfangenen Werte. Gespeicherte Daten bleiben unverändert.",
"showReal": "Echte Werte anzeigen",
"off": "Anonymer Modus ist aus",
"disable": "Anonymen Modus deaktivieren",
"enable": "Anonymen Modus aktivieren",
"hint": "Ersetzt Hostnamen, Adressen, Benutzernamen, Domains und E-Mail-Adressen durch feste Platzhalter, damit ein Screenshot geteilt werden kann. Nur die Anzeige — gespeicherte Daten und Exporte bleiben unverändert.",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@
},
"anonymous": {
"active": "Anonymous mode is on",
"banner": "Hostnames, addresses, user names and domains on screen are stand-ins, not the values received. Stored data is unchanged.",
"showReal": "Show real values",
"off": "Anonymous mode is off",
"disable": "Disable anonymous mode",
"enable": "Enable anonymous mode",
"hint": "Replaces hostnames, addresses, usernames, domains and e-mail addresses with stable stand-ins, so a screenshot can be shared. Display only — stored data and exports are unchanged.",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lib/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@
},
"anonymous": {
"active": "Modo anónimo activo",
"banner": "Los nombres de host, direcciones, cuentas y dominios en pantalla son sustitutos, no los valores recibidos. Los datos guardados no cambian.",
"showReal": "Mostrar los valores reales",
"off": "Modo anónimo desactivado",
"disable": "Desactivar modo anónimo",
"enable": "Activar modo anónimo",
"hint": "Sustituye nombres de host, direcciones, usuarios, dominios y correos por alias estables, para poder compartir una captura. Solo la visualización — los datos almacenados y las exportaciones no cambian.",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lib/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@
},
"anonymous": {
"active": "Mode anonyme actif",
"banner": "Les noms d’hôtes, adresses, comptes et domaines affichés sont des substituts, pas les valeurs reçues. Les données enregistrées sont inchangées.",
"showReal": "Afficher les vraies valeurs",
"off": "Mode anonyme désactivé",
"disable": "Désactiver le mode anonyme",
"enable": "Activer le mode anonyme",
"hint": "Remplace les noms d’hôte, adresses, identifiants, domaines et adresses e-mail par des substituts stables, pour pouvoir partager une capture d’écran. Affichage uniquement — les données stockées et les exports sont inchangés.",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lib/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@
},
"anonymous": {
"active": "Modalità anonima attiva",
"banner": "Nomi host, indirizzi, account e domini a schermo sono sostituti, non i valori ricevuti. I dati salvati restano invariati.",
"showReal": "Mostra i valori reali",
"off": "Modalità anonima disattivata",
"disable": "Disattiva modalità anonima",
"enable": "Attiva modalità anonima",
"hint": "Sostituisce nomi host, indirizzi, utenti, domini ed e-mail con segnaposto stabili, per poter condividere uno screenshot. Solo visualizzazione — i dati memorizzati e le esportazioni restano invariati.",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lib/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@
},
"anonymous": {
"active": "匿名モードが有効です",
"banner": "画面上のホスト名、アドレス、アカウント、ドメインは代替値であり、受信した値ではありません。保存済みデータはそのままです。",
"showReal": "実際の値を表示",
"off": "匿名モードはオフです",
"disable": "匿名モードを無効にする",
"enable": "匿名モードを有効にする",
"hint": "ホスト名、アドレス、ユーザー名、ドメイン、メールアドレスを安定した代替値に置き換え、スクリーンショットを共有できるようにします。表示のみ — 保存されたデータとエクスポートは変更されません。",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lib/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@
},
"anonymous": {
"active": "Modo anónimo ativo",
"banner": "Os nomes de anfitrião, endereços, contas e domínios apresentados são substitutos, não os valores recebidos. Os dados guardados não mudam.",
"showReal": "Mostrar os valores reais",
"off": "Modo anónimo desativado",
"disable": "Desativar modo anónimo",
"enable": "Ativar modo anónimo",
"hint": "Substitui nomes de host, endereços, utilizadores, domínios e e-mails por substitutos estáveis, para poder partilhar uma captura de ecrã. Apenas a apresentação — os dados guardados e as exportações não mudam.",
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lib/i18n/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@
},
"anonymous": {
"active": "匿名模式已开启",
"banner": "屏幕上的主机名、地址、账户和域名均为替代值,而非接收到的值。已存储的数据不变。",
"showReal": "显示真实值",
"off": "匿名模式已关闭",
"disable": "禁用匿名模式",
"enable": "启用匿名模式",
"hint": "将主机名、地址、用户名、域名和电子邮件替换为固定的替代值,以便分享截图。仅影响显示 — 已存储的数据和导出不会改变。",
Expand Down
Loading