Commit Graph
632 Commits
Author SHA1 Message Date
Albert Yi 5d3f072a2f fix wiki excerpt links 2018-10-22 13:15:33 -07:00
r888888888 7051351852 fix og:title metatags 2018-10-20 19:53:39 -07:00
r888888888 ee3b8933d2 tweak social links 2018-10-20 19:38:32 -07:00
r888888888 0ab6e9f94d refactor share buttons 2018-10-20 19:11:16 -07:00
r888888888 192ac128cd add additional meta tags for seo 2018-10-20 17:15:29 -07:00
Albert Yi a6b00b3ff3 fixes #3921 2018-10-16 15:01:39 -07:00
evazion 6d293dfde2 related tags: fix style issues. 2018-10-16 13:09:22 -05:00
evazion 6223f89a99 related tags: refactor /related_tags.js to avoid updating unchanged columns.
Refactor the /related_tags.js call so that when the "Related tags"
button is clicked, it only replaces the columns that actually changed,
not the entire related tags section.

This avoids rebuilding the Recent / Frequent / Translated Tags / Artist
columns every time the "Related tags" button is clicked.
2018-10-15 18:41:32 -05:00
evazion 5a05961bde related tags: factor partials out from post, upload edit forms. 2018-10-12 21:18:15 -05:00
evazion 739bb1270c TagSetPresenter: refactor tag string for post edit form.
Move PostPresenter#categorized_tag_groups to TagSetPresenter#split_tag_list_text.

This allows split_tag_list_text to reuse the same set of tags already
fetched by the tag set presenter for the sidebar.

This avoids a memcache call to get the tag categories when rendering the
tag string for the post edit form.
2018-09-30 21:52:24 -05:00
evazion 654d40875f posts/show: only render detailed rejection dialog for approvers. 2018-09-26 20:46:22 -05:00
evazion f886f2fdb3 posts/show: load flag/appeal/replacement dialogs via ajax (#3922). 2018-09-26 20:01:14 -05:00
evazion 6fe883c316 posts index: clean up limit:<n> / order:random parsing (#2894)
* Move the limit:<n> / order:random metatag parsing from the controller
  to the post set.

* Introduce `Tag.has_metatag?` and use it to parse these metatags
  instead of using a regex (#2894).
2018-09-20 19:23:47 -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 47e26419d3 nav menu: add html ids to secondary nav menu links (#3844). 2018-08-27 20:57:59 -05:00
evazion 6ccf4ed9c0 blacklists: refactor blacklist html+css.
* Consolidate blacklist css in one file.
* blacklist box: fix tag colors not dimming on hover.
* blacklist box: allow middle clicking on tags to open in new tab.
* /wiki_pages: move blacklist controls to top of tag sidebar.
* /wiki_pages: fix missing "disable all" / "re-enable all" buttons.
2018-08-21 23:33:08 -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 3ae913a707 html: convert html comments to erb comments.
Avoid emitting useless comments in the html.
2018-08-17 18:55:21 -05:00
evazion 3f7b1e0b13 html: fix invalid </meta>, </link>, </input> closing tags. 2018-08-17 18:41:48 -05:00
evazion 7aa2a41798 blacklists: fix flickering of inline blacklists. 2018-08-14 16:04:08 -05:00
evazion 766d68c4ee posts/show: fix flickering post unvote link. 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
evazion 72a37c2f94 posts/show: fix flickering fav/unfav buttons. 2018-08-14 16:03:16 -05:00
evazion 7028417bfb posts/show: fix 'Flag' option in sidebar.
* Don't show 'Flag' option on already flagged posts.
* Drop flag/appeal link show/hide Javascript (did nothing, links were already shown/hidden in html).
2018-08-14 16:03:16 -05:00
evazion d7ec28b804 posts/show: fix 'Hide from queue' option in sidebar.
Fix 'Hide from queue' option appearing on deleted posts, but not on
pending or flagged posts.
2018-08-14 12:48:13 -05:00
evazion bbaadda1e3 Convert keyboard shortcuts to use data-shortcut. 2018-08-12 12:09:58 -05:00
r888888888 d813f41aad fix video page for ugoiras 2018-08-04 22:06:48 -07:00
r888888888 88c2fa69f3 fix js for ugoira player 2018-08-04 21:59:58 -07:00
r888888888 e0bd3277af remove es6 references in ugoira js 2018-08-04 17:15:14 -07:00
Albert Yi 6fde3c20cf fixes for #3791 2018-07-31 16:44:55 -07:00
Albert Yi 6fa0ae2cf1 Migrate assets to use Webpacker 2018-07-27 15:24:05 -07:00
r888888888 93a669d2de expose recommendd posts link 2018-07-21 14:39:07 -07:00
r888888888 fd2f6c9742 hide recommend posts link 2018-07-21 14:28:32 -07:00
r888888888 344c46ed00 add mock recommender service for development, add user-context recommended posts 2018-07-21 14:02:57 -07:00
Albert Yi 9cfb629891 rename similar posts to recommended posts, refactor menu on posts/show 2018-07-20 16:36:14 -07:00
Albert Yi 75162d3d8b bug fixes + tests 2018-07-20 12:31:28 -07:00
Albert Yi d9a1eeacc9 Recommend posts on /posts/show based on voting patterns 2018-07-20 12:14:16 -07:00
Albert Yi 6ea3d7983e add normalization for deviantart artist urls 2018-07-18 11:38:00 -07:00
Albert Yi a610111658 switch post previews to use flexbox, add better styling for cropped thumbnails 2018-07-18 11:38:00 -07:00
Albert Yi 7b74f5caf6 switch to using thumbs for voting 2018-07-06 11:02:14 -07:00
r888888888 3ba5c6fb51 refactor iqdb endpoints 2018-06-23 10:59:04 -07:00
Albert Yi 64446d49e1 add image cropping support 2018-06-22 14:41:57 -07:00
r888888888 ca842cc6d9 fixes #3727 2018-05-26 12:58:19 -07:00
r888888888 c054784302 eliminate unused vars in search counters 2018-05-26 11:59:40 -07:00
Albert Yi 4b6019d6ad fixes #3668 2018-04-26 10:25:24 -07:00
Albert Yi 97dd0680df remove download query from post file size link 2018-04-16 16:41:46 -07:00
Albert Yi cd88a8df9f fixes #3620 2018-04-12 13:00:48 -07:00
Albert Yi d9d98f05c2 Merge branch 'rails-5.1' 2018-04-11 11:40:36 -07:00
Albert Yi a25629bff9 fixes #3594 2018-04-11 11:14:58 -07:00
r888888888andevazion abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00