mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
Merge branch 'main' into fix/migrate-repacks-from-sqlite-to-dexie
This commit is contained in:
commit
41c80daaaa
24 changed files with 256 additions and 57 deletions
|
@ -311,6 +311,7 @@
|
|||
"report_reason_violence": "Violence",
|
||||
"report_reason_spam": "Spam",
|
||||
"report_reason_other": "Other",
|
||||
"profile_reported": "Profile reported"
|
||||
"profile_reported": "Profile reported",
|
||||
"your_friend_code": "Your friend code:"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -315,6 +315,7 @@
|
|||
"report_reason_violence": "Violência",
|
||||
"report_reason_spam": "Spam",
|
||||
"report_reason_other": "Outro",
|
||||
"profile_reported": "Perfil reportado"
|
||||
"profile_reported": "Perfil reportado",
|
||||
"your_friend_code": "Seu código de amigo:"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -275,6 +275,7 @@
|
|||
"no_pending_invites": "Não tens convites de amizade pendentes",
|
||||
"no_blocked_users": "Não tens nenhum utilizador bloqueado",
|
||||
"friend_code_copied": "Código de amigo copiado",
|
||||
"image_process_failure": "Falha ao processar a imagem"
|
||||
"image_process_failure": "Falha ao processar a imagem",
|
||||
"your_friend_code": "Seu código de amigo:"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ export class WindowManager {
|
|||
});
|
||||
|
||||
authWindow.loadURL(
|
||||
`https://auth.hydralauncher.gg/?${searchParams.toString()}`
|
||||
`${import.meta.env.MAIN_VITE_AUTH_URL}/?${searchParams.toString()}`
|
||||
);
|
||||
|
||||
authWindow.once("ready-to-show", () => {
|
||||
|
|
1
src/main/vite-env.d.ts
vendored
1
src/main/vite-env.d.ts
vendored
|
@ -3,6 +3,7 @@
|
|||
interface ImportMetaEnv {
|
||||
readonly MAIN_VITE_STEAMGRIDDB_API_KEY: string;
|
||||
readonly MAIN_VITE_API_URL: string;
|
||||
readonly MAIN_VITE_AUTH_URL: string;
|
||||
readonly MAIN_VITE_SENTRY_DSN: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import { useAppSelector, useUserDetails } from "@renderer/hooks";
|
|||
import { useEffect, useMemo, useRef } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { UserFriendModalTab } from "@renderer/pages/shared-modals/user-friend-modal";
|
||||
import SteamLogo from "@renderer/assets/steam-logo.svg?react";
|
||||
|
||||
const LONG_POLLING_INTERVAL = 60_000;
|
||||
|
||||
|
@ -68,6 +69,23 @@ export function SidebarProfile() {
|
|||
);
|
||||
}, [userDetails, t, friendRequestCount, showFriendsModal]);
|
||||
|
||||
const gameRunningDetails = () => {
|
||||
if (!userDetails || !gameRunning) return null;
|
||||
|
||||
if (gameRunning.iconUrl) {
|
||||
return (
|
||||
<img
|
||||
alt={gameRunning.title}
|
||||
width={24}
|
||||
style={{ borderRadius: 4 }}
|
||||
src={gameRunning.iconUrl}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return <SteamLogo />;
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles.profileContainer}>
|
||||
<button
|
||||
|
@ -108,14 +126,7 @@ export function SidebarProfile() {
|
|||
)}
|
||||
</div>
|
||||
|
||||
{userDetails && gameRunning && (
|
||||
<img
|
||||
alt={gameRunning.title}
|
||||
width={24}
|
||||
style={{ borderRadius: 4 }}
|
||||
src={gameRunning.iconUrl!}
|
||||
/>
|
||||
)}
|
||||
{gameRunningDetails()}
|
||||
</div>
|
||||
</button>
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ export const UserFriendModal = ({
|
|||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<p>Seu código de amigo: </p>
|
||||
<p>{t("your_friend_code")}</p>
|
||||
<button
|
||||
className={styles.friendCodeButton}
|
||||
onClick={copyToClipboard}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue