Skip to content

Commit 24c7154

Browse files
committed
Add report issue functionality and disclaimer to NodePanel
1 parent 77f972b commit 24c7154

1 file changed

Lines changed: 48 additions & 3 deletions

File tree

pcd-website/src/components/NodePanel.vue

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ async function copyLink(node: Node) {
178178
shareDropdownOpen.value = false;
179179
setTimeout(() => { linkCopied.value = false; }, 2000);
180180
}
181+
182+
function getReportIssueHref(node: Node): string {
183+
const subject = `[Report] Issue with "${node.event_name}" page`;
184+
const body = `Hi PCD team,\n\nI would like to report an issue with the following page:\n\n- Name: "${node.event_name}"\n- Link: ${getShareUrl(node)}\n\n[Please describe the issue here].\n\nThank you!`;
185+
return `mailto:day@processingfoundation.org?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
186+
}
181187
</script>
182188

183189
<template>
@@ -397,7 +403,7 @@ async function copyLink(node: Node) {
397403
<Icon icon="bi:map" width="1em" height="1em" aria-hidden="true" class="panel-link-icon" />
398404
<span>Get directions</span>
399405
</a>
400-
<a
406+
<a
401407
v-if="node.primary_contact.email"
402408
:href="`mailto:${node.primary_contact.email}`"
403409
class="panel-link-row"
@@ -418,6 +424,30 @@ async function copyLink(node: Node) {
418424
<span>{{ node.event_page_url }}</span>
419425
</a>
420426
</div>
427+
428+
<!-- Disclaimer -->
429+
<template v-if="!node.organization_name?.toLowerCase().includes('processing foundation')">
430+
<hr class="panel-separator" aria-hidden="true" />
431+
<p v-if="node.organization_name" class="panel-disclaimer">
432+
This event is organized by {{ node.organization_name }} and is not affiliated with the Processing Foundation. For any questions or concerns about this event, please contact the organizers directly.
433+
</p>
434+
<p v-else class="panel-disclaimer">
435+
This event is independently organized and is not affiliated with the Processing Foundation. For any questions or concerns about this event, please contact the organizers directly.
436+
</p>
437+
</template>
438+
439+
<!-- Report issue -->
440+
<div class="panel-report">
441+
<hr class="panel-separator" aria-hidden="true" />
442+
<a
443+
:href="getReportIssueHref(node)"
444+
class="panel-link-row panel-report-link"
445+
title="Report an issue with this page"
446+
>
447+
<Icon icon="bi:flag" width="1em" height="1em" aria-hidden="true" class="panel-link-icon" />
448+
<span>Report an issue with this page</span>
449+
</a>
450+
</div>
421451
</div>
422452
</template>
423453
</div>
@@ -690,7 +720,7 @@ async function copyLink(node: Node) {
690720
.panel-event-website-btn {
691721
display: block;
692722
width: 100%;
693-
margin-bottom: 1rem;
723+
margin-bottom: 1.5rem;
694724
padding: 0.625rem 1rem;
695725
background: var(--color-link);
696726
color: #fff;
@@ -933,8 +963,23 @@ async function copyLink(node: Node) {
933963
}
934964
935965
/* ─── Links section ─── */
966+
.panel-disclaimer {
967+
font-size: 0.8125rem;
968+
color: var(--color-text-muted);
969+
line-height: 1.5;
970+
margin-bottom: 1rem;
971+
}
972+
936973
.panel-links {
937-
margin-bottom: 1.5rem;
974+
margin-bottom: 0.75rem;
975+
}
976+
977+
.panel-report-link {
978+
color: var(--color-text-muted);
979+
}
980+
981+
.panel-report-link:hover {
982+
color: var(--color-link);
938983
}
939984
940985
.panel-separator {

0 commit comments

Comments
 (0)