feat(ui): refresh branding and account identity copying
Replace every active application icon asset with the new high-resolution artwork, including transparent PNG, complete Windows ICO sizes, and the documentation screenshot. Turn populated username and email cells into non-selectable copy actions backed by validated native Electron clipboard IPC while keeping empty cells and row interactions unchanged.
This commit is contained in:
@@ -4922,6 +4922,11 @@ export function App(): ReactElement {
|
||||
const row = accountRowBindings.get(rowId);
|
||||
if (row) setAccountContextMenu({ x, y, rowId });
|
||||
},
|
||||
onCopyIdentity: (label, value) => {
|
||||
void window.rd.writeClipboardText(value)
|
||||
.then(() => showToast(`${label} kopiert`))
|
||||
.catch(() => showToast("Kopieren fehlgeschlagen"));
|
||||
},
|
||||
onAdd: openCreateAccountDialog,
|
||||
onRemoveSelected: () => {
|
||||
const row = selectedAccountViewId ? accountRowBindings.get(selectedAccountViewId) : null;
|
||||
|
||||
@@ -74,6 +74,7 @@ export interface AccountWorkspaceActions {
|
||||
onToggleEnabled: (rowId: string) => void;
|
||||
onEdit: (rowId: string) => void;
|
||||
onContextMenu: (rowId: string, x: number, y: number) => void;
|
||||
onCopyIdentity: (label: "Benutzername" | "E-Mail", value: string) => void;
|
||||
onAdd: () => void;
|
||||
onRemoveSelected: () => void;
|
||||
onCheckAll: () => void;
|
||||
@@ -91,6 +92,36 @@ export interface AccountWorkspaceActions {
|
||||
onRoutingAdd?: (hosterId: string) => void;
|
||||
}
|
||||
|
||||
function renderAccountIdentityCell({
|
||||
className,
|
||||
label,
|
||||
value,
|
||||
onCopy
|
||||
}: {
|
||||
className: string;
|
||||
label: "Benutzername" | "E-Mail";
|
||||
value: string;
|
||||
onCopy: (label: "Benutzername" | "E-Mail", value: string) => void;
|
||||
}): ReactElement {
|
||||
const copyable = value.trim() !== "" && value !== "—";
|
||||
return (
|
||||
<span className={className} role="cell" title={copyable ? `${value}\nKlicken zum Kopieren` : value}>
|
||||
{copyable ? (
|
||||
<button
|
||||
aria-label={`${label} kopieren`}
|
||||
className="settings-account-copy-button"
|
||||
onClick={(event) => {
|
||||
event.stopPropagation();
|
||||
onCopy(label, value);
|
||||
}}
|
||||
onDoubleClick={(event) => event.stopPropagation()}
|
||||
type="button"
|
||||
>{value}</button>
|
||||
) : value}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
export interface AccountWorkspaceProps {
|
||||
model: AccountWorkspaceViewModel;
|
||||
actions: AccountWorkspaceActions;
|
||||
@@ -240,8 +271,8 @@ function AccountRow({
|
||||
<span className={`settings-account-status-badge is-${row.status.tone}`}>{row.status.text}</span>
|
||||
</span>
|
||||
<span className="settings-account-traffic" role="cell">{row.traffic}</span>
|
||||
<span className="settings-account-username settings-copyable" role="cell" title={row.username}>{row.username}</span>
|
||||
<span className="settings-account-email settings-copyable" role="cell" title={row.email}>{row.email}</span>
|
||||
{renderAccountIdentityCell({ className: "settings-account-username", label: "Benutzername", onCopy: actions.onCopyIdentity, value: row.username })}
|
||||
{renderAccountIdentityCell({ className: "settings-account-email", label: "E-Mail", onCopy: actions.onCopyIdentity, value: row.email })}
|
||||
<span className="settings-account-expires" role="cell">{row.expires}</span>
|
||||
<span className="settings-account-credential" role="cell">{row.credential}</span>
|
||||
<span className="settings-account-column-actions" role="cell">
|
||||
|
||||
@@ -732,6 +732,27 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.settings-account-copy-button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
cursor: copy;
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
text-overflow: ellipsis;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.settings-account-copy-button:hover,
|
||||
.settings-account-copy-button:focus-visible {
|
||||
color: var(--ui-accent);
|
||||
}
|
||||
|
||||
.settings-account-action-button {
|
||||
display: grid;
|
||||
width: 30px;
|
||||
|
||||
Reference in New Issue
Block a user