Commit Graph

481 Commits

Author SHA1 Message Date
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
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
778619301e Resize font and other size parameters when the image resizes
- Each element has the size style elements scaled to the font size with "em"
-- The font size of the element is scaled in percentage to the parent element
- All sizes are then scaled by changing the font size of the note container
- The scale resize calculation uses the large image size
-- Since this is the assumed default size for a user
- Preview sets the font size of the inner box to the base font size
-- This allows the calculations to be performed correctly
2020-02-10 17:22: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
BrokenEagle
de1324098d Rework wiki page versions index/diff views
- Changed to using the diff-body CSS class
-- Removed unnecessary elements from the CSS style file
- Does a symmetric difference on the array fields to detect differences
- Add more descriptors to the status/changes column
- Specifically add <br> to statuses to cause line breaks
2020-02-08 22:57:29 +00:00
BrokenEagle
ede7167bb8 Rework pool versions index/diff views
- Changed to using the diff-body CSS class
-- Removed unneeded CSS style file
- Removed trailing whitespace after the >>> link
-- It was causing artifact line-throughs to appear after the link
- Changed the diff link to only render when a text field has changed
-- Because the post changes are already shown on the index view
- Specifically add <br> to statuses to cause line breaks
2020-02-08 22:57:29 +00:00
BrokenEagle
d62f7e786e Revise display on artist commentary versions index
- All text fields are now shown in their non-rendered form
-- This allows changes to be highlighted with the diff builder
-- The different fields were labeled and separated for easier discernment
-- Fields are only shown if they have text in either the current or previous versions
- Various changes are also verbalized for easier discovery
- The date and the user columns were combined
-- This is more in line with other indexes, plus it saves on space
- The revert listing was changed to use a thumbnail instead of post ID links
-- This makes it more in line with the post versions index
2020-02-08 22:57:28 +00:00
BrokenEagle
154849a501 Added/modified common stylesheets
- Added a generalized diff-body class
- Added a generalized versions stylesheet
2020-02-08 22:57:27 +00:00
evazion
9322c596e2 Fix #4279: Very long tags break forum post format.
* Enable word breaks for all DText-formatted text. Ensures extremely
  long strings in comments get broken.

* Fix the author column on comments/forum posts to use a fixed 12em
  width (except on the mobile layout). Using flex-basis was wrong because
  it allowed the author column to shrink if the other column was too wide.
2020-02-05 16:49:04 -06:00
evazion
aeec46b212 views: move inline javascript to app bundle. 2020-01-26 19:16:38 -06:00
evazion
2265721cb2 forum: move inline css to stylesheet. 2020-01-26 19:16:38 -06:00
BrokenEagle
d9e5b94838 Added search for posts with the embedded flag enabled 2020-01-23 03:30:38 +00:00
evazion
9d71c77524 autocomplete: fix favgroup:<name> returning favgroups for other users.
* Fix favgroup:<name> autocompletion to only return favgroups for the
  current user.
* Add favgroup autocomplete to the /favorite_groups search form.
2020-01-22 11:21:16 -06:00
evazion
0a3d038df9 autocomplete: fix broken wiki page autocomplete.
Fix breakage from 34368272e.
2020-01-21 18:44:02 -06:00
BrokenEagle
5f746c1a34 Made recommended changes to moderator reports (see #4267) 2020-01-21 01:38:08 +00:00
BrokenEagle
a3e889bdf5 Added highlighting and notices for moderators
- Posts and topics have an added moderation_reports function
-- This is so all moderation reports can be loaded in a single query
- Those moderation reports are passed into the render functions separately
-- This is so the individual comments/posts don't have to be queried
2020-01-18 21:10:50 +00:00
evazion
ab325c5d2b favgroups: convert post_ids from string to array. 2020-01-17 00:19:20 -06:00
evazion
09833e9b61 Merge pull request #4259 from BrokenEagle/upload-commentary-enhancements
Add upload commentary enhancements
2020-01-17 00:18:17 -06:00
evazion
1ce628c31f favgroups: fix add to favgroup not working.
Fix the Add to Favgroup button not working when the user only has 1
favgroup.
2020-01-15 13:17:04 -06:00
BrokenEagle
82b621d87d Added upload commentary enhancements
- Can now translate commentary from the upload page
- Can now add commentary tags with a checkbox
2020-01-14 23:59:27 +00:00
evazion
b3eeb170cb explore/posts/intro: remove page.
This was an alternate frontpage that contained a list of previews of the
most popular tags. This page was never linked from anywhere and it was
unknown by most users.
2020-01-12 23:01:04 -06:00
evazion
90b94adee8 /wiki_page_versions/diff: use SetDiff to diff other_names.
Use SetDiff instead of DiffBuilder to generate diffs for wiki page other
names. SetDiff is what we use for artist other names.
2020-01-12 16:31:23 -06:00
evazion
56faf701f3 Merge pull request #4254 from BrokenEagle/copyable-note-number
Move note number to the body so that it can be copied
2020-01-10 20:22:07 -06:00
evazion
afa4a2c985 js: fixup issues with @rails/ujs.
Fix a couple regressions caused by the migration from jquery-ujs to
@rails/ujs in 9f4ac4c96:

* Add authenticity tokens to all remote forms. By default, Rails doesn't
  doesn't include authenticity tokens in remote forms because it can cause
  problems with fragment caching. This was fine with jquery-ujs because it
  would insert the authenticity token when the remote form was
  submitted, but apparently @rails/ujs doesn't do this. This broke
  certain remote forms nested inside of jquery UI dialogs.

* Fix dialogs to trigger remote form submissions through @rails/ujs
  instead of through jquery. This fixes a problem where remote forms that
  returned a javascript response displayed the response as plaintext
  instead of executing the returned javascript.
2020-01-10 19:16:27 -06:00
evazion
3ca4f4f32c posts: convert post edit form to simple form. 2020-01-10 12:08:28 -06:00
evazion
9f4ac4c96a js: replace jquery-ujs with @rails/ujs. 2020-01-09 22:15:18 -06:00
BrokenEagle
4a873626c8 Moved note title to the body so that it can be copied
- Adjusted the title text for new notes
- Adjusted the starting dialog sizes to fit the new text
2020-01-09 22:14:01 +00:00
evazion
e119524f20 Merge pull request #4247 from BrokenEagle/pool-version-enhancements
Add pool version enhancements
2020-01-08 19:34:25 -06:00
evazion
0b31a6f491 Merge pull request #4249 from BrokenEagle/artist-wiki-links
Have artist wiki links go to artist page
2020-01-08 11:27:37 -06:00
evazion
11411ab778 Merge pull request #4251 from BrokenEagle/tag-script-storage
Change tag script storage
2020-01-08 11:21:08 -06:00
BrokenEagle
ef29ede448 Fix issue where numeric keypad was setting bad values 2020-01-08 00:22:28 +00:00
BrokenEagle
6f698ec104 Convert tag script storage to local storage 2020-01-08 00:22:28 +00:00
BrokenEagle
57befe894d Fix the error from missing jQuery-ui effects 2020-01-07 22:32:01 +00:00
BrokenEagle
9182a4f556 Highlight carriage return changes 2020-01-07 18:48:51 +00:00
BrokenEagle
34542fdf5c Pool versions diff: Use diff builder to highlight description changes
- Add highlights for name changes
- Separate and name the sections
2020-01-07 18:48:51 +00:00
evazion
ba7c38cfe0 forum: fix .forum-topic-row selector.
The .forum-topic-row class was removed. Use different selector instead.

This rule ensures the timestamp doesn't wrap on small screens.
2020-01-07 02:51:19 -06:00
BrokenEagle
642e121ad9 Have artist wiki links go to artist page 2020-01-07 05:21:29 +00:00
evazion
ee212f8ebb css: fix references to data-user attributes on <body> tag.
Fixup for 5e03c3d84.
2020-01-05 16:41:42 -06:00
BrokenEagle
5e03c3d84e Adjust naming of user and model attributes
- Remove unnecessary attributes that cause additional SQL queries
- Remove unneeded check for nil on current_item
2020-01-05 19:46:08 +00:00
BrokenEagle
4b904dff5a Convert classes to use data attributes
- Remote resolved classes on post flags since they were unused
2020-01-04 22:02:45 +00:00
BrokenEagle
043944e1dd Convert index tables to using table builder 2020-01-04 22:02:43 +00:00
evazion
c251d145e4 Revert "Add Danbooru Winter Sale."
This reverts commit 963f1f7991.
2020-01-02 01:29:55 -06:00