From b229d94a8da7b258f1b49867e8cee225d5feb735 Mon Sep 17 00:00:00 2001
From: vracto
Date: Wed, 30 Jul 2025 16:56:10 -0500
Subject: add forward and backward buttons to non-fullscreen view (#495)
* feat: create external tools section (#493)
* feat: create external tools section
* fix: better wording
* add forward and backward buttons to non-fullscreen
---------
Co-authored-by: Dominik K.
Co-authored-by: Maze Winther
---
apps/web/src/components/editor/preview-panel.tsx | 60 +++++++++++++++++++-----
apps/web/src/components/icons.tsx | 50 ++++++++++++++++++++
2 files changed, 97 insertions(+), 13 deletions(-)
(limited to 'apps/web/src/components')
diff --git a/apps/web/src/components/editor/preview-panel.tsx b/apps/web/src/components/editor/preview-panel.tsx
index 4cc35bb5..39c6795f 100644
--- a/apps/web/src/components/editor/preview-panel.tsx
+++ b/apps/web/src/components/editor/preview-panel.tsx
@@ -826,6 +826,18 @@ function PreviewToolbar({
setCanvasSizeToOriginal(aspectRatio);
};
+ const totalDuration = getTotalDuration();
+
+ const skipBackward = () => {
+ const newTime = Math.max(0, currentTime - 1);
+ setCurrentTime(newTime);
+ };
+
+ const skipForward = () => {
+ const newTime = Math.min(totalDuration, currentTime + 1);
+ setCurrentTime(newTime);
+ };
+
if (isExpanded) {
return (
-
+
+
+
+
+
diff --git a/apps/web/src/components/icons.tsx b/apps/web/src/components/icons.tsx
index 6099c052..43f953e8 100644
--- a/apps/web/src/components/icons.tsx
+++ b/apps/web/src/components/icons.tsx
@@ -113,3 +113,53 @@ export function BackgroundIcon({ className }: { className?: string }) {
);
}
+
+export function MarbleIcon({
+ className = "",
+ size = 32,
+}: {
+ className?: string;
+ size?: number;
+}) {
+ return (
+
+ );
+}
+
+export function DataBuddyIcon({
+ className = "",
+ size = 32,
+}: {
+ className?: string;
+ size?: number;
+}) {
+ return (
+
+ );
+}
--
cgit v1.3.1