fix(ui): перенести таблицы администрирования и сортировать бэкапы по байтам

This commit is contained in:
Denozordec committed 2026-09-14 08:38:09 +07:00
1 parent 583b23ded1
commit d47f7ab162
8 files changed
+135 -50

No files matched your search

+11 -11
View File
@@ -1,23 +1,23 @@
"use client"
import { dataGridFeatures, type DataGridFeatures } from "@/components/reui/data-grid"
import { useMemo } from "react"
import {
type ColumnDef,
getCoreRowModel,
getSortedRowModel,
useReactTable,
} from "@tanstack/react-table-v8"
useTable,
} from "@tanstack/react-table"
import type { Server } from "@/lib/data"
import { Flag } from "@/components/flag"
import { cn } from "@/lib/utils"
import { FormToggle } from "@/components/form-kit"
import { DataGridShell } from "@/components/data-grids/shared/legacy-data-grid-shell"
import { DataGridShell } from "@/components/data-grids/shared/data-grid-shell"
import {
DATA_GRID_CELL_PAD,
DATA_GRID_CELL_PAD_FIRST,
DATA_GRID_CELL_PAD_LAST,
} from "@/components/data-grids/shared/legacy-data-grid-layout"
import { DataGridSortHeader } from "@/components/data-grids/shared/legacy-data-grid-sort-header"
} from "@/components/data-grids/shared/data-grid-layout"
import { DataGridSortHeader } from "@/components/data-grids/shared/data-grid-sort-header"
import { EmptyState } from "@/components/empty-state"
import { CableIcon, CopyIcon, EyeIcon, EyeOffIcon, Trash2Icon } from "lucide-react"
@@ -49,7 +49,7 @@ function SubusersDataGrid({
onToggleActive,
onRemove,
}: SubusersDataGridProps) {
const columns = useMemo<ColumnDef<SubUserRow>[]>(
const columns = useMemo<ColumnDef<DataGridFeatures, SubUserRow>[]>(
() => [
{
id: "login",
@@ -200,11 +200,11 @@ function SubusersDataGrid({
[onRemove, onToggleActive, onToggleReveal, revealedIds, servers],
)
const table = useReactTable({
const table = useTable({
features: dataGridFeatures,
manualPagination: true,
data: subUsers,
columns,
getCoreRowModel: getCoreRowModel(),
getSortedRowModel: getSortedRowModel(),
getRowId: (row) => row.id,
})