diff --git a/app/javascript/src/javascripts/utility/storage.js b/app/javascript/src/javascripts/utility/storage.js index 2a119e4de..37a6577d4 100644 --- a/app/javascript/src/javascripts/utility/storage.js +++ b/app/javascript/src/javascripts/utility/storage.js @@ -8,6 +8,8 @@ LStorage.get = function (name) { }; LStorage.getObject = function (name) { const value = this.get(name); + if (!value) return null; + try { return JSON.parse(value); } catch (error) { diff --git a/app/javascript/src/styles/specific/post_replacements.scss b/app/javascript/src/styles/specific/post_replacements.scss index febb2eb3c..dfc0d3e80 100644 --- a/app/javascript/src/styles/specific/post_replacements.scss +++ b/app/javascript/src/styles/specific/post_replacements.scss @@ -32,4 +32,8 @@ div#c-post-replacements { font-weight: bold; width: fit-content; } + + #avoid-posting-notice ul { + margin-left: 1em; + } } diff --git a/app/javascript/src/styles/specific/posts.scss b/app/javascript/src/styles/specific/posts.scss index fd9fa457a..44772ee9a 100644 --- a/app/javascript/src/styles/specific/posts.scss +++ b/app/javascript/src/styles/specific/posts.scss @@ -331,30 +331,6 @@ div#c-posts { } } - div#avoid-posting-notice { - font-size: 1.25rem; - line-height: 1.5rem; - padding: $padding-025 $padding-050; - - background-color: themed("color-section"); - border: 1px solid themed("color-foreground"); - - ul { - list-style: disc; - } - - li { - .artist, .separator, .details { - display: table-cell; - } - - .separator { - color: var(--color-text-muted); - padding: 0 0.3rem; - } - } - } - div.quick-mod { .quick-mod-group { @@ -453,6 +429,30 @@ div#c-posts { } } +div#avoid-posting-notice { + font-size: 1.25rem; + line-height: 1.5rem; + padding: $padding-025 $padding-050; + + background-color: themed("color-section"); + border: 1px solid themed("color-foreground"); + + ul { + list-style: disc; + } + + li { + .artist, .separator, .details { + display: table-cell; + } + + .separator { + color: var(--color-text-muted); + padding: 0 0.3rem; + } + } +} + div#c-post-versions, div#c-artist-versions { div#a-index { a { diff --git a/app/views/post_replacements/_new.html.erb b/app/views/post_replacements/_new.html.erb index 469540f47..b8399907f 100644 --- a/app/views/post_replacements/_new.html.erb +++ b/app/views/post_replacements/_new.html.erb @@ -10,6 +10,9 @@