= ({
draggable={false}
onMouseDown={handleMouseDown}
onMouseUp={handleMouseUp}
+ onMouseEnter={() => setIsHovered(true)}
onMouseLeave={handleMouseLeave}
>
{
@@ -413,128 +485,12 @@ const PageThumbnail: React.FC
= ({
{page.pageNumber}
- e.stopPropagation()}
- onMouseUp={(e) => e.stopPropagation()}
- onClick={(e) => e.stopPropagation()}
- >
-
- {
- e.stopPropagation();
- if (index > 0 && !movingPage && !isAnimating) {
- onSetMovingPage(page.pageNumber);
- // Actually move the page left (swap with previous page)
- onReorderPages(page.pageNumber, index - 1);
- setTimeout(() => onSetMovingPage(null), 650);
- onSetStatus(`Moved page ${page.pageNumber} left`);
- }
- }}
- >
-
-
-
-
-
- {
- e.stopPropagation();
- if (index < totalPages - 1 && !movingPage && !isAnimating) {
- onSetMovingPage(page.pageNumber);
- // Actually move the page right (swap with next page)
- onReorderPages(page.pageNumber, index + 1);
- setTimeout(() => onSetMovingPage(null), 650);
- onSetStatus(`Moved page ${page.pageNumber} right`);
- }
- }}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {index < totalPages - 1 && (
-
-
-
-
-
- )}
-
-
-
-
-
-
-
+ />
diff --git a/frontend/src/components/shared/HoverActionMenu.module.css b/frontend/src/components/shared/HoverActionMenu.module.css
new file mode 100644
index 000000000..27974f152
--- /dev/null
+++ b/frontend/src/components/shared/HoverActionMenu.module.css
@@ -0,0 +1,28 @@
+/* Base Hover Menu */
+.hoverMenu {
+ position: absolute;
+ left: 50%;
+ transform: translateX(-50%);
+ display: flex;
+ gap: 8px;
+ align-items: center;
+ background: var(--bg-toolbar);
+ border: 1px solid var(--border-default);
+ padding: 6px 12px;
+ border-radius: 20px;
+ box-shadow: var(--shadow-md);
+ z-index: 30;
+ white-space: nowrap;
+ pointer-events: auto;
+ transition: opacity 0.2s ease-in-out;
+}
+
+/* Inside positioning (Page Editor style) - within container */
+.inside {
+ bottom: 8px;
+}
+
+/* Outside positioning (File Editor style) - below container */
+.outside {
+ bottom: -8px;
+}
diff --git a/frontend/src/components/shared/HoverActionMenu.tsx b/frontend/src/components/shared/HoverActionMenu.tsx
new file mode 100644
index 000000000..1c55f5f0a
--- /dev/null
+++ b/frontend/src/components/shared/HoverActionMenu.tsx
@@ -0,0 +1,60 @@
+import React from 'react';
+import { ActionIcon, Tooltip } from '@mantine/core';
+import styles from './HoverActionMenu.module.css';
+
+export interface HoverAction {
+ id: string;
+ icon: React.ReactNode;
+ label: string;
+ onClick: (e: React.MouseEvent) => void;
+ disabled?: boolean;
+ color?: string;
+ hidden?: boolean;
+}
+
+interface HoverActionMenuProps {
+ show: boolean;
+ actions: HoverAction[];
+ position?: 'inside' | 'outside';
+ className?: string;
+}
+
+const HoverActionMenu: React.FC