Commit Graph

215 Commits

Author SHA1 Message Date
evazion
94180d77b4 dark mode: fix <kbd> tag colors.
Use a light background for <kbd> tags on the keyboard shortcuts page for
better contrast with the page backgorund.
2020-04-17 00:39:16 -05:00
evazion
bfdb0a4f5e notes: fix note text vertically overflowing note body.
Can happen when the translator intentionally sets a note body height
that's too small for the note and it causes the note text to overflow.

ref: https://danbooru.donmai.us/forum_topics/9127?page=301#forum_post_164787
2020-04-07 14:16:51 -05:00
evazion
b3238c5dbe dtext: fix scrunched table columns.
Fix table columns being collapsed to one character wide in certain
cases. Caused by setting `word-break: break-word` on div.prose, which
was needed to stop very long unbroken strings making columns too wide,
but has the opposite effect of making columns too narrow in other cases.

Example: https://danbooru.donmai.us/forum_topics/13868?page=28#forum_post_164950
2020-04-07 14:05:46 -05:00
evazion
8773c7e87f Merge pull request #4369 from BrokenEagle/post-version-fixes
Various post version fixes
2020-04-04 02:55:37 -05:00
evazion
dda47f15b0 Merge pull request #4350 from BrokenEagle/fix-relationship-previews
Fix relationship preview alt text overflowing
2020-04-04 02:34:03 -05:00
evazion
522c8c219f Merge pull request #4373 from BrokenEagle/note-fixes
Various note fixes
2020-04-04 01:17:32 -05:00
evazion
25cca328b2 Fix #4388: Missing newline in upload form error. 2020-04-03 23:44:02 -05:00
evazion
9def8c5c0d notes: prevent notes appearing above site notices. 2020-03-31 01:23:16 -05:00
evazion
cc385fa9e4 notes: better fix for note body sizing (#4375).
Setting max-width causes notes to overflow the note body if they set a
fixed `width` or they use `white-space: nowrap` and the line is wider
than the max-width. Using `width: min-content` instead makes the note
shrink to fit but doesn't prevent it from expanding if it needs to.
2020-03-31 01:18:23 -05:00
evazion
c44267b848 Fix #4375: The popup note boxes are very long 2020-03-29 02:53:50 -05:00
BrokenEagle
7358452152 Fix note borders not showing up with the dark theme
- Also remove unnecessary duplicated note variables for dark theme
2020-03-28 21:08:26 +00:00
BrokenEagle
6aa0adb738 Make the post versions more like the old format
- "Current" is now most like the old format
-- It is therefore now the default for post versions
- Only show the actual edits in their own column
- Show the current state at that version in another column
- On the "previous" view, don't double-show full list of tags for
  the first post versions, so leave edits blank
2020-03-28 06:29:41 +00:00
evazion
da235cec05 uploads: fix preview image resizing.
* Fix preview images not being resized to fit the screen when using the
  bookmarklet.

* Fit images to both screen width and height by default. Previously we
  fit to screen width only, so tall images were hard to see.

* Allow clicking on the image or pressing Z to toggle image size.

* Move size information to above the image and add resize links:
** small: fit width and height
** large: fit width
** full: fit none

* Bind the image error handler in an onerror attribute on the image
  itself so that it will always fire. Before it wouldn't fire if the image
  failed immediately on pageload before we could bind the error handler.
2020-03-27 21:16:46 -05:00
evazion
269c20d6ee notes: clean up note visibility toggling. 2020-03-26 22:04:36 -05:00
evazion
1af6850c7c posts: add "view original" sidebar option.
* Add a "View original" sidebar option.
* Rename the "View large" sidebar option to "View smaller".
* Remove the "Loading..." message when switching image sizes.
* Fix the V hotkey not working after using it once.
* Change #image-resize-link to .image-view-original link (note that
  there are two of these links now, one in the notice bar and one in the
  sidebar).
* Add a `data-post-current-image-size` attribute on the <body> element
  and use it to control visibility of links and notices.
2020-03-26 22:03:47 -05:00
evazion
87a51129b8 posts: add back "resize to window" link.
* Add back "Resize to window" link.
* Add Z shortcut for resize to window link (mnemonic: Z for zoom image).
* Resize images to screen width by default on both desktop and mobile.
* Make it so that notes are nested directly inside the .image-container
  element with the image, instead of inside a separate .note-container
  element. This means .image-container and .note-container are now the
  same element. This is so that the size of the .note-container is
  driven by the size of the image, which ensures that notes are
  automatically resized as the image is resized.
2020-03-26 21:55:59 -05:00
evazion
1126147dee posts: change #image-container, #note-container to classes.
Change #image-container and #note-container from IDs to classes. This is
necessary so that we can use one container element for both the image
container and the note container. This may break custom CSS and
userscripts.
2020-03-26 18:17:13 -05:00
evazion
f23df47c09 ip addresses: add ip address show page.
* Add IP address show page at /ip_addresses/1.2.3.4.
* Add "Details", "Ban IP", "Ban User" options to the /ip_addresses listing.
2020-03-23 01:48:59 -05:00
BrokenEagle
85611ec379 Fix relationship preview alt text overflowing 2020-03-21 06:40:21 +00:00
evazion
c2b2349472 Merge pull request #4339 from BrokenEagle/version-reports
Add alternate version comparisons
2020-03-20 16:32:28 -05:00
evazion
2bc99a813c Merge pull request #4320 from BrokenEagle/note-dimension-percentages
Convert notes to use percentages instead of exact coordinates
2020-03-20 16:26:02 -05:00
BrokenEagle
e23ee170f5 Add alternate comparison types to versions
- The types are:
-- Previous: The default and the previously used type
-- Subsequent: Compares against the next version
-- Current: Compares against the current version
- Allow switching between comparison types in index and diff views
-- Have links vary depending upon current comparison type
2020-03-17 18:31:20 +00:00
evazion
8253df84d9 forum: make status labels into clickable filters.
* Make it so that you can click the stickied / locked / deleted icons or
  the new / approved / pending / rejected labels to filter topics by
  that status.

* Replace the `mod_only` search param with `is_private`.
2020-03-16 21:23:27 -05:00
evazion
95d65b25e2 forum: add back 'new' label, move status labels to right-side column.
Also prevent long usernames from wrapping.

Fixes #4332.
2020-03-16 21:22:27 -05:00
evazion
e81161bca5 forum: adjust BUR status label colors (again).
* Indicate unread topics in bold instead of with a "NEW" label.
* Use pills for labels.
2020-03-11 00:01:56 -05:00
evazion
f917595554 forum: adjust BUR status label colors. 2020-03-10 23:11:41 -05:00
evazion
6504d44223 forum: change BUR counts to status labels.
Use pending / approved / rejected status labels in front of the topic
title instead of a BUR count column. This is to make the forum listing
easier to visually scan for resolved vs unresolved topics.

Labels are only added for topics in the Tags category. This is a hack to
avoid labels on megathreads that have had BURs mistakenly attached to them.

[APPROVED] and [REJECTED] labels are stripped from thread titles to make
the titles cleaner. This is a hack until these titles can be fixed.
2020-03-10 20:13:11 -05:00
evazion
134a06722a forum: use icons to indicate sticky/locked/deleted/restricted status. 2020-03-10 19:04:56 -05:00
evazion
c30ba8d5bc users/edit: fix Advanced settings section being shown by default. 2020-03-08 14:24:38 -05:00
BrokenEagle
8c1f6020ba Adjust how blacklist classes get added
- Rename class for links as it was a misnomer
2020-03-07 08:13:14 +00:00
evazion
a271ddcc29 views: reduce font size of Danbooru link in header. 2020-03-06 23:23:34 -06:00
evazion
9960290666 views: reduce font size of footer. 2020-03-06 19:56:53 -06:00
evazion
32bad825e1 tags.scss: remove unused banned tag styling. 2020-03-06 15:14:25 -06:00
BrokenEagle
20bad0ec53 Remove the standard line-height attribute from <br> elements
This is because it was messing with using line-height on the outer
element. In order to get around this, the line height had to be set
individually on every single <br> element used.
2020-03-04 08:21:12 +00:00
BrokenEagle
e844a06e61 Convert notes to use percentages instead of exact coordinates
- This allows for the note boxes to be easily resized
-- Now resizing the note container resizes all of the note boxes
-- The z-index and position values had to be adjusted for this
--- So that the note/preview boxes were still visible
--- So that the image was selectable with right clicks
- All of the inner box styles have been moved to the outer box
-- Now the inner box is only a container for the note body
- The always resize image option has been removed from user settings
-- The value still exists on the model for future rename/reuse
- The max width is set at 100% for responsive mode to fit the screen
2020-03-04 00:35:42 +00:00
evazion
85f1674618 modqueue: highlight bad tags instead of entire post.
Change it so that when a post contains bad tags, the tags themselves are
highlighted rather than the entire post.

This also adds a data-tag-name attribute to tags in tag lists.
2020-03-03 03:25:51 -06:00
evazion
b0e2ffbe7d modqueue: remove highlighting of high/low scoring posts. 2020-03-03 03:25:51 -06:00
evazion
fc97ea3c8e modqueue: rework post display.
Rework how posts are displayed in the modqueue:

* Rearrange post info to take up less space and to be consistent with
  how posts are shown on the comments index.
* Reduce font size of approve / reject options.
* Reduce empty space around thumbnails and between posts.
* Add size info beneath thumbnails.
* Allow voting on posts.
* Use PostPresenter.preview to standardize rendering of thumbnails. This
  adds parent/child borders, tooltips, and data attributes.
2020-03-03 03:25:51 -06:00
evazion
475d6ae7cf modqueue: move url from /moderator/post/queue to /modqueue. 2020-02-29 17:46:58 -06:00
evazion
928c7f8a0a Merge pull request #4281 from BrokenEagle/embedded-notes-improvements
Add embedded notes improvements
2020-02-24 01:13:13 -06:00
evazion
463b1b734e Add curated posts page.
Add a curated posts page at /explore/posts/curated. Curated posts are
the most favorited posts by contributor-level users (users with
unlimited upload permissions).

Also add an order:curated tag using for use in regular searches.
2020-02-23 17:52:38 -06:00
evazion
9b58cb7b42 mode menu: remove approve option.
Remove the approve option from the post mode menu. Mass approving posts
is rarely needed. The javascript was also buggy (it didn't update the
data attributes correctly when undeleting a post).

The replacement for this feature is to use a tagscript with the
status:active tag.
2020-02-20 17:43:33 -06:00
evazion
c89c7ccc63 mode menu: remove post ban, rating lock, note lock options. 2020-02-20 03:42:07 -06:00
evazion
7e67d3dd9c views: replace .category-N css classes with .tag-type-N
* Replace the .category-N CSS classes on tags with .tag-type-N. Before
  we were inconsistent about whether tag colors were indicated with
  .category-N or .tag-type-N. Now it's always .tag-type-N.

* Fix various places to not use Tag.category_for. Tag.category_for does
  one Redis call per tag lookup, which leads to N Redis calls on many
  pages. This was inefficient because usually we either already had the
  tags from the database, or we could fetch them easily.
2020-02-16 04:35:37 -06:00
BrokenEagle
44f32a1e5e Add ability to copy certain style attributes to the outer note boxes
- Attributes are pulled from the first element with class "note-box-attributes"
- Transform is note box only to prevent applying the same transform twice
-- Only rotations are allowed to prevent excessive scaling of note boxes
-- Note box positions are adjusted after drag/nudge/resize to prevent out-of-bounds
-- The note body is placed on the lowest box corner that is farthest left
- Background color is inner box only since the note box is already transparent
-- Backgrounds with any transparency aren't allowed as they would interfere with the text below
- Border radius is both since they both have borders
- Add full namespaces to all event removes to prevent bad removes
2020-02-11 04:56:27 +00:00
BrokenEagle
9fbeb5ec3a Add note key nudge function
- Notes must be clicked in order to engage the nudge function for that note
-- This status is indicated by a green border around the note
-- Clicking the note or another note will turn off nudging for that note
- Also prevent notes from being nudged outside of the image borders
2020-02-11 04:56:26 +00:00
BrokenEagle
e0e60a9546 Remove dead embedded code 2020-02-10 17:23:27 -06:00
BrokenEagle
44bcef03e1 Add additional styles for embedded notes
- Use CSS classes instead of applying the styles to the elements.
-- Allows a user to override any of the default styles being applied.
- Remove the borders and handles when not hovering over the box.
- Increase the opacity for embedded notes to full to avoid conflicts with
  the text underneath.
- Decrease the opacity a little when editing embedded notes.
-- Allows for better seeing of the text underneath while still being able
   to see the translation text above.
-- Compensated for by showing full opacity when hovering over the note box.
2020-02-10 17:20:56 -06:00
evazion
3ef4d9c7ac artists/summary: link other names to artist searches.
* Link other names to artist searches instead of to the new artist page.
* Remove the asterisk next to other names indicating the name isn't used
  as the primary name of another artist. This is almost always the case.
2020-02-10 17:11:38 -06:00
BrokenEagle
8ff00cfc7d Rework post version view
- Added a changes column explicitly listing all of the changes
-- This makes it more in line with the other views now
2020-02-08 22:57:30 +00:00