Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): open the preview page in the system browser from the menu #10833

Closedsti0(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/10833/headopened View on GitHub

Showing 3 changed files with 45 additions and 2 deletions.

x
0 of 3 viewed, 3 left
6 additions and 0 deletionsapps/web/src/components/preview/PreviewMoreMenu.tsxModified
View file
@@ -52,6 +52,8 @@
nativePictureInPicture: boolean;
/** Toggles the optional native always-on-top preview window. */
onNativePictureInPicture: () => void;
+ /** Opens the current page in the OS default browser. */
+ onOpenInBrowser: () => void;
/** Environment the tab belongs to; scopes storage clearing to its partitions. */
environmentId: EnvironmentId;
/** Profile the tab was opened under, if the server recorded one. */
@@ -79,6 +81,7 @@
onToggleDeviceToolbar,
nativePictureInPicture,
onNativePictureInPicture,
+ onOpenInBrowser,
environmentId,
profileId,
profileName,
@@ -120,6 +123,9 @@
? "Close separate preview window"
: "Open separate preview window"}
</MenuItem>
+ <MenuItem onClick={onOpenInBrowser} disabled={tabDisabled}>
+ Open in system browser
+ </MenuItem>
<MenuItem onClick={onToggleDeviceToolbar} disabled={tabDisabled}>
{deviceToolbarVisible ? "Hide device toolbar" : "Show device toolbar"}
</MenuItem>