feat: cross-platform titlebar, video transfers and client cleanup
Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped
Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped
Adds frameless-window controls for Windows/Linux (native traffic lights on macOS), keeps transfers at the current position for video, lets the video player use the same sync/device controls as the media bar, and removes dead code plus assorted UI/perf issues.
This commit is contained in:
1 parent
4bdd0139bf
commit
6675a55957
26 files changed
+561
-316
No files matched your search
@@ -0,0 +1,40 @@
|
||||
import { useLocation } from "@tanstack/react-router";
|
||||
import React, { useEffect } from "react";
|
||||
import { shouldShowAppBar } from "@/components/appBar/appBar";
|
||||
import WindowControls from ".";
|
||||
|
||||
import "./windowControls.scss";
|
||||
|
||||
const isMac = navigator.userAgent.includes("Macintosh");
|
||||
|
||||
const WindowChromeContent = () => {
|
||||
useEffect(() => {
|
||||
document.body.classList.add("has-window-chrome");
|
||||
return () => document.body.classList.remove("has-window-chrome");
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="window-chrome">
|
||||
<div className="window-chrome-drag" data-tauri-drag-region />
|
||||
<div className="window-chrome-controls">
|
||||
<WindowControls />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Frameless-window fallback for pages that do not draw the app header:
|
||||
* a small drag strip plus the window buttons in the top-right corner.
|
||||
*/
|
||||
const WindowChrome = () => {
|
||||
const { pathname } = useLocation();
|
||||
if (isMac) return null;
|
||||
if (pathname === "/home" || shouldShowAppBar(pathname)) return null;
|
||||
// The video player has its own fullscreen UI.
|
||||
if (pathname.startsWith("/player")) return null;
|
||||
|
||||
return <WindowChromeContent />;
|
||||
};
|
||||
|
||||
export default WindowChrome;
|
||||
Reference in new issue
Block a user