Fold NE selection and refresh status into the shared list pager.

Add an optional ListPager meta slot so Managed NE no longer needs a separate selection row above the table.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-10-13 00:41:37 +08:00
parent 312f6f2f96
commit 0ecff329cf
3 changed files with 38 additions and 12 deletions

View file

@ -671,15 +671,6 @@ export function NePage() {
</div>
<div className="pt-list">
{selected.length ? (
<div className="ne-selection-meta">
<span>{t("managedNe.selectedCount", { n: selected.length })}</span>
<Button size="sm" variant="ghost" onPress={() => setSelected([])}>
{t("managedNe.clearSelection")}
</Button>
</div>
) : null}
{listQuery.isFetching ? <p className="muted">{t("common.refreshing")}</p> : null}
{listQuery.isError ? (
<p className="error-text">{t("managedNe.loadFailed", { error: errText(listQuery.error) })}</p>
) : null}
@ -832,6 +823,19 @@ export function NePage() {
setPage(1);
}}
disabled={listQuery.isLoading}
meta={
<>
{selected.length ? (
<span className="ne-selection-meta">
· {t("managedNe.selectedCount", { n: selected.length })}
<button type="button" className="ne-selection-meta__clear" onClick={() => setSelected([])}>
{t("managedNe.clearSelection")}
</button>
</span>
) : null}
{listQuery.isFetching ? <span className="ne-selection-meta"> · {t("common.refreshing")}</span> : null}
</>
}
/>
</div>
</section>