Commit Graph

434 Commits

Author SHA1 Message Date
evazion
87b6f59bf0 post tooltips: fix tooltips appearing over one another.
When viewing a list of post #XXX links, like this:

* post #123
* post #456
* post #789

Then moving from bottom to top could cause multiple tooltips to appear
over one another. This was because tippy.js tries to keep tooltips
active while moving towards them, which meant it was possible to
activate a second tooltip while moving towards the first.
2020-07-16 14:23:48 -05:00
evazion
ce61202d14 post tooltips: fix long usernames causing header to overflow.
* Make tooltips wider.
* Abbreviate ratings.
* Truncate long usernames.
2020-07-16 12:53:00 -05:00
evazion
1e2e99a941 post tooltips: fix tooltips not appearing on /comments page. 2020-07-13 19:10:15 -05:00
evazion
cf4469f902 users: add dropdown actions to username tooltips. 2020-07-13 17:09:03 -05:00
evazion
88bbd1e3f0 users: add username tooltips. 2020-07-13 17:09:03 -05:00
evazion
d7f489b68e users: get rid of the .with-style class.
Replace with `body[data-current-user-style-usernames="true"]` instead.
2020-07-13 17:08:53 -05:00
evazion
2219a96d2e pool.js: remove leftover recent pools code.
Removed in 1e3c97e4.
2020-07-08 11:33:10 -05:00
evazion
7bfea5cd19 js: drop stupidtable plugin.
This was only used on the saved search index. It let you click on column
headers to sort the table by that column. This doesn't make sense now
that saved searches are paginated.
2020-07-08 11:31:45 -05:00
evazion
7dfc783f2c Fix #4537: Forum quoting broken in topics where user has a reply. 2020-07-06 16:02:19 -05:00
evazion
b5fc8fff6e Add privacy policy (#4415). 2020-07-06 02:53:01 -05:00
evazion
efe5111a9e js: bundle jQuery with Webpack.
Include jQuery in our Webpack bundle instead of loading it from CDNJS.
This means we no longer load any Javascript libraries from third party
sites.
2020-06-30 23:41:47 -05:00
evazion
94490eb57f Fix #4492: Switch from qtip2 to tippy.js. 2020-06-30 22:40:40 -05:00
evazion
5f05a41fbc Fix #4468: Tag edit mode on posts view applies taglist to wrong post. 2020-06-30 15:20:59 -05:00
evazion
883856d4af simple form: refactor DText form fields to use SimpleForm.
* Refactors DText form fields to use a custom SimpleForm input instead
  of manually generated html. This fixes it so that DText fields use the
  same markup as normal SimpleForm fields, which lets us apply browser
  maxlength validations to DText input fields.

* Fixes autocomplete for @-mentions only working in comments and forum posts.
  Now @-mention autocomplete works in all DText fields, including dmails.
  Known bug: it applies in artist commentary fields when it shouldn't.
2020-06-25 16:28:09 -05:00
evazion
8ef2b7772d Merge pull request #4530 from BrokenEagle/parent-child-status-search
Add ability to search on status of parent/child
2020-06-23 23:53:57 -05:00
BrokenEagle
4acd89838b Add ability to search on status of parent/child 2020-06-21 22:39:21 +00:00
evazion
213766fac9 posts: fix "view original" not working on mobile.
ref: 38f385d1ca (r40000777)
2020-06-18 12:25:45 -05:00
evazion
1ea0141ae1 Merge pull request #4499 from BrokenEagle/fix-4408
Fix notes having absolute coordinates upon creation
2020-06-09 01:36:44 -05:00
evazion
38f385d1ca js, css: fix eslint and stylelint warnings. 2020-06-09 01:35:44 -05:00
BrokenEagle
6f7530533a Fix notes having absolute coordinates upon creation
Notes are not given percent coordinates when created, however moving
or resizing would update the coordinates to percentage. This is why
it was appearing as if the type of coordinates given were random.
2020-06-05 21:53:00 +00:00
evazion
647556761b Fix antiproxying (again).
Fuck it, just hardcode it. They rewrite certain parts of our markup so
we can't rely on anything in the html.
2020-06-02 23:30:15 -05:00
evazion
91640447c0 Fix antiproxying config options.
Don't embed config options directly in Javascript. Including them in the
Javascript forces us to recompile the Javascript whenever these options
change, which requires us to redeploy the entire site instead of just
restarting the app server.
2020-06-02 20:50:39 -05:00
evazion
a8389c74d8 uploads: fix dropzone previews being stretched. 2020-06-02 03:04:36 -05:00
evazion
8b46d00b9b Add antiproxying protection.
Try to prevent malicious sites like danbooru.me or idanbooru.com from
proxying our site and inserting ads. If we detect that we're not running
on the real site, then we redirect to the real site.
2020-06-01 13:41:15 -05:00
evazion
fb19bf06ce Merge pull request #4490 from BrokenEagle/fix-embedded-notes
Fix embedded notes not being re-editable after note creation
2020-05-29 11:29:12 -05:00
BrokenEagle
a6c64bb69a Fix embedded notes not being re-editable after note creation
The issue is that the body of the embedded notes were being set to
the value which tells the script not to read the original body after
saving a note. This was a poor system prone to issues, so instead a
DOM class is now explicitly added to the notes on note creation and
cleared whenever a note gets saved.

Additionally, the embedded note bodies were standardized to use the
same initial value as non-embedded notes as well.
2020-05-27 23:59:19 +00:00
BrokenEagle
8cab65367c Added mono font 2020-05-25 19:15:35 +00:00
evazion
26d6e23377 Fix #4425: Add Danbooru Discord server prominently
* Add Discord, Twitter, and Github links to site footer.
* Remove "Desktop mode" and "Keyboard shortcuts" links from footer.
  Users can use the desktop site option in their browser to switch
  between desktop and mobile mode.
* Remove git hash from footer. Users can hover over the Github logo to
  see the hash instead.
2020-05-08 17:14:22 -05:00
evazion
e425870c17 Fix #4027: Search for posts favorited by the fav group order. 2020-04-27 13:11:07 -05:00
evazion
35824c9e45 posts: remove AddThis widget.
AddThis apparently pulls in a script from z.moatads.com now. Fuck that.
2020-04-23 13:38:24 -05:00
evazion
94180d77b4 dark mode: fix <kbd> tag colors.
Use a light background for <kbd> tags on the keyboard shortcuts page for
better contrast with the page backgorund.
2020-04-17 00:39:16 -05:00
evazion
e848011080 Fix #4406: Add "commentary:" metasearch.
Add:

* commentary:true (posts with commentary)
* commentary:false (posts without commentary)
* commentary:translated (posts with translated commentary)
* commentary:untranslated (posts with untranslated commentary)
* commentary:"text" (posts where any commentary field matches "text")

Known issues:

* There's no way to escape the true, false, translated, or
  untranslated keywords to do a literal text search for commentaries
  containing one of these keywords.

* Negated searches may be slow. Using a left outer join instead of a
  subquery would be faster in most cases, but negating it is harder.
2020-04-17 00:11:00 -05:00
evazion
9901161bbf search: rename artcomm metatag to commentaryupdater.
* Rename the artcomm:<user> metatag to commentaryupdater:<user>.
* Add support for negated -commentaryupdater:<user> searches.
2020-04-16 21:06:51 -05:00
evazion
bfdb0a4f5e notes: fix note text vertically overflowing note body.
Can happen when the translator intentionally sets a note body height
that's too small for the note and it causes the note text to overflow.

ref: https://danbooru.donmai.us/forum_topics/9127?page=301#forum_post_164787
2020-04-07 14:16:51 -05:00
evazion
b3238c5dbe dtext: fix scrunched table columns.
Fix table columns being collapsed to one character wide in certain
cases. Caused by setting `word-break: break-word` on div.prose, which
was needed to stop very long unbroken strings making columns too wide,
but has the opposite effect of making columns too narrow in other cases.

Example: https://danbooru.donmai.us/forum_topics/13868?page=28#forum_post_164950
2020-04-07 14:05:46 -05:00
evazion
8773c7e87f Merge pull request #4369 from BrokenEagle/post-version-fixes
Various post version fixes
2020-04-04 02:55:37 -05:00
evazion
dda47f15b0 Merge pull request #4350 from BrokenEagle/fix-relationship-previews
Fix relationship preview alt text overflowing
2020-04-04 02:34:03 -05:00
evazion
56ea6b9ec5 Merge pull request #4387 from BrokenEagle/embedded-note-alignment
Add additional settable attributes for embedded notes alignment
2020-04-04 02:20:24 -05:00
evazion
522c8c219f Merge pull request #4373 from BrokenEagle/note-fixes
Various note fixes
2020-04-04 01:17:32 -05:00
evazion
25cca328b2 Fix #4388: Missing newline in upload form error. 2020-04-03 23:44:02 -05:00
evazion
fde42022c0 post disapprovals: refactor disapproval reasons.
* Factor out reasons into a constant
* Change column default and eliminate unused `legacy` reason.
2020-04-03 23:44:02 -05:00
BrokenEagle
a4ab165de7 Add alignment attributes for embedded notes
- justify-conent is for L-R alignment
- align-items is for T-B alignment
2020-04-04 02:10:33 +00:00
evazion
9def8c5c0d notes: prevent notes appearing above site notices. 2020-03-31 01:23:16 -05:00
evazion
cc385fa9e4 notes: better fix for note body sizing (#4375).
Setting max-width causes notes to overflow the note body if they set a
fixed `width` or they use `white-space: nowrap` and the line is wider
than the max-width. Using `width: min-content` instead makes the note
shrink to fit but doesn't prevent it from expanding if it needs to.
2020-03-31 01:18:23 -05:00
evazion
c44267b848 Fix #4375: The popup note boxes are very long 2020-03-29 02:53:50 -05:00
BrokenEagle
ddb888297e Fix movable status not being removed after the note has been saved
This was also causing the movable status on new notes to require
clicking twice to remove that status since the note ID gets changed
but the move ID wasn't.
2020-03-28 21:08:27 +00:00
BrokenEagle
7358452152 Fix note borders not showing up with the dark theme
- Also remove unnecessary duplicated note variables for dark theme
2020-03-28 21:08:26 +00:00
BrokenEagle
902c0b910e Make note bodies smaller and simpler for embedded notes 2020-03-28 21:08:26 +00:00
evazion
71e1d7c2a5 notes: fix note mispositioning when image is blacklisted.
If the image is blacklisted on initial page load then unblacklisted
after the image is loaded, then the notes will be mispositioned at the
bottom of the image. This is because we relied on $image.height() to
calculate the note position, but the image height is zero when the image
is hidden.

Potential fix for #4370.
2020-03-28 14:56:38 -05:00
BrokenEagle
6aa0adb738 Make the post versions more like the old format
- "Current" is now most like the old format
-- It is therefore now the default for post versions
- Only show the actual edits in their own column
- Show the current state at that version in another column
- On the "previous" view, don't double-show full list of tags for
  the first post versions, so leave edits blank
2020-03-28 06:29:41 +00:00