Commit Graph

143 Commits

Author SHA1 Message Date
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
bbaadda1e3 Convert keyboard shortcuts to use data-shortcut. 2018-08-12 12:09:58 -05:00
Albert Yi
b56681a609 refactor solution for #3804 2018-08-07 13:31:45 -07:00
Albert Yi
d053e135ab fix leaked ip addresses in upload status (#3804) 2018-08-07 13:18:31 -07:00
r888888888
334d8b7c6f Add alt_source field on uploads to deal with twitter galleries 2018-08-04 16:32:15 -07:00
Albert Yi
099654b2da truncate sources on upload listing 2018-07-06 11:02:26 -07:00
lllusion3469
0502f3ece1 Make dropzone accept mp4, webm, and swf files
to match the rest of the code base

For flash files I've used the file extension because the mime type is browser
specific and I've found at least 2 different variations for .swf:
1. `application/vnd.adobe.flash-movie`: wikipedia
2. `application/vnd.adobe.flash.movie`: mailcap, firefox
some other browser may not even know the .swf extension in the first place
2018-07-03 18:53:34 +02:00
Albert Yi
9510dead9f refactor iqdb query support 2018-06-19 14:16:12 -07:00
Albert Yi
2ec97bc8ba display more info in upload page 2018-06-19 12:46:17 -07:00
Albert Yi
9f33b14fa8 adjust styling 2018-06-14 17:52:41 -07:00
Albert Yi
b0c2ddba8b update tests 2018-06-14 17:52:41 -07:00
Albert Yi
0e6c358701 add drag and drop file uploads w/async processing
[skip ci]
2018-06-14 17:52:41 -07:00
Albert Yi
fdd7582fb0 add support for upload preprocessing 2018-06-14 17:52:41 -07:00
evazion
442964b0eb tag_set_presenter: refactor split_tag_list_html.
* Make category headers optional.
* Make category order configurable.
* Clean up code.
2018-04-25 22:12:10 -05:00
evazion
c9acbbdf9e uploads: revamp /uploads listing UI (#3657).
* Add thumbnails.
* Colorize tags.
* Rearrange columns.
* Add rating/source/size/dimensions info.
* Add "»" search drilldown links.
2018-04-20 15:52:09 -05:00
evazion
e6ce05eb29 uploads: add more search options for /uploads listing (#3657). 2018-04-20 15:51:56 -05:00
evazion
ff4616e7b2 uploads: add upload-specific secondary links. 2018-04-20 15:51:56 -05:00
evazion
8083c7daae uploads: fix batch upload page to work without bookmarklet.
* Add a form to the /uploads/batch page so that it can be used without
  the bookmarklet.

* Fix an exception when no url is given.
2018-04-20 15:51:56 -05:00
evazion
bca483cefd Fix #3628: Retry button is displayed for failed uploads that cannot succeed even if retried 2018-04-12 22:14:06 -05:00
Albert Yi
cd88a8df9f fixes #3620 2018-04-12 13:00:48 -07:00
r888888888
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
r888888888
a8c4179083 fix html class in uploads/new 2018-01-02 15:34:43 -08:00
Albert Yi
b315ee25bc Merge pull request #3471 from BrokenEagle/fix-controller-views
Various fixes for controller views
2017-12-28 11:18:44 -08:00
BrokenEagle
31d3215dad Fix page controller and action IDs
- Also fix affected CSS and JS files
2017-12-28 10:20:12 -08:00
r888888888
659eb62402 css tweaks 2017-12-26 16:06:16 -08:00
BrokenEagle
d54b26c61d Convert tag category Javascript/CSS assets to ERB 2017-12-24 17:01:17 -08:00
Albert Yi
4d6dc895d6 Merge pull request #3362 from BrokenEagle/feat-client-input-validation
Moved input existence validations to client (#3352)
2017-11-21 10:56:14 -08:00
BrokenEagle
63773fed6b Fixes #3366 2017-11-14 07:39:25 -08:00
BrokenEagle
f91e11bb41 Moved input existence validations to client 2017-11-13 14:08:34 -08:00
BrokenEagle
6838901aac Moved non-config tag category info to its own class 2017-11-07 16:21:29 -08:00
BrokenEagle
1de8fd2bd6 Moved tag logic for Javascript to config file 2017-11-07 10:58:40 -08:00
r888888888
8874b274ad remove ccs integration 2017-10-17 17:59:26 -07:00
r888888888
0985f929cc style buttons for upload/post edit pages 2017-09-14 16:56:40 -07:00
evazion
6797f8564d upload limits: show full upload limits on upload page. 2017-08-10 23:58:58 -05:00
r888888888
d32e1a51ab expand access of ccs to builders 2017-08-02 17:15:16 -07:00
Albert Yi
9b982b3379 Merge pull request #3228 from r888888888/ccs
integrate with ccs
2017-07-21 18:00:05 -07:00
r888888888
c5a40628e6 integrate with ccs 2017-07-20 15:25:19 -07:00
evazion
7cb7c2fbab Remove ruby DText implementation (#3206). 2017-07-19 16:48:42 -05:00
evazion
e3a4bfd28c /upload/batch: use image proxy for embedded thumbnails. 2017-06-27 13:46:59 -05:00
evazion
281ddae35d /uploads/batch: add thumbnail previews (#3194). 2017-06-27 13:31:47 -05:00
evazion
3ecee91861 Fix #3061: Add "General" button for related tags on new/edit posts. 2017-05-26 12:49:59 -05:00
evazion
c68e68f3c2 /uploads/new: add show/hide commentary toggle button. 2017-05-13 00:18:52 -05:00
evazion
b2f62482a1 Remove artist commentary handling from download rewrite strategies. 2017-05-10 18:01:51 -05:00
evazion
4631262374 Fix broken tag autocomplete on multiple pages.
Mark all tag <input>s with a `data-autocomplete` attribute, instead of
hardcoding a list of html IDs to autocomplete in javascript.

This way should be less error prone. It fixes autocomplete in several places:

* Autocomplete for the search box on /posts didn't work in the
  responsive layout. This was because /posts has two search boxes that
  both have the id `tags`: one in the normal sidebar, and one in the
  responsive tag list. $("#tags") only initialized autocomplete on the
  first one.

* Autocomplete didn't work on the aliases or implications pages. This
  was due to selecting the wrong html ids.
2017-04-22 15:24:03 -05:00
r888888888
c4b5998e64 fixes #2692: Rework bookmarklet preview 2017-03-21 15:41:20 -07:00
Albert Yi
87bcc07fae enable ragel parser for remaining dtext endpoints 2017-01-10 15:12:37 -08:00
Albert Yi
7aab50f726 remove old iqdb code 2016-12-02 13:21:56 -08:00
evazion
1d3ec05348 Fix nil exception on if help:upload_notice doesn't exist. 2016-11-21 01:40:37 -06:00
evazion
5909e8501c Pull upload notice, bookmarklet notice from help:upload_notice wiki page. 2016-11-21 01:17:15 -06:00
evazion
13d4474818 Add self-uploading disclaimer to uploads page. 2016-10-24 18:52:01 -05:00