Commit Graph

575 Commits

Author SHA1 Message Date
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
BrokenEagle
a206c9d6ac Added a view large link to facilitate switching between image sizes
- The link is placed in the Options section
-- In the same place as the now defunct "Resize to image" link
-- This was so that it doesn't interfere with the image when in full size
2020-03-04 00:35:45 +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
b232470248 search: change behavior of disapproval:<reason> metatag.
* Change the `disapproval:<reason>` metatag to `disapproved:<reason>`.

* Change `disapproved:<reason>` to show all posts disapproved for a
  given reason, not just those disapproved by the current user.

* Allow searching for your own disapprovals with `disapproved:<my_name>`.

* Drop the `disapproved:<any|none>` metatags. `disapproved:any` is
  equivalent to `disapproved:<my_name>` and `disapproved:none` is
  equivalent to `-disapproved:<my_name>`.

These changes are so that you can search e.g. disapproved:poor_quality
to find all posts disapproved for poor quality.
2020-02-29 17:46:57 -06:00
evazion
cded0f763b approvers: remove "you haven't moderated in awhile" notice.
Remove the nag message when an approver hasn't approved anything
recently. Also remove the modqueue random posts page. As of 3d410398a,
inactive approvers are now warned via dmails.
2020-02-28 14:28:08 -06:00
evazion
869142ed1b Fix #4314: Favorite/vote modes give generic error messages.
Refactor tag scripts to fix multiple issues:

* Errors during tag scripting didn't show the actual error message, just
  a generic "There was an error updating post #NNN" message.
* The quick edit form didn't show any error messages at all on failure.
* Thumbnails didn't have all their data attributes properly updated
  after the post was updated.

This changes it so that thumbnails have their html fully replaced after
updating. This has the side effect of removing event handlers bound
directly to the thumbnail. A `danbooru:post-preview-updated` event is
fired in case userscripts need to detect when thumbnails are updated.
2020-02-27 19:23:48 -06:00
evazion
4b9a29743a Revert "Fix post resize image control"
This reverts commit 2affd4a3b5.
2020-02-27 00:19:09 -06:00
BrokenEagle
f671a5528d Adapt which note body corner is used for note box rotations
Beforehand it was always using the left corner, which was causing
the note body to be to the right of the note box whenever the bottom
angle of the note box was descending. Now it selects the left or
the right corner depending on the angle, which keeps the note body
in a better position right beneath the note box.
2020-02-25 17:16:32 +00: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
1ce01df3db Merge pull request #4302 from BrokenEagle/fix-nonembedded-note-resizing
Restrict note container resizing to embedded notes
2020-02-23 01:01:44 -06:00
BrokenEagle
2b0d52b5bb Restrict note container resizing to embedded notes 2020-02-21 20:07:19 +00: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
f47c56d976 approvals: move post approval endpoint to /post_approvals.
Move the post approval endpoint from `POST /moderator/post/approval` to
`POST /post_approvals`.
2020-02-20 15:49:18 -06:00
evazion
610ad9e119 mode menu: refactor favorite and vote options. 2020-02-20 03:42:07 -06:00
evazion
c89c7ccc63 mode menu: remove post ban, rating lock, note lock options. 2020-02-20 03:42:07 -06:00
BrokenEagle
e4ff641c9a Fix autocomplete insert completion
It was removing line returns, even when line returns are important,
such as in the blacklist and frequent tags input fields. Besides those,
it was also causing confusion when editing tags on a post, as those
are divided into categories, but adding an additional tag for a category
at the end of a group causes groups of tags to be combined.
2020-02-18 00:00:58 +00: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
evazion
caf54fe45a blacklists: remove ability for mods to blacklist uploaders by name. 2020-02-16 04:00:42 -06:00
BrokenEagle
2affd4a3b5 Fix post resize image control
It was resizing images to the original width and height, even if
they were currently being shown in their large image format (850px).
This was causing excessive blur and artifacts in some cases.
2020-02-14 20:49:37 +00:00
BrokenEagle
115355ab7b Fix dialogue text for new notes
It was showing "Editing note #xx" and so on for all new notes past the first initial new note.
2020-02-14 20:49:17 +00: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
c082a258c7 Add note key resize function
- Same as using the key nudge, however it's used with the shift key
2020-02-11 04:56:26 +00:00