mirror of
https://github.com/HeyPuter/puter.git
synced 2026-10-09 05:12:03 +00:00
Support Cmd/Ctrl+click and adaptive bg color
Update the dashboard app tile click handler so Ctrl/Cmd+click opens apps in a new tab (matching the context menu behavior) while keeping existing target-link/app-name routing. Also switch the default body background to white and add a dark-mode media query to use a dark background color.
This commit is contained in:
1 parent
25410cac92
commit
d87f3464fc
2 files changed
+17
-1
No files matched your search
@@ -365,6 +365,16 @@ const TabApps = {
|
||||
}
|
||||
const appName = $(this).attr('data-app-name');
|
||||
const targetLink = $(this).attr('data-target-link');
|
||||
// Ctrl/Cmd+click opens in a new browser tab, mirroring the
|
||||
// context menu's "Open in new tab" item.
|
||||
if ( e.ctrlKey || e.metaKey ) {
|
||||
if ( targetLink && targetLink !== '' ) {
|
||||
window.open(targetLink, '_blank', 'noopener,noreferrer');
|
||||
} else if ( appName ) {
|
||||
window.open(`/app/${encodeURIComponent(appName)}`, '_blank', 'noopener,noreferrer');
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ( targetLink && targetLink !== '' ) {
|
||||
window.open(targetLink, '_blank', 'noopener,noreferrer');
|
||||
} else if ( appName ) {
|
||||
|
||||
@@ -125,10 +125,16 @@ body {
|
||||
background: no-repeat center center fixed;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
background-color: #3d4c74;
|
||||
background-color: #ffffff;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
}
|
||||
|
||||
.embedded-in-3rd-party-website, .embedded-in-popup {
|
||||
background: none !important;
|
||||
background-color: #ccccccbe !important;
|
||||
|
||||
Reference in new issue
Block a user