From 3385c033b7d9133574ca09018e8a1b5c767c0183 Mon Sep 17 00:00:00 2001 From: Pontus Abrahamsson Date: Sat, 2 Dec 2023 19:02:02 +0100 Subject: [PATCH] Actions --- .github/workflows/preview-dashboard.yaml | 2 +- .github/workflows/preview-website.yml | 2 +- .github/workflows/production-dashboard.yml | 2 +- .github/workflows/production-website.yml | 2 +- .../tables/vault/data-table-row.tsx | 103 +++++++++++++++++- apps/dashboard/src/components/user-menu.tsx | 1 - 6 files changed, 106 insertions(+), 6 deletions(-) diff --git a/.github/workflows/preview-dashboard.yaml b/.github/workflows/preview-dashboard.yaml index c44d60a138..f28c500b29 100644 --- a/.github/workflows/preview-dashboard.yaml +++ b/.github/workflows/preview-dashboard.yaml @@ -20,7 +20,7 @@ jobs: uses: rlespinasse/github-slug-action@v4 - uses: oven-sh/setup-bun@v1 with: - bun-version: "1.0.14" + bun-version: "1.0.15" - name: Install dependencies run: bun install --frozen-lockfile - name: 📤 Pull Vercel Environment Information diff --git a/.github/workflows/preview-website.yml b/.github/workflows/preview-website.yml index 1580c4de1e..fc9c848594 100644 --- a/.github/workflows/preview-website.yml +++ b/.github/workflows/preview-website.yml @@ -20,7 +20,7 @@ jobs: uses: rlespinasse/github-slug-action@v4 - uses: oven-sh/setup-bun@v1 with: - bun-version: "1.0.14" + bun-version: "1.0.15" - name: Install dependencies run: bun install --frozen-lockfile - name: 📤 Pull Vercel Environment Information diff --git a/.github/workflows/production-dashboard.yml b/.github/workflows/production-dashboard.yml index a59745c26f..fb7102cfc6 100644 --- a/.github/workflows/production-dashboard.yml +++ b/.github/workflows/production-dashboard.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 with: - bun-version: "1.0.14" + bun-version: "1.0.15" - name: Install dependencies run: bun install --frozen-lockfile - name: 📤 Pull Vercel Environment Information diff --git a/.github/workflows/production-website.yml b/.github/workflows/production-website.yml index a98277b2f6..65b799b994 100644 --- a/.github/workflows/production-website.yml +++ b/.github/workflows/production-website.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 with: - bun-version: "1.0.14" + bun-version: "1.0.15" - name: Install dependencies run: bun install --frozen-lockfile - name: 📤 Pull Vercel Environment Information diff --git a/apps/dashboard/src/components/tables/vault/data-table-row.tsx b/apps/dashboard/src/components/tables/vault/data-table-row.tsx index c8e57e661b..22d17101f6 100644 --- a/apps/dashboard/src/components/tables/vault/data-table-row.tsx +++ b/apps/dashboard/src/components/tables/vault/data-table-row.tsx @@ -26,6 +26,20 @@ import { ContextMenuSubTrigger, ContextMenuTrigger, } from "@midday/ui/context-menu"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuPortal, + DropdownMenuSeparator, + DropdownMenuShortcut, + DropdownMenuSub, + DropdownMenuSubContent, + DropdownMenuSubTrigger, + DropdownMenuTrigger, +} from "@midday/ui/dropdown-menu"; +import { Icons } from "@midday/ui/icons"; import { TableCell, TableRow } from "@midday/ui/table"; import { useToast } from "@midday/ui/use-toast"; import { format } from "date-fns"; @@ -132,7 +146,94 @@ export function DataTableRow({ data, addOptimisticData }) { {data?.created_at ? format(new Date(data.created_at), "Pp") : "-"} - {data?.updated_at ? format(new Date(data.updated_at), "Pp") : "-"} +
+ + {data?.updated_at + ? format(new Date(data.updated_at), "Pp") + : "-"} + + + + + + + {!data.isFolder && ( + + + Share URL + + + + + shareFile.execute({ + filepath, + expireIn: ms("1 week"), + }) + } + > + Expire in 1 week + + + shareFile.execute({ + filepath, + expireIn: ms("1 month"), + }) + } + > + Expire in 1 month + + + shareFile.execute({ + filepath, + expireIn: ms("1 year"), + }) + } + > + Expire in 1 year + + + + + )} + + {!disableActions && !isDefaultFolder && ( + Rename + )} + + {data.isFolder ? ( + + Download + + ) : ( + + Download + + )} + + {!disableActions && !isDefaultFolder && ( + + Delete + + )} + {/* Settings */} + + +
diff --git a/apps/dashboard/src/components/user-menu.tsx b/apps/dashboard/src/components/user-menu.tsx index 722bc35b2c..a90b984d54 100644 --- a/apps/dashboard/src/components/user-menu.tsx +++ b/apps/dashboard/src/components/user-menu.tsx @@ -19,7 +19,6 @@ export async function UserMenu() { return ( <> - {" "}