diff --git a/src/components/Elements/MainModal/scss/settings/modules/tabs/_changelog.scss b/src/components/Elements/MainModal/scss/settings/modules/tabs/_changelog.scss index 84ad67fa..325eabce 100644 --- a/src/components/Elements/MainModal/scss/settings/modules/tabs/_changelog.scss +++ b/src/components/Elements/MainModal/scss/settings/modules/tabs/_changelog.scss @@ -1,18 +1,3 @@ -.updateChangelog { - max-width: 75%; - margin-top: 15px; - white-space: pre-wrap; - font-size: 18px; - - a { - color: var(--modal-link); - - &:hover { - opacity: 0.8; - } - } -} - .changelogtab { .mainTitle { margin: 0 !important; @@ -21,4 +6,10 @@ img { max-width: 95%; } + + a { + &:hover { + opacity: 0.8; + } + } } diff --git a/src/components/Form/Settings/Checkbox/Checkbox.jsx b/src/components/Form/Settings/Checkbox/Checkbox.jsx index 6c5b2626..e76dc25f 100644 --- a/src/components/Form/Settings/Checkbox/Checkbox.jsx +++ b/src/components/Form/Settings/Checkbox/Checkbox.jsx @@ -1,6 +1,7 @@ import variables from 'config/variables'; import { useEffect, useState } from 'react'; import { Checkbox as CheckboxUI, Field, Label } from '@headlessui/react'; +import { MdCheckBox } from "react-icons/md"; import EventBus from 'utils/eventbus'; const Checkbox = (props) => { @@ -36,25 +37,14 @@ const Checkbox = (props) => { }; return ( - + - - - + diff --git a/src/features/marketplace/views/Added.jsx b/src/features/marketplace/views/Added.jsx index bd34c4b7..bd2432a9 100644 --- a/src/features/marketplace/views/Added.jsx +++ b/src/features/marketplace/views/Added.jsx @@ -11,7 +11,7 @@ import { Dropdown, FileUpload } from 'components/Form/Settings'; import { Header, CustomActions } from 'components/Layout/Settings'; import { Button } from 'components/Elements'; -import { install, uninstall, urlParser } from 'utils/marketplace'; +import { install, uninstall } from 'utils/marketplace'; export default class Added extends PureComponent { constructor() { @@ -100,7 +100,7 @@ export default class Added extends PureComponent { type: info.data.type, display_name: info.data.name, author: info.data.author, - description: urlParser(info.data.description.replace(/\n/g, '
')), + description: info.data.description, //updated: info.updated, version: info.data.version, icon: info.data.screenshot_url, diff --git a/src/features/marketplace/views/Browse.jsx b/src/features/marketplace/views/Browse.jsx index e74d01bb..ed756f4e 100644 --- a/src/features/marketplace/views/Browse.jsx +++ b/src/features/marketplace/views/Browse.jsx @@ -16,7 +16,7 @@ import Dropdown from '../../../components/Form/Settings/Dropdown/Dropdown'; import { Header } from 'components/Layout/Settings'; import { Button } from 'components/Elements'; -import { install, urlParser, uninstall } from 'utils/marketplace'; +import { install, uninstall } from 'utils/marketplace'; class Marketplace extends PureComponent { constructor() { @@ -98,7 +98,7 @@ class Marketplace extends PureComponent { type: info.data.type, display_name: info.data.name, author: info.data.author, - description: urlParser(info.data.description.replace(/\n/g, '
')), + description: info.data.description, //updated: info.updated, version: info.data.version, icon: info.data.screenshot_url, diff --git a/src/features/marketplace/views/ItemPage.jsx b/src/features/marketplace/views/ItemPage.jsx index 80ec728b..1b0ce118 100644 --- a/src/features/marketplace/views/ItemPage.jsx +++ b/src/features/marketplace/views/ItemPage.jsx @@ -23,6 +23,8 @@ import { ShareModal } from 'components/Elements'; import placeholderIcon from 'assets/icons/marketplace-placeholder.png'; import { Items } from '../components/Items/Items'; +import Markdown from 'markdown-to-jsx'; + class ItemPage extends PureComponent { constructor(props) { super(props); @@ -230,10 +232,7 @@ class ItemPage extends PureComponent { {variables.getMessage('modals.main.marketplace.product.description')} - + {this.props.data.data.description} {this.props.data.data.quotes && ( <> diff --git a/src/features/misc/sections/Changelog.jsx b/src/features/misc/sections/Changelog.jsx index b329ce62..42c15a7f 100644 --- a/src/features/misc/sections/Changelog.jsx +++ b/src/features/misc/sections/Changelog.jsx @@ -111,7 +111,9 @@ class Changelog extends PureComponent { {this.state.title} Released on {this.state.date} - {this.state.content} + + {this.state.content} + ); } diff --git a/src/utils/marketplace/index.js b/src/utils/marketplace/index.js index c5cbfc23..0e7f7882 100644 --- a/src/utils/marketplace/index.js +++ b/src/utils/marketplace/index.js @@ -1,5 +1,4 @@ import { install } from './install'; import { uninstall } from './uninstall'; -import { urlParser } from './urlParser'; -export { install, uninstall, urlParser }; +export { install, uninstall }; diff --git a/src/utils/marketplace/urlParser.js b/src/utils/marketplace/urlParser.js deleted file mode 100644 index 1f35438d..00000000 --- a/src/utils/marketplace/urlParser.js +++ /dev/null @@ -1,13 +0,0 @@ -// based on https://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links -export function urlParser(input) { - const urlPattern = - /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,63}\b([-a-zA-Z0-9()!@:%_+.~#?&//=]*)/g; - const emailPattern = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g; - - const replaceUrl = (url) => `
${url}`; - const replaceEmail = (email) => `${email}`; - - const replacedUrls = input.replace(urlPattern, replaceUrl); - const replacedEmails = replacedUrls.replace(emailPattern, replaceEmail); - return replacedEmails; -}