Commit Graph

401 Commits

Author SHA1 Message Date
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
56ea6b9ec5 Merge pull request #4387 from BrokenEagle/embedded-note-alignment
Add additional settable attributes for embedded notes alignment
2020-04-04 02:20:24 -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
fde42022c0 post disapprovals: refactor disapproval reasons.
* Factor out reasons into a constant
* Change column default and eliminate unused `legacy` reason.
2020-04-03 23:44:02 -05:00
BrokenEagle
a4ab165de7 Add alignment attributes for embedded notes
- justify-conent is for L-R alignment
- align-items is for T-B alignment
2020-04-04 02:10:33 +00: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
ddb888297e Fix movable status not being removed after the note has been saved
This was also causing the movable status on new notes to require
clicking twice to remove that status since the note ID gets changed
but the move ID wasn't.
2020-03-28 21:08:27 +00: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
902c0b910e Make note bodies smaller and simpler for embedded notes 2020-03-28 21:08:26 +00:00
evazion
71e1d7c2a5 notes: fix note mispositioning when image is blacklisted.
If the image is blacklisted on initial page load then unblacklisted
after the image is loaded, then the notes will be mispositioned at the
bottom of the image. This is because we relied on $image.height() to
calculate the note position, but the image height is zero when the image
is hidden.

Potential fix for #4370.
2020-03-28 14:56:38 -05: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
f1ffc016b8 posts: fix tagged filenames disappearing after viewing original.
The file url in the data attributes on the image container doesn't
contain the tags for performance reasons. The post data attributes are
used for thumbnails too and we don't want to include tagged filenames
for those because it requires looking up tag categories, which triggers
a lot of redis calls on the post index page.
2020-03-27 21:34:16 -05: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
578f99f3c2 notes: remove dead resize_inner_border method.
Followup to e844a06e6. Also remove a dead reference to
`#original-file-link` (removed years ago).
2020-03-26 22:04:36 -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
052c039ce8 Only count unique post IDs for blacklist menu 2020-03-19 18:35:41 +00: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
ffc57b6cfa Use alternate iterators which have better performance 2020-03-07 08:13:14 +00: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
BrokenEagle
161e776cf7 Add utility regexp split function for non-whitespace words 2020-03-07 08:13:14 +00:00
BrokenEagle
d1aed303fd Fix blacklist code executing muliple times
- When enabling/disabling all, it was executing on every single blacklist line
- When starting out disabled, it was executing several times
2020-03-07 08:13:13 +00:00
BrokenEagle
d84150b232 Fix posts not being processed by blacklist after post updates
- Blacklisting individual posts was moved into its own function
- Fixed Javascript variables being leaked into the user environment
- Fixed post qTips being orphaned by replacements by destroying them first
- Moved edit form check into post success to avoid repeating post check
2020-03-07 08:13:08 +00:00
evazion
967d398c8e search: move query parsing code from tag model to post query builder. 2020-03-06 23:23:38 -06: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
39ad0d2210 settings: rename "disable responsive mode" to "enable desktop mode"
Desktop mode is a better description. Most users don't know what responsive mode means.
2020-03-06 19:37:11 -06:00
evazion
32bad825e1 tags.scss: remove unused banned tag styling. 2020-03-06 15:14:25 -06:00
evazion
4c11e339bd artists: rename is_active flag to is_deleted.
Rename is_active to is_deleted. This is for better consistency with
other models, and to reduce confusion over what "active" means for
artists. Sometimes users think active is for whether the artist is
actively producing work.
2020-03-06 14:50:21 -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
7a81fd03ef Make clicking the box hide the popup note box in responsive mode
- This is because the note body of one note box could hide another note box
- The only option to hide the note body previously was to double tap the image
2020-03-04 00:35:45 +00:00