Age | Commit message (Collapse) | Author | Files | Lines |
|
My testing, deployment and backup scripts were getting more complicated
with files from various stages being lumped into a single directory
structure, so all generated files (= anything touched by 'make') and
runtime files (= anything touched by the web backend or multi) have now
been moved into separate directories. These directories are also
configurable with $VNDB_GEN and $VNDB_VAR, making it possible to manage
multiple instances from a single source checkout.
I also got rid of *data/* and *dl/* while I was at it, and moved
*static/st/* (that is, the screenshot thumbnails) to */sf.t/*, to be
consistent with the newer and more flexible image directory naming
scheme.
This commit breaks all existing installations and upgrading requires
manual action. General upgrade instructions:
# BEFORE doing a checkout of this commit
make clean
# AFTER
make
mkdir -p var/static var/log
mv static/st var/static/sf.t
mv static/{sf,ch,cv}{,.orig} var/static/
mv data/conf.pl var/
mv data/log var/
mv data/hibp var/
mv dl var/
util/setup-var.sh
Use `git status` find leftover files to clean up or move.
Don't forget to update conf.pl and web server configuration to make sure
they access the new paths.
|
|
Fixes https://vndb.org/t950.1680
|
|
https://vndb.org/t21372.3
|
|
Fixes https://vndb.org/t21372.1
|
|
Pointless busywork, because my brain is too mushy to work on useful
stuff. :(
|
|
Unfinished, primarily for testing.
https://vndb.org/t20399.36
|
|
For completeness.
|
|
For some reason people manage to fail the old input validation even on
this form.
|
|
|
|
How about I test the code before deploying?
|
|
Workaround for https://vndb.org/t8242.1461 - Not anywhere near perfect,
but tends to cover most titles. I might adjust the forms later on to
turn the romanization requirement into a warning, but for now this'll
do.
|
|
Main reason for this rewrite is that I realized that many mobile
browsers don't properly support reportValidity() yet. The new form code
still heavily uses the HTML5 validation API, but doesn't rely on
reportValidity() as much since it has CSS :invalid fallbacks. And even
if that fails, the error messages reported by the server are slightly
more useful.
Also removed the bot verification question as an experiment, might come
back if it turns out to be needed.
Also added a silly checkbox to check if people read checkbox labels.
Also used <input type="email"> to help mobile browsers select the right
keyboard.
|
|
elm.min.js.gz shrunk by 9919 bytes. user.min.js.gz is now 9681 bytes.
Not a totally fair comparison and those few bytes are completely
irrelevant, but it at least shows that I'm not making things more bloated.
|
|
Yak shaving at its finest. I was working on an edit form for the new
franchises system, but then realized that the form JS and HTML kind of
sucked and a completely new form isn't the best way to experiment with a
new implementation. I also had some ideas to improve the user edit form,
so decided to rewrite that first, but then realized it's better to lay
down a smaller foundation before doing the complex stuff. So here we
are, a completely useless rewrite of a tiny little login form.
But I did improve error messages a bit while I was at it.
There's still a bunch of unknowns regarding form implementations: to see
if there's a more convenient way to set custom validations; to see if
HTML5 validation works well with form tabs; to see if URL fragments can
be used to select form tabs; mobile-friendly form layouts (should be
easier with this new approach); dropdown search improvements, etc. The
user edit form should prove a good testing ground for all of that.
|
|
|
|
The idea behind the list icon CSS filters was that they could be
adjusted in themes, but (1) that never happened and (2) even with colors
embedded in the SVG they can still be adjusted with the same mechanism.
In that light, embedding the colors in the SVG is the cleaner solution.
|
|
Unique classes have lower chance of clashing with anything else.
Automatically generating the dimensions increases the size of the CSS
file a bit, but it simplifies maintenance. The only thing that's still
done manually is the selection between the .svg and .png image.
|
|
Couldn't get fragment identifiers to work satisfyingly, so ended up
going back to old-fashioned CSS background-position. Oh well.
|
|
Not that this is any less messy, but hopefully makes it easier to build
upon.
|
|
|
|
Which is also kind of an abuse, but at least the semantics are much
closer.
(Next up: the standout class. Slowly working towards a "font: inherit"
and "color: inherit" reset, which'll remove the need for a bunch of ugly
workarounds)
|
|
With a samesite cookie check, to see if that can be relied on.
|
|
|
|
This change also increases browser version requirements by quite a bit,
though it should still be fair. Pale Moon is an easy "old enough" target
to test.
This new organization is, in a way, pretty similar to what we had before
the switch to Elm, except with more experience I might be able to do
this in a more manageable way.
I have to admit, I like arrow functions more than I had expected.
|
|
It was possible to search for deleted producers, but I didn't really see
the value in that. Checking for deleted VNs is still important, likewise
for tags & traits.
This reduces the size of the cache a bit, but more importantly also
improves accuracy of the search result counts for other DB entries.
|
|
|
|
Might have some false positives as there's prolly a bunch of titles
mixing Greek into a Latin alphabet, but that shouldn't be a problem.
|
|
|
|
|
|
Currently has 851 million password hashes, taking about 8G of space with
the current approach. It's simple and fast, so should be worth it.
inb4 complains about "why can't I use my password anymore!?"
|
|
+ update filters and APIs to respect the 'listread' permission.
|
|
|
|
I'm pretty sure this was requested by someone, but I can't find the
relevant post at the moment.
|
|
Fixes https://vndb.org/t2520.697
|
|
|
|
|
|
|
|
Problems with the old implementation were that the setting wasn't an
intentional user action, so there were a LOT of preference writes that
were reverted a minute or so later. Wasting both server and visitor
time. For regular visitors, the localstorage-based approach also caused
a reflow if their preferences didn't match the default.
Downside of the new implementation is that regular visitors can't change
their preference at all anymore, this now requires an account. :/
|
|
This implements the main database model part of custom title languages
(https://vndb.org/t12465). Selecting the right title for display is done
in SQL through the 'vnt' VIEW, which can be overridden in each session
with a TEMPORARY VIEW in order to support user title preferences, but
that part has not been implemented yet.
I had started out using an sql_vn() function that returned a subquery
instead of using a VIEW, but then ran into trouble with the item_info()
SQL function. This VIEW approach also happened to simplify much of the
code. I did have to get rid of the Discusssions::Lib::sql_boards()
function, as Postgres was unable to optimize the subquery inside a UNION
inside a subquery for some reason. Haven't run into any other noticeable
performance regressions yet.
TODO:
- Implement actual user title preferences
- Add the correct 'lang' HTML attributes everywhere a title is displayed
(we do have the information now, though it still isn't trivial)
- Add title fetching support to API
|
|
|
|
But don't display them on the ulist itself yet, since that may be
confusing when the widget is added to that listing. Ugh, what a mess.
|
|
There's no way to list or aggregate the votes yet, and I'm not fully
sure the data model is what it should be. Hence testing.
|
|
|
|
Only exact matches for now, and the UI's a bit ugly.
w/e it works, ship it.
|
|
Fixes https://vndb.org/t2520.585
|
|
Currently only added on VN listings in row view, but the goal is to add
this widget to other listings and pages as well. This should make it
easy to see whether a VN is on your list and to add/remove/edit your
list status.
The code is one of the messiest copy-paste jobs I've ever done. I'm
totally going to regret having to maintain this crap. But anyway, let's
first see how this UI is received.
|
|
Requires imagemagick built with webp support, of course.
They're still converted to JPEG, because I don't think the
size/compatibility trade-off is worth it.
|
|
Make it clear that a valid email is required in order to create an
account. The previous wording implied that there was no account
activation and people would enter bogus addresses.
There (should) not be a need anymore for the "shitty email provider"
messages, as I'm routing mails for those destinations through external
relays now. I really hate that this is necessary, but such is life.
Also fix the wording of the password reset mail - that function hasn't
disabled your account for a while now.
|
|
I don't like the platforms listing in CSS much, after all, and I've
never been a big fan of the <abbr> hacks. Been experimenting with sprite
sheets and inline <svg><use..>, but for now I think the simplest
solution of just using <img> tags still seems the best.
Until I change my mind again and can't resist the allure of throwing all
icons in a single nicely compressed file.
|
|
|