mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-03-28 08:15:55 +00:00
notification fixes
This commit is contained in:
parent
81959f6883
commit
cf9bea2954
@ -194,7 +194,7 @@ export const DesktopHeader = ({
|
|||||||
height={25}
|
height={25}
|
||||||
width={20}
|
width={20}
|
||||||
color={
|
color={
|
||||||
hasUnreadAnnouncements
|
isUnread
|
||||||
? "var(--unread)"
|
? "var(--unread)"
|
||||||
: isAnnouncement
|
: isAnnouncement
|
||||||
? "black"
|
? "black"
|
||||||
@ -219,7 +219,7 @@ export const DesktopHeader = ({
|
|||||||
height={25}
|
height={25}
|
||||||
width={20}
|
width={20}
|
||||||
color={
|
color={
|
||||||
hasUnreadChat
|
isUnreadChat
|
||||||
? "var(--unread)"
|
? "var(--unread)"
|
||||||
: isChat
|
: isChat
|
||||||
? "black"
|
? "black"
|
||||||
|
@ -2411,6 +2411,10 @@ export const Group = ({
|
|||||||
setGroupSection={setGroupSection}
|
setGroupSection={setGroupSection}
|
||||||
groupSection={groupSection}
|
groupSection={groupSection}
|
||||||
setOpenManageMembers={setOpenManageMembers}
|
setOpenManageMembers={setOpenManageMembers}
|
||||||
|
goToAnnouncements={goToAnnouncements}
|
||||||
|
goToChat={goToChat}
|
||||||
|
hasUnreadAnnouncements={isUnread}
|
||||||
|
hasUnreadChat={isUnreadChat}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -16,7 +16,7 @@ import { ChatIcon } from "../../assets/Icons/ChatIcon";
|
|||||||
import { ThreadsIcon } from "../../assets/Icons/ThreadsIcon";
|
import { ThreadsIcon } from "../../assets/Icons/ThreadsIcon";
|
||||||
import { MembersIcon } from "../../assets/Icons/MembersIcon";
|
import { MembersIcon } from "../../assets/Icons/MembersIcon";
|
||||||
|
|
||||||
export const GroupMenu = ({ setGroupSection, groupSection, setOpenManageMembers }) => {
|
export const GroupMenu = ({ setGroupSection, groupSection, setOpenManageMembers, goToAnnouncements, goToChat, hasUnreadChat, hasUnreadAnnouncements }) => {
|
||||||
const [anchorEl, setAnchorEl] = useState(null);
|
const [anchorEl, setAnchorEl] = useState(null);
|
||||||
const open = Boolean(anchorEl);
|
const open = Boolean(anchorEl);
|
||||||
|
|
||||||
@ -73,13 +73,13 @@ export const GroupMenu = ({ setGroupSection, groupSection, setOpenManageMembers
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{groupSection === "announcement" &&(
|
{groupSection === "announcement" &&(
|
||||||
<> <NotificationIcon2 /> {" Announcements"}</>
|
<> <NotificationIcon2 color={hasUnreadAnnouncements || hasUnreadChat ? 'var(--unread)' : 'white'} /> {" Announcements"}</>
|
||||||
)}
|
)}
|
||||||
{groupSection === "chat" &&(
|
{groupSection === "chat" &&(
|
||||||
<> <ChatIcon /> {" Hub Chats"}</>
|
<> <ChatIcon color={hasUnreadAnnouncements || hasUnreadChat ? 'var(--unread)' : 'white'} /> {" Hub Chats"}</>
|
||||||
)}
|
)}
|
||||||
{groupSection === "forum" &&(
|
{groupSection === "forum" &&(
|
||||||
<> <ThreadsIcon /> {" Threads"}</>
|
<> <ThreadsIcon color={hasUnreadAnnouncements || hasUnreadChat ? 'var(--unread)' : 'white'} /> {" Threads"}</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
<ArrowDownIcon color="white" />
|
<ArrowDownIcon color="white" />
|
||||||
@ -120,7 +120,7 @@ export const GroupMenu = ({ setGroupSection, groupSection, setOpenManageMembers
|
|||||||
>
|
>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setGroupSection("chat");
|
goToChat()
|
||||||
handleClose();
|
handleClose();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -128,7 +128,7 @@ export const GroupMenu = ({ setGroupSection, groupSection, setOpenManageMembers
|
|||||||
|
|
||||||
minWidth: '24px !important'
|
minWidth: '24px !important'
|
||||||
}}>
|
}}>
|
||||||
<ChatIcon sx={{ color: "#fff" }} />
|
<ChatIcon sx={{ color: hasUnreadChat ? 'var(--unread)' : "#fff" }} />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText sx={{
|
<ListItemText sx={{
|
||||||
"& .MuiTypography-root": {
|
"& .MuiTypography-root": {
|
||||||
@ -139,7 +139,7 @@ export const GroupMenu = ({ setGroupSection, groupSection, setOpenManageMembers
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setGroupSection("announcement");
|
goToAnnouncements()
|
||||||
handleClose();
|
handleClose();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@ -147,7 +147,7 @@ export const GroupMenu = ({ setGroupSection, groupSection, setOpenManageMembers
|
|||||||
|
|
||||||
minWidth: '24px !important'
|
minWidth: '24px !important'
|
||||||
}}>
|
}}>
|
||||||
<NotificationIcon2 sx={{ color: "#fff" }} />
|
<NotificationIcon2 sx={{ color: hasUnreadAnnouncements ? 'var(--unread)' : "#fff" }} />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<ListItemText sx={{
|
<ListItemText sx={{
|
||||||
"& .MuiTypography-root": {
|
"& .MuiTypography-root": {
|
||||||
|
@ -215,6 +215,8 @@ export const decryptSingle = async ({ data64, secretKeyObject, skipDecodeBase64
|
|||||||
// New format: nonce is included in the message (first 32 characters)
|
// New format: nonce is included in the message (first 32 characters)
|
||||||
nonceBase64 = decodeForNumber.slice(10, 42); // First 32 characters for the nonce
|
nonceBase64 = decodeForNumber.slice(10, 42); // First 32 characters for the nonce
|
||||||
encryptedDataBase64 = decodeForNumber.slice(42); // The remaining part is the encrypted data
|
encryptedDataBase64 = decodeForNumber.slice(42); // The remaining part is the encrypted data
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert Base64 strings to Uint8Array
|
// Convert Base64 strings to Uint8Array
|
||||||
|
Loading…
x
Reference in New Issue
Block a user