change the way branch permalinks work

branch permalinks still use /b, but /b?abc now acts as a redirect rather than doing annoying JavaScript garbage
I changed the branch element ID format to accomodate this---now the IDs are of form `b-{id}` rather than `{tree_path}:{id}`.
the old way was stupid anyways.

I hope nothing breaks too majorly because of this.
This commit is contained in:
りき萌 2025-01-11 00:15:29 +01:00
parent 70be482fb7
commit c537eb844f
8 changed files with 26 additions and 66 deletions

View file

@ -49,7 +49,7 @@ export class Branch {
});
}
this.namedID = element.id.split(":")[1];
this.namedID = element.id.replace(/^b-/, "");
Branch.branchesByNamedID.set(this.namedID, element);
if (ulid.isCanonicalUlid(this.namedID)) {