mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
#591 - profile, users and projects
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
'use client';
|
||||
|
||||
import { ColumnDef } from '@tanstack/react-table';
|
||||
import { Server } from '@/types/server';
|
||||
import { Link } from '@inertiajs/react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { EyeIcon } from 'lucide-react';
|
||||
import ServerStatus from '@/pages/servers/components/status';
|
||||
import DateTime from '@/components/date-time';
|
||||
|
||||
export const columns: ColumnDef<Server>[] = [
|
||||
{
|
||||
@ -27,6 +26,15 @@ export const columns: ColumnDef<Server>[] = [
|
||||
enableColumnFilter: true,
|
||||
enableSorting: true,
|
||||
},
|
||||
{
|
||||
accessorKey: 'created_at',
|
||||
header: 'Created at',
|
||||
enableColumnFilter: true,
|
||||
enableSorting: true,
|
||||
cell: ({ row }) => {
|
||||
return <DateTime date={row.original.created_at} />;
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: 'status',
|
||||
header: 'Status',
|
||||
@ -43,7 +51,7 @@ export const columns: ColumnDef<Server>[] = [
|
||||
cell: ({ row }) => {
|
||||
return (
|
||||
<div className="flex items-center justify-end">
|
||||
<Link href={route('servers.show', { server: row.original.id })}>
|
||||
<Link href={route('servers.show', { server: row.original.id })} prefetch>
|
||||
<Button variant="outline" size="sm">
|
||||
<EyeIcon />
|
||||
</Button>
|
||||
|
@ -37,7 +37,7 @@ export default function DeleteServer({ server, children }: { server: Server; chi
|
||||
<DialogDescription>Delete server and its resources.</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<Form id="delete-server-form" onSubmit={submit}>
|
||||
<Form id="delete-server-form" onSubmit={submit} className="p-4">
|
||||
<FormFields>
|
||||
<FormField>
|
||||
<Label htmlFor="server-name">Name</Label>
|
||||
@ -49,7 +49,7 @@ export default function DeleteServer({ server, children }: { server: Server; chi
|
||||
|
||||
<DialogFooter className="gap-2">
|
||||
<DialogClose asChild>
|
||||
<Button variant="secondary">Cancel</Button>
|
||||
<Button variant="outline">Cancel</Button>
|
||||
</DialogClose>
|
||||
|
||||
<Button form="delete-server-form" variant="destructive" disabled={form.processing}>
|
||||
|
@ -9,7 +9,7 @@ export default function ServerHeader({ server }: { server: Server }) {
|
||||
return (
|
||||
<div className="flex items-center justify-between border-b px-4 py-2">
|
||||
<div className="space-y-2">
|
||||
<div className="text-accent-foreground/50 flex items-center space-x-2 text-xs">
|
||||
<div className="flex items-center space-x-2 text-xs">
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<div className="flex items-center space-x-1">
|
||||
|
Reference in New Issue
Block a user