[PostReplacements] Add a DNP notice (#776)

This commit is contained in:
Cinder 2024-10-29 07:37:58 -07:00 committed by GitHub
parent 5616241e8d
commit 21c486a475
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 33 additions and 24 deletions

View File

@ -8,6 +8,8 @@ LStorage.get = function (name) {
}; };
LStorage.getObject = function (name) { LStorage.getObject = function (name) {
const value = this.get(name); const value = this.get(name);
if (!value) return null;
try { try {
return JSON.parse(value); return JSON.parse(value);
} catch (error) { } catch (error) {

View File

@ -32,4 +32,8 @@ div#c-post-replacements {
font-weight: bold; font-weight: bold;
width: fit-content; width: fit-content;
} }
#avoid-posting-notice ul {
margin-left: 1em;
}
} }

View File

@ -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 { div.quick-mod {
.quick-mod-group { .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#c-post-versions, div#c-artist-versions {
div#a-index { div#a-index {
a { a {

View File

@ -10,6 +10,9 @@
<div><%= "#{post.image_width}x#{post.image_height} (#{post.file_size.to_fs(:human_size, precision: 5)})" %></div> <div><%= "#{post.image_width}x#{post.image_height} (#{post.file_size.to_fs(:human_size, precision: 5)})" %></div>
</div> </div>
<br> <br>
<%= render "posts/partials/show/avoid_posting", post: post %>
<br />
<div id="replacement-uploader" class="simple_form"></div> <div id="replacement-uploader" class="simple_form"></div>
</div> </div>