Add account column reset button
This commit is contained in:
parent
7737a4b0da
commit
3c37cdba85
@ -1370,6 +1370,16 @@ export function App(): ReactElement {
|
|||||||
}
|
}
|
||||||
}, [accountColumnWidths]);
|
}, [accountColumnWidths]);
|
||||||
|
|
||||||
|
const resetAccountColumnWidths = useCallback((): void => {
|
||||||
|
setAccountColumnWidths({ ...ACCOUNT_COLUMN_DEFAULT_WIDTHS });
|
||||||
|
try {
|
||||||
|
window.localStorage.removeItem(ACCOUNT_COLUMN_STORAGE_KEY);
|
||||||
|
} catch {
|
||||||
|
// Ignore local persistence failures for optional UI state.
|
||||||
|
}
|
||||||
|
showToast("Accounts-Spalten zurückgesetzt", 1800);
|
||||||
|
}, [showToast]);
|
||||||
|
|
||||||
// Sync column order from settings (value-based comparison to avoid reference issues)
|
// Sync column order from settings (value-based comparison to avoid reference issues)
|
||||||
const columnOrderJson = JSON.stringify(snapshot.settings.columnOrder);
|
const columnOrderJson = JSON.stringify(snapshot.settings.columnOrder);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -4178,6 +4188,11 @@ export function App(): ReactElement {
|
|||||||
/>
|
/>
|
||||||
Debrid-Link-Keys im Feld "Zugang" einzeln untereinander anzeigen
|
Debrid-Link-Keys im Feld "Zugang" einzeln untereinander anzeigen
|
||||||
</label>
|
</label>
|
||||||
|
<div className="account-display-actions">
|
||||||
|
<button className="btn btn-sm" disabled={actionBusy} onClick={resetAccountColumnWidths}>
|
||||||
|
Spalten zurücksetzen
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
{configuredAccounts.length === 0 && (
|
{configuredAccounts.length === 0 && (
|
||||||
<div className="account-empty-state">
|
<div className="account-empty-state">
|
||||||
|
|||||||
@ -1457,6 +1457,12 @@ body,
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.account-display-actions {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin: -2px 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.key-stats-popup {
|
.key-stats-popup {
|
||||||
width: min(1360px, calc(100vw - 20px));
|
width: min(1360px, calc(100vw - 20px));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user