diff --git a/src/AdminUI.css b/src/AdminUI.css index da0ffe7..a84f55b 100644 --- a/src/AdminUI.css +++ b/src/AdminUI.css @@ -176,6 +176,13 @@ dialog > div label { width: 100%; justify-content: space-between; } +.add-guest > div { + display: flex; + flex-direction: column; + overflow-y: auto; + gap: 7px; + max-height: calc(3px + 1rem); +} .danger-hint { align-self: flex-end; font-size: 8pt; @@ -185,7 +192,11 @@ dialog > div label { .danger-hint > pre { display: inline-block; } +#template { + min-height: 1rem; +} .tip { + height: 1rem; align-self: flex-end; font-size: 8pt; color: gray; diff --git a/src/AdminUI.tsx b/src/AdminUI.tsx index e6888fa..19dd30a 100644 --- a/src/AdminUI.tsx +++ b/src/AdminUI.tsx @@ -203,7 +203,13 @@ export const PartyUI: React.FC<{ party: ResponseCreateParty, adminToken: string, const exportPartyLink = async (user: RequestCreateGuest) => { const url = `https://${party.name}.party.leafbla.de/${user.token}`; - navigator.clipboard.writeText(url); + const template = document.getElementById("template"); + if (template instanceof HTMLTextAreaElement && template.value.trim() !== "") { + const pattern = template.value.replace("%URL", url);; + navigator.clipboard.writeText(pattern); + } else { + navigator.clipboard.writeText(url); + } }; return <> @@ -227,7 +233,10 @@ export const PartyUI: React.FC<{ party: ResponseCreateParty, adminToken: string,
- Did you know: Contextmenu copies the invite link! +
+ Did you know: Contextmenu copies the invite link! + +
editUser({ coming: null, extra: {}, grammatical_gender: "m", name: "", token: "" })}> 🏃