da1537e3eb
Sync cpanfile
2025-05-04 12:29:51 +00:00
3273793777
api/v0: make meta reflect reality
2025-05-04 12:29:32 +00:00
26c0443999
site: small refactor for promise all handler
2025-05-04 11:02:34 +00:00
d97ee5f57c
api/v0: replace one "if !" with "unless" for readability
2025-05-04 10:02:23 +00:00
05c8d5e493
Some missing "use v5.40"
2025-05-04 09:37:35 +00:00
84a068e5a8
site: allow to directly mount api
2025-05-04 09:36:09 +00:00
cc449cd9d7
api/v0: fix last page calculation in PagedResults
2025-05-03 18:10:26 +00:00
e7c70f2503
api/v0: fix fetch media related to tags
...
@media_ids is always at most one page size in length, so don't call
->page which returns an empty array.
2025-05-03 18:07:00 +00:00
2d64ec57a0
site: inline Random controller
2025-05-03 18:02:43 +00:00
3734b97e0c
Drop unused variable
2025-05-03 17:58:26 +00:00
7d8d873fc4
site: use no_redirect for randomized endpoints
...
As a really nice consequence, drop max_redirects from Mojo::UserAgent.
2025-05-03 17:57:42 +00:00
c1463b36ef
api/v0: make Tags model random_id return the display
2025-05-03 17:55:26 +00:00
d44435ac73
api/v0: add no_redirect option for randomized endpoints
2025-05-03 17:44:45 +00:00
37802a2aa1
api/v0: inline listing helpers
2025-05-03 17:18:47 +00:00
9d8b300d11
api/v0: improve error conditions
...
Return an HTTP 404 when no media is found and an HTTP 400 when some of
the requested tags aren't found.
2025-05-03 17:05:11 +00:00
fa6f642ca2
api/v0: simplify Tags model get
...
Since previous commit, get only effectively serves search for ids or
displays. Remove the machinery to deal with other stuff and simplify
error checking.
2025-05-03 16:42:30 +00:00
f1c3d1ed0e
api/v0: simplify show_tag
...
Only accept an ID or the display name. Stop accepting kind_id and raw
names. As a consequence of the latter, the endpoint now always returns
exactly one tag.
2025-05-03 16:42:30 +00:00
d78708e619
db: add a kind for extensions
2025-05-03 15:45:31 +00:00
ecbc3ded8d
api/v0: remove lib/Pooru/Schema.pm
...
Missed in ad46c6ba85
.
2025-05-03 13:55:22 +00:00
19369d4dc2
Consistently use v5.40 everywhere
...
Also make the file headings more consistent with regards to spacingg.
2025-05-03 13:53:37 +00:00
c5eef1be0b
api/v0: inline Random controller
2025-05-03 13:50:07 +00:00
fdb969de16
Remove no longer needed script
2025-05-03 13:42:41 +00:00
aa68868647
db: drop no longer used views
2025-05-03 13:40:24 +00:00
ad46c6ba85
api/v0: remove old model's remnants
2025-05-03 13:37:54 +00:00
291775bb04
site: adjust to the new model
...
similarity_score was renamed to score.
2025-05-03 13:35:00 +00:00
230c595e80
api/v0: switch the API to the new model
2025-05-03 13:34:26 +00:00
0635e37e13
api/v0: add a new model implementation
...
Use DBI exclusively to have a fine control of the produced queries. dbic
requires a lot of symbols permutation to produce the desired ones.
2025-05-03 13:30:27 +00:00
b052526f4e
db: add extra indexes for tag and media_tag
2025-05-03 08:41:23 +00:00
b01e4197e7
site: small css fixes
...
- remove padding-bottom from main
- add some missing margin-bottom in components
- fix .media-metadata and .media-item size
2025-04-29 21:27:26 +00:00
ce6635f1d9
api/v0: predefined searchs for Random controller
2025-04-29 21:27:17 +00:00
4c476dfd3e
site: show similar media in media view
2025-04-29 12:11:30 +00:00
c625ee860a
api/v0: implement similarity search for media
...
Use a very naive approach: define similarity as the number of shared
tags between two media pieces. It can be implemented in SQL and produces
decent results.
2025-04-29 12:08:22 +00:00
29aa172391
api/v0: make escaped sequences work for search
...
Reorder the regex chars and remove a needless escape while there.
2025-04-28 21:00:32 +00:00
202c6fa878
site: fix propagation prevention on Enter and Tab keys
2025-04-28 19:27:37 +00:00
3ea1283af8
site: refactor search component a bit
...
Move external functions into the object and improve naming.
2025-04-28 19:26:59 +00:00
f4f059578d
site: typo: returrn -> return
2025-04-28 16:00:25 +00:00
9935590a19
site: remove x-model="search" in search component
...
There is an issue that screws with cursor position afterwards, always
placing it at the end. For the time being, manage the binding manually.
2025-04-28 15:59:10 +00:00
bf21610576
site: bind search component open to items.length
2025-04-28 15:58:00 +00:00
cc25efc5f4
site: rework {up,down} arrow handling
...
Allows it to work when setting the cursor via the pointer.
2025-04-28 14:19:01 +00:00
301b28e7e1
site: remove focus event from search
2025-04-28 13:48:07 +00:00
e28a2e2239
site: add a class to search form
2025-04-28 13:43:21 +00:00
005560bd4c
site: css polishing
...
- relocate a couple of specific blocks out of the general area
- rename --gap to --vertical-unit
2025-04-28 13:39:51 +00:00
07987b7c0e
site: rework search component
...
Don't reimplement a bunch of reactive stuff that Alpine.js handles by
default.
2025-04-28 12:46:29 +00:00
15a98e03d1
site: style fixes
...
Set the right variables for dark mode --tag-kind-*. Style input
foreground and background colors.
2025-04-28 12:42:48 +00:00
ba424dcb02
site: make /search always return JSON
2025-04-28 12:24:33 +00:00
41f759c566
site: make gallery, navbar, search and media align
2025-04-28 07:18:02 +00:00
4a2fb176d8
site: reset suggestions state when clicking anywhere else
2025-04-28 06:52:23 +00:00
8168bb9715
site: decouple state from event handlers
...
Try to avoid directly setting state from event handlers and instead
provide utility functions that mutate state in a consistent way.
2025-04-28 06:52:23 +00:00
b1cd0dad8d
site: adjust cursor position after search autocompletion
2025-04-27 19:36:08 +00:00
6250bb9699
site: fix mouseenter event detection
2025-04-27 19:24:16 +00:00