Commit Graph
8303 Commits
Author SHA1 Message Date
evazion 8e4e274dae Fix #4186: Add tooltips to post #xxx links. 2019-10-06 18:05:13 -05:00
evazion d69e95a539 Fix #4180: Tooltip requests can be spammed.
* Cancel pending ajax requests when mousing out of the thumbnail.
  Prevents multiple requests from piling up if the user moves in and out
  of the thumbnail before the first request completes. This normally
  isn't possible except during slowbooru.

* Show an error message if the ajax request fails unexpectedly.
2019-10-06 02:54:27 -05:00
evazion 61619b719e Add rel="noreferrer" to external links.
Tells browsers not to send the Referer header when following external
links. Among other things, this bypasses Pixiv's anti-hotlinking
protection when opening direct image sources from Pixiv.
2019-10-06 01:32:14 -05:00
evazion ce33cd8b02 Fix #4185: Embedded translation notes aren't being styled. 2019-10-06 01:26:08 -05:00
evazion fbb5076c70 Fix #4184: post_versions API throws when user is 'anonymous' 2019-10-06 00:42:51 -05:00
evazion 188602abcc css: fix long blacklists not truncating in sidebar.
* https://danbooru.donmai.us/forum_topics/9127?page=281#forum_post_160147
* https://css-tricks.com/flexbox-truncated-text
2019-10-03 21:51:33 -05:00
evazion d64236813a js: replace <meta> tags with <body> data attributes.
Refactor things to store information about the current user as data
attributes on the <body> tag rather than as <meta> tags. These <meta>
tags are now deprecated and will be eventually removed.

* Store all of the current user's API attributes as data attributes on
  the <body> tag.

* Add `CurrentUser.data` for getting data from the <body> tag, and
  use it instead of `Utility.meta`.

* Add `CurrentUser.update` for updating the current user's settings.

* Fix a bug with the user named "Anonymous" not being able to edit notes.
2019-10-02 15:59:22 -05:00
evazion b492b5de9c modqueue: improve layout on mobile.
* Switch layout from float to flexbox.
* Collapse to one column layout on mobile (thumbnails above post info).
* Wordbreak overly long sources.
2019-10-02 01:52:24 -05:00
evazion d9f154094f css: switch mod dashboard, keyboard shortcuts pages to flexbox.
* Switch /static/keyboard_shortcuts from float-based layout to flexbox.
* Switch /moderator/dashboard from float-based layout to flexbox.
* Remove various .clearfix, `clear: both` rules.
* Remove dead .quick-mod rule.
2019-10-02 01:52:24 -05:00
evazion b9c869f3e4 css: fix stylelint issues. 2019-10-02 01:52:24 -05:00
evazion 60eaa99784 css: add stylelint. 2019-10-02 01:52:24 -05:00
evazion c17d95309a gems: update gems. 2019-10-02 01:52:19 -05:00
evazion 3096cea2d6 maintenance: fix db timeouts in regenerate_post_counts!
Disable database timeouts durings daily maintenance. Fixes
`regenerate_post_counts!` timing out. Remove calls to without_timeout
because otherwise it will reenable the timeout when trying to restore
the old timeout (see 97cc873a3f).
2019-10-01 22:51:40 -05:00
evazion 5d90256b24 spam detection: whitelist users more than 1 month old. 2019-10-01 22:51:40 -05:00
evazion ed7b6c781a /related_tags: fix category dropdown not working. 2019-10-01 22:51:13 -05:00
evazion 978844c548 /user_name_change_requests: fix renames not being visible to all users. 2019-10-01 00:45:45 -05:00
evazion 1291505546 Fix blacklists not working on /comments page.
This rule:

    .post-preview.blacklisted-active, #image-container.blacklisted-active, #c-comments .post.blacklisted-active {
      display: none;
    }

was being overridden by this rule:

    div#c-comments div#a-index div.post, div#c-comments div#a-show div.post {
      display: flex;
    }
2019-10-01 00:36:47 -05:00
evazion f6d63b6843 Fix broken layouts in old browsers that lack flexbox support.
Very old browsers (in particular, Firefox 16 and iOS 8.4 Safari) don't
support flexbox without prefixes, which breaks sidebar and comment
layouts. Extend the browserlist config so that autoprefixer generates
flexbox prefixes for these browsers.
2019-09-30 16:40:56 -05:00
evazion 83538b8105 /posts: fix duplicate share box id. 2019-09-30 12:01:42 -05:00
evazion dade1e67b0 /post_versions: add search form, tweak layout.
* Add search form above table.
* Move thumbnail to left of table when viewing history of single post.
* Remove unrelated links from subnav menu.
* Fix bugs with changed_tags search.
2019-09-30 02:51:13 -05:00
evazion e3b49a2a6d unicorn: bump worker processes (16 -> 20). 2019-09-30 01:00:28 -05:00
evazion 4d45141c4e js: standardize width of dialog boxes.
Increase width of artist commentary dialog, saved search dialog, and
favgroups dialog to 700px (the width that most other dialog boxes use).
2019-09-30 00:58:34 -05:00
evazion c66f7c4626 post/pool versions: fix database timeouts not being set.
Bug: database timeouts were set only on the main database, not on the
post and pool versions database, so users effectively had an unlimited
timeout when dealing with these things.
2019-09-30 00:58:34 -05:00
evazion 5b2675b831 css: clean up responsive css.
* Reduce size of buttons, form inputs, site menu items, paginator, and
  sidebar text.
* Remove various dead rules (nonexistent selectors, rules overriden by
  other rules, rules that were otherwise redundant or did nothing).
* Increase page margin size.
* Fix notes being mispositioned (caused by `#image { margin-top: 5px }` rule).
2019-09-30 00:58:34 -05:00
evazion 5818c367fd css: add .mobile-only, .desktop-only classes. 2019-09-30 00:58:34 -05:00
evazion cf97235aa6 css: reduce spacing between comments on mobile. 2019-09-30 00:58:34 -05:00
evazion fa70014a3c forum topics: adjust page title, reply link.
* Change page title from "Forum - Blah blah - Danbooru" to "Blah blah blah - Forum - Danbooru"
  so that more of the thread title is visible in tabs.

* Change "Reply »" to "Post reply" for consistency with comments (where
  the new comment link is called "Post comment".

* Remove "Topic: " so that topic titles take up less space on mobile.
2019-09-29 16:12:16 -05:00
evazion fc3441606e forum posts, comments: make timestamps into permalinks.
Make the timestamp beneath the username on forum posts into a permalink
that links to the post in full context of the thread. For comments, make
the timestamp link to the comment in full context of the post.

* Make the timestamp in forum posts link to /forum_posts/123.
* Make the timestamp in comments link to /posts/456#comment_123.
* Make /forum_posts/123 redirect to /forum_topics/456#forum_post_123.
* Make /comments/123 redirect to /posts/456#comment_123.
* Remove the "ID: ###" and "Permalink" fields from forum posts.
2019-09-29 15:57:15 -05:00
evazion 9ba46105dd tests: skip system tests when firefox isn't installed. 2019-09-29 14:29:28 -05:00
evazion f34489af02 css: factor out shared forum post / comment css. 2019-09-29 14:09:47 -05:00
evazion 5dfc14ba07 css: switch sidebar layout from float to flexbox. 2019-09-28 23:45:47 -05:00
evazion 960e5d4ae0 views: factor out sidebar layout template.
* Factor out common sidebar layout template.
* Convert wiki pages and posts to use this template.
* Add data-layout attribute to <body> element indicating the current layout.
2019-09-28 17:50:10 -05:00
evazion f7d7ed4b23 css: generalize anchor :target highlighting.
Generalize :target css so that it works on other things besides forum
posts (e.g. wiki pages, /post_versions#post-version-123).
2019-09-28 17:50:10 -05:00
evazion 6ef1a1c0b8 css: fix dead space around thumbnails in tables. 2019-09-28 17:50:10 -05:00
evazion 085e903e02 /post_versions: reorganize layout, add thumbnails.
* Add thumbnails to /post_versions (when viewing history of a single
  post, thumbnail is above table rather than in every table row).
* Combine user, date, and ip address columns into one column.
* Remove rating and parent columns (rating and parent changes are
  already listed in the tags column).
2019-09-28 17:48:35 -05:00
evazion 609a440d1c /post_versions: unify standard and revert listings. 2019-09-28 14:47:21 -05:00
evazion 62ec679bfb /post_versions/search: add tag autocomplete + quicksearch. 2019-09-28 12:14:09 -05:00
evazion 82af426592 Remove reference to google-api-client gem (fixup b2d0d2689). 2019-09-28 12:06:42 -05:00
evazion a39b67b901 Remove mod-only user revert system (#4178).
The mass undo system from #4178 replaces this system.

Followup to f2dccf8cf.
2019-09-27 21:48:49 -05:00
evazion 3b75dbf64f Update gems. 2019-09-27 21:28:16 -05:00
evazion b2d0d2689b gems: remove unused google-api-client gem. 2019-09-27 21:14:38 -05:00
evazion f2dccf8cf1 Remove mod-only bulk revert system (#4178).
The mass undo system added in #4178 is a replacement for the mod-only
bulk revert system.
2019-09-27 21:12:53 -05:00
evazion 1341dbb262 Remove post changes report.
This was a mod-only report that used Google BigQuery to search post
versions by tag. 2b4ee0ee8 allows all users to search post versions by
tag, so this report is no longer necessary.
2019-09-27 21:12:53 -05:00
evazion d29bbbbd71 Fix #4178: add ability to mass undo tag edits.
Adds checkboxes to the /post_versions index allowing you to select and
undo multiple versions at once.
2019-09-27 21:02:32 -05:00
evazion 9000bc5cc6 Fix ApplicationRecord#search_attribute (fixup 2b4ee0ee).
`column.array?` failed when the column was actually an association.
2019-09-27 21:02:32 -05:00
evazion 6f0b58ad49 tags: fix typo in order_similarity (fixup 8de692580). 2019-09-26 22:14:48 -05:00
evazion 97e0c16af6 /tags: add history, related, similar links. 2019-09-26 22:14:29 -05:00
evazion 2b4ee0ee8f post versions: add ability to search post versions by tags.
* Add ability to search /post_versions by added tags, removed tags, or
  changed tags (added or removed).

* Add 'History' link to the sidebar of the /posts index. This is a
  shortcut for a /post_versions search of the current tag.
2019-09-26 22:14:29 -05:00
evazion 12de26d2cf post versions: add more search options to /post_versions/search. 2019-09-26 16:35:05 -05:00
evazion 3341223b40 css: adjust comment / forum post layout on mobile.
* Remove borders around comments.
* Remove background behind commenter name / timestamp.
* Put timestamp on same line as commenter name.
2019-09-26 02:03:13 -05:00