mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: refactoring notification window
This commit is contained in:
parent
d5b1bcdc7f
commit
beaa919c80
7 changed files with 17 additions and 15 deletions
|
@ -9,7 +9,7 @@
|
|||
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: local: *; media-src 'self' local: data: *;"
|
||||
/>
|
||||
</head>
|
||||
<body style="background-color: #1c1c1c">
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
|
|
|
@ -35,7 +35,6 @@ globalStyle("body", {
|
|||
userSelect: "none",
|
||||
fontFamily: "Noto Sans, sans-serif",
|
||||
fontSize: vars.size.body,
|
||||
background: vars.color.background,
|
||||
color: vars.color.body,
|
||||
margin: "0",
|
||||
});
|
||||
|
|
|
@ -28,7 +28,7 @@ import {
|
|||
import { store } from "./store";
|
||||
|
||||
import resources from "@locales";
|
||||
import { Achievemnt } from "./pages/achievement/achievement";
|
||||
import { Achievement } from "./pages/achievement/achievement";
|
||||
|
||||
import "./workers";
|
||||
import { RepacksContextProvider } from "./context";
|
||||
|
@ -70,7 +70,7 @@ ReactDOM.createRoot(document.getElementById("root")!).render(
|
|||
<Route path="/settings" Component={Settings} />
|
||||
<Route path="/profile/:userId" Component={Profile} />
|
||||
</Route>
|
||||
<Route path="/achievement-notification" Component={Achievemnt} />
|
||||
<Route path="/achievement-notification" Component={Achievement} />
|
||||
</Routes>
|
||||
</HashRouter>
|
||||
</RepacksContextProvider>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { useEffect, useMemo, useState } from "react";
|
||||
import achievementSound from "@renderer/assets/audio/achievement.wav";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { vars } from "@renderer/theme.css";
|
||||
|
||||
export function Achievemnt() {
|
||||
export function Achievement() {
|
||||
const { t } = useTranslation("achievement");
|
||||
|
||||
const [achievementInfo, setAchievementInfo] = useState<{
|
||||
|
@ -39,7 +40,7 @@ export function Achievemnt() {
|
|||
};
|
||||
}, [audio]);
|
||||
|
||||
if (!achievementInfo) return <p>Nada</p>;
|
||||
if (!achievementInfo) return null;
|
||||
|
||||
return (
|
||||
<div
|
||||
|
@ -48,6 +49,7 @@ export function Achievemnt() {
|
|||
flexDirection: "row",
|
||||
gap: "8px",
|
||||
alignItems: "center",
|
||||
background: vars.color.background,
|
||||
}}
|
||||
>
|
||||
<img
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue