Commit Graph

10180 Commits

Author SHA1 Message Date
evazion
e23f09235e artists: redact version histories of banned artists.
Fix names and urls of banned artists being visible in Google through
artist version pages.
2021-02-07 23:28:50 -06:00
evazion
30b7345900 robots.txt: disallow crawling version pages.
Some of these pages were accidentally crawled because rules like `Allow:
/artist` allowed `/artist_versions` to be crawled (Allow rules are
prefix matches).
2021-02-07 23:28:50 -06:00
evazion
3f6e7ff6b5 Fix #4701: Odd behavior on older versions of Chrome.
Regression caused by the upgrade to Webpacker 6.0 in 90cd3293e. This
caused various Javascript errors in old versions of Chrome, which
somehow resulted in the keyboard shortcut for visiting the next page
being triggered when you pressed any key.

Specifically, the mobx library (used by the TagCounter component) called
`Object.entries`, which isn't available in Chrome 49, and for some
unknown reason this triggered the buggy shortcut behavior.

`Object.entries` is supposed to be automatically polyfilled by Babel to
support old browsers, but something changed in Webpacker 6 that broke
this and I couldn't get it working again. The probable cause is that
Webpacker 6 no longer transpiles code inside ./node_modules by default,
which means that any libraries we use that use new Javascript features
won't get transpiled down to support old browsers, but even after fixing
that it still didn't work. The workaround is to just drop mobx and
preact entirely to avoid the issue.
2021-02-07 05:53:32 -06:00
evazion
70ab7c50e6 Fix #4703: Report notice for forum posts is visible to non-moderators. 2021-02-06 15:04:27 -06:00
evazion
1eb094c862 tag lists: fix broken '?' links for artist tags. 2021-02-05 20:22:55 -06:00
evazion
031032326e mentions: fix exception when mentioning nonexistent user. 2021-02-05 19:40:30 -06:00
evazion
7dbf3c53ab related tags: fix missing backgrounds for selected tags. 2021-02-05 19:38:36 -06:00
evazion
5ee0cd5ffb related tags: fix incorrectly returning banned_artist for artist tag. 2021-02-05 19:28:34 -06:00
evazion
3f515a52ab Update CHANGELOG.md. 2021-02-05 19:12:30 -06:00
evazion
9a0a988572 tests: fix test breakage in Github CI.
Fix tests not working in Github. They were failing because the latest
version of Webpack needs a version of Node newer than the version in
shipped Ubuntu 20.04.

Also fix the Docker build failing because of the system timezone
database not being installed in Ubuntu 20.10.
2021-02-05 03:40:16 -06:00
evazion
3639d7eae5 tests: fixup twitter tests for c90ef9f1b. 2021-02-05 03:33:07 -06:00
evazion
327deb9cbb tests: fix regression in 6d867de20.
6d867de20 caused an exception in the ApiKeysController, which calls
respond_with with two arguments: `respond_with(CurrentUser.user, @api_key)`.
`options[0]` referred to the second argument, which was incorrect.
2021-02-05 03:33:07 -06:00
evazion
620c9e9ac9 Fix #4697: Better UX for disabling tooltips. 2021-02-05 02:37:02 -06:00
evazion
1f637867a4 tags: refactor tag lists to use ViewComponent. 2021-02-05 02:37:02 -06:00
evazion
9d60046f1d tests: fixup typo in 520b72948. 2021-02-04 00:41:14 -06:00
evazion
891aa8b458 Merge pull request #4671 from BrokenEagle/fix-note-nudge
Fix the note nudge on rotated notes
2021-02-04 00:38:14 -06:00
evazion
19db959894 Merge pull request #4674 from BrokenEagle/add-missing-associated-attributes
Add missing associated attributes
2021-02-04 00:37:32 -06:00
evazion
96ed242dea Merge pull request #4673 from BrokenEagle/fix-new-twitter-artist
Add the Twitter name to the list of other names for new artists
2021-02-04 00:35:53 -06:00
evazion
3e9184ff1e Merge pull request #4693 from nonamethanks/fix-4692
Post sidebar: ignore metatags for the tag history link
2021-02-04 00:34:16 -06:00
evazion
7da2651074 Merge pull request #4684 from AkiaCode/patch-1
Update LICENSE
2021-02-04 00:33:44 -06:00
evazion
061ce15a0a Merge pull request #4694 from bipface/fix-docker-config
fix docker config
2021-02-04 00:33:32 -06:00
evazion
410a37ec80 tests: fix ip geolocation test. 2021-02-04 00:20:52 -06:00
evazion
4c0c3360e7 Fix #4689: Remove 7 day waiting period for new uploaders. 2021-02-04 00:20:52 -06:00
evazion
b8dbc7f68a Fix #4667: Ordering IP bans by last seen puts unknown first. 2021-02-04 00:09:54 -06:00
evazion
520b72948f Fix #4695: Raise max video length to match Twitter's (2:20). 2021-02-04 00:01:03 -06:00
evazion
3f16fe3d80 Fix #4680: @-ing yourself sends you a DMail.
Don't send a dmail when the user @-mentions themselves, whether in an
edit or in the original message.
2021-02-03 23:46:59 -06:00
evazion
50864c7147 Fix #4685: Tagging "aliased_tag -aliased_tag" adds aliased_tag. 2021-02-03 23:24:12 -06:00
evazion
e28c28c03b BURs: when moving artists, add old tag to other names.
When aliasing or renaming an artist, add their old tag name to their
other names.
2021-02-03 23:17:13 -06:00
evazion
b03d8e728d Fix #4683: Automove _(style) tags when artists are processed via BUR. 2021-02-03 21:27:35 -06:00
evazion
19974d3ab1 Fix #4688: Malformed SQL when searching -status:any.
Negating `Post.all` produced the invalid SQL fragment `WHERE NOT ()`.
Use `Post.where("TRUE")` instead to produce `WHERE NOT (TRUE)`.
2021-02-03 21:15:58 -06:00
evazion
e90f792e20 Update ruby gems and yarn packages. 2021-02-03 21:12:33 -06:00
bipface
7546198fcc fix Dockerfile.danbooru
bundle path was getting lost when switching user
2021-02-03 00:25:59 +11:00
bipface
5c0a49c815 fix filename in docker-compose command 2021-02-03 00:21:08 +11:00
nonamethanks
efa20d8e53 Post sidebar: ignore metatags for the tag history link 2021-02-01 19:02:54 +01:00
evazion
896e5cb763 Add BetterErrors gem. 2021-01-30 14:19:37 -06:00
evazion
c0f27d6e3b posts: refactor next/prev keyboard shortcuts.
On the post show page, define the next page / previous page keyboard
shortcuts in html using data-shortcut attributes instead of in
Javascript. This is consistent with how these shortcuts are defined on
the post index page.
2021-01-30 01:16:00 -06:00
evazion
27cac98516 posts: eliminate pool_id, favgroup_id url params.
Replace the `pool_id` and `favgroup_id` url params:

    https://danbooru.donmai.us/posts/123?pool_id=456
    https://danbooru.donmai.us/posts/123?favgroup_id=456

with the `q` param:

    https://danbooru.donmai.us/posts/123?q=pool:456
    https://danbooru.donmai.us/posts/123?q=favgroup:456
2021-01-29 23:01:44 -06:00
evazion
1e778dbbf6 posts: factor out post navbar into component.
* Factor out the post navbar into a component. The post navbar is the
  part of the post containing the current search, the list of pools, and
  the list of favgroups, along with next/prev navigation links.

* Change navbar markup: remove various unused CSS classes/IDs, change
  pools to use same markup as favgroups, replace nested <div>'s with
  flat <ul>/<li> list.

* Use CSS to truncate long searches/pool names/favgroup names if they're
  too wide for the screen (especially on mobile).
2021-01-29 21:46:21 -06:00
evazion
151a9b026e js: remove jquery-ui effect-shake plugin. 2021-01-29 15:06:35 -06:00
evazion
d0c9f6e0b8 posts: allow toggling between upvotes and downvotes.
Like 9efb374ae, allow users to toggle between upvoting and downvoting a
post without raising an error or having to manually remove the vote
first. If you upvote a post, then downvote it, the upvote is
automatically removed and replaced by the downvote.

Other changes:

* Tagging a post with `upvote:self` or `downvote:self` is now silently
  ignored when the user doesn't have permission to vote, instead of
  raising an error.
* Undoing a vote that doesn't exist now does nothing instead of
  returning an error. This can happen if you open the same post in two
  tabs, undo the vote in tab 1, then try to undo the vote again in tab 2.

Changes to the /post_votes API:

* `POST /post_votes` and `DELETE /post_votes` now return a post vote
  instead of a post.
* The `score` param in `POST /post_votes` is now 1 or -1, not `up` or
  `down`.
2021-01-29 02:22:23 -06:00
evazion
ffdd5e6128 posts: make post votes work the same way as comment votes.
Change post votes to work the same way as comment votes:

* Make the upvote arrow blue if you've upvoted the post, or grey if you
  haven't. Likewise for the downvote arrow.
* Make it so you can click the upvote or downvote arrows to undo the vote.
* Don't show any notices when you vote on a post.

Also fix it so that votes work the same way on the posts page, the
comments page, and in the modqueue. Before it wasn't possible to undo
votes on the comments page or in the modqueue.
2021-01-29 02:21:08 -06:00
evazion
0a8fe506b4 posts: add script to remove duplicate votes.
There were 67 duplicate votes in the production database.
2021-01-29 02:09:30 -06:00
evazion
af84386d77 webpack: fix hot reloading not working.
Upgrade to webpacker-6.0.0.beta.4 to fix a bug where bin/webpack-dev-server
didn't respect the host/port config options in config/webpacker.yml,
which made it listen on the wrong port, breaking hot reloading.
2021-01-29 02:09:30 -06:00
Aki
4b0bbaa15c Update LICENSE 2021-01-28 16:20:56 +09:00
evazion
90cd3293eb Upgrade to Webpacker 6.0. 2021-01-28 00:22:49 -06:00
evazion
2eeee446a5 js: upgrade to MobX 6.0. 2021-01-27 17:46:17 -06:00
evazion
0713751e3c tests: fix user upgrades not being tested in CI. 2021-01-27 16:55:46 -06:00
evazion
716cdb0126 tests: fix broken tests.
* Fix a broken Twitter profile image upload test.
* Skip a broken DeviantArt flash file upload test (flash no longer
  supported by DeviantArt?)
* Skip user upgrade tests when Stripe is not configured.
2021-01-27 00:40:53 -06:00
evazion
3137284292 Update ruby gems and yarn packages. 2021-01-27 00:02:35 -06:00
evazion
0919acb861 unicorn: increase workers, reduce timeout. 2021-01-26 19:52:43 -06:00