summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler
AgeCommit message (Collapse)AuthorFilesLines
2020-04-24v2rw/VN::Page: Remove old and unused codeYorhel3-794/+2
There's a lot of unused code in VNDB::DB::{VN,Release} still, but I'll not fiddle with that for now.
2020-04-17v2rw/VN::Page: Start conversion of VN pagesYorhel1-1/+1
Currently implemented: - Revision diff - Info box & tags (already implemented from /v+/chars page) - Stats There's a few annoying TODO's left, this conversion will take some effort.
2020-04-13UList.VNPage: Allow setting notes from the VN pageYorhel1-1/+2
2020-04-11v2rw: Convert VN char pages (/v+/chars)Yorhel2-191/+3
This also reimplements the VN infobox part of the page - a good first step into converting the main VN pages to v2rw. The new '?view=' parameter is used for spoiler and sexual hiding. Also fixes a bug on character pages where release-specific roles weren't displayed correctly.
2020-04-01VN::Graph: Also generate VN graphs on-demandYorhel1-23/+0
Same change as with Producers::Graph before. This also adds an option to show/hide unofficial relations. Restructured the code a bit to allow for sharing code between Producers::Graph and VN::Graph.
2020-03-30Producers::Graph: Experiment with dynamically generating relation graphsYorhel1-22/+0
The producers.rgraph column still exists and the old graphs are still being generated - that will be removed if this new approach works out.
2020-03-22Delete old release edit formYorhel1-321/+0
So that I can now work on adding a few more fields.
2020-03-22Handler::Producers: Explicitly mention primary language on producer pagesYorhel1-1/+3
To avoid confusion - https://vndb.org/t950.693 .. 696.
2020-03-12SQL: Keep track of dimensions for all images in the DBYorhel2-3/+3
Ought to simplify the image flagging UI.
2020-02-29Revert "Handler::Chars: don't automatically remove non-applicable traits ↵Yorhel1-3/+1
when editing" This reverts commit 486ce0910818ea4b8bc7ef42592915c775f1f45f. Turns out that was considered a feature rather than a bug... https://vndb.org/t3314.2009
2020-02-29Merge branch 'reledit'Yorhel1-3/+3
2020-02-28v2rw/RelEdit: Allow creating a new releaseYorhel1-1/+1
Not totally super happy with this solution; I'd rather automatically create an empty entry and send that to 'RelEdit.Main', but initializing all fields in Perl is tricky. At least in Elm we get some sort of type checking (though Elm can't tell whether the default value makes sense) and doing this in Elm makes it possible to initialize to something invalid that the user has to change (not currently done yet). It's messy either way.
2020-02-28Handler::Chars: don't automatically remove non-applicable traits when editingYorhel1-1/+3
2020-02-21v2rw/WIP: Incremental rewrite of the release edit formYorhel1-2/+2
The new form does change a few things to the UI, so I'll keep the old form around for a while so that people have something to fallback to when it doesn't work (like, right now). I'm also doing this rewrite in multiple commits as it's a pretty large change.
2020-02-13v2rw: Add instance listing to Chars::PageYorhel1-90/+0
I wasn't sure how to handle the fetching of multiple character entries; whether to extend/re-use db_entry() or write a separate function. Ended up going with the latter solution, as db_entry() already has other functionality (and overhead) that we won't be needing in this case. This overhead will matter when this function is used for the character listing on VN pages.
2020-02-13v2rw: WIP: Convert character pagesYorhel1-1/+1
This uses an alternative (non-JS) approach to spoiler hiding, which is both much simpler to implement and properly handles all cases. Downside is that it requires a page reload. It also allows direct linking to a character page with a particular view, but I'm not entirely sure if this is a welcome feature. This is a WIP because it doesn't display instances yet.
2020-01-28v2rw: Convert the VN tagmod interfaceYorhel1-161/+0
This also changes the voting interface a little bit: - Spoiler options are a bit more concise - Mouse-over a button indicates what it does - The -1 and -2 options are not available anymore - Downvoted tags are hidden by default - Moderators can now vote-and-overrule in a single go
2020-01-23v2rw: Convert release pagesYorhel1-282/+1
This removes the user list management functionality, I'll reimplement those in a bit.
2020-01-09ulist: Rework VN "User options" tab to be more prominent and convenientYorhel1-4/+4
Personally not a big fan of this taking so much space when it's not on the user's list, but people want instant options so there we go. It probably still blends in too well with the rest of the VN info though, styling isn't my thing. And there's no need to hit "Add to list" anymore now.
2020-01-08Slightly less ugly tagscore displayYorhel1-1/+1
And get rid of the spoiler warning in the tag link browser. There are lots of pages that would need it if we applied it consistently.
2020-01-08v2rw: Convert tag link browserYorhel1-115/+0
2020-01-06Handler::Chars: Fix empty lines from hidden spoilers in VN relations on char ↵Yorhel1-1/+2
pages
2019-12-24ulist: Delete old lists code and redirect old URLsYorhel1-482/+1
2019-12-24ulist: Add list management widget on VN pagesYorhel1-35/+18
Minimal version. It reuses the LabelEdit and VoteEdit widgets, but doesn't allow setting a note or start/finish date at the moment. VN pages now have both v2rw.js and the old vndb.js; Those two scripts aren't meant to be used together on a single page, so I'm hoping this will be temporary. I removed the 'checkall' handling from vndb.js as that might conflict. It's only used on the old list pages anyway.
2019-12-22ulist: Update "My lists" VN filters to use new ulists featureYorhel1-6/+1
This is just a simple backwards-compatible port, proper integration should allow one to filter on individual labels. The "On my VN list" filter now works slightly differently in that it considers *everything* in ulist_vns to be on the users' VN list, including votes and wishlist. I've removed the option to display a "Wishlist" column. The wishlist works rather differently now, maybe this should instead just display all assigned labels - but that would consume quite a bit of space. :(
2019-12-22ulist: Use new lists for VN vote stats & listingYorhel1-1/+2
To my surprise, I actually managed to achieve acceptable performance by just adding two indices. I totally expected I'd have to keep a cache column in ulist_vns whether the row is private or not. The partial index on the users table in fact improves the performance of the vote graph query. A covering index improves that even further, but that requires Postgres 11+, which the Docker image doesn't have yet (and isn't all that crucial anyway). There's a rather annoying potential for confusion regarding the private flag on votes. The user page & list stats only look at whether the 'Voted' label is private, whereas the VN stats use the "proper" approach of checking for any public label. Not entirely sure which of the two is more intuitive.
2019-12-12v2rw: Discussion board editing & thread creationYorhel1-239/+0
Now with BBCode preview, interactive board search, client-side error reporting and lots of new bugs. This took me far too long, turns out it wasn't such a trivial rewrite.
2019-12-01Discussions: Do not highlight post when nagivating to the "last post"Yorhel2-2/+2
That behavior was more distracting, especially when the intention of the link isn't to link to that post in particular, but just to the more recent part of the thread. As an additional advantage, this doesn't rely on the t#.# redirect anymore, this making browsing the forums slightly faster.
2019-12-01v2rw: Convert thread display + poll votingYorhel1-212/+2
I did not reimplement the 'poll_recast' and 'poll_preview' settings, these actions are now always permitted. Updated CSS a little bit to highlight the linked post and fix the double border at the bottom. The nice thing about the sql_visible_threads() function I wrote earlier is that is can also be used for access control on a single thread. More code re-use. \o/
2019-11-27CSS: Less hacky .maintabsYorhel1-9/+13
Flexbox instead of floats. Apart from that, it's still very hacky. Uses relative positioning in order to overlay 1px over the .mainbox. This should fix the ages-old 'bottom tabs overlay next mainbox' bug and provide more flexibility with adding a top-level <fieldset> or centered buttons.
2019-11-19v2rw: Convert discussion board listings + change link structure a bitYorhel1-121/+0
A board-wide "tab"-like structure rather than breadcrumbs, has a more consistent feeling.
2019-11-15Move pubskin fetching responsibility to VNWeb::HTML::framework_Yorhel2-8/+8
Requiring callers to fetch the right fields and pass it along to framework_() just seems brittle. This implementation requires an extra query but does make an effort to avoid fetching the skin and css when it's not needed.
2019-11-15v2rw: Convert discussion board indexYorhel1-39/+1
Not super happy with the layout of the thread listing table, maybe I'll revisit that after converting the board listings. Also not super happy with the overall (lack of) structure in the board listing pages, should be able to find something for that as well.
2019-11-15v2rw: Convert discussion board searchYorhel1-112/+0
With minor styling improvements and full pagination for thread title search. I did combine a few queries which I initially separated for performance reasons. A few quick benchmarks show that it's fast enough, but I'll have to see how it performs in production.
2019-11-14v2rw: Convert staff pagesYorhel1-164/+1
This is where the ExtLink module comes in handy: generating the revision comparison thing is much easier now. Did find and fix a bunch of issues with the new revision box generator code, but that was to be expected, I hadn't tested that code well yet and this is its first more demanding use. Rest of this is a pretty direct rewrite, nothing too special.
2019-11-12v2rw: Move entryLinks() into separate VNDB::ExtLinks moduleYorhel4-23/+30
This is yak shaving. The new module doesn't have much value as it is, apart from having a central place to define link formats. This new enrich_extlinks() approach is also a bit more efficient in that it can avoid separate SQL queries for multiple objects. But the real reason for these changes is that I can use that %LINKS hash table to automatically generate the links part in the edit summary and it should (hopefully) also be useful to generate a more convenient/streamlined Elm edit form.
2019-11-02Add character age field + conversionYorhel1-1/+10
2019-11-02Add character cup size field + conversion + filterYorhel1-4/+9
2019-10-30v2rw: Convert /u+/postsYorhel1-69/+0
Simple conversion, no real changes other than that the new version has full pagination.
2019-10-16v2rw: Convert staff adding/editing formYorhel1-120/+0
This is the first major editing form to be converted, so I'm expecting a little breakage. A good chunk of this code has been copied from v3. In terms of the UI there has been a small change: aliases that are still referenced do not have the 'remove' link and instead have a flag that shows that they are still referenced. This ought to be a bit friendlier than throwing an error message after the user has submitted the form. Some other things I'd like to improve in this form: - BBCode preview - Pasting in external links and letting the form figure out the Pixiv ID, etc. - Or perhaps even: Integrate AniDB/Wikidata search/autocompletion.
2019-10-14v2rw: Convert user listingYorhel1-78/+1
2019-10-14Delete the user deletion featureYorhel1-44/+0
It's rather much code just to run a single SQL statement that I almost never need. Incidentally, the feature was also broken because the DELETE permission wasn't granted in perms.sql.
2019-10-14Add lang HTML attribute to some original language fieldsYorhel4-9/+9
The database doesn't have a language attribute for every field, so this is more of a best-effort heuristic. The attribute should allow browsers to choose the correct font. https://vndb.org/t2520.300
2019-10-13Sort languages by name rather than tagYorhel3-4/+4
https://vndb.org/t950.634
2019-10-12v2rw: Convert user notifications interface (/u+/notifies)Yorhel1-151/+0
2019-10-10rewards: Honor public custom css/skinYorhel3-10/+10
2019-10-10rewards: Apply supporters badge and unicode name (almost) everywhereYorhel6-32/+30
Only place where this isn't applied (yet?): Sorting user lists still goes by the old username and board names don't use the new unicode names. I have to say, I quite like the sql_user() and user_() pattern. It's not without problems when applied to everything, but it's good enough for several use cases.
2019-10-07Tag/trait pages: Removed cache info line, it is not accurate anymoreYorhel2-3/+6
2019-10-05Handler::VNPage: Fix default tag categories when not logged inYorhel1-1/+2
2019-10-04v2rw: Convert user pagesYorhel1-117/+0
Pretty simple conversion, not much special. Did change a few minor display thingies to be more consistent.