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