Clicking ctrl to open in new window

This commit is contained in:
Dustin Brett 2024-02-14 20:50:49 -08:00
parent 6dc587a43b
commit c353d76772

View File

@ -409,7 +409,13 @@ const Browser: FC<ComponentProcessProps> = ({ id }) => {
{bookmarks.map(({ name, icon, url: bookmarkUrl }) => ( {bookmarks.map(({ name, icon, url: bookmarkUrl }) => (
<Button <Button
key={name} key={name}
onClick={() => goToLink(bookmarkUrl)} onClick={({ ctrlKey }) => {
if (ctrlKey) {
open("Browser", { url: bookmarkUrl });
} else {
goToLink(bookmarkUrl);
}
}}
{...label( {...label(
`${name}\n${bookmarkUrl `${name}\n${bookmarkUrl
.replace(/^http:\/\//, "") .replace(/^http:\/\//, "")