mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
reductant assignments fix + extracted operation into independent statement
This commit is contained in:
@@ -95,30 +95,15 @@ app.whenReady().then(async () => {
|
||||
y2 = "100%";
|
||||
|
||||
if (direction === "to right") {
|
||||
// x1 = "0%"; // Already set to default value
|
||||
// y1 = "0%"; // Already set to default value
|
||||
x2 = "100%";
|
||||
y2 = "0%";
|
||||
} else if (direction === "to bottom") {
|
||||
// x1 = "0%"; // Already set to default value
|
||||
// y1 = "0%"; // Already set to default value
|
||||
x2 = "0%";
|
||||
y2 = "100%";
|
||||
} else if (direction === "45deg") {
|
||||
// x1 = "0%"; // Already set to default value
|
||||
y1 = "100%";
|
||||
x2 = "100%";
|
||||
y2 = "0%";
|
||||
} else if (direction === "135deg") {
|
||||
// x1 = "0%"; // Already set to default value
|
||||
// y1 = "0%"; // Already set to default value
|
||||
x2 = "100%";
|
||||
// y2 = "100%"; // Already set to default value
|
||||
} else if (direction === "225deg") {
|
||||
x1 = "100%";
|
||||
// y1 = "0%"; // Already set to default value
|
||||
x2 = "0%";
|
||||
// y2 = "100%"; // Already set to default value
|
||||
} else if (direction === "315deg") {
|
||||
x1 = "100%";
|
||||
y1 = "100%";
|
||||
|
||||
@@ -22,6 +22,14 @@ export function SidebarGameItem({
|
||||
? game.libraryImageUrl || game.iconUrl
|
||||
: game.customIconUrl || game.iconUrl;
|
||||
|
||||
// Determine fallback icon based on game type
|
||||
const getFallbackIcon = () => {
|
||||
if (isCustomGame) {
|
||||
return <PlayLogo className="sidebar__game-icon" />;
|
||||
}
|
||||
return <SteamLogo className="sidebar__game-icon" />;
|
||||
};
|
||||
|
||||
return (
|
||||
<li
|
||||
key={game.id}
|
||||
@@ -43,10 +51,8 @@ export function SidebarGameItem({
|
||||
alt={game.title}
|
||||
loading="lazy"
|
||||
/>
|
||||
) : isCustomGame ? (
|
||||
<PlayLogo className="sidebar__game-icon" />
|
||||
) : (
|
||||
<SteamLogo className="sidebar__game-icon" />
|
||||
getFallbackIcon()
|
||||
)}
|
||||
|
||||
<span className="sidebar__menu-item-button-label">
|
||||
|
||||
Reference in New Issue
Block a user