Links/redirects: Copy link on a saved redirect
A manifest's idLink gives a saved record's own address, shown on its URL ID card with a Copy link button; redirects use it for the /go/ link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e060153798
commit
0eea9ba13b
2 changed files with 28 additions and 2 deletions
|
|
@ -5,7 +5,7 @@
|
|||
/go/<URL ID>, and passed on with the link's UTM tags. Server side:
|
||||
server/src/admin-schema/redirects.js and routes/redirects.js. */
|
||||
|
||||
import { SITE_ORIGIN } from "../site.ts";
|
||||
import { SITE_ORIGIN, siteUrl } from "../site.ts";
|
||||
|
||||
const GO = `${SITE_ORIGIN.replace(/^https?:\/\//, "").replace(/\/$/, "")}/go/`;
|
||||
|
||||
|
|
@ -15,6 +15,8 @@ export const redirects = {
|
|||
singular: "redirect",
|
||||
idLabel: "URL ID",
|
||||
idPrefix: GO,
|
||||
// The address to share, copied from the saved redirect's page.
|
||||
idLink: (id: string) => siteUrl(`/go/${id}`),
|
||||
|
||||
list: {
|
||||
columns: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue