mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-02-12 02:05:49 +00:00
mobile friendly
This commit is contained in:
parent
9cb1a977e0
commit
99f2ae1885
@ -23,7 +23,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
|||||||
}));
|
}));
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
chrome.runtime.sendMessage({ action: "userInfo" }, (response) => {
|
chrome?.runtime?.sendMessage({ action: "userInfo" }, (response) => {
|
||||||
if (response.error) {
|
if (response.error) {
|
||||||
document.dispatchEvent(new CustomEvent('qortalExtensionResponses', {
|
document.dispatchEvent(new CustomEvent('qortalExtensionResponses', {
|
||||||
detail: { type: "USER_INFO", data: {
|
detail: { type: "USER_INFO", data: {
|
||||||
@ -38,7 +38,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (type === 'REQUEST_IS_INSTALLED') {
|
} else if (type === 'REQUEST_IS_INSTALLED') {
|
||||||
chrome.runtime.sendMessage({ action: "version" }, (response) => {
|
chrome?.runtime?.sendMessage({ action: "version" }, (response) => {
|
||||||
if (response.error) {
|
if (response.error) {
|
||||||
console.error("Error:", response.error);
|
console.error("Error:", response.error);
|
||||||
} else {
|
} else {
|
||||||
@ -51,7 +51,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
|||||||
} else if (type === 'REQUEST_CONNECTION') {
|
} else if (type === 'REQUEST_CONNECTION') {
|
||||||
console.log('REQUEST_CONNECTION')
|
console.log('REQUEST_CONNECTION')
|
||||||
const hostname = window.location.hostname
|
const hostname = window.location.hostname
|
||||||
chrome.runtime.sendMessage({ action: "connection", payload: {
|
chrome?.runtime?.sendMessage({ action: "connection", payload: {
|
||||||
hostname
|
hostname
|
||||||
}, timeout }, (response) => {
|
}, timeout }, (response) => {
|
||||||
if (response.error) {
|
if (response.error) {
|
||||||
@ -75,7 +75,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
chrome.runtime.sendMessage({ action: "oauth", payload: {
|
chrome?.runtime?.sendMessage({ action: "oauth", payload: {
|
||||||
nodeBaseUrl: payload.nodeBaseUrl,
|
nodeBaseUrl: payload.nodeBaseUrl,
|
||||||
senderAddress: payload.senderAddress,
|
senderAddress: payload.senderAddress,
|
||||||
senderPublicKey: payload.senderPublicKey, timestamp: payload.timestamp
|
senderPublicKey: payload.senderPublicKey, timestamp: payload.timestamp
|
||||||
@ -105,7 +105,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
chrome.runtime.sendMessage({ action: "buyOrder", payload: {
|
chrome?.runtime?.sendMessage({ action: "buyOrder", payload: {
|
||||||
qortalAtAddress: payload.qortalAtAddress,
|
qortalAtAddress: payload.qortalAtAddress,
|
||||||
hostname
|
hostname
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
|||||||
}));
|
}));
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
chrome.runtime.sendMessage({ action: "ltcBalance", payload: {
|
chrome?.runtime?.sendMessage({ action: "ltcBalance", payload: {
|
||||||
hostname
|
hostname
|
||||||
}, timeout }, (response) => {
|
}, timeout }, (response) => {
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
|||||||
}));
|
}));
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
chrome.runtime.sendMessage({ action: "authentication", payload: {
|
chrome?.runtime?.sendMessage({ action: "authentication", payload: {
|
||||||
hostname
|
hostname
|
||||||
}, timeout }, (response) => {
|
}, timeout }, (response) => {
|
||||||
if (response.error) {
|
if (response.error) {
|
||||||
@ -191,7 +191,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
|||||||
}));
|
}));
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
chrome.runtime.sendMessage({ action: "sendQort", payload: {
|
chrome?.runtime?.sendMessage({ action: "sendQort", payload: {
|
||||||
hostname,
|
hostname,
|
||||||
amount: payload.amount,
|
amount: payload.amount,
|
||||||
description: payload.description,
|
description: payload.description,
|
||||||
@ -221,7 +221,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
|||||||
}));
|
}));
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
chrome.runtime.sendMessage({ action: "closePopup" }, (response) => {
|
chrome?.runtime?.sendMessage({ action: "closePopup" }, (response) => {
|
||||||
if (response.error) {
|
if (response.error) {
|
||||||
|
|
||||||
document.dispatchEvent(new CustomEvent('qortalExtensionResponses', {
|
document.dispatchEvent(new CustomEvent('qortalExtensionResponses', {
|
||||||
@ -241,7 +241,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
|
chrome.runtime?.onMessage.addListener(function(message, sender, sendResponse) {
|
||||||
if (message.type === "LOGOUT") {
|
if (message.type === "LOGOUT") {
|
||||||
// Notify the web page
|
// Notify the web page
|
||||||
window.postMessage({
|
window.postMessage({
|
||||||
|
551
src/App.tsx
551
src/App.tsx
@ -41,6 +41,8 @@ import Logout from "./assets/svgs/Logout.svg";
|
|||||||
import Return from "./assets/svgs/Return.svg";
|
import Return from "./assets/svgs/Return.svg";
|
||||||
import Success from "./assets/svgs/Success.svg";
|
import Success from "./assets/svgs/Success.svg";
|
||||||
import Info from "./assets/svgs/Info.svg";
|
import Info from "./assets/svgs/Info.svg";
|
||||||
|
import CloseIcon from '@mui/icons-material/Close';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
createAccount,
|
createAccount,
|
||||||
generateRandomSentence,
|
generateRandomSentence,
|
||||||
@ -83,6 +85,7 @@ import {
|
|||||||
import { executeEvent } from "./utils/events";
|
import { executeEvent } from "./utils/events";
|
||||||
import { requestQueueCommentCount, requestQueuePublishedAccouncements } from "./components/Chat/GroupAnnouncements";
|
import { requestQueueCommentCount, requestQueuePublishedAccouncements } from "./components/Chat/GroupAnnouncements";
|
||||||
import { requestQueueGroupJoinRequests } from "./components/Group/GroupJoinRequests";
|
import { requestQueueGroupJoinRequests } from "./components/Group/GroupJoinRequests";
|
||||||
|
import { DrawerComponent } from "./components/Drawer/Drawer";
|
||||||
|
|
||||||
type extStates =
|
type extStates =
|
||||||
| "not-authenticated"
|
| "not-authenticated"
|
||||||
@ -126,6 +129,28 @@ const defaultValues: MyContextInterface = {
|
|||||||
message: "",
|
message: "",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
export let isMobile = false
|
||||||
|
|
||||||
|
const isMobileDevice = () => {
|
||||||
|
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
||||||
|
|
||||||
|
if (/android/i.test(userAgent)) {
|
||||||
|
return true; // Android device
|
||||||
|
}
|
||||||
|
|
||||||
|
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
|
||||||
|
return true; // iOS device
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isMobileDevice()) {
|
||||||
|
isMobile = true
|
||||||
|
console.log("Running on a mobile device");
|
||||||
|
} else {
|
||||||
|
console.log("Running on a desktop");
|
||||||
|
}
|
||||||
|
|
||||||
export const allQueues = {
|
export const allQueues = {
|
||||||
requestQueueCommentCount: requestQueueCommentCount,
|
requestQueueCommentCount: requestQueueCommentCount,
|
||||||
@ -160,7 +185,7 @@ export const clearAllQueues = () => {
|
|||||||
|
|
||||||
export const pauseAllQueues = () => {
|
export const pauseAllQueues = () => {
|
||||||
controlAllQueues('pause');
|
controlAllQueues('pause');
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "pauseAllQueues",
|
action: "pauseAllQueues",
|
||||||
payload: {
|
payload: {
|
||||||
@ -171,7 +196,7 @@ export const pauseAllQueues = () => {
|
|||||||
}
|
}
|
||||||
export const resumeAllQueues = () => {
|
export const resumeAllQueues = () => {
|
||||||
controlAllQueues('resume');
|
controlAllQueues('resume');
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "resumeAllQueues",
|
action: "resumeAllQueues",
|
||||||
payload: {
|
payload: {
|
||||||
@ -266,11 +291,33 @@ function App() {
|
|||||||
const [openAdvancedSettings, setOpenAdvancedSettings] = useState(false);
|
const [openAdvancedSettings, setOpenAdvancedSettings] = useState(false);
|
||||||
const [useLocalNode, setUseLocalNode] = useState(false);
|
const [useLocalNode, setUseLocalNode] = useState(false);
|
||||||
const [confirmUseOfLocal, setConfirmUseOfLocal] = useState(false);
|
const [confirmUseOfLocal, setConfirmUseOfLocal] = useState(false);
|
||||||
|
const [isOpenDrawerProfile, setIsOpenDrawerProfile] = useState(false);
|
||||||
const [apiKey, setApiKey] = useState("");
|
const [apiKey, setApiKey] = useState("");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
chrome.runtime.sendMessage({ action: "getApiKey" }, (response) => {
|
if(!isMobile) return
|
||||||
|
// Function to set the height of the app to the viewport height
|
||||||
|
const resetHeight = () => {
|
||||||
|
const height = window.visualViewport ? window.visualViewport.height : window.innerHeight;
|
||||||
|
// Set the height to the root element (usually #root)
|
||||||
|
document.getElementById('root').style.height = height + "px";
|
||||||
|
};
|
||||||
|
|
||||||
|
// Set the initial height
|
||||||
|
resetHeight();
|
||||||
|
|
||||||
|
// Add event listeners for resize and visualViewport changes
|
||||||
|
window.addEventListener('resize', resetHeight);
|
||||||
|
window.visualViewport?.addEventListener('resize', resetHeight);
|
||||||
|
|
||||||
|
// Clean up the event listeners when the component unmounts
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener('resize', resetHeight);
|
||||||
|
window.visualViewport?.removeEventListener('resize', resetHeight);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
useEffect(() => {
|
||||||
|
chrome?.runtime?.sendMessage({ action: "getApiKey" }, (response) => {
|
||||||
if (response) {
|
if (response) {
|
||||||
|
|
||||||
globalApiKey = response;
|
globalApiKey = response;
|
||||||
@ -405,7 +452,7 @@ function App() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const storeWalletInfo = (wallet: any) => {
|
const storeWalletInfo = (wallet: any) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{ action: "storeWalletInfo", wallet },
|
{ action: "storeWalletInfo", wallet },
|
||||||
(response) => {
|
(response) => {
|
||||||
if (response) {
|
if (response) {
|
||||||
@ -427,7 +474,7 @@ function App() {
|
|||||||
|
|
||||||
const getBalanceFunc = () => {
|
const getBalanceFunc = () => {
|
||||||
setQortBalanceLoading(true);
|
setQortBalanceLoading(true);
|
||||||
chrome.runtime.sendMessage({ action: "balance" }, (response) => {
|
chrome?.runtime?.sendMessage({ action: "balance" }, (response) => {
|
||||||
if (!response?.error && !isNaN(+response)) {
|
if (!response?.error && !isNaN(+response)) {
|
||||||
setBalance(response);
|
setBalance(response);
|
||||||
}
|
}
|
||||||
@ -436,7 +483,7 @@ function App() {
|
|||||||
};
|
};
|
||||||
const getLtcBalanceFunc = () => {
|
const getLtcBalanceFunc = () => {
|
||||||
setLtcBalanceLoading(true);
|
setLtcBalanceLoading(true);
|
||||||
chrome.runtime.sendMessage({ action: "ltcBalance" }, (response) => {
|
chrome?.runtime?.sendMessage({ action: "ltcBalance" }, (response) => {
|
||||||
if (!response?.error && !isNaN(+response)) {
|
if (!response?.error && !isNaN(+response)) {
|
||||||
setLtcBalance(response);
|
setLtcBalance(response);
|
||||||
}
|
}
|
||||||
@ -459,7 +506,7 @@ function App() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "sendCoin",
|
action: "sendCoin",
|
||||||
payload: {
|
payload: {
|
||||||
@ -487,7 +534,7 @@ function App() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Listen for messages from the background script
|
// Listen for messages from the background script
|
||||||
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
chrome.runtime?.onMessage.addListener((message, sender, sendResponse) => {
|
||||||
// Check if the message is to update the state
|
// Check if the message is to update the state
|
||||||
if (
|
if (
|
||||||
message.action === "UPDATE_STATE_CONFIRM_SEND_QORT" &&
|
message.action === "UPDATE_STATE_CONFIRM_SEND_QORT" &&
|
||||||
@ -563,7 +610,7 @@ function App() {
|
|||||||
//param = isDecline
|
//param = isDecline
|
||||||
const confirmPayment = (isDecline: boolean) => {
|
const confirmPayment = (isDecline: boolean) => {
|
||||||
if (isDecline) {
|
if (isDecline) {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "sendQortConfirmation",
|
action: "sendQortConfirmation",
|
||||||
payload: {
|
payload: {
|
||||||
@ -586,7 +633,7 @@ function App() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "sendQortConfirmation",
|
action: "sendQortConfirmation",
|
||||||
payload: {
|
payload: {
|
||||||
@ -613,7 +660,7 @@ function App() {
|
|||||||
|
|
||||||
const confirmBuyOrder = (isDecline: boolean) => {
|
const confirmBuyOrder = (isDecline: boolean) => {
|
||||||
if (isDecline) {
|
if (isDecline) {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "buyOrderConfirmation",
|
action: "buyOrderConfirmation",
|
||||||
payload: {
|
payload: {
|
||||||
@ -630,7 +677,7 @@ function App() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "buyOrderConfirmation",
|
action: "buyOrderConfirmation",
|
||||||
payload: {
|
payload: {
|
||||||
@ -657,7 +704,7 @@ function App() {
|
|||||||
hostname: string,
|
hostname: string,
|
||||||
interactionId: string
|
interactionId: string
|
||||||
) => {
|
) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "responseToConnectionRequest",
|
action: "responseToConnectionRequest",
|
||||||
payload: { isOkay, hostname, interactionId },
|
payload: { isOkay, hostname, interactionId },
|
||||||
@ -679,7 +726,7 @@ function App() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
try {
|
try {
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
chrome.runtime.sendMessage({ action: "getWalletInfo" }, (response) => {
|
chrome?.runtime?.sendMessage({ action: "getWalletInfo" }, (response) => {
|
||||||
if (response && response?.walletInfo) {
|
if (response && response?.walletInfo) {
|
||||||
setRawWallet(response?.walletInfo);
|
setRawWallet(response?.walletInfo);
|
||||||
if (
|
if (
|
||||||
@ -708,7 +755,7 @@ function App() {
|
|||||||
}, 10000);
|
}, 10000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
chrome.runtime.sendMessage({ action: "userInfo" }, (response) => {
|
chrome?.runtime?.sendMessage({ action: "userInfo" }, (response) => {
|
||||||
if (response && !response.error) {
|
if (response && !response.error) {
|
||||||
setUserInfo(response);
|
setUserInfo(response);
|
||||||
}
|
}
|
||||||
@ -799,7 +846,7 @@ function App() {
|
|||||||
crypto.kdfThreads,
|
crypto.kdfThreads,
|
||||||
() => {}
|
() => {}
|
||||||
);
|
);
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "decryptWallet",
|
action: "decryptWallet",
|
||||||
payload: {
|
payload: {
|
||||||
@ -814,7 +861,7 @@ function App() {
|
|||||||
wallet,
|
wallet,
|
||||||
qortAddress: wallet.address0,
|
qortAddress: wallet.address0,
|
||||||
});
|
});
|
||||||
chrome.runtime.sendMessage({ action: "userInfo" }, (response2) => {
|
chrome?.runtime?.sendMessage({ action: "userInfo" }, (response2) => {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
if (response2 && !response2.error) {
|
if (response2 && !response2.error) {
|
||||||
setUserInfo(response);
|
setUserInfo(response);
|
||||||
@ -835,7 +882,7 @@ function App() {
|
|||||||
|
|
||||||
const logoutFunc = () => {
|
const logoutFunc = () => {
|
||||||
try {
|
try {
|
||||||
chrome.runtime.sendMessage({ action: "logout" }, (response) => {
|
chrome?.runtime?.sendMessage({ action: "logout" }, (response) => {
|
||||||
if (response) {
|
if (response) {
|
||||||
resetAllStates();
|
resetAllStates();
|
||||||
executeEvent("logout-event", {});
|
executeEvent("logout-event", {});
|
||||||
@ -898,7 +945,7 @@ function App() {
|
|||||||
res();
|
res();
|
||||||
}, 250);
|
}, 250);
|
||||||
});
|
});
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "decryptWallet",
|
action: "decryptWallet",
|
||||||
payload: {
|
payload: {
|
||||||
@ -911,14 +958,14 @@ function App() {
|
|||||||
setAuthenticatePassword("");
|
setAuthenticatePassword("");
|
||||||
setExtstate("authenticated");
|
setExtstate("authenticated");
|
||||||
setWalletToBeDecryptedError("");
|
setWalletToBeDecryptedError("");
|
||||||
chrome.runtime.sendMessage({ action: "userInfo" }, (response) => {
|
chrome?.runtime?.sendMessage({ action: "userInfo" }, (response) => {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
if (response && !response.error) {
|
if (response && !response.error) {
|
||||||
setUserInfo(response);
|
setUserInfo(response);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getBalanceFunc();
|
getBalanceFunc();
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{ action: "getWalletInfo" },
|
{ action: "getWalletInfo" },
|
||||||
(response) => {
|
(response) => {
|
||||||
if (response && response?.walletInfo) {
|
if (response && response?.walletInfo) {
|
||||||
@ -1023,7 +1070,7 @@ function App() {
|
|||||||
});
|
});
|
||||||
setIsLoadingRegisterName(true);
|
setIsLoadingRegisterName(true);
|
||||||
new Promise((res, rej) => {
|
new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "registerName",
|
action: "registerName",
|
||||||
payload: {
|
payload: {
|
||||||
@ -1076,225 +1123,22 @@ function App() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const renderProfile = ()=> {
|
||||||
return (
|
return (
|
||||||
<AppContainer>
|
<AuthenticatedContainer sx={{ width:"350px", display: 'flex' }}>
|
||||||
{/* {extState === 'group' && (
|
{isMobile && (
|
||||||
<Group myAddress={userInfo?.address} />
|
<Box sx={{
|
||||||
)} */}
|
padding: '10px',
|
||||||
|
display: 'flex',
|
||||||
{extState === "not-authenticated" && (
|
justifyContent: 'flex-end'
|
||||||
<>
|
}}><CloseIcon onClick={()=> {
|
||||||
<Spacer height="48px" />
|
setIsOpenDrawerProfile(false)
|
||||||
<div
|
}} sx={{
|
||||||
className="image-container"
|
|
||||||
style={{
|
|
||||||
width: "136px",
|
|
||||||
height: "154px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<img src={Logo1} className="base-image" />
|
|
||||||
<img src={Logo1Dark} className="hover-image" />
|
|
||||||
</div>
|
|
||||||
<Spacer height="38px" />
|
|
||||||
<TextP
|
|
||||||
sx={{
|
|
||||||
textAlign: "center",
|
|
||||||
lineHeight: "15px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
WELCOME TO <TextItalic>YOUR</TextItalic> <br></br>
|
|
||||||
<TextSpan> QORTAL WALLET</TextSpan>
|
|
||||||
</TextP>
|
|
||||||
<Spacer height="38px" />
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
gap: "10px",
|
|
||||||
alignItems: "center",
|
|
||||||
marginLeft: "28px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<CustomButton {...getRootProps()}>
|
|
||||||
<input {...getInputProps()} />
|
|
||||||
Authenticate
|
|
||||||
</CustomButton>
|
|
||||||
<Tooltip
|
|
||||||
title="Authenticate by importing your Qortal JSON file"
|
|
||||||
arrow
|
|
||||||
>
|
|
||||||
<img src={Info} />
|
|
||||||
</Tooltip>
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
<Spacer height="6px" />
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
gap: "10px",
|
|
||||||
alignItems: "center",
|
|
||||||
marginLeft: "28px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<CustomButton
|
|
||||||
onClick={() => {
|
|
||||||
setExtstate("create-wallet");
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Create account
|
|
||||||
</CustomButton>
|
|
||||||
|
|
||||||
<img
|
|
||||||
src={Info}
|
|
||||||
style={{
|
|
||||||
visibility: "hidden",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
{hasLocalNode && (
|
|
||||||
<>
|
|
||||||
<Spacer height="15px" />
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
gap: "10px",
|
|
||||||
alignItems: "center",
|
|
||||||
flexDirection: "column",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
|
|
||||||
<Typography
|
|
||||||
sx={{
|
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
fontSize: '14px'
|
color: 'white'
|
||||||
}}
|
}} /></Box>
|
||||||
onClick={() => {
|
|
||||||
setOpenAdvancedSettings(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Advanced settings
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
{openAdvancedSettings && (
|
|
||||||
<>
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
gap: "10px",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: 'center',
|
|
||||||
width: '100%'
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Checkbox
|
|
||||||
edge="start"
|
|
||||||
checked={useLocalNode}
|
|
||||||
tabIndex={-1}
|
|
||||||
disableRipple
|
|
||||||
onChange={(event) => {
|
|
||||||
setUseLocalNode(event.target.checked);
|
|
||||||
}}
|
|
||||||
disabled={confirmUseOfLocal}
|
|
||||||
sx={{
|
|
||||||
"&.Mui-checked": {
|
|
||||||
color: "white", // Customize the color when checked
|
|
||||||
},
|
|
||||||
"& .MuiSvgIcon-root": {
|
|
||||||
color: "white",
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Typography>Use local node</Typography>
|
|
||||||
</Box>
|
|
||||||
{useLocalNode && (
|
|
||||||
<>
|
|
||||||
<Button disabled={confirmUseOfLocal} variant="contained" component="label">
|
|
||||||
Select apiKey.txt
|
|
||||||
<input
|
|
||||||
type="file"
|
|
||||||
accept=".txt"
|
|
||||||
hidden
|
|
||||||
onChange={handleFileChangeApiKey} // File input handler
|
|
||||||
/>
|
|
||||||
</Button>
|
|
||||||
<Spacer height="5px" />
|
|
||||||
<Typography
|
|
||||||
sx={{
|
|
||||||
fontSize: "12px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{apiKey}
|
|
||||||
</Typography>
|
|
||||||
<Spacer height="5px" />
|
|
||||||
<Button
|
|
||||||
onClick={() => {
|
|
||||||
const valueToSet = !confirmUseOfLocal
|
|
||||||
const payload = valueToSet ? apiKey : null
|
|
||||||
chrome.runtime.sendMessage(
|
|
||||||
{ action: "setApiKey", payload },
|
|
||||||
(response) => {
|
|
||||||
if (response) {
|
|
||||||
globalApiKey = payload;
|
|
||||||
|
|
||||||
setConfirmUseOfLocal(valueToSet)
|
|
||||||
if(!globalApiKey){
|
|
||||||
setUseLocalNode(false)
|
|
||||||
setOpenAdvancedSettings(false)
|
|
||||||
setApiKey('')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
variant="contained"
|
|
||||||
sx={{
|
|
||||||
color: "white",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{!confirmUseOfLocal ? 'Confirm use of local node' : 'Switch back to gateway'}
|
|
||||||
|
|
||||||
</Button>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Box>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{/* {extState !== "not-authenticated" && (
|
|
||||||
<button onClick={logoutFunc}>logout</button>
|
|
||||||
)} */}
|
|
||||||
{extState === "authenticated" && isMainWindow && (
|
|
||||||
<MyContext.Provider
|
|
||||||
value={{
|
|
||||||
txList,
|
|
||||||
setTxList,
|
|
||||||
memberGroups,
|
|
||||||
setMemberGroups,
|
|
||||||
isShow,
|
|
||||||
onCancel,
|
|
||||||
onOk,
|
|
||||||
show,
|
|
||||||
message,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
width: "100vw",
|
|
||||||
height: "100vh",
|
|
||||||
display: "flex",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Group
|
|
||||||
balance={balance}
|
|
||||||
userInfo={userInfo}
|
|
||||||
myAddress={userInfo?.address}
|
|
||||||
isFocused={isFocused}
|
|
||||||
isMain={isMain}
|
|
||||||
/>
|
|
||||||
<AuthenticatedContainer sx={{ width: "350px" }}>
|
|
||||||
<AuthenticatedContainerInnerLeft>
|
<AuthenticatedContainerInnerLeft>
|
||||||
<Spacer height="48px" />
|
<Spacer height="48px" />
|
||||||
|
|
||||||
@ -1490,6 +1334,234 @@ function App() {
|
|||||||
)}
|
)}
|
||||||
</AuthenticatedContainerInnerRight>
|
</AuthenticatedContainerInnerRight>
|
||||||
</AuthenticatedContainer>
|
</AuthenticatedContainer>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<AppContainer sx={{
|
||||||
|
height: isMobile ? '100%' : '100vh'
|
||||||
|
}}>
|
||||||
|
{/* {extState === 'group' && (
|
||||||
|
<Group myAddress={userInfo?.address} />
|
||||||
|
)} */}
|
||||||
|
|
||||||
|
{extState === "not-authenticated" && (
|
||||||
|
<>
|
||||||
|
<Spacer height="48px" />
|
||||||
|
<div
|
||||||
|
className="image-container"
|
||||||
|
style={{
|
||||||
|
width: "136px",
|
||||||
|
height: "154px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<img src={Logo1} className="base-image" />
|
||||||
|
<img src={Logo1Dark} className="hover-image" />
|
||||||
|
</div>
|
||||||
|
<Spacer height="38px" />
|
||||||
|
<TextP
|
||||||
|
sx={{
|
||||||
|
textAlign: "center",
|
||||||
|
lineHeight: "15px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
WELCOME TO <TextItalic>YOUR</TextItalic> <br></br>
|
||||||
|
<TextSpan> QORTAL WALLET</TextSpan>
|
||||||
|
</TextP>
|
||||||
|
<Spacer height="38px" />
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "10px",
|
||||||
|
alignItems: "center",
|
||||||
|
marginLeft: "28px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CustomButton {...getRootProps()}>
|
||||||
|
<input {...getInputProps()} />
|
||||||
|
Authenticate
|
||||||
|
</CustomButton>
|
||||||
|
<Tooltip
|
||||||
|
title="Authenticate by importing your Qortal JSON file"
|
||||||
|
arrow
|
||||||
|
>
|
||||||
|
<img src={Info} />
|
||||||
|
</Tooltip>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
<Spacer height="6px" />
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "10px",
|
||||||
|
alignItems: "center",
|
||||||
|
marginLeft: "28px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CustomButton
|
||||||
|
onClick={() => {
|
||||||
|
setExtstate("create-wallet");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Create account
|
||||||
|
</CustomButton>
|
||||||
|
|
||||||
|
<img
|
||||||
|
src={Info}
|
||||||
|
style={{
|
||||||
|
visibility: "hidden",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
{hasLocalNode && (
|
||||||
|
<>
|
||||||
|
<Spacer height="15px" />
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "10px",
|
||||||
|
alignItems: "center",
|
||||||
|
flexDirection: "column",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
|
||||||
|
<Typography
|
||||||
|
sx={{
|
||||||
|
cursor: 'pointer',
|
||||||
|
fontSize: '14px'
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
setOpenAdvancedSettings(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Advanced settings
|
||||||
|
</Typography>
|
||||||
|
|
||||||
|
{openAdvancedSettings && (
|
||||||
|
<>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "10px",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: 'center',
|
||||||
|
width: '100%'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Checkbox
|
||||||
|
edge="start"
|
||||||
|
checked={useLocalNode}
|
||||||
|
tabIndex={-1}
|
||||||
|
disableRipple
|
||||||
|
onChange={(event) => {
|
||||||
|
setUseLocalNode(event.target.checked);
|
||||||
|
}}
|
||||||
|
disabled={confirmUseOfLocal}
|
||||||
|
sx={{
|
||||||
|
"&.Mui-checked": {
|
||||||
|
color: "white", // Customize the color when checked
|
||||||
|
},
|
||||||
|
"& .MuiSvgIcon-root": {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Typography>Use local node</Typography>
|
||||||
|
</Box>
|
||||||
|
{useLocalNode && (
|
||||||
|
<>
|
||||||
|
<Button disabled={confirmUseOfLocal} variant="contained" component="label">
|
||||||
|
Select apiKey.txt
|
||||||
|
<input
|
||||||
|
type="file"
|
||||||
|
accept=".txt"
|
||||||
|
hidden
|
||||||
|
onChange={handleFileChangeApiKey} // File input handler
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
<Spacer height="5px" />
|
||||||
|
<Typography
|
||||||
|
sx={{
|
||||||
|
fontSize: "12px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{apiKey}
|
||||||
|
</Typography>
|
||||||
|
<Spacer height="5px" />
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
const valueToSet = !confirmUseOfLocal
|
||||||
|
const payload = valueToSet ? apiKey : null
|
||||||
|
chrome?.runtime?.sendMessage(
|
||||||
|
{ action: "setApiKey", payload },
|
||||||
|
(response) => {
|
||||||
|
if (response) {
|
||||||
|
globalApiKey = payload;
|
||||||
|
|
||||||
|
setConfirmUseOfLocal(valueToSet)
|
||||||
|
if(!globalApiKey){
|
||||||
|
setUseLocalNode(false)
|
||||||
|
setOpenAdvancedSettings(false)
|
||||||
|
setApiKey('')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
variant="contained"
|
||||||
|
sx={{
|
||||||
|
color: "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{!confirmUseOfLocal ? 'Confirm use of local node' : 'Switch back to gateway'}
|
||||||
|
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{/* {extState !== "not-authenticated" && (
|
||||||
|
<button onClick={logoutFunc}>logout</button>
|
||||||
|
)} */}
|
||||||
|
{extState === "authenticated" && (
|
||||||
|
<MyContext.Provider
|
||||||
|
value={{
|
||||||
|
txList,
|
||||||
|
setTxList,
|
||||||
|
memberGroups,
|
||||||
|
setMemberGroups,
|
||||||
|
isShow,
|
||||||
|
onCancel,
|
||||||
|
onOk,
|
||||||
|
show,
|
||||||
|
message,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100vw",
|
||||||
|
height: isMobile ? '100%' : "100vh",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: isMobile ? 'column' : 'row'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Group
|
||||||
|
balance={balance}
|
||||||
|
userInfo={userInfo}
|
||||||
|
myAddress={userInfo?.address}
|
||||||
|
isFocused={isFocused}
|
||||||
|
isMain={isMain}
|
||||||
|
isOpenDrawerProfile={isOpenDrawerProfile}
|
||||||
|
setIsOpenDrawerProfile={setIsOpenDrawerProfile}
|
||||||
|
/>
|
||||||
|
{!isMobile && renderProfile()}
|
||||||
|
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@ -2316,6 +2388,7 @@ function App() {
|
|||||||
info={infoSnack}
|
info={infoSnack}
|
||||||
setInfo={setInfoSnack}
|
setInfo={setInfoSnack}
|
||||||
/>
|
/>
|
||||||
|
<DrawerComponent open={isOpenDrawerProfile} setOpen={setIsOpenDrawerProfile} >{renderProfile()}</DrawerComponent>
|
||||||
</AppContainer>
|
</AppContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -2341,7 +2341,7 @@ if (res?.[key]) {
|
|||||||
throw new Error("No Chatheads saved");
|
throw new Error("No Chatheads saved");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
chrome?.runtime?.onMessage.addListener((request, sender, sendResponse) => {
|
||||||
if (request) {
|
if (request) {
|
||||||
switch (request.action) {
|
switch (request.action) {
|
||||||
case "version":
|
case "version":
|
||||||
@ -3581,7 +3581,7 @@ const restoreWindowBounds = (callback) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
chrome.action.onClicked.addListener((tab) => {
|
chrome.action?.onClicked?.addListener((tab) => {
|
||||||
const popupUrl = chrome.runtime.getURL("index.html?main=true");
|
const popupUrl = chrome.runtime.getURL("index.html?main=true");
|
||||||
chrome.windows.getAll(
|
chrome.windows.getAll(
|
||||||
{ populate: true, windowTypes: ["popup"] },
|
{ populate: true, windowTypes: ["popup"] },
|
||||||
@ -3716,7 +3716,7 @@ const checkActiveChatsForNotifications = async ()=> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
chrome.notifications.onClicked.addListener( (notificationId) => {
|
chrome.notifications?.onClicked?.addListener( (notificationId) => {
|
||||||
|
|
||||||
const popupUrl = chrome.runtime.getURL("index.html?main=true");
|
const popupUrl = chrome.runtime.getURL("index.html?main=true");
|
||||||
const isDirect = notificationId.includes('_type=direct_');
|
const isDirect = notificationId.includes('_type=direct_');
|
||||||
@ -3839,14 +3839,14 @@ chrome.notifications.onClicked.addListener( (notificationId) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Reconnect when service worker wakes up
|
// Reconnect when service worker wakes up
|
||||||
chrome.runtime.onStartup.addListener(() => {
|
chrome.runtime?.onStartup.addListener(() => {
|
||||||
console.log("Service worker started up, reconnecting WebSocket...");
|
console.log("Service worker started up, reconnecting WebSocket...");
|
||||||
// initWebsocketMessageGroup();
|
// initWebsocketMessageGroup();
|
||||||
// listenForNewGroupAnnouncements()
|
// listenForNewGroupAnnouncements()
|
||||||
// listenForThreadUpdates()
|
// listenForThreadUpdates()
|
||||||
});
|
});
|
||||||
|
|
||||||
chrome.runtime.onInstalled.addListener((details) => {
|
chrome.runtime?.onInstalled.addListener((details) => {
|
||||||
if (details.reason === chrome.runtime.OnInstalledReason.INSTALL) {
|
if (details.reason === chrome.runtime.OnInstalledReason.INSTALL) {
|
||||||
console.log('Extension Installed');
|
console.log('Extension Installed');
|
||||||
// Perform tasks that should only happen on extension installation
|
// Perform tasks that should only happen on extension installation
|
||||||
@ -3866,14 +3866,14 @@ chrome.runtime.onInstalled.addListener((details) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Check if the alarm already exists before creating it
|
// Check if the alarm already exists before creating it
|
||||||
chrome.alarms.get("checkForNotifications", (existingAlarm) => {
|
chrome.alarms?.get("checkForNotifications", (existingAlarm) => {
|
||||||
if (!existingAlarm) {
|
if (!existingAlarm) {
|
||||||
// If the alarm does not exist, create it
|
// If the alarm does not exist, create it
|
||||||
chrome.alarms.create("checkForNotifications", { periodInMinutes: 4 });
|
chrome.alarms.create("checkForNotifications", { periodInMinutes: 4 });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
chrome.alarms.onAlarm.addListener(async (alarm) => {
|
chrome.alarms?.onAlarm.addListener(async (alarm) => {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (alarm.name === "checkForNotifications") {
|
if (alarm.name === "checkForNotifications") {
|
||||||
|
@ -10,7 +10,7 @@ import { decryptPublishes, getTempPublish, saveTempPublish } from "./GroupAnnoun
|
|||||||
import { AnnouncementList } from "./AnnouncementList";
|
import { AnnouncementList } from "./AnnouncementList";
|
||||||
import { Spacer } from "../../common/Spacer";
|
import { Spacer } from "../../common/Spacer";
|
||||||
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
||||||
import { getBaseApiReact, pauseAllQueues, resumeAllQueues } from "../../App";
|
import { getBaseApiReact, isMobile, pauseAllQueues, resumeAllQueues } from "../../App";
|
||||||
|
|
||||||
const tempKey = 'accouncement-comment'
|
const tempKey = 'accouncement-comment'
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ export const AnnouncementDiscussion = ({
|
|||||||
if (!selectedAnnouncement) return;
|
if (!selectedAnnouncement) return;
|
||||||
|
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "publishGroupEncryptedResource",
|
action: "publishGroupEncryptedResource",
|
||||||
payload: {
|
payload: {
|
||||||
@ -245,7 +245,7 @@ export const AnnouncementDiscussion = ({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
height: "100vh",
|
height: isMobile ? '100%' : "100vh",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
|
@ -40,7 +40,7 @@ export const ChatDirect = ({ myAddress, isNewChat, selectedDirect, setSelectedDi
|
|||||||
const decryptMessages = (encryptedMessages: any[])=> {
|
const decryptMessages = (encryptedMessages: any[])=> {
|
||||||
try {
|
try {
|
||||||
return new Promise((res, rej)=> {
|
return new Promise((res, rej)=> {
|
||||||
chrome.runtime.sendMessage({ action: "decryptDirect", payload: {
|
chrome?.runtime?.sendMessage({ action: "decryptDirect", payload: {
|
||||||
data: encryptedMessages,
|
data: encryptedMessages,
|
||||||
involvingAddress: selectedDirect?.address
|
involvingAddress: selectedDirect?.address
|
||||||
}}, (response) => {
|
}}, (response) => {
|
||||||
@ -146,7 +146,7 @@ const sendChatDirect = async ({ chatReference = undefined, messageText}: any)=>
|
|||||||
|
|
||||||
if(!directTo) return
|
if(!directTo) return
|
||||||
return new Promise((res, rej)=> {
|
return new Promise((res, rej)=> {
|
||||||
chrome.runtime.sendMessage({ action: "sendChatDirect", payload: {
|
chrome?.runtime?.sendMessage({ action: "sendChatDirect", payload: {
|
||||||
directTo, chatReference, messageText
|
directTo, chatReference, messageText
|
||||||
}}, async (response) => {
|
}}, async (response) => {
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ const sendChatDirect = async ({ chatReference = undefined, messageText}: any)=>
|
|||||||
"senderName": myName
|
"senderName": myName
|
||||||
})
|
})
|
||||||
setNewChat(null)
|
setNewChat(null)
|
||||||
chrome.runtime.sendMessage({
|
chrome?.runtime?.sendMessage({
|
||||||
action: "addTimestampEnterChat",
|
action: "addTimestampEnterChat",
|
||||||
payload: {
|
payload: {
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
|
@ -10,7 +10,7 @@ import Tiptap from './TipTap'
|
|||||||
import { CustomButton } from '../../App-styles'
|
import { CustomButton } from '../../App-styles'
|
||||||
import CircularProgress from '@mui/material/CircularProgress';
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
import { LoadingSnackbar } from '../Snackbar/LoadingSnackbar'
|
import { LoadingSnackbar } from '../Snackbar/LoadingSnackbar'
|
||||||
import { getBaseApiReactSocket, pauseAllQueues, resumeAllQueues } from '../../App'
|
import { getBaseApiReactSocket, isMobile, pauseAllQueues, resumeAllQueues } from '../../App'
|
||||||
import { CustomizedSnackbars } from '../Snackbar/Snackbar'
|
import { CustomizedSnackbars } from '../Snackbar/Snackbar'
|
||||||
import { PUBLIC_NOTIFICATION_CODE_FIRST_SECRET_KEY } from '../../constants/codes'
|
import { PUBLIC_NOTIFICATION_CODE_FIRST_SECRET_KEY } from '../../constants/codes'
|
||||||
import { useMessageQueue } from '../../MessageQueueContext'
|
import { useMessageQueue } from '../../MessageQueueContext'
|
||||||
@ -85,7 +85,7 @@ export const ChatGroup = ({selectedGroup, secretKey, setSecretKey, getSecretKey,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
return new Promise((res, rej)=> {
|
return new Promise((res, rej)=> {
|
||||||
chrome.runtime.sendMessage({ action: "decryptSingle", payload: {
|
chrome?.runtime?.sendMessage({ action: "decryptSingle", payload: {
|
||||||
data: encryptedMessages,
|
data: encryptedMessages,
|
||||||
secretKeyObject: secretKey
|
secretKeyObject: secretKey
|
||||||
}}, (response) => {
|
}}, (response) => {
|
||||||
@ -233,7 +233,7 @@ export const ChatGroup = ({selectedGroup, secretKey, setSecretKey, getSecretKey,
|
|||||||
const encryptChatMessage = async (data: string, secretKeyObject: any)=> {
|
const encryptChatMessage = async (data: string, secretKeyObject: any)=> {
|
||||||
try {
|
try {
|
||||||
return new Promise((res, rej)=> {
|
return new Promise((res, rej)=> {
|
||||||
chrome.runtime.sendMessage({ action: "encryptSingle", payload: {
|
chrome?.runtime?.sendMessage({ action: "encryptSingle", payload: {
|
||||||
data,
|
data,
|
||||||
secretKeyObject
|
secretKeyObject
|
||||||
}}, (response) => {
|
}}, (response) => {
|
||||||
@ -252,7 +252,7 @@ export const ChatGroup = ({selectedGroup, secretKey, setSecretKey, getSecretKey,
|
|||||||
const sendChatGroup = async ({groupId, typeMessage = undefined, chatReference = undefined, messageText}: any)=> {
|
const sendChatGroup = async ({groupId, typeMessage = undefined, chatReference = undefined, messageText}: any)=> {
|
||||||
try {
|
try {
|
||||||
return new Promise((res, rej)=> {
|
return new Promise((res, rej)=> {
|
||||||
chrome.runtime.sendMessage({ action: "sendChatGroup", payload: {
|
chrome?.runtime?.sendMessage({ action: "sendChatGroup", payload: {
|
||||||
groupId, typeMessage, chatReference, messageText
|
groupId, typeMessage, chatReference, messageText
|
||||||
}}, (response) => {
|
}}, (response) => {
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ const clearEditorContent = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{
|
<div style={{
|
||||||
height: '100vh',
|
height: isMobile ? '100%' : '100vh',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
|
@ -107,7 +107,7 @@ export const CreateCommonSecret = ({groupId, secretKey, isOwner, myAddress, sec
|
|||||||
const secretKeyToSend = !secretKey2 ? null : secretKey2
|
const secretKeyToSend = !secretKey2 ? null : secretKey2
|
||||||
|
|
||||||
|
|
||||||
chrome.runtime.sendMessage({ action: "encryptAndPublishSymmetricKeyGroupChat", payload: {
|
chrome?.runtime?.sendMessage({ action: "encryptAndPublishSymmetricKeyGroupChat", payload: {
|
||||||
groupId: groupId,
|
groupId: groupId,
|
||||||
previousData: secretKeyToSend
|
previousData: secretKeyToSend
|
||||||
} }, (response) => {
|
} }, (response) => {
|
||||||
@ -142,7 +142,7 @@ export const CreateCommonSecret = ({groupId, secretKey, isOwner, myAddress, sec
|
|||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
gap: '25px',
|
gap: '25px',
|
||||||
maxWidth: '350px',
|
maxWidth: '350px',
|
||||||
background: '#4444'
|
background: '#444444'
|
||||||
}}>
|
}}>
|
||||||
<LoadingButton loading={isLoading} loadingPosition="start" color="warning" variant='contained' onClick={createCommonSecret}>Re-encyrpt key</LoadingButton>
|
<LoadingButton loading={isLoading} loadingPosition="start" color="warning" variant='contained' onClick={createCommonSecret}>Re-encyrpt key</LoadingButton>
|
||||||
{noSecretKey ? (
|
{noSecretKey ? (
|
||||||
|
@ -28,7 +28,7 @@ const uid = new ShortUniqueId({ length: 8 });
|
|||||||
import CampaignIcon from '@mui/icons-material/Campaign';
|
import CampaignIcon from '@mui/icons-material/Campaign';
|
||||||
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
||||||
import { AnnouncementDiscussion } from "./AnnouncementDiscussion";
|
import { AnnouncementDiscussion } from "./AnnouncementDiscussion";
|
||||||
import { MyContext, getBaseApiReact, pauseAllQueues, resumeAllQueues } from "../../App";
|
import { MyContext, getBaseApiReact, isMobile, pauseAllQueues, resumeAllQueues } from "../../App";
|
||||||
import { RequestQueueWithPromise } from "../../utils/queue/queue";
|
import { RequestQueueWithPromise } from "../../utils/queue/queue";
|
||||||
import { CustomizedSnackbars } from "../Snackbar/Snackbar";
|
import { CustomizedSnackbars } from "../Snackbar/Snackbar";
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ export const saveTempPublish = async ({ data, key }: any) => {
|
|||||||
|
|
||||||
|
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "saveTempPublish",
|
action: "saveTempPublish",
|
||||||
payload: {
|
payload: {
|
||||||
@ -62,7 +62,7 @@ export const getTempPublish = async () => {
|
|||||||
|
|
||||||
|
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "getTempPublish",
|
action: "getTempPublish",
|
||||||
payload: {
|
payload: {
|
||||||
@ -81,7 +81,7 @@ export const getTempPublish = async () => {
|
|||||||
export const decryptPublishes = async (encryptedMessages: any[], secretKey) => {
|
export const decryptPublishes = async (encryptedMessages: any[], secretKey) => {
|
||||||
try {
|
try {
|
||||||
return await new Promise((res, rej) => {
|
return await new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "decryptSingleForPublishes",
|
action: "decryptSingleForPublishes",
|
||||||
payload: {
|
payload: {
|
||||||
@ -182,7 +182,7 @@ export const GroupAnnouncements = ({
|
|||||||
const encryptChatMessage = async (data: string, secretKeyObject: any) => {
|
const encryptChatMessage = async (data: string, secretKeyObject: any) => {
|
||||||
try {
|
try {
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "encryptSingle",
|
action: "encryptSingle",
|
||||||
payload: {
|
payload: {
|
||||||
@ -206,7 +206,7 @@ export const GroupAnnouncements = ({
|
|||||||
|
|
||||||
|
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "publishGroupEncryptedResource",
|
action: "publishGroupEncryptedResource",
|
||||||
payload: {
|
payload: {
|
||||||
@ -460,7 +460,7 @@ export const GroupAnnouncements = ({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
height: "100vh",
|
height: isMobile ? '100%' : "100vh",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
@ -479,7 +479,7 @@ export const GroupAnnouncements = ({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
height: "100vh",
|
height: isMobile ? '100%' : "100vh",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
|
@ -6,6 +6,7 @@ import React, {
|
|||||||
useState,
|
useState,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { GroupMail } from "../Group/Forum/GroupMail";
|
import { GroupMail } from "../Group/Forum/GroupMail";
|
||||||
|
import { isMobile } from "../../App";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -35,7 +36,7 @@ export const GroupForum = ({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
height: "100vh",
|
height: isMobile ? '100%' : "100vh",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
|
31
src/components/Drawer/Drawer.tsx
Normal file
31
src/components/Drawer/Drawer.tsx
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
import Box from '@mui/material/Box';
|
||||||
|
import Drawer from '@mui/material/Drawer';
|
||||||
|
import Button from '@mui/material/Button';
|
||||||
|
import List from '@mui/material/List';
|
||||||
|
import Divider from '@mui/material/Divider';
|
||||||
|
import ListItem from '@mui/material/ListItem';
|
||||||
|
import ListItemButton from '@mui/material/ListItemButton';
|
||||||
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
||||||
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
|
import InboxIcon from '@mui/icons-material/MoveToInbox';
|
||||||
|
import MailIcon from '@mui/icons-material/Mail';
|
||||||
|
import CloseIcon from '@mui/icons-material/Close';
|
||||||
|
export const DrawerComponent = ({open, setOpen, children}) => {
|
||||||
|
|
||||||
|
const toggleDrawer = (newOpen: boolean) => () => {
|
||||||
|
setOpen(newOpen);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Drawer open={open} onClose={toggleDrawer(false)}>
|
||||||
|
<Box sx={{ width: 400, height: '100%' }} role="presentation">
|
||||||
|
|
||||||
|
{children}
|
||||||
|
</Box>
|
||||||
|
</Drawer>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
@ -103,7 +103,7 @@ export const AddGroup = ({ address, open, setOpen }) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "createGroup",
|
action: "createGroup",
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -108,7 +108,7 @@ export const AddGroupList = ({ setInfoSnack, setOpenSnack }) => {
|
|||||||
})
|
})
|
||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "joinGroup",
|
action: "joinGroup",
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -123,7 +123,7 @@ export const GroupMail = ({
|
|||||||
const updateThreadActivity = async ({threadId, qortalName, groupId, thread}) => {
|
const updateThreadActivity = async ({threadId, qortalName, groupId, thread}) => {
|
||||||
try {
|
try {
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "updateThreadActivity",
|
action: "updateThreadActivity",
|
||||||
payload: {
|
payload: {
|
||||||
@ -656,6 +656,11 @@ export const GroupMail = ({
|
|||||||
thread?.threadData?.createdAt < hasViewedRecent?.timestamp;
|
thread?.threadData?.createdAt < hasViewedRecent?.timestamp;
|
||||||
return (
|
return (
|
||||||
<SingleThreadParent
|
<SingleThreadParent
|
||||||
|
sx={{
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
gap: '15px',
|
||||||
|
height: 'auto'
|
||||||
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentThread(thread);
|
setCurrentThread(thread);
|
||||||
if(thread?.threadId && thread?.threadData?.name){
|
if(thread?.threadId && thread?.threadData?.name){
|
||||||
|
@ -94,7 +94,7 @@ export const publishGroupEncryptedResource = async ({
|
|||||||
identifier,
|
identifier,
|
||||||
}) => {
|
}) => {
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "publishGroupEncryptedResource",
|
action: "publishGroupEncryptedResource",
|
||||||
payload: {
|
payload: {
|
||||||
@ -117,7 +117,7 @@ export const publishGroupEncryptedResource = async ({
|
|||||||
export const encryptSingleFunc = async (data: string, secretKeyObject: any) => {
|
export const encryptSingleFunc = async (data: string, secretKeyObject: any) => {
|
||||||
try {
|
try {
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "encryptSingle",
|
action: "encryptSingle",
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { Box, Modal, useTheme } from '@mui/material'
|
import { Box, Modal, useTheme } from '@mui/material'
|
||||||
|
import { isMobile } from '../../../App'
|
||||||
|
|
||||||
interface MyModalProps {
|
interface MyModalProps {
|
||||||
open: boolean
|
open: boolean
|
||||||
@ -40,7 +41,7 @@ export const ReusableModal: React.FC<MyModalProps> = ({
|
|||||||
top: '50%',
|
top: '50%',
|
||||||
left: '50%',
|
left: '50%',
|
||||||
transform: 'translate(-50%, -50%)',
|
transform: 'translate(-50%, -50%)',
|
||||||
width: '75%',
|
width: isMobile ? '95%' : '75%',
|
||||||
bgcolor: theme.palette.primary.main,
|
bgcolor: theme.palette.primary.main,
|
||||||
boxShadow: 24,
|
boxShadow: 24,
|
||||||
p: 4,
|
p: 4,
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -26,7 +26,7 @@ export const InviteMember = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
setIsLoadingInvite(true)
|
setIsLoadingInvite(true)
|
||||||
if (!expiryTime || !value) return;
|
if (!expiryTime || !value) return;
|
||||||
new Promise((res, rej) => {
|
new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "inviteToGroup",
|
action: "inviteToGroup",
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -74,7 +74,7 @@ export const ListOfBans = ({ groupId, setInfoSnack, setOpenSnack, show }) => {
|
|||||||
})
|
})
|
||||||
setIsLoadingUnban(true)
|
setIsLoadingUnban(true)
|
||||||
new Promise((res, rej)=> {
|
new Promise((res, rej)=> {
|
||||||
chrome.runtime.sendMessage({ action: "cancelBan", payload: {
|
chrome?.runtime?.sendMessage({ action: "cancelBan", payload: {
|
||||||
groupId,
|
groupId,
|
||||||
qortalAddress: address,
|
qortalAddress: address,
|
||||||
}}, (response) => {
|
}}, (response) => {
|
||||||
|
@ -75,7 +75,7 @@ export const ListOfInvites = ({ groupId, setInfoSnack, setOpenSnack, show }) =>
|
|||||||
})
|
})
|
||||||
setIsLoadingCancelInvite(true)
|
setIsLoadingCancelInvite(true)
|
||||||
await new Promise((res, rej)=> {
|
await new Promise((res, rej)=> {
|
||||||
chrome.runtime.sendMessage({ action: "cancelInvitationToGroup", payload: {
|
chrome?.runtime?.sendMessage({ action: "cancelInvitationToGroup", payload: {
|
||||||
groupId,
|
groupId,
|
||||||
qortalAddress: address,
|
qortalAddress: address,
|
||||||
}}, (response) => {
|
}}, (response) => {
|
||||||
|
@ -74,7 +74,7 @@ export const ListOfJoinRequests = ({ groupId, setInfoSnack, setOpenSnack, show }
|
|||||||
})
|
})
|
||||||
setIsLoadingAccept(true)
|
setIsLoadingAccept(true)
|
||||||
await new Promise((res, rej)=> {
|
await new Promise((res, rej)=> {
|
||||||
chrome.runtime.sendMessage({ action: "inviteToGroup", payload: {
|
chrome?.runtime?.sendMessage({ action: "inviteToGroup", payload: {
|
||||||
groupId,
|
groupId,
|
||||||
qortalAddress: address,
|
qortalAddress: address,
|
||||||
inviteTime: 10800,
|
inviteTime: 10800,
|
||||||
|
@ -63,7 +63,7 @@ const ListOfMembers = ({
|
|||||||
|
|
||||||
setIsLoadingKick(true);
|
setIsLoadingKick(true);
|
||||||
new Promise((res, rej) => {
|
new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "kickFromGroup",
|
action: "kickFromGroup",
|
||||||
payload: {
|
payload: {
|
||||||
@ -107,7 +107,7 @@ const ListOfMembers = ({
|
|||||||
});
|
});
|
||||||
setIsLoadingBan(true);
|
setIsLoadingBan(true);
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "banFromGroup",
|
action: "banFromGroup",
|
||||||
payload: {
|
payload: {
|
||||||
@ -153,7 +153,7 @@ const ListOfMembers = ({
|
|||||||
});
|
});
|
||||||
setIsLoadingMakeAdmin(true);
|
setIsLoadingMakeAdmin(true);
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "makeAdmin",
|
action: "makeAdmin",
|
||||||
payload: {
|
payload: {
|
||||||
@ -198,7 +198,7 @@ const ListOfMembers = ({
|
|||||||
});
|
});
|
||||||
setIsLoadingRemoveAdmin(true);
|
setIsLoadingRemoveAdmin(true);
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "removeAdmin",
|
action: "removeAdmin",
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -23,7 +23,7 @@ export const ListOfThreadPostsWatched = () => {
|
|||||||
const getPosts = async ()=> {
|
const getPosts = async ()=> {
|
||||||
try {
|
try {
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "getThreadActivity",
|
action: "getThreadActivity",
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -77,7 +77,7 @@ export const ManageMembers = ({
|
|||||||
})
|
})
|
||||||
|
|
||||||
await new Promise((res, rej) => {
|
await new Promise((res, rej) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome?.runtime?.sendMessage(
|
||||||
{
|
{
|
||||||
action: "leaveGroup",
|
action: "leaveGroup",
|
||||||
payload: {
|
payload: {
|
||||||
|
@ -85,7 +85,7 @@ export const UserListOfInvites = ({myAddress, setInfoSnack, setOpenSnack}) => {
|
|||||||
setIsLoading(true);
|
setIsLoading(true);
|
||||||
|
|
||||||
await new Promise((res, rej)=> {
|
await new Promise((res, rej)=> {
|
||||||
chrome.runtime.sendMessage({ action: "joinGroup", payload: {
|
chrome?.runtime?.sendMessage({ action: "joinGroup", payload: {
|
||||||
groupId,
|
groupId,
|
||||||
}}, (response) => {
|
}}, (response) => {
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ export const WebSocketActive = ({ myAddress, setIsLoadingGroups }) => {
|
|||||||
).sort((a, b) => (b.timestamp || 0) - (a.timestamp || 0));
|
).sort((a, b) => (b.timestamp || 0) - (a.timestamp || 0));
|
||||||
|
|
||||||
|
|
||||||
chrome.runtime.sendMessage({
|
chrome?.runtime?.sendMessage({
|
||||||
action: 'handleActiveGroupDataFromSocket',
|
action: 'handleActiveGroupDataFromSocket',
|
||||||
payload: {
|
payload: {
|
||||||
groups: sortedGroups,
|
groups: sortedGroups,
|
||||||
|
@ -81,3 +81,7 @@ body {
|
|||||||
.group-list::-webkit-scrollbar-thumb:hover {
|
.group-list::-webkit-scrollbar-thumb:hover {
|
||||||
background-color: whitesmoke;
|
background-color: whitesmoke;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
overscroll-behavior:none !important;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user