feat(stellungnahme): E-Mail-Button immer zeigen (leerer Empfänger = an sich selbst)
This commit is contained in:
@@ -225,9 +225,10 @@ Karl-Liebknecht-Straße 4
|
|||||||
);
|
);
|
||||||
|
|
||||||
const mailtoLink = $derived.by(() => {
|
const mailtoLink = $derived.by(() => {
|
||||||
if (!block.recipientEmail || !outputText) return "";
|
if (!outputText) return "";
|
||||||
const subject = `Einwendung Regionalplan Südwestthüringen – Vorranggebiet ${gebietsBez}`;
|
const subject = `Einwendung Regionalplan Südwestthüringen – Vorranggebiet ${gebietsBez}`;
|
||||||
return `mailto:${block.recipientEmail}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(outputText)}`;
|
const to = block.recipientEmail ?? "";
|
||||||
|
return `mailto:${to}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(outputText)}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
function buildText(): string {
|
function buildText(): string {
|
||||||
@@ -920,7 +921,7 @@ ${"=".repeat(64)}`;
|
|||||||
<button class="rounded-md border border-stein-300 px-3 py-1.5 text-xs font-medium text-stein-700 hover:bg-stein-50" onclick={copyText}>{copyFeedback || "Kopieren"}</button>
|
<button class="rounded-md border border-stein-300 px-3 py-1.5 text-xs font-medium text-stein-700 hover:bg-stein-50" onclick={copyText}>{copyFeedback || "Kopieren"}</button>
|
||||||
<button class="rounded-md border border-stein-300 px-3 py-1.5 text-xs font-medium text-stein-700 hover:bg-stein-50" onclick={downloadText}>Herunterladen</button>
|
<button class="rounded-md border border-stein-300 px-3 py-1.5 text-xs font-medium text-stein-700 hover:bg-stein-50" onclick={downloadText}>Herunterladen</button>
|
||||||
<button class="rounded-md border border-stein-300 px-3 py-1.5 text-xs font-medium text-stein-700 hover:bg-stein-50" onclick={printText}>Drucken</button>
|
<button class="rounded-md border border-stein-300 px-3 py-1.5 text-xs font-medium text-stein-700 hover:bg-stein-50" onclick={printText}>Drucken</button>
|
||||||
{#if mailtoLink}
|
{#if mailtoLink}
|
||||||
<a href={mailtoLink} class="rounded-md border border-wald-400 bg-wald-50 px-3 py-1.5 text-xs font-medium text-wald-700 hover:bg-wald-100">{block.recipientEmail ? "Per E-Mail senden" : "Per E-Mail (an mich)"}</a>
|
<a href={mailtoLink} class="rounded-md border border-wald-400 bg-wald-50 px-3 py-1.5 text-xs font-medium text-wald-700 hover:bg-wald-100">{block.recipientEmail ? "Per E-Mail senden" : "Per E-Mail (an mich)"}</a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user