+
{
// Ctrl (Win/Linux) or Cmd (Mac) + Click opens metadata
if (e.ctrlKey || e.metaKey) {
@@ -405,14 +561,21 @@ export function DocumentsTableShell({
{columnVisibility.created_by && doc.created_by_name && (
-
+
{doc.created_by_name}
)}
{columnVisibility.created_at && (
-
- {formatDate(doc.created_at)}
-
+
+
+
+ {formatRelativeDate(doc.created_at)}
+
+
+
+ {formatAbsoluteDate(doc.created_at)}
+
+
)}
diff --git a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx
index cc6ed3fe8..3fd4dcac8 100644
--- a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx
+++ b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx
@@ -1,7 +1,6 @@
"use client";
import { MoreHorizontal, Pencil, Trash2 } from "lucide-react";
-import { motion } from "motion/react";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { toast } from "sonner";
@@ -21,7 +20,6 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
-import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import type { Document } from "./types";
// Only FILE and NOTE document types can be edited
@@ -74,88 +72,93 @@ export function RowActions({
};
return (
-
+ <>
{/* Desktop Actions */}
-
- {isEditable && (
-
-
-
-
-
-
-
- Edit Document
-
-
- )}
-
- {isDeletable && (
-
-
-
-
-
-
-
- Delete
-
-
- )}
-
-
- {/* Mobile Actions Dropdown */}
-
-
-
-
-
-
- {isEditable && (
+
+ {isEditable ? (
+ // Editable documents: show 3-dot dropdown with edit + delete
+
+
+
+
+
Edit
- )}
- {isDeletable && (
- setIsDeleteOpen(true)}
- className="text-destructive focus:text-destructive"
- >
-
- Delete
+ {isDeletable && (
+ setIsDeleteOpen(true)}
+ className="text-destructive focus:text-destructive"
+ >
+
+ Delete
+
+ )}
+
+
+ ) : (
+ // Non-editable documents: show only delete button directly
+ isDeletable && (
+
+ )
+ )}
+
+
+ {/* Mobile Actions Dropdown */}
+
+ {isEditable ? (
+ // Editable documents: show 3-dot dropdown
+
+
+
+
+
+
+
+ Edit
- )}
-
-
+ {isDeletable && (
+
setIsDeleteOpen(true)}
+ className="text-destructive focus:text-destructive"
+ >
+
+ Delete
+
+ )}
+
+
+ ) : (
+ // Non-editable documents: show only delete button directly
+ isDeletable && (
+
+ )
+ )}
@@ -178,6 +181,6 @@ export function RowActions({
-
+ >
);
}