mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-02-11 17:55:49 +00:00
fixes
This commit is contained in:
parent
975ae5af27
commit
5d68db5b40
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Qortal",
|
"name": "Qortal",
|
||||||
"version": "2.2.0",
|
"version": "2.3.0",
|
||||||
"icons": {
|
"icons": {
|
||||||
"16": "qort.png",
|
"16": "qort.png",
|
||||||
"32": "qort.png",
|
"32": "qort.png",
|
||||||
|
@ -178,14 +178,14 @@ export const ChatOptions = ({
|
|||||||
if (isPrivate === false) {
|
if (isPrivate === false) {
|
||||||
return messages
|
return messages
|
||||||
.filter((message) =>
|
.filter((message) =>
|
||||||
extractTextFromHTML(message?.messageText)?.includes(`@${myName}`)
|
extractTextFromHTML(message?.messageText)?.includes(`@${myName?.toLowerCase()}`)
|
||||||
)
|
)
|
||||||
?.sort((a, b) => b?.timestamp - a?.timestamp);
|
?.sort((a, b) => b?.timestamp - a?.timestamp);
|
||||||
}
|
}
|
||||||
return messages
|
return messages
|
||||||
.filter((message) =>
|
.filter((message) =>
|
||||||
extractTextFromHTML(message?.decryptedData?.message)?.includes(
|
extractTextFromHTML(message?.decryptedData?.message)?.includes(
|
||||||
`@${myName}`
|
`@${myName?.toLowerCase()}`
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
?.sort((a, b) => b?.timestamp - a?.timestamp);
|
?.sort((a, b) => b?.timestamp - a?.timestamp);
|
||||||
|
@ -80,7 +80,7 @@ export const MessageDisplay = ({ htmlContent, isReply }) => {
|
|||||||
const sanitizedContent = DOMPurify.sanitize(linkify(htmlContent), {
|
const sanitizedContent = DOMPurify.sanitize(linkify(htmlContent), {
|
||||||
ALLOWED_TAGS: [
|
ALLOWED_TAGS: [
|
||||||
'a', 'b', 'i', 'em', 'strong', 'p', 'br', 'div', 'span', 'img',
|
'a', 'b', 'i', 'em', 'strong', 'p', 'br', 'div', 'span', 'img',
|
||||||
'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'code', 'pre', 'table', 'thead', 'tbody', 'tr', 'th', 'td'
|
'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'code', 'pre', 'table', 'thead', 'tbody', 'tr', 'th', 'td','s', 'hr'
|
||||||
],
|
],
|
||||||
ALLOWED_ATTR: [
|
ALLOWED_ATTR: [
|
||||||
'href', 'target', 'rel', 'class', 'src', 'alt', 'title',
|
'href', 'target', 'rel', 'class', 'src', 'alt', 'title',
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
.tiptap hr {
|
.tiptap hr {
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid var(--gray-2);
|
border-top: 1px solid var(--gray-2);
|
||||||
margin: 2rem 0;
|
margin: 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ProseMirror:focus-visible {
|
.ProseMirror:focus-visible {
|
||||||
@ -102,7 +102,8 @@
|
|||||||
|
|
||||||
.tiptap p {
|
.tiptap p {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: white; /* Ensure paragraph text color is white */
|
color: white;
|
||||||
|
margin: 0px;
|
||||||
}
|
}
|
||||||
.tiptap p.is-editor-empty:first-child::before {
|
.tiptap p.is-editor-empty:first-child::before {
|
||||||
color: #adb5bd;
|
color: #adb5bd;
|
||||||
|
@ -750,7 +750,7 @@ export const deleteListItems = async (data, isFromExtension) => {
|
|||||||
if(isGateway){
|
if(isGateway){
|
||||||
throw new Error('This action cannot be done through a gateway')
|
throw new Error('This action cannot be done through a gateway')
|
||||||
}
|
}
|
||||||
const requiredFields = ["list_name", "item"];
|
const requiredFields = ["list_name"];
|
||||||
const missingFields: string[] = [];
|
const missingFields: string[] = [];
|
||||||
requiredFields.forEach((field) => {
|
requiredFields.forEach((field) => {
|
||||||
if (!data[field]) {
|
if (!data[field]) {
|
||||||
@ -763,20 +763,25 @@ export const deleteListItems = async (data, isFromExtension) => {
|
|||||||
throw new Error(errorMsg);
|
throw new Error(errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
const item = data.item;
|
if(!data?.item && !data?.items){
|
||||||
|
throw new Error('Missing fields: items')
|
||||||
|
}
|
||||||
|
const item = data?.item;
|
||||||
|
const items = data?.items
|
||||||
|
|
||||||
const list_name = data.list_name;
|
const list_name = data.list_name;
|
||||||
|
|
||||||
const resPermission = await getUserPermission({
|
const resPermission = await getUserPermission({
|
||||||
text1: "Do you give this application permission to",
|
text1: "Do you give this application permission to",
|
||||||
text2: `Remove the following from the list ${list_name}:`,
|
text2: `Remove the following from the list ${list_name}:`,
|
||||||
highlightedText: item,
|
highlightedText: items ? JSON.stringify(items) : item,
|
||||||
}, isFromExtension);
|
}, isFromExtension);
|
||||||
const { accepted } = resPermission;
|
const { accepted } = resPermission;
|
||||||
|
|
||||||
if (accepted) {
|
if (accepted) {
|
||||||
const url = await createEndpoint(`/lists/${list_name}`);
|
const url = await createEndpoint(`/lists/${list_name}`);
|
||||||
const body = {
|
const body = {
|
||||||
items: [item],
|
items: items || [item],
|
||||||
};
|
};
|
||||||
const bodyToString = JSON.stringify(body);
|
const bodyToString = JSON.stringify(body);
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
@ -1585,9 +1590,18 @@ export const getUserWallet = async (data, isFromExtension) => {
|
|||||||
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
throw new Error(errorMsg);
|
throw new Error(errorMsg);
|
||||||
}
|
}
|
||||||
|
const isGateway = await isRunningGateway();
|
||||||
|
|
||||||
|
if (data?.coin === "ARRR" && isGateway)
|
||||||
|
throw new Error(
|
||||||
|
"Cannot view ARRR wallet info through the gateway. Please use your local node."
|
||||||
|
);
|
||||||
|
|
||||||
const resPermission = await getUserPermission({
|
const resPermission = await getUserPermission({
|
||||||
text1:
|
text1:
|
||||||
"Do you give this application permission to get your wallet information?",
|
"Do you give this application permission to get your wallet information?",
|
||||||
|
highlightedText: `coin: ${data.coin}`,
|
||||||
|
|
||||||
}, isFromExtension);
|
}, isFromExtension);
|
||||||
const { accepted } = resPermission;
|
const { accepted } = resPermission;
|
||||||
|
|
||||||
@ -1628,7 +1642,7 @@ export const getUserWallet = async (data, isFromExtension) => {
|
|||||||
break;
|
break;
|
||||||
case "BTC":
|
case "BTC":
|
||||||
userWallet["address"] = parsedData.btcAddress;
|
userWallet["address"] = parsedData.btcAddress;
|
||||||
userWallet["publickey"] = parsedData.derivedMasterPublicKey;
|
userWallet["publickey"] = parsedData.btcPublicKey;
|
||||||
break;
|
break;
|
||||||
case "LTC":
|
case "LTC":
|
||||||
userWallet["address"] = parsedData.ltcAddress;
|
userWallet["address"] = parsedData.ltcAddress;
|
||||||
@ -1875,8 +1889,17 @@ export const getUserWalletInfo = async (data, isFromExtension) => {
|
|||||||
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
const errorMsg = `Missing fields: ${missingFieldsString}`;
|
||||||
throw new Error(errorMsg);
|
throw new Error(errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(data?.coin === 'ARRR'){
|
||||||
|
|
||||||
|
throw new Error(
|
||||||
|
"ARRR is not supported for this call."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const resPermission = await getUserPermission({
|
const resPermission = await getUserPermission({
|
||||||
text1: "Do you give this application permission to retrieve your wallet information",
|
text1: "Do you give this application permission to retrieve your wallet information",
|
||||||
|
highlightedText: `coin: ${data.coin}`
|
||||||
}, isFromExtension);
|
}, isFromExtension);
|
||||||
const { accepted } = resPermission;
|
const { accepted } = resPermission;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user