mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-27 04:41:03 +00:00
Compare commits
11 Commits
feat/disab
...
feat/LBX-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96b12cb27e | ||
|
|
a01e1b1709 | ||
|
|
60fd90820c | ||
|
|
798f88618e | ||
|
|
40795c34dc | ||
|
|
e335e05628 | ||
|
|
05464f25df | ||
|
|
b9830afca1 | ||
|
|
1cab73bcb4 | ||
|
|
387b3ebeac | ||
|
|
1545f42d17 |
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
[](https://github.com/hydralauncher/hydra/actions)
|
[](https://github.com/hydralauncher/hydra/actions)
|
||||||
[](https://github.com/hydralauncher/hydra/releases)
|
[](https://github.com/hydralauncher/hydra/releases)
|
||||||
|
[](https://community.chocolatey.org/packages/hydralauncher)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
transition: all ease 0.2s;
|
transition: all ease 0.2s;
|
||||||
position: relative;
|
position: relative;
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgba(255, 255, 255, 0.03);
|
background-color: rgba(255, 255, 255, 0.03);
|
||||||
@@ -40,12 +42,17 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: globals.$background-color;
|
background-color: globals.$background-color;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__badge-picture {
|
&__badge-picture {
|
||||||
|
|||||||
@@ -130,6 +130,32 @@ export default function Notifications() {
|
|||||||
return () => unsubscribe();
|
return () => unsubscribe();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const unsubscribe = window.electron.onSyncNotificationCount(() => {
|
||||||
|
if (userDetails) {
|
||||||
|
fetchApiNotifications(0, false);
|
||||||
|
}
|
||||||
|
fetchLocalNotifications();
|
||||||
|
});
|
||||||
|
|
||||||
|
return () => unsubscribe();
|
||||||
|
}, [userDetails, fetchApiNotifications, fetchLocalNotifications]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const handleVisibilityChange = () => {
|
||||||
|
if (!document.hidden && userDetails) {
|
||||||
|
fetchApiNotifications(0, false);
|
||||||
|
fetchLocalNotifications();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
document.addEventListener("visibilitychange", handleVisibilityChange);
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
||||||
|
};
|
||||||
|
}, [userDetails, fetchApiNotifications, fetchLocalNotifications]);
|
||||||
|
|
||||||
const mergedNotifications = useMemo<MergedNotification[]>(() => {
|
const mergedNotifications = useMemo<MergedNotification[]>(() => {
|
||||||
const sortByDate = (a: MergedNotification, b: MergedNotification) =>
|
const sortByDate = (a: MergedNotification, b: MergedNotification) =>
|
||||||
new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime();
|
new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime();
|
||||||
|
|||||||
@@ -116,5 +116,6 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user