Skip to content

Paramaterized paths#405

Merged
hrfee merged 9 commits into
mainfrom
paramaterized-paths
May 14, 2025
Merged

Paramaterized paths#405
hrfee merged 9 commits into
mainfrom
paramaterized-paths

Conversation

@hrfee

@hrfee hrfee commented May 14, 2025

Copy link
Copy Markdown
Owner

Modifiable admin, my account and invite page paths. Advanced setting; set in Settings > URL Paths.
Only the pages themselves are affected, API routes remain as-is, EXCEPT: app.Telegram/DiscordVerifiedInvite, app.DiscordServerInvite, app.MatrixCheckPIN and app.MatrixSendPIN. These are all subpaths of the invite form, and need the invite in the path so will remain as subpaths (maybe revisit this in future?). I have added notes about these paths to the API docs.

Page subpaths are in the PAGES global struct in Go, and window.pages in typescript.

Other bits:

  • gcHTML is now app.gcHTML, takes Page parameter and templates in usual stuff itself (PAGES, cssVersion/Class, email/tg/dc/mxEnabled, etc.). Language strings still aren't, as the way it's done for each page can differ.
  • Many of the template parameters were previously added to window in each page's template. The usual ones are now done in header.html (confirmed to not cause issues on dumb pages like crash.html).
  • Mentioned to check URL before refreshing in case you changed host/port/subfolder/etc in setup. Also made cards a bit narrower
  • Fixed URL-based navigation (only really affecting Setup).
  • Fixed some Makefile bugs, avoiding unnecessary CSS builds and actually including modified typescript.

hrfee added 9 commits May 13, 2025 17:31
just send an announcement to yourself.
to change the urls of the admin page, the my account page and of
invites. Seems to work, but need to check all the code over and test.
various subpath combos seem to work, and trailing slashes from them are
trimmed (including for the empty admin path "/", which is now "" by
default).
tailwind command taking part-bundle and turning it into v3bundle didn't
do anything when no changes occurred, so v3bundle kept on being left
    untouched, and therefore with an old timestamp. part-bundle and
    v3bundle are both deleted before CSS is built, so the tailwind
    command always generates a new file.
popstate messages from the browser don't have an event.state, and i
don't even know what the overridePopState stuff is trying to do. If
event.state is null, try window.location.hash, or the last part of the
URL path.
just mentioned that you should check the URL before refreshing if you
changed host/port/subfolder/etc.
use a container to kinda fix the max-width. Tried this on admin but it
messed too much up to bother (the accounts table specifically
doesn't like it).
@netlify

netlify Bot commented May 14, 2025

Copy link
Copy Markdown

Deploy Preview for jfa-go canceled.

Name Link
🔨 Latest commit 632393b
🔍 Latest deploy log https://app.netlify.com/projects/jfa-go/deploys/682501d82f63970008b26a4f

@hrfee hrfee merged commit b47a481 into main May 14, 2025
4 checks passed
@hrfee

hrfee commented May 14, 2025

Copy link
Copy Markdown
Owner Author

Merging so I can get some proper feedback. I've done a reasonable amount of testing this time at least.

@hrfee

hrfee commented May 14, 2025

Copy link
Copy Markdown
Owner Author

Fixes #385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant