mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-08 18:33:39 +00:00
fix(windows): hide engine consoles
Disable the native Windows frame at startup and render in-app window controls so packaged builds use Firelink's own titlebar placement instead of the default OS chrome. Apply CREATE_NO_WINDOW to raw child processes used by the aria2 daemon and shared engine version checks. Route ffmpeg and deno checks through the same hidden version-check helper so Settings > Engine does not flash console windows. Normalize Windows extended-length paths before returning approved download roots to the UI, while keeping canonicalization for backend safety checks. Detect yt-dlp's embedded runtime per platform so Windows onedir builds look for python*.dll instead of macOS Python.framework. Verification: npm run build; cargo check --manifest-path src-tauri/Cargo.toml; cargo test --manifest-path src-tauri/Cargo.toml --lib; node --check scripts/smoke-packaged-app.js; Ruby YAML parse for .github/workflows/release.yml; git diff --check.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import { getCurrentWindow } from '@tauri-apps/api/window';
|
||||
import { Minus, Square, X } from 'lucide-react';
|
||||
|
||||
const appWindow = getCurrentWindow();
|
||||
|
||||
export function WindowControls() {
|
||||
return (
|
||||
<div className="window-controls" aria-label="Window controls">
|
||||
<button
|
||||
type="button"
|
||||
className="window-control"
|
||||
title="Minimize"
|
||||
aria-label="Minimize"
|
||||
onClick={() => void appWindow.minimize()}
|
||||
>
|
||||
<Minus size={13} strokeWidth={2.25} />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="window-control"
|
||||
title="Maximize"
|
||||
aria-label="Maximize"
|
||||
onClick={() => void appWindow.toggleMaximize()}
|
||||
>
|
||||
<Square size={11} strokeWidth={2.25} />
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="window-control close"
|
||||
title="Close"
|
||||
aria-label="Close"
|
||||
onClick={() => void appWindow.close()}
|
||||
>
|
||||
<X size={14} strokeWidth={2.25} />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user