Commit Graph

8143 Commits

Author SHA1 Message Date
Kira
82ba9da969 Thumbnail insertion code 2019-04-30 08:04:20 -07:00
Kira
25f8222d2c Add avatar to user class
This also updates the supporting code to enable dumping deferred
post information to the page, which was partially broken in a
previous commit.
2019-04-30 06:50:43 -07:00
Kira
01418903aa Enable blacklist code to accept post data as objects
This sets up support of using the blacklist code as a utility to
support blacklisting avatars and dtext thumbnails before inserting
them into the DOM.
2019-04-30 06:46:27 -07:00
Kira
47e222343a Add deferred posts system
This allows aggregating posts from many sources and loading them
all at the same time at the end of the request, and only if they
being used.

Other potential approaches are to eager preload all posts referenced
by specific entities, but this breaks for thumbnail dtext, which
will be added later.
2019-04-30 04:53:31 -07:00
Kira
f72b9fd1e1 Add RequestStore gem 2019-04-30 04:46:40 -07:00
Zwagoth
68e8f551e0
Merge pull request #74 from zwagoth/profile_info
Add user profile info
2019-04-28 10:02:42 -04:00
Kira
128428f879 Add user profile info
Possible improvements:
 - Lock commission information to users linked to artists.
   (Currently not implemented.)
2019-04-28 06:59:29 -07:00
Zwagoth
1a2e4ca73f
Merge pull request #73 from zwagoth/tag_category_job
Don't queue nil tag category update jobs
2019-04-28 08:06:32 -04:00
Kira
1b6f1d0f47 Don't queue nil tag category update jobs
Tag category updates don't need to run for new tags, and attempting
to run them results in an exception because the tag does not have
a tag id at that point.

The tag counts for the post are still correct as the tag has been
saved and is in the transaction by the time the post system asks
for tag counts for each category, negating the need for the job.
2019-04-28 05:03:35 -07:00
Zwagoth
40bbf22721
Merge pull request #72 from zwagoth/simple_version
Add simple versioning replacement
2019-04-27 14:29:53 -04:00
Kira
06db14aceb Add simple versioning replacement
This replaces the old simple versioning helper that existed on
e621. The implementaiton is roughly the same but has been updated
to use newer rails methods.

No, it's not very flexible, but it didn't need to be.
2019-04-27 11:28:02 -07:00
Zwagoth
0006ded1b9
Merge pull request #70 from zwagoth/multiple_sources
Multiple sources
2019-04-27 11:48:28 -04:00
Kira
bf100446b9 Teach uploaders and editor pages about multiple sources
This somewhat gimps the current source information fetching tool,
however it was already a bit suspect, and needs to be reworked before
being released as a public tool because it relies on API calls.
2019-04-26 07:27:06 -07:00
Kira
8274d3b3c5 Allow multiple sources per post
TODO: Uploader
2019-04-26 03:34:40 -07:00
Zwagoth
d68e5d7814
Merge pull request #69 from zwagoth/refactor_uploader
Refactor uploader
2019-04-25 02:48:25 -04:00
Kira
d16d717fc6 Fix post replacement without preprocessor 2019-04-24 00:05:22 -07:00
Kira
f58c542892 Remove upload preprocessor
The preprocessor was full of weird problems and allowed for
treating the site as a temporary file store without creating a
post to go with the file uploaded.
2019-04-23 20:39:48 -07:00
Zwagoth
0f51b2148c
Merge pull request #68 from zwagoth/forum_categories
Support for access locked forum categories
2019-04-21 23:45:48 -04:00
Kira
8698bd4e39 Support for access locked forum categories 2019-04-21 20:32:11 -07:00
Zwagoth
379020d6b2
Merge pull request #67 from zwagoth/hide_from_anon
Add hide from anon and hide from search engines
2019-04-17 22:45:14 -04:00
Kira
c1d82c7308 Add hide from anon and hide from search engines 2019-04-17 19:44:12 -07:00
Zwagoth
e454fc360c
Merge pull request #66 from zwagoth/mod_actions
Mod actions
2019-04-17 22:14:24 -04:00
Kira
007c55740f Small fixes for mod actions that were not hooked up 2019-04-17 19:13:26 -07:00
Kira
4673523607 Update storage of mod actions to json for potential search abilities 2019-04-14 02:34:04 -07:00
Kira
ebc23caa77 Refactor mod action log sites 2019-04-14 02:34:04 -07:00
Kira
779f30b6bd Preliminary mod action decorator and structure 2019-04-14 02:30:01 -07:00
Kira
e5e453ebcc Add application level default decorator 2019-04-14 02:30:01 -07:00
Kira
11f64ce743 Add Draper for decorators 2019-04-14 02:30:01 -07:00
Zwagoth
65f786c04e
Merge pull request #65 from zwagoth/elasticsearch_query_builder
Add back previous post query builder until migration is finished
2019-04-14 05:29:33 -04:00
Kira
d8cffc4be1 Add back previous post query builder until migration is finished
A lot of code relies on little bits and pieces of the old query builder,
either for utility functions for returning information in a specific way.

Until all of these code sites have been refactored, the old parser needs
to exist within the codebase for it to continue to operate.

Primarily this impacts various search functions around the site using
the numerical search helper functions.
2019-04-14 02:26:41 -07:00
Zwagoth
4eea0b6604
Merge pull request #63 from zwagoth/readd_approvals
Re add approvals
2019-04-11 23:47:48 -04:00
Kira
86adf1eea4 Add fix up post disapproval things after revert 2019-04-11 23:46:34 -04:00
Zwagoth
4a46874a50 Revert "Remove post disapproval"
This reverts commit c6df9a33e0.
2019-04-11 23:39:44 -04:00
Zwagoth
0eb9c2ff22 Revert "Remove post disapprovals table"
This reverts commit 8126c9ef52.
2019-04-11 23:39:44 -04:00
Zwagoth
3027137ea2
Merge pull request #62 from zwagoth/vote_cleanup
Vote cleanup
2019-04-11 22:32:03 -04:00
Kira
511e2aa267 Make post votes work like comment votes 2019-04-10 20:08:36 -07:00
Kira
9dceee4648 Move comment vote loading to controllers
This avoids using a very hacking preloading scheme that involved
a singleton value that could change at runtime and chaining model
associations together.
2019-04-10 17:21:27 -07:00
Kira
44ab7b1a8c Comment votes and vote fixups and interface 2019-04-09 13:04:40 -07:00
Kira
0503d7bb8c Most of comment voting fixes and vote viewer
TODO: locking and admin deletion
2019-04-07 21:46:08 -07:00
Kira
4513516e76 Post vote view and locking support 2019-04-06 13:13:50 -07:00
Kira
537b4a3248 Add negated vote search capability 2019-04-06 10:14:25 -07:00
Zwagoth
9fee77c3b3
Merge pull request #61 from zwagoth/pools
Add pool import
2019-04-05 19:10:57 -04:00
Kira
66b6d29ae3 Add pool import
This also limits the number of posts in a pool to 1000.
2019-04-05 16:08:33 -07:00
Zwagoth
6dfc99d629
Merge pull request #60 from zwagoth/tag_type_history
Tag type history
2019-04-05 13:57:26 -04:00
Kira
f1f1f496c1 Minor fixups for tag type history 2019-04-05 10:50:48 -07:00
Kira
d9f5dcd4ce Tag type restrictions and history 2019-04-03 18:56:47 -07:00
Zwagoth
1089773d0c Merge branch 'elasticsearch' 2019-04-03 11:25:41 -04:00
Kira
99f8e9addd Moved favs/voting out into managers to consolidate logic
While the logic was not particularly complex or spread out it was
made more complicated by the models being dependant on one another.

This creates a central entry point for voting and favorites and
coordinates all transactions.

TODO: upvote/downvote/fav metatags in tag section result in an error
because they attempt to change the transaction isolation mode during
an outer transaction.
2019-03-31 13:25:55 -07:00
Kira
d12e387ba7 Fix indexing race conditions in sets and pools 2019-03-30 08:48:05 -07:00
Kira
bd85b5404c Fix race condition in favorites and voting on posts
This resolves the case where the model update job would be triggered
too soon and miss the committed state for favorites and votes on posts.

The cause of this was larger transaction blocks surrounding updates
and the jobs being queued on the first column update before commit.

This ensures that the post is fully committed before it is queued
for an index update and that all changes are visible in the table.
2019-03-30 01:59:48 -07:00