feat: updating title bar z-index

This commit is contained in:
Chubby Granny Chaser 2025-01-06 20:50:09 +00:00 committed by Zamitto
parent 2a3c3eb7b8
commit ce76bc5b6b
5 changed files with 23 additions and 14 deletions

View File

@ -123,7 +123,7 @@ export const titleBar = style({
alignItems: "center", alignItems: "center",
padding: `0 ${SPACING_UNIT * 2}px`, padding: `0 ${SPACING_UNIT * 2}px`,
WebkitAppRegion: "drag", WebkitAppRegion: "drag",
zIndex: "4", zIndex: vars.zIndex.titleBar,
borderBottom: `1px solid ${vars.color.border}`, borderBottom: `1px solid ${vars.color.border}`,
} as ComplexStyleRule); } as ComplexStyleRule);

View File

@ -239,7 +239,7 @@ export function App() {
return ( return (
<> <>
{window.electron.platform === "win32" && ( {/* {window.electron.platform === "win32" && (
<div className={styles.titleBar}> <div className={styles.titleBar}>
<h4> <h4>
Hydra Hydra
@ -248,7 +248,15 @@ export function App() {
)} )}
</h4> </h4>
</div> </div>
)} )} */}
<div className={styles.titleBar}>
<h4>
Hydra
{hasActiveSubscription && (
<span className={styles.cloudText}> Cloud</span>
)}
</h4>
</div>
<Toast <Toast
visible={toast.visible} visible={toast.visible}

View File

@ -130,15 +130,16 @@ export function DownloadGroup({
if (game.progress === 1) { if (game.progress === 1) {
const uploadSpeed = formatBytes(seedingStatus?.uploadSpeed ?? 0); const uploadSpeed = formatBytes(seedingStatus?.uploadSpeed ?? 0);
return game.status === "seeding" && if (game.status === "seeding" && game.downloader === Downloader.Torrent) {
game.downloader === Downloader.Torrent ? ( return (
<> <>
<p>{t("seeding")}</p> <p>{t("seeding")}</p>
{uploadSpeed && <p>{uploadSpeed}/s</p>} {uploadSpeed && <p>{uploadSpeed}/s</p>}
</> </>
) : ( );
<p>{t("completed")}</p> } else {
); return <p>{t("completed")}</p>;
}
} }
if (game.status === "paused") { if (game.status === "paused") {

View File

@ -16,6 +16,6 @@ $spacing-unit: 8px;
$toast-z-index: 5; $toast-z-index: 5;
$bottom-panel-z-index: 3; $bottom-panel-z-index: 3;
$title-bar-z-index: 4; $title-bar-z-index: 1900000001;
$backdrop-z-index: 4; $backdrop-z-index: 4;
$modal-z-index: 5; $modal-z-index: 5;

View File

@ -24,7 +24,7 @@ export const vars = createGlobalTheme(":root", {
zIndex: { zIndex: {
toast: "5", toast: "5",
bottomPanel: "3", bottomPanel: "3",
titleBar: "4", titleBar: "1900000001",
backdrop: "4", backdrop: "4",
}, },
}); });