mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-10-29 16:17:25 +09:00
refactor(recycle-bin): drop the page-local header
The tab-local title, retention blurb and standalone Refresh button duplicated chrome the grid already provides (Refresh data lives in the grid tools menu; per-row 'purges in Xd' carries the retention signal). The page now leads with the view picker and table like other grids. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1704d60b05
commit
5bfb0f6747
2 files changed
+1
-16
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 303 KiB After Width: | Height: | Size: 283 KiB |
@@ -1,5 +1,5 @@
|
|||||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
import { Trash2, Undo2, RefreshCw } from 'lucide-react';
|
import { Trash2, Undo2 } from 'lucide-react';
|
||||||
import api from '@/services/api';
|
import api from '@/services/api';
|
||||||
import { useToast } from '@/contexts/ToastContext';
|
import { useToast } from '@/contexts/ToastContext';
|
||||||
import { useAuth } from '@/contexts/AuthContext';
|
import { useAuth } from '@/contexts/AuthContext';
|
||||||
@@ -228,18 +228,6 @@ export default function RecycleBinTab() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="settings-section recyclebin">
|
<div className="settings-section recyclebin">
|
||||||
<div className="settings-section__head">
|
|
||||||
<div>
|
|
||||||
<h2>{t('app.recycleBinTab.recycleBin', 'Recycle bin')}</h2>
|
|
||||||
<p className="settings-section__hint">
|
|
||||||
{t('app.recycleBinTab.deletedRecordsAreKeptFor', 'Deleted records are kept for')} {retentionDays} {t('app.recycleBinTab.daysSoTheyCanBePut', 'days so they can be put back. Restoring returns the record itself — it does not re-apply configuration that was torn down at delete time (a domain’s vhost, for example).')}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Button variant="outline" size="sm" onClick={load} disabled={loading}>
|
|
||||||
<RefreshCw size={15} /> {t('common.actions.refresh', 'Refresh')}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<EmptyState loading loadingVariant="table" title={t('app.recycleBinTab.loadingDeletedRecords', 'Loading deleted records…')} />
|
<EmptyState loading loadingVariant="table" title={t('app.recycleBinTab.loadingDeletedRecords', 'Loading deleted records…')} />
|
||||||
) : items.length === 0 ? (
|
) : items.length === 0 ? (
|
||||||
@@ -250,9 +238,6 @@ export default function RecycleBinTab() {
|
|||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
{/* The section's h2 above stays put — it heads the
|
|
||||||
retention explanation as much as the table, so the
|
|
||||||
picker sits with the table it actually belongs to. */}
|
|
||||||
<GridViewPicker
|
<GridViewPicker
|
||||||
views={chrome.views}
|
views={chrome.views}
|
||||||
label="items"
|
label="items"
|
||||||
|
|||||||
Reference in new issue
Block a user