mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
Rework Identitäten dialog to match the native client's layout
The old dialog was a flat list with an inline rename field and a radio button per row - visually and structurally nothing like the native myTeamSpeak-style Identitäten window. Reworked to the same list + detail panel layout: pick an identity on the left, edit its Name/Nickname/ Phonetischer Nickname on the right, see its Eindeutige ID (once known) and creation status, Standard/Löschen/Exportieren buttons per identity. Also added what was actually missing functionally, not just visually: - Import/Export: an identity's opaque tsclientlib blob can be downloaded as a JSON file and re-imported later (backup/transfer between browsers). - Per-identity nickname: each identity now remembers its own nickname (like native TS3), applied when switching identities in the connect dialog and saved back after a successful connect - previously there was only one global nickname shared by every identity. Deliberately left out of scope (documented inline in the component): myTeamSpeak cloud-synced identities (a whole separate account system this self-hosted client has no equivalent of) and the manual "Sicherheitsstufe erhöhen" button (tsclientlib already runs that proof-of-work step automatically during connect whenever a server demands a higher level, so a manual trigger wouldn't add functionality, only let you pre-compute it before connecting). Verified interactively in demo mode: dialog renders in the new layout, fields are all editable, Standard/Löschen/Export honor their expected enabled/disabled states.
This commit is contained in:
1 parent
ea7b97b161
commit
17899ae137
3 files changed
+265
-51
No files matched your search
+35
-10
@@ -996,7 +996,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ts-identities-dialog {
|
.ts-identities-dialog {
|
||||||
width: 460px;
|
width: 520px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-identities-body {
|
||||||
|
display: flex;
|
||||||
|
gap: 1rem;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-identities-list-label {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--text-muted);
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-identities-list {
|
.ts-identities-list {
|
||||||
@@ -1005,32 +1017,45 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
border: 1px solid var(--border-soft);
|
border: 1px solid var(--border-soft);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
width: 180px;
|
||||||
max-height: 260px;
|
max-height: 260px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-identities-item {
|
.ts-identities-list li {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
padding: 0.35rem 0.5rem;
|
|
||||||
border-bottom: 1px solid var(--border-soft);
|
border-bottom: 1px solid var(--border-soft);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-identities-list li:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-identities-list-item {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0.35rem 0.5rem;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-identities-item-active {
|
.ts-identities-list-item-default {
|
||||||
background: var(--accent-soft, rgba(78, 161, 247, 0.15));
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-identities-name {
|
.ts-identities-detail {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ts-identities-readonly {
|
||||||
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-identities-status {
|
.ts-identities-status {
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-log-level-row {
|
.ts-log-level-row {
|
||||||
|
|||||||
+212
-41
@@ -75,6 +75,10 @@ const ACTIVE_IDENTITY_KEY = "webspeak3:active-identity";
|
|||||||
interface Identity {
|
interface Identity {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
/** Per-identity nickname/phonetic nickname, like the native client - selecting
|
||||||
|
* an identity in the connect dialog fills these in. Empty until first set. */
|
||||||
|
nickname: string;
|
||||||
|
phoneticName: string;
|
||||||
/** Opaque tsclientlib identity blob - null until the first successful connect generates one. */
|
/** Opaque tsclientlib identity blob - null until the first successful connect generates one. */
|
||||||
blob: string | null;
|
blob: string | null;
|
||||||
}
|
}
|
||||||
@@ -85,8 +89,11 @@ interface Identity {
|
|||||||
(function ensureIdentitiesSeeded() {
|
(function ensureIdentitiesSeeded() {
|
||||||
if (localStorage.getItem(IDENTITIES_KEY) !== null) return;
|
if (localStorage.getItem(IDENTITIES_KEY) !== null) return;
|
||||||
const legacyBlob = localStorage.getItem(IDENTITY_KEY);
|
const legacyBlob = localStorage.getItem(IDENTITY_KEY);
|
||||||
|
const legacyNickname = localStorage.getItem(LAST_NICKNAME_KEY) ?? "";
|
||||||
const id = crypto.randomUUID();
|
const id = crypto.randomUUID();
|
||||||
const identities: Identity[] = [{ id, name: "Standard", blob: legacyBlob }];
|
const identities: Identity[] = [
|
||||||
|
{ id, name: "Standard", nickname: legacyNickname, phoneticName: "", blob: legacyBlob },
|
||||||
|
];
|
||||||
localStorage.setItem(IDENTITIES_KEY, JSON.stringify(identities));
|
localStorage.setItem(IDENTITIES_KEY, JSON.stringify(identities));
|
||||||
localStorage.setItem(ACTIVE_IDENTITY_KEY, id);
|
localStorage.setItem(ACTIVE_IDENTITY_KEY, id);
|
||||||
localStorage.removeItem(IDENTITY_KEY);
|
localStorage.removeItem(IDENTITY_KEY);
|
||||||
@@ -95,12 +102,22 @@ interface Identity {
|
|||||||
function loadIdentities(): Identity[] {
|
function loadIdentities(): Identity[] {
|
||||||
try {
|
try {
|
||||||
const raw = localStorage.getItem(IDENTITIES_KEY);
|
const raw = localStorage.getItem(IDENTITIES_KEY);
|
||||||
const parsed = raw ? (JSON.parse(raw) as Identity[]) : [];
|
const parsed = raw ? (JSON.parse(raw) as Partial<Identity>[]) : [];
|
||||||
if (parsed.length > 0) return parsed;
|
if (parsed.length > 0) {
|
||||||
|
// Backfill fields older saves (before per-identity nickname/phonetic
|
||||||
|
// name existed) don't have.
|
||||||
|
return parsed.map((i) => ({
|
||||||
|
id: i.id ?? crypto.randomUUID(),
|
||||||
|
name: i.name ?? "Standard",
|
||||||
|
nickname: i.nickname ?? "",
|
||||||
|
phoneticName: i.phoneticName ?? "",
|
||||||
|
blob: i.blob ?? null,
|
||||||
|
}));
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// fall through
|
// fall through
|
||||||
}
|
}
|
||||||
return [{ id: crypto.randomUUID(), name: "Standard", blob: null }];
|
return [{ id: crypto.randomUUID(), name: "Standard", nickname: "", phoneticName: "", blob: null }];
|
||||||
}
|
}
|
||||||
|
|
||||||
const FAVORITES_KEY = "webspeak3:favorites";
|
const FAVORITES_KEY = "webspeak3:favorites";
|
||||||
@@ -2730,25 +2747,50 @@ function ServerConnectionInfoDialog({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Mirrors the native client's "Identitäten" window: a list on the left plus
|
||||||
|
* a detail panel on the right (Name/Nickname/Phonetischer Nickname/
|
||||||
|
* Eindeutige ID), rather than the old flat list-with-inline-rename layout.
|
||||||
|
* The native window also has a myTeamSpeak-synced identity list and a
|
||||||
|
* "Sicherheitsstufe erhöhen" button - both deliberately out of scope here:
|
||||||
|
* the former needs a whole separate cloud-account system this self-hosted
|
||||||
|
* client doesn't have, and the latter (tsclientlib's proof-of-work identity
|
||||||
|
* level increase) already runs automatically during connect whenever a
|
||||||
|
* server demands a higher level, so there's nothing a manual button would
|
||||||
|
* add beyond letting you pre-compute it before connecting. */
|
||||||
function IdentitiesDialog({
|
function IdentitiesDialog({
|
||||||
identities,
|
identities,
|
||||||
activeId,
|
activeId,
|
||||||
|
ownUid,
|
||||||
onActivate,
|
onActivate,
|
||||||
onAdd,
|
onAdd,
|
||||||
onRename,
|
onRename,
|
||||||
|
onNicknameChange,
|
||||||
|
onPhoneticChange,
|
||||||
onDelete,
|
onDelete,
|
||||||
|
onExport,
|
||||||
|
onImport,
|
||||||
onClose,
|
onClose,
|
||||||
}: {
|
}: {
|
||||||
identities: Identity[];
|
identities: Identity[];
|
||||||
activeId: string | null;
|
activeId: string | null;
|
||||||
|
/** The connected own client's unique ID, if currently connected with the
|
||||||
|
* active identity - shown as that identity's "Eindeutige ID". */
|
||||||
|
ownUid: string | null;
|
||||||
onActivate: (id: string) => void;
|
onActivate: (id: string) => void;
|
||||||
onAdd: () => void;
|
onAdd: () => void;
|
||||||
onRename: (id: string, name: string) => void;
|
onRename: (id: string, name: string) => void;
|
||||||
|
onNicknameChange: (id: string, value: string) => void;
|
||||||
|
onPhoneticChange: (id: string, value: string) => void;
|
||||||
onDelete: (id: string) => void;
|
onDelete: (id: string) => void;
|
||||||
|
onExport: (id: string) => void;
|
||||||
|
onImport: (file: File) => void;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
}) {
|
}) {
|
||||||
const t = useT();
|
const t = useT();
|
||||||
const backdrop = useBackdropDismiss(onClose);
|
const backdrop = useBackdropDismiss(onClose);
|
||||||
|
const importInputRef = useRef<HTMLInputElement>(null);
|
||||||
|
const [selectedId, setSelectedId] = useState(activeId ?? identities[0]?.id ?? null);
|
||||||
|
const selected = identities.find((i) => i.id === selectedId) ?? identities[0] ?? null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="ts-dialog-backdrop" {...backdrop}>
|
<div className="ts-dialog-backdrop" {...backdrop}>
|
||||||
@@ -2759,41 +2801,102 @@ function IdentitiesDialog({
|
|||||||
✕
|
✕
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="ts-dialog-body">
|
<div className="ts-dialog-body ts-identities-body">
|
||||||
<ul className="ts-identities-list">
|
<div>
|
||||||
{identities.map((identity) => (
|
<div className="ts-identities-list-label">{t("identities.listLabel")}</div>
|
||||||
<li
|
<ul className="ts-identities-list">
|
||||||
key={identity.id}
|
{identities.map((identity) => (
|
||||||
className={`ts-identities-item${identity.id === activeId ? " ts-identities-item-active" : ""}`}
|
<li key={identity.id}>
|
||||||
>
|
<button
|
||||||
<input
|
className={`ts-link-button ts-identities-list-item${
|
||||||
type="radio"
|
identity.id === selectedId ? " ts-perms-editor-selected" : ""
|
||||||
name="active-identity"
|
}${identity.id === activeId ? " ts-identities-list-item-default" : ""}`}
|
||||||
checked={identity.id === activeId}
|
onClick={() => setSelectedId(identity.id)}
|
||||||
onChange={() => onActivate(identity.id)}
|
title={identity.id === activeId ? t("identities.isDefault") : undefined}
|
||||||
title={t("identities.activate")}
|
>
|
||||||
/>
|
{identity.id === activeId ? "★ " : ""}
|
||||||
<input
|
{identity.name}
|
||||||
className="ts-identities-name"
|
</button>
|
||||||
value={identity.name}
|
</li>
|
||||||
onChange={(e) => onRename(identity.id, e.target.value)}
|
))}
|
||||||
/>
|
</ul>
|
||||||
<span className="ts-identities-status">
|
</div>
|
||||||
{identity.blob ? t("identities.generated") : t("identities.pending")}
|
<div className="ts-identities-detail">
|
||||||
</span>
|
{selected && (
|
||||||
<button
|
<>
|
||||||
disabled={identities.length <= 1}
|
<label className="ts-dialog-field">
|
||||||
onClick={() => onDelete(identity.id)}
|
{t("identities.name")}
|
||||||
title={t("identities.delete")}
|
<input value={selected.name} onChange={(e) => onRename(selected.id, e.target.value)} />
|
||||||
>
|
</label>
|
||||||
✕
|
<label className="ts-dialog-field">
|
||||||
</button>
|
{t("connect.nickname")}
|
||||||
</li>
|
<input
|
||||||
))}
|
value={selected.nickname}
|
||||||
</ul>
|
onChange={(e) => onNicknameChange(selected.id, e.target.value)}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<label className="ts-dialog-field">
|
||||||
|
{t("identities.phoneticNickname")}
|
||||||
|
<input
|
||||||
|
value={selected.phoneticName}
|
||||||
|
onChange={(e) => onPhoneticChange(selected.id, e.target.value)}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<label className="ts-dialog-field">
|
||||||
|
{t("identities.uniqueId")}
|
||||||
|
<input
|
||||||
|
readOnly
|
||||||
|
value={selected.id === activeId && ownUid ? ownUid : t("identities.unknown")}
|
||||||
|
className="ts-identities-readonly"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<div className="ts-identities-status">
|
||||||
|
{selected.blob ? t("identities.generated") : t("identities.pending")}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="ts-dialog-buttons">
|
<div className="ts-dialog-buttons">
|
||||||
<button onClick={onAdd}>{t("identities.add")}</button>
|
<div>
|
||||||
|
<button onClick={onAdd}>{t("identities.add")}</button>
|
||||||
|
<button onClick={() => importInputRef.current?.click()}>{t("identities.import")}</button>
|
||||||
|
<input
|
||||||
|
ref={importInputRef}
|
||||||
|
type="file"
|
||||||
|
accept=".json,application/json"
|
||||||
|
style={{ display: "none" }}
|
||||||
|
onChange={(e) => {
|
||||||
|
const file = e.target.files?.[0];
|
||||||
|
e.target.value = "";
|
||||||
|
if (file) onImport(file);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{selected && (
|
||||||
|
<>
|
||||||
|
<button disabled={!selected.blob} onClick={() => onExport(selected.id)}>
|
||||||
|
{t("identities.export")}
|
||||||
|
</button>
|
||||||
|
<button onClick={() => onActivate(selected.id)} disabled={selected.id === activeId}>
|
||||||
|
{t("identities.setDefault")}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
disabled={identities.length <= 1}
|
||||||
|
onClick={() => {
|
||||||
|
const wasActive = selected.id === activeId;
|
||||||
|
const idx = identities.findIndex((i) => i.id === selected.id);
|
||||||
|
onDelete(selected.id);
|
||||||
|
if (selected.id === selectedId) {
|
||||||
|
const remaining = identities.filter((i) => i.id !== selected.id);
|
||||||
|
setSelectedId((wasActive ? remaining[0] : remaining[Math.max(0, idx - 1)])?.id ?? null);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("identities.delete")}
|
||||||
|
</button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<div className="ts-dialog-buttons-right">
|
<div className="ts-dialog-buttons-right">
|
||||||
<button onClick={onClose}>{t("dialog.close")}</button>
|
<button onClick={onClose}>{t("dialog.close")}</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -4324,9 +4427,13 @@ function AppInner() {
|
|||||||
setConnected(true);
|
setConnected(true);
|
||||||
localStorage.setItem(LAST_HOST_KEY, connectHost);
|
localStorage.setItem(LAST_HOST_KEY, connectHost);
|
||||||
localStorage.setItem(LAST_NICKNAME_KEY, connectNickname);
|
localStorage.setItem(LAST_NICKNAME_KEY, connectNickname);
|
||||||
if (data.identity && connectIdentityId) {
|
if (connectIdentityId) {
|
||||||
setIdentities((prev) =>
|
setIdentities((prev) =>
|
||||||
prev.map((i) => (i.id === connectIdentityId ? { ...i, blob: data.identity } : i))
|
prev.map((i) =>
|
||||||
|
i.id === connectIdentityId
|
||||||
|
? { ...i, blob: data.identity || i.blob, nickname: connectNickname }
|
||||||
|
: i
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
setServerName(data.serverName);
|
setServerName(data.serverName);
|
||||||
@@ -5178,8 +5285,24 @@ function AppInner() {
|
|||||||
setWhisperLists((prev) => prev.filter((list) => list.id !== id));
|
setWhisperLists((prev) => prev.filter((list) => list.id !== id));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Switching identities (in the connect dialog's picker) also switches the
|
||||||
|
* nickname field to that identity's own remembered nickname, like the
|
||||||
|
* native client - only when it actually has one saved, so a fresh
|
||||||
|
* identity doesn't blank out what the user already typed. */
|
||||||
|
const handleActiveIdentityChange = (id: string) => {
|
||||||
|
setActiveIdentityId(id);
|
||||||
|
const identity = identities.find((i) => i.id === id);
|
||||||
|
if (identity?.nickname) setNickname(identity.nickname);
|
||||||
|
};
|
||||||
|
|
||||||
const handleAddIdentity = () => {
|
const handleAddIdentity = () => {
|
||||||
const identity: Identity = { id: crypto.randomUUID(), name: t("identities.newName"), blob: null };
|
const identity: Identity = {
|
||||||
|
id: crypto.randomUUID(),
|
||||||
|
name: t("identities.newName"),
|
||||||
|
nickname: "",
|
||||||
|
phoneticName: "",
|
||||||
|
blob: null,
|
||||||
|
};
|
||||||
setIdentities((prev) => [...prev, identity]);
|
setIdentities((prev) => [...prev, identity]);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5187,6 +5310,15 @@ function AppInner() {
|
|||||||
setIdentities((prev) => prev.map((i) => (i.id === id ? { ...i, name } : i)));
|
setIdentities((prev) => prev.map((i) => (i.id === id ? { ...i, name } : i)));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleIdentityNicknameChange = (id: string, value: string) => {
|
||||||
|
setIdentities((prev) => prev.map((i) => (i.id === id ? { ...i, nickname: value } : i)));
|
||||||
|
if (id === activeIdentityId) setNickname(value);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleIdentityPhoneticChange = (id: string, value: string) => {
|
||||||
|
setIdentities((prev) => prev.map((i) => (i.id === id ? { ...i, phoneticName: value } : i)));
|
||||||
|
};
|
||||||
|
|
||||||
const handleDeleteIdentity = (id: string) => {
|
const handleDeleteIdentity = (id: string) => {
|
||||||
setIdentities((prev) => {
|
setIdentities((prev) => {
|
||||||
if (prev.length <= 1) return prev;
|
if (prev.length <= 1) return prev;
|
||||||
@@ -5196,6 +5328,40 @@ function AppInner() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** Downloads one identity's opaque tsclientlib blob as a JSON file - the
|
||||||
|
* same file this dialog's "Importieren" button reads back in, so it
|
||||||
|
* doubles as a backup/transfer mechanism between browsers or devices. */
|
||||||
|
const handleExportIdentity = (id: string) => {
|
||||||
|
const identity = identities.find((i) => i.id === id);
|
||||||
|
if (!identity?.blob) return;
|
||||||
|
const blob = new Blob([identity.blob], { type: "application/json" });
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const a = document.createElement("a");
|
||||||
|
a.href = url;
|
||||||
|
a.download = `${identity.name.replace(/[^a-z0-9_-]+/gi, "_") || "identity"}.ts3identity.json`;
|
||||||
|
document.body.appendChild(a);
|
||||||
|
a.click();
|
||||||
|
document.body.removeChild(a);
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleImportIdentity = (file: File) => {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onload = () => {
|
||||||
|
const text = (reader.result as string).trim();
|
||||||
|
try {
|
||||||
|
JSON.parse(text);
|
||||||
|
} catch {
|
||||||
|
logClient("error", "Identitäten", `"${file.name}" ist keine gültige Identitätsdatei.`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const name = file.name.replace(/\.(ts3identity\.)?json$/i, "") || t("identities.newName");
|
||||||
|
const identity: Identity = { id: crypto.randomUUID(), name, nickname: "", phoneticName: "", blob: text };
|
||||||
|
setIdentities((prev) => [...prev, identity]);
|
||||||
|
};
|
||||||
|
reader.readAsText(file);
|
||||||
|
};
|
||||||
|
|
||||||
const handleShowClientConnectionInfo = (clientId: number, clientName: string) => {
|
const handleShowClientConnectionInfo = (clientId: number, clientName: string) => {
|
||||||
setClientConnectionInfoTarget({ id: clientId, name: clientName });
|
setClientConnectionInfoTarget({ id: clientId, name: clientName });
|
||||||
setClientConnectionInfo(null);
|
setClientConnectionInfo(null);
|
||||||
@@ -6235,7 +6401,7 @@ function AppInner() {
|
|||||||
onServerPasswordChange={setServerPassword}
|
onServerPasswordChange={setServerPassword}
|
||||||
onChannelPasswordChange={setChannelPassword}
|
onChannelPasswordChange={setChannelPassword}
|
||||||
onDefaultChannelChange={setDefaultChannel}
|
onDefaultChannelChange={setDefaultChannel}
|
||||||
onActiveIdentityChange={setActiveIdentityId}
|
onActiveIdentityChange={handleActiveIdentityChange}
|
||||||
onToggleExpanded={() => setConnectDialogExpanded((v) => !v)}
|
onToggleExpanded={() => setConnectDialogExpanded((v) => !v)}
|
||||||
onConnect={handleConnect}
|
onConnect={handleConnect}
|
||||||
onCancel={() => setConnectDialogOpen(false)}
|
onCancel={() => setConnectDialogOpen(false)}
|
||||||
@@ -6295,10 +6461,15 @@ function AppInner() {
|
|||||||
<IdentitiesDialog
|
<IdentitiesDialog
|
||||||
identities={identities}
|
identities={identities}
|
||||||
activeId={activeIdentityId}
|
activeId={activeIdentityId}
|
||||||
|
ownUid={connected ? ownClient?.uid ?? null : null}
|
||||||
onActivate={setActiveIdentityId}
|
onActivate={setActiveIdentityId}
|
||||||
onAdd={handleAddIdentity}
|
onAdd={handleAddIdentity}
|
||||||
onRename={handleRenameIdentity}
|
onRename={handleRenameIdentity}
|
||||||
|
onNicknameChange={handleIdentityNicknameChange}
|
||||||
|
onPhoneticChange={handleIdentityPhoneticChange}
|
||||||
onDelete={handleDeleteIdentity}
|
onDelete={handleDeleteIdentity}
|
||||||
|
onExport={handleExportIdentity}
|
||||||
|
onImport={handleImportIdentity}
|
||||||
onClose={() => setIdentitiesOpen(false)}
|
onClose={() => setIdentitiesOpen(false)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -134,6 +134,15 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"identities.newName": "Neue Identität",
|
"identities.newName": "Neue Identität",
|
||||||
"identities.generated": "Erstellt",
|
"identities.generated": "Erstellt",
|
||||||
"identities.pending": "Wird bei der nächsten Verbindung erstellt",
|
"identities.pending": "Wird bei der nächsten Verbindung erstellt",
|
||||||
|
"identities.listLabel": "Lokale Identitäten",
|
||||||
|
"identities.name": "Identität Name:",
|
||||||
|
"identities.phoneticNickname": "Phonetischer Nickname:",
|
||||||
|
"identities.uniqueId": "Eindeutige ID:",
|
||||||
|
"identities.unknown": "Unbekannt",
|
||||||
|
"identities.setDefault": "Standard",
|
||||||
|
"identities.isDefault": "Aktuell als Standard verwendet",
|
||||||
|
"identities.export": "Exportieren",
|
||||||
|
"identities.import": "Importieren",
|
||||||
|
|
||||||
"connectionInfo.clientTitle": "Verbindungsinformationen - {name}",
|
"connectionInfo.clientTitle": "Verbindungsinformationen - {name}",
|
||||||
"connectionInfo.serverTitle": "Serververbindungsinformationen",
|
"connectionInfo.serverTitle": "Serververbindungsinformationen",
|
||||||
@@ -625,6 +634,15 @@ const translations: Record<Lang, Record<string, string>> = {
|
|||||||
"identities.newName": "New Identity",
|
"identities.newName": "New Identity",
|
||||||
"identities.generated": "Generated",
|
"identities.generated": "Generated",
|
||||||
"identities.pending": "Will be generated on next connection",
|
"identities.pending": "Will be generated on next connection",
|
||||||
|
"identities.listLabel": "Local Identities",
|
||||||
|
"identities.name": "Identity Name:",
|
||||||
|
"identities.phoneticNickname": "Phonetic Nickname:",
|
||||||
|
"identities.uniqueId": "Unique ID:",
|
||||||
|
"identities.unknown": "Unknown",
|
||||||
|
"identities.setDefault": "Set as Default",
|
||||||
|
"identities.isDefault": "Currently used as default",
|
||||||
|
"identities.export": "Export",
|
||||||
|
"identities.import": "Import",
|
||||||
|
|
||||||
"connectionInfo.clientTitle": "Connection Info - {name}",
|
"connectionInfo.clientTitle": "Connection Info - {name}",
|
||||||
"connectionInfo.serverTitle": "Server Connection Info",
|
"connectionInfo.serverTitle": "Server Connection Info",
|
||||||
|
|||||||
Reference in new issue
Block a user