diff --git a/src/components/Elements/MainModal/scss/settings/_main.scss b/src/components/Elements/MainModal/scss/settings/_main.scss index d8c8e34a..e1e6e5d3 100644 --- a/src/components/Elements/MainModal/scss/settings/_main.scss +++ b/src/components/Elements/MainModal/scss/settings/_main.scss @@ -55,7 +55,7 @@ input { @include themed { background: t($modal-sidebar); - border: 3px solid t($modal-sidebarActive); + border: 1px solid t($modal-sidebarActive); color: t($color); } 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 1366f541..6891a0d0 100644 --- a/src/components/Elements/MainModal/scss/settings/modules/tabs/_changelog.scss +++ b/src/components/Elements/MainModal/scss/settings/modules/tabs/_changelog.scss @@ -1,15 +1,8 @@ .updateChangelog { max-width: 75%; + margin-top: 15px; white-space: pre-wrap; - li { - cursor: initial; - font-size: 1rem; - list-style-type: disc; - padding: 0; - margin-left: 20px; - } - a { color: var(--modal-link); @@ -20,14 +13,8 @@ } .changelogtab { - h1 { - max-width: 85%; - font-size: 2rem; - margin-bottom: -10px !important; - } - - h5 { - line-height: 0 !important; + .mainTitle { + margin: 0 !important; } img { diff --git a/src/features/misc/sections/Changelog.jsx b/src/features/misc/sections/Changelog.jsx index 01a039c6..6f4c2a78 100644 --- a/src/features/misc/sections/Changelog.jsx +++ b/src/features/misc/sections/Changelog.jsx @@ -19,13 +19,24 @@ class Changelog extends PureComponent { } parseMarkdown = (text) => { - text = text.replace(/^\* /gm, '
  • ').replace(/\n/g, '
  • '); - text = text.replace(/\*\*(.*?)\*\*/g, '$1'); - text = text.replace(/^## (.*$)/gm, '

    $1

    '); - text = text.replace( - /((http|https):\/\/[^\s]+)/g, - '$1', - ); + if (typeof text !== 'string') { + throw new Error('Input must be a string'); + } + + // Replace list items + text = text.replace(/^\* (.*$)/gm, '
  • $1
  • '); + + // Wrap list items in + text = text.replace(/((
  • .*<\/li>\s*)+)/g, ''); + + // Replace other markdown syntax + text = text + .replace(/\*\*(.*?)\*\*/g, '$1') + .replace(/^## (.*$)/gm, '$1') + .replace( + /((http|https):\/\/[^\s]+)/g, + '$1', + ); return text; }; @@ -123,8 +134,8 @@ class Changelog extends PureComponent { return (
    -

    {this.state.title}

    -
    Released on {this.state.date}
    + {this.state.title} + Released on {this.state.date} {this.state.image && (