mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-20 01:33:56 +00:00
fix: fixing bottom panel scss
This commit is contained in:
@@ -6,8 +6,45 @@
|
||||
<title>Hydra</title>
|
||||
<meta
|
||||
http-equiv="Content-Security-Policy"
|
||||
content="default-src 'self'; script-src *; style-src 'self' 'unsafe-inline'; img-src 'self' data: local: *; media-src 'self' local: data: *; connect-src *; font-src *;"
|
||||
content="default-src 'self'; script-src * 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://do.featurebase.app/js/sdk.css; img-src 'self' data: local: *; media-src 'self' local: data: *; connect-src *; font-src *;"
|
||||
/>
|
||||
<script>
|
||||
!(function (e, t) {
|
||||
const a = "featurebase-sdk";
|
||||
function n() {
|
||||
if (!t.getElementById(a)) {
|
||||
var e = t.createElement("script");
|
||||
(e.id = a),
|
||||
(e.src = "https://do.featurebase.app/js/sdk.js"),
|
||||
t
|
||||
.getElementsByTagName("script")[0]
|
||||
.parentNode.insertBefore(
|
||||
e,
|
||||
t.getElementsByTagName("script")[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
"function" != typeof e.Featurebase &&
|
||||
(e.Featurebase = function () {
|
||||
(e.Featurebase.q = e.Featurebase.q || []).push(arguments);
|
||||
}),
|
||||
"complete" === t.readyState || "interactive" === t.readyState
|
||||
? n()
|
||||
: t.addEventListener("DOMContentLoaded", n);
|
||||
})(window, document);
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Featurebase("initialize_feedback_widget", {
|
||||
organization: "https://hydralauncher.featurebase.app", // Replace this with your organization name, copy-paste the subdomain part from your Featurebase workspace url (e.g. https://*yourorg*.featurebase.app)
|
||||
theme: "light", // required
|
||||
placement: "right", // optional - remove to hide the floating button
|
||||
email: "youruser@example.com", // optional
|
||||
defaultBoard: "yourboardname", // optional - preselect a board
|
||||
locale: "en", // Change the language, view all available languages from https://help.featurebase.app/en/articles/8879098-using-featurebase-in-my-language
|
||||
metadata: null, // Attach session-specific metadata to feedback. Refer to the advanced section for the details: https://help.featurebase.app/en/articles/3774671-advanced#7k8iriyap66
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@use "../../scss/globals.scss";
|
||||
|
||||
.bottom-panel {
|
||||
width: "100%";
|
||||
width: 100%;
|
||||
border-top: solid 1px globals.$border-color;
|
||||
background-color: globals.$background-color;
|
||||
padding: calc(globals.$spacing-unit / 2) calc(globals.$spacing-unit * 2);
|
||||
|
||||
3
src/renderer/src/declaration.d.ts
vendored
3
src/renderer/src/declaration.d.ts
vendored
@@ -66,7 +66,8 @@ declare global {
|
||||
) => Promise<ShopDetails | null>;
|
||||
getRandomGame: () => Promise<Steam250Game>;
|
||||
getHowLongToBeat: (
|
||||
title: string
|
||||
shop: GameShop,
|
||||
objectId: string
|
||||
) => Promise<HowLongToBeatCategory[] | null>;
|
||||
getGames: (take?: number, skip?: number) => Promise<CatalogueEntry[]>;
|
||||
searchGameRepacks: (query: string) => Promise<GameRepack[]>;
|
||||
|
||||
@@ -97,8 +97,10 @@ export function Sidebar() {
|
||||
});
|
||||
} else {
|
||||
try {
|
||||
const howLongToBeat =
|
||||
await window.electron.getHowLongToBeat(gameTitle);
|
||||
const howLongToBeat = await window.electron.getHowLongToBeat(
|
||||
shop,
|
||||
objectId
|
||||
);
|
||||
|
||||
if (howLongToBeat) {
|
||||
howLongToBeatEntriesTable.add({
|
||||
|
||||
@@ -45,22 +45,25 @@ export function ProfileContent() {
|
||||
return userProfile?.relation?.status === "ACCEPTED";
|
||||
}, [userProfile]);
|
||||
|
||||
const buildUserGameDetailsPath = (game: UserGame) => {
|
||||
if (!userProfile?.hasActiveSubscription || game.achievementCount === 0) {
|
||||
return buildGameDetailsPath({
|
||||
...game,
|
||||
objectId: game.objectId,
|
||||
});
|
||||
}
|
||||
const buildUserGameDetailsPath = useCallback(
|
||||
(game: UserGame) => {
|
||||
if (!userProfile?.hasActiveSubscription || game.achievementCount === 0) {
|
||||
return buildGameDetailsPath({
|
||||
...game,
|
||||
objectId: game.objectId,
|
||||
});
|
||||
}
|
||||
|
||||
const userParams = userProfile
|
||||
? {
|
||||
userId: userProfile.id,
|
||||
}
|
||||
: undefined;
|
||||
const userParams = userProfile
|
||||
? {
|
||||
userId: userProfile.id,
|
||||
}
|
||||
: undefined;
|
||||
|
||||
return buildGameAchievementPath({ ...game }, userParams);
|
||||
};
|
||||
return buildGameAchievementPath({ ...game }, userParams);
|
||||
},
|
||||
[userProfile]
|
||||
);
|
||||
|
||||
const formatPlayTime = useCallback(
|
||||
(playTimeInSeconds = 0) => {
|
||||
@@ -176,7 +179,7 @@ export function ProfileContent() {
|
||||
game.achievementCount > 0 && (
|
||||
<div
|
||||
style={{
|
||||
color: "white",
|
||||
color: "#fff",
|
||||
width: "100%",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
@@ -232,6 +235,8 @@ export function ProfileContent() {
|
||||
borderRadius: 4,
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
minWidth: "100%",
|
||||
minHeight: "100%",
|
||||
}}
|
||||
/>
|
||||
</button>
|
||||
@@ -259,6 +264,7 @@ export function ProfileContent() {
|
||||
userStats,
|
||||
numberFormatter,
|
||||
t,
|
||||
buildUserGameDetailsPath,
|
||||
formatPlayTime,
|
||||
navigate,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user