Commit Graph

11558 Commits

Author SHA1 Message Date
evazion
81bd86d202 posts: add "general" rating; rename "safe" rating to "sensitive".
* Add "general" rating.
* Rename "safe" rating to "sensitive".
* Change safe mode to include both rating:s and rating:g.
* Treat rating:safe as a synonym for rating:sensitive.
* Link "howto:rate" in the post edit form.
2022-05-22 13:38:45 -05:00
evazion
d346adabc9 Revert "posts: fix rounding errors in ratio: metatag."
This reverts commit 80ced3e418.

This turned out to be intentional. Rounding the aspect ratio to 2
decimal places is so that searches for exact ratios like `ratio:16:9` or
`ratio:1.78` work even when the ratio doesn't exactly match. Rounding to
2 decimal places means that the ratio: metatag has a 1% error tolerance.
2022-05-22 12:37:26 -05:00
evazion
c6b5be1c9f Update Danbooru logo. 2022-05-22 02:53:22 -05:00
evazion
ed1629bc7d Update Danbooru logo. 2022-05-21 23:26:46 -05:00
evazion
276850d2b1 Update Danbooru logo. 2022-05-21 21:39:44 -05:00
evazion
e7c507b7fc css: adjust spacing around header on mobile. 2022-05-21 14:57:49 -05:00
evazion
80ced3e418 posts: fix rounding errors in ratio: metatag.
Fix the ratio: metatag sometimes including wrong results due to rounding
errors. For example, searching for `ratio:>=4.0` would include post
3220414, which has an aspect ratio of 3.99879. This would get rounded up
to 2 decimal places to 4.00.
2022-05-21 14:08:50 -05:00
evazion
e53e8da3a1 Fix #5171: Don't allow wide_image and tall_image to be manually tagged. 2022-05-21 14:01:31 -05:00
evazion
d89db73c2f Add site logo to header. 2022-05-21 13:30:21 -05:00
evazion
1bcf93b816 Fix #5178: Add received bans to user includes. 2022-05-20 23:03:22 -05:00
evazion
9867514a78 Fix #5177: ordfav with commentary search raises exception. 2022-05-20 22:59:02 -05:00
evazion
0fe9356bf6 tests: fix broken tests. 2022-05-20 22:51:02 -05:00
evazion
1e78b97eb8 Add config options to disable comments and the forum.
Add options to disable comments, the forum, and autocomplete. This is
for personal boorus and potentially for safe mode. Note that disabling
the forum may cause difficulties with creating and approving BURs.

Disabling comments and the forum merely hides them from most areas,
rather than completely removing them.
2022-05-18 14:45:40 -05:00
evazion
2fe38c1c07 Fix #5168: Disable rate limits on testbooru/non-prod environments.
Add a `rate_limits_enabled?` config option for disabling rate limits.
2022-05-18 14:16:06 -05:00
evazion
25f0b01d50 posts: optimize has: metatag.
Use EXISTS queries instead of `id IN (?)` subqueries because they're
faster, especially when negated.
2022-05-18 13:59:04 -05:00
evazion
181639368c posts: add is: and has: metatags.
Add the following metatags:

* is:parent
* is:child
* is:safe
* is:questionable
* is:explicit
* is:sfw (same as -rating:q,e)
* is:nsfw (same as rating:q,e)
* is:active
* is:deleted
* is:pending
* is:flagged
* is:appealed
* is:banned
* is:modqueue
* is:unmoderated
* is:jpg
* is:png
* is:gif
* is:mp4
* is:webm
* is:swf
* is:zip
* has:parent
* has:children
* has:source
* has:appeals
* has:flags
* has:replacements
* has:comments
* has:commentary
* has:notes
* has:pools

All of these searches were already possible with other metatags, but these might be more convenient.
2022-05-18 13:04:15 -05:00
evazion
141044d352 posts: refactor hardcoded ratings.
Refactor ratings to not be hardcoded in various places. Make it so
all ratings are defined in Post::RATINGS.

Also make it so that you can search multiple ratings at once with `rating:q,e`.
2022-05-18 13:04:15 -05:00
evazion
af8ef8b277 uploads: address "Failed to replace upload_media_assets..." error
Sometimes uploads fail with this error:

    Failed to replace upload_media_assets because one or more of the new
    records could not be saved.

Change it so that media assets are saved individually, so that if saving
any of them fails we get a better error message.
2022-05-17 18:28:13 -05:00
evazion
06b38a19af posts: don't show nsfw tags in sidebar in safe mode.
Fix the post index page to not show nsfw tags in the sidebar in safe
mode. Instead of showing the most popular tags on the front page, or the
most similar tags to the current search, show only frequent tags (the
top 25 tags from posts on the current page).
2022-05-17 04:04:09 -05:00
evazion
ce18c866d9 Fix #4582: Safebooru should not block "censored" tag
* Remove the default list of blocked tags in safe mode.
* Change it so that tags that are blocked in safe mode are filtered out
  at the database level rather than at the html level.
2022-05-17 02:24:16 -05:00
evazion
8239a1b551 upgrades: fix Danbooru.config.user_upgrades_enabled? setting
* Fix it so that if upgrades are disabled, only the payment button is disabled instead of the whole page.
* Fix it so that disabling upgrades with DANBOORU_USER_UPGRADES_ENABLED="false" works.
2022-05-17 01:24:38 -05:00
evazion
3dbe6ea842 Merge pull request #5166 from NamelessContributor/notes-text-stroke
Notes: allow using -webkit-text-stroke and related
2022-05-16 15:13:15 -05:00
evazion
6b54415c47 Merge pull request #5170 from nonamethanks/fix-fc2-bad-source
Fc2: don't mark valid blog page sources as bad_source
2022-05-16 15:12:07 -05:00
evazion
1ea76624c8 Merge pull request #5172 from nonamethanks/sort-relationships
Tags: sort list of relationships alphabetically
2022-05-16 15:11:58 -05:00
nonamethanks
c97dd8958f Tags: sort list of relationships alphabetically 2022-05-16 13:08:11 +02:00
nonamethanks
dcbb2216aa Fc2: don't mark valid blog page sources as bad_source 2022-05-15 18:46:50 +02:00
evazion
1eb15da7c5 upgrades: add authorize.net integration.
Add integration for accepting payments with Authorize.net.

https://developer.authorize.net/hello_world.html
2022-05-15 01:47:45 -05:00
evazion
4b65e96abc upgrades: rename stripe_id to transaction_id
* Rename the stripe_id column to transaction_id.
* Add a new payment_processor column to identity the processor used for
  this transaction (and hence, which backend system the transaction_id is for).
2022-05-15 01:05:24 -05:00
evazion
6de527f064 upgrades: show login and create account links for anon users. 2022-05-15 01:05:21 -05:00
NamelessContributor
c909555da8 Notes: allow using -webkit-text-stroke and related
These properties are widely supported: https://caniuse.com/text-stroke
Currently some notes use multiple text-shadows as a workaround:
https://danbooru.donmai.us/notes?search[body_matches]=text-shadow
2022-05-14 07:24:03 +02:00
evazion
39a9c7efa0 Merge pull request #5164 from nonamethanks/tag-deprecation-edit-form
Tags: show better message in edit form if tag lacks wiki
2022-05-11 21:00:26 -05:00
evazion
c5d906e93f Merge pull request #5163 from NamelessContributor/footer-commit-hash
Add back current commit hash to site footer.
2022-05-11 20:59:58 -05:00
nonamethanks
4eb579ebe4 Tags: show better message in edit form if tag lacks wiki 2022-05-11 20:52:55 +02:00
NamelessContributor
f668cfdbac Add back current commit hash to site footer.
The commit hash is shown when hovering over the app name in the footer.
2022-05-11 14:56:13 +02:00
evazion
c73ff4fbd9 Update Ruby gems and Yarn packages. 2022-05-11 00:23:53 -05:00
evazion
bb461d82b6 Fix #5162: NoMethodError in MastodonApiClient#commentary without credentials set 2022-05-11 00:17:49 -05:00
evazion
7573c6dfc9 Merge pull request #5160 from NamelessContributor/feat-data-is-deprecated
Add data-is-deprecated attribute to tags
2022-05-11 00:10:13 -05:00
evazion
4360573af0 upgrades: update text. 2022-05-10 12:20:11 -05:00
NamelessContributor
c762e3ddbc Add data-is-deprecated attribute to tags
Allows using custom CSS to highlight deprecated tags, fixes #5110
2022-05-10 17:17:15 +02:00
evazion
1720246cb9 Remove Twitter/Github/Discord links from site footer.
Our new payment processor demanded that we remove our social media links
from the site. Removing these for compliance. It doesn't make sense, I know.
2022-05-10 09:56:14 -05:00
evazion
32d77d57ec upgrades: update upgrade page text. 2022-05-09 14:16:58 -05:00
evazion
af96f78a49 routes: change /static/contact to /contact; /user_upgrades/new to /upgrade. 2022-05-09 14:16:58 -05:00
evazion
f65021fa01 config: move contact page info to a config option.
Make the info on the contact page configurable instead of hard coded.
2022-05-09 14:16:58 -05:00
evazion
80f3778616 Merge pull request #5159 from nonamethanks/fix-furaffinity-ascii-urls
Furaffinity: fix uploads for non-ascii image urls
2022-05-09 14:16:32 -05:00
nonamethanks
5b8402751c Furaffinity: fix uploads for non-ascii image urls
Use Addressable::URI, which supports non-ascii urls.
2022-05-09 18:38:38 +02:00
evazion
638c928c8a Add 18 USC 2257 disclaimer.
Add a 2257 disclaimer and link to it in the site footer.
2022-05-09 02:26:19 -05:00
evazion
763f9aad98 Merge pull request #5156 from NamelessContributor/tooltip-non-web-source
post tooltips: add support for non-web sources
2022-05-08 23:15:13 -05:00
evazion
d606b9b4c9 Merge pull request #5155 from NamelessContributor/fix-5154
related tags: fix wiki link adding "undefined" tag
2022-05-08 23:14:37 -05:00
evazion
910846163d Fix #5094: db/populate.rb is broken.
Rewrite db/populate.rb:

* Fix broken code.
* Pull random posts from Danbooru for more realistic data.
* Generate more data (wiki pages, artist commentaries, artist urls).
* Make the amount of data generated configurable with environment variables.
* Use FFaker to generate better random text and usernames.

Usage:

* docker-compose exec danbooru bin/rails runner db/populate.rb # with Docker
* bin/rails runner db/populate.rb                              # without Docker
2022-05-08 22:56:08 -05:00
evazion
067d094cc1 upgrades: add notice that upgrades are temporarily disabled. 2022-05-07 18:25:35 -05:00