generated from partypages/party-template
This commit is contained in:
parent
d9e50d4641
commit
22cb701cb4
@ -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;
|
||||
|
@ -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,
|
||||
</div>
|
||||
</div>
|
||||
<div className="add-guest">
|
||||
<span className="tip">Did you know: Contextmenu copies the invite link!</span>
|
||||
<div>
|
||||
<span className="tip">Did you know: Contextmenu copies the invite link!</span>
|
||||
<textarea placeholder="Use %URL as substitution" id="template" ></textarea>
|
||||
</div>
|
||||
<span className="lg add-guest-button" onClick={() => editUser({ coming: null, extra: {}, grammatical_gender: "m", name: "", token: "" })}>
|
||||
🏃
|
||||
</span>
|
||||
|
Loading…
Reference in New Issue
Block a user