Skip to content

Commit

Permalink
Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Dec 2, 2023
1 parent 2153718 commit 3385c03
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/preview-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/production-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/production-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
103 changes: 102 additions & 1 deletion apps/dashboard/src/components/tables/vault/data-table-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -132,7 +146,94 @@ export function DataTableRow({ data, addOptimisticData }) {
{data?.created_at ? format(new Date(data.created_at), "Pp") : "-"}
</TableCell>
<TableCell>
{data?.updated_at ? format(new Date(data.updated_at), "Pp") : "-"}
<div className="flex justify-between">
<span>
{data?.updated_at
? format(new Date(data.updated_at), "Pp")
: "-"}
</span>
<DropdownMenu>
<DropdownMenuTrigger>
<Icons.MoreHoriz />
</DropdownMenuTrigger>
<DropdownMenuContent
className="w-56"
sideOffset={10}
align="end"
>
{!data.isFolder && (
<DropdownMenuSub>
<DropdownMenuSubTrigger>
Share URL
</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent>
<DropdownMenuItem
onClick={() =>
shareFile.execute({
filepath,
expireIn: ms("1 week"),
})
}
>
Expire in 1 week
</DropdownMenuItem>
<DropdownMenuItem
onClick={() =>
shareFile.execute({
filepath,
expireIn: ms("1 month"),
})
}
>
Expire in 1 month
</DropdownMenuItem>
<DropdownMenuItem
onClick={() =>
shareFile.execute({
filepath,
expireIn: ms("1 year"),
})
}
>
Expire in 1 year
</DropdownMenuItem>
</DropdownMenuSubContent>
</DropdownMenuPortal>
</DropdownMenuSub>
)}

{!disableActions && !isDefaultFolder && (
<DropdownMenuItem>Rename</DropdownMenuItem>
)}
<DropdownMenuItem>
{data.isFolder ? (
<a
href={`/api/download/zip?path=${folderPath}&filename=${data.name}`}
download
className="truncate"
>
Download
</a>
) : (
<a
href={`/api/download/file?path=${folderPath}&filename=${data.name}`}
download
className="truncate"
>
Download
</a>
)}
</DropdownMenuItem>
{!disableActions && !isDefaultFolder && (
<AlertDialogTrigger asChild>
<DropdownMenuItem>Delete</DropdownMenuItem>
</AlertDialogTrigger>
)}
{/* <DropdownMenuItem>Settings</DropdownMenuItem> */}
</DropdownMenuContent>
</DropdownMenu>
</div>
</TableCell>
</TableRow>
</ContextMenuTrigger>
Expand Down
1 change: 0 additions & 1 deletion apps/dashboard/src/components/user-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export async function UserMenu() {

return (
<>
{" "}
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Avatar className="rounded-full w-8 h-8">
Expand Down

0 comments on commit 3385c03

Please sign in to comment.