Commit Graph

46 Commits

Author SHA1 Message Date
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
evazion
aeec46b212 views: move inline javascript to app bundle. 2020-01-26 19:16:38 -06:00
evazion
ab325c5d2b favgroups: convert post_ids from string to array. 2020-01-17 00:19:20 -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
5394dbc3d2 tagging: lower happy/sad tag count thresholds.
Lower the frowny face tag threshold from 25 to 10 tags and the happy
face tag threshold from 35 to 20 tags.
2019-12-07 19:03:40 -06:00
evazion
5791f4e805 recommendations: show favcount beneath recommended posts.
* Add favorite count beneath recommended posts. Clicking the favcount
  loads more recommended posts like that post.
* Increase number of recommendations shown on post show page.
2019-12-02 03:08:01 -06:00
evazion
efda9f37e1 recommendations: add search form, allow searching by username. 2019-12-02 02:26:21 -06:00
evazion
41b30fc64c recommendations: open user recommendations to all users.
* Open recommendations to all users (not just gold).
* Show recommendations on all posts (not just posts after 2017).
* Allow users to browse recommendations for other users.
* Increase number of recommended posts returned.
* Change endpoints to /recommended_posts?user_id=1234 and
  /recommended_posts?post_id=1234 and add json/xml support.
2019-12-01 00:44:04 -06:00
evazion
f9881e5414 autocomplete: add saved search label autocomplete in more places. 2019-11-12 20:24:24 -06:00
evazion
ccf32aa7a4 posts: remove 'Similar' button from post edit form.
Remove the 'Similar' button next to the source field in the post edit
form. Removed for multiple reasons:

* It doesn't make sense to have to open the edit form to do a reverse
  image search.

* The 'Similar' button tries to redownload the file from the source,
  which has various problems: the source might have been deleted, it
  might have been changed or revised, it might be a format that iqdb
  can't handle (ugoira/webm/mp4), or it might otherwise not match the
  the actual post.

* The 'Find similar' button already exists in the sidebar and it does
  the right thing by using the preview image from Danbooru, which
  avoids all the above issues.
2019-10-14 21:16:04 -05:00
evazion
930e904594 mobile: reduce swipe gesture sensitivity.
Address complaints that gestures are too sensitive and interfere with
scrolling.
2019-10-07 23:20:16 -05:00
evazion
eb80d4f36e mobile: disable "swipe left to go back" gesture on post show page.
The swipe left gesture interfered with scrolling left and right, using
using pinch to zoom, and with copy and pasting text. This gesture wasn't
really necessary anyway, since the back button can always be used to go
back instead.
2019-10-07 23:17:13 -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
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
6019a9fdc4 js: fix eslint warnings. 2019-08-18 11:24:42 -05:00
evazion
8d07ad7390 js: clean up notice/error messaging. 2019-08-14 01:46:44 -05:00
evazion
e000bdb861 js: drop jquery-timeout plugin.
Replace with `Danbooru.Utility.delay`.
2019-08-14 01:46:44 -05:00
Nicolas Stepien
2d25519e18 Add video support to resize_image_to_window
This should make videos automatically scale on the mobile view.
2019-07-25 23:20:14 +01:00
Albert Yi
4fe7f5eff9 restyling 2019-01-23 17:40:58 -08:00
Albert Yi
6c332057ac add blur->sharpen animation for loading expanded images on posts 2019-01-23 16:56:00 -08:00
evazion
3adf24c0aa tag edit dialog: fix popout link not always being bound.
Fix the popout link not being bound on the upload page when uploading
without the bookmarklet.
2018-12-18 19:23:59 -06:00
Albert Yi
8ac530a909 fixes #4006: Bring back the "edit tags" button to the sidebar
fixes #4011: Comment input field under posts is too big, goes slightly beyond view boundaries
fixes #4010: Incorrect dynamic tag counts
2018-12-12 11:44:25 -08:00
Albert Yi
3893926048 add dynamic tag counts on upload form 2018-12-10 17:51:28 -08:00
evazion
1cba439589 Fix #3971: Keyboard navigation inside pools is broken. 2018-11-05 13:04:21 -06:00
evazion
a2186c19dc Fix positioning of tag edit dialog box.
Bug: if you open the tag edit dialog with shift+e, close it, then open
it again, it won't be vertically centered when it opens the second time.

Fix: hide the related tags section *before* opening the dialog, not after.
Hiding it afterwards shifts the layout, which uncenters the dialog.
2018-10-25 22:39:29 -05:00
Albert Yi
4d07183a1d Merge pull request #3957 from evazion/fix-related-tags
Related tags: build html server-side, eliminate cookies
2018-10-24 17:34:14 -07:00
r888888888
ee3b8933d2 tweak social links 2018-10-20 19:38:32 -07:00
evazion
33ca028927 related tags: fix initialization logic for recent/frequent/translated/artist columns.
Initialize the recent tags, frequent tags, translated tags, and artist
tags columns only once, when the related tags section is first shown.

The related tags section is shown automatically when the 'Edit' tab is
opened, or by default on the uploads page.

This fixes the /related_tags.js and /source.js calls being triggered
every time the tag edit dialog box or the 'Edit' tab was opened.
2018-10-15 18:42:04 -05:00
evazion
4e2944ee06 related tags: build html server-side instead of client-side. 2018-10-12 21:18:15 -05:00
evazion
f886f2fdb3 posts/show: load flag/appeal/replacement dialogs via ajax (#3922). 2018-09-26 20:01:14 -05:00
evazion
10ca4dd3ad artists: replace artist finder with fetch source data.
* On posts, automatically trigger "Fetch source data" when clicking the
  Edit tab, instead of triggering the artist finder button. This way we
  find both the artist and the translated tags in one ajax call.

* Remove the "Artist" finder button next to the source field. This isn't
  necessary given that "Fetch source data" finds the artist itself.

* Remove the /artists/finder.json API endpoint. This is no longer used
  after removing the "Artist" finder button.
2018-09-11 20:09:25 -05:00
evazion
3bed5f3cf9 Fix #3867: Add namespaces to all Javascript events. 2018-09-04 12:26:18 -05:00
evazion
c03af7f563 posts.js: remove dead search dropdown code. 2018-09-04 12:26:18 -05:00
Albert Yi
0fcdc30b69 Merge pull request #3817 from evazion/fix-3816
Avoid flickering hidden page elements during page loads
2018-08-21 14:44:26 -07:00
evazion
ec0646c234 posts/show: don't scroll page when opening edit dialog.
Don't scroll up the page when opening the tag edit dialog via shift+e.
Fixes regression in #3812.
2018-08-15 18:56:52 -05:00
evazion
766d68c4ee posts/show: fix flickering post unvote link. 2018-08-14 16:04:08 -05:00
evazion
7174c24ac8 posts/show: fix flickering recommended tab. 2018-08-14 16:04:08 -05:00
evazion
0c49b162f0 posts/show: fix flickering favlist show/hide buttons. 2018-08-14 16:03:16 -05:00
Albert Yi
a7450303e0 Merge branch 'master' into fix-3807 2018-08-13 18:21:53 -07:00
evazion
bbaadda1e3 Convert keyboard shortcuts to use data-shortcut. 2018-08-12 12:09:58 -05:00
evazion
107d19c6b3 Tag scripts: drop [if ...] and [reset] syntax (fix #3807, #3773)
Fixes #3807. Drops the TagScript module entirely and replaces it with
a simple call to Post.tag.

Simultaneously fixes #3773 as a consequence of removing TagScript.run.
Post.update already updates data-tags by itself, so there was no need
for TagScript.run to update data-tags as well.
2018-08-08 16:01:42 -05:00
evazion
f72b32b27b Fix eslint warnings. 2018-08-05 18:30:25 -05:00
r888888888
477a5a8ac3 fix recommended js 2018-08-02 23:53:28 -07:00
Albert Yi
6fa0ae2cf1 Migrate assets to use Webpacker 2018-07-27 15:24:05 -07:00