Age | Commit message (Collapse) | Author | Files | Lines |
|
This allows for proper use of parameters that do validate while using
defaults for those that don't. Also removes the need for error handling
and potential duplication of default values.
Requires latest TUWF git, so rebuild the docker image if you use that.
|
|
|
|
|
|
|
|
|
|
|
|
Replaces the old "wishlist status" column that I removed earlier. It's
kind of awkward, but at least the functionality still exists now.
|
|
ulist tables
I made an attempt to be as backwards-compatible as possible, but this
does introduce some weird and hard-to-fix behavior that didn't exist
before. In particular:
- Removing a VN from the votelist or wishlist will make it show up on
'get vnlist'.
- Removing a VN from the vnlist will also remove it from the votelist
and wishlist.
- set wishlist status only works if the appropriately-named labels
exist. Renaming the converted labels will break and these labels
aren't created for new users.
|
|
|
|
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.
|
|
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. :(
|
|
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.
|
|
|
|
|
|
Old VNDB::* code still uses that preference in a few places, that needs
to be fixed.
|
|
|
|
|
|
This adds the users.c_vns and c_wish columns and a function to update
the cache.
Unlike my previous cache update approaches, I did not use SQL triggers
here, as that seemed more complex and less efficient than updating the
cache manually. That's not to say that I'm happy with the current
approach, but meh...
The cache update function is not automatically run for all users, but
that could be added to Multi::Maintenance if it turns out that the
cached values will not be updated properly in some cases.
|
|
Rather than fetching the entire shop inventory as a single JSON, which
doesn't work anymore now that Denpasoft has more products than its API
allows you to fetch. Pagination support is kinda meh. The handle lookup
method works fine and is also what we do with other shops.
|
|
Decided to go with option presets (e.g. '?wishlist=1') rather than add
the full list of options to each link. Makes it easier to maintain and
keeps URLs for basic pages short.
As a result of that, I had to fix ColSelect.elm to not read the current
URL but instead get the URL passed by Perl. Fortunately, it looks like
the Erl package can deal with partial URLs (only the query string, in
this case) just fine.
|
|
It turned out that naively changing the existing queries to refer to
ulist_vns with a (WHERE vote IS NOT NULL) made them ultra slow (like,
DNF-slow), for a reason I haven't been able to figure out yet. I had to
rewrite the queries to use CTEs and in doing so figured that I could get
an extra performance improvement by combining the popularity and rating
updates in one query. The combined update function now runs faster than
the old queries.
|
|
For convenience and consistency with the board view.
|
|
It's like I forgot halfway through that SQL::Interp has special, and
very useful, syntax for inserts
This also reduces the number of queries in Discussions::Edit a bit, as
there's no more need for the INSERT-followed-by-UPDATE hack.
|
|
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.
|
|
Fixes https://vndb.org/t2520/14#334 - I originally had some trouble to
do this because `load` doesn't actually reload the page if you're just
changing the hash. The `reload` following it handles that now.
The Redirect response is just cleanup, there's several places that could
benefit form it.
|
|
|
|
The username used to be visible to mods when hitting the edit button.
Now that I'm rewriting the edit form I'm removing the username display
field (it's not something you can edit, after all), so I'm moving the
information to the thread, where it belongs.
|
|
For more consistency. Only exception right now is the password reset
form, which still has parameters in the URL. Didn't convert it as that
code doesn't use the elm_form() framework at the moment.
|
|
Turns out the recent update didn't allow me to moderate private threads
anymore. :(
I decided not make it a boardmod feature this time, one person for
moderating private threads is enough.
|
|
|
|
So we can apply the new preview functionality.
I got rid of the "Go advanced" button, because there's really nothing
advanced about it.
|
|
|
|
|
|
TODO:
- Managing labels
- Assigning labels to VNs
Not yet sure what the API for the latter should look like.
|
|
To directly query the new list feature. I'll migrate the old
vnlist/wishlist/votelist APIs later to query the 'ulist' tables.
|
|
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.
|
|
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/
|
|
|
|
It works pretty well, but Lists.pm is getting *really* ugly now. :(
|
|
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.
|
|
|
|
|
|
This is pretty slow for large lists, but let's just see how it goes.
|
|
|
|
People leave their window open for a while, and that's fine.
|
|
It's redundant. The goal was to make the notes feature more prominent so
it'd stand out more, but in hindsight it seems more like a distraction.
|
|
Requires the latest git version of TUWF.
|
|
|
|
listing
i.e. private and hidden threads are now included in the counter if you
can see those threads.
|
|
A board-wide "tab"-like structure rather than breadcrumbs, has a more
consistent feeling.
|