Skip to content

Commit

Permalink
Merge pull request #145 from Morphclue/feat/email-button
Browse files Browse the repository at this point in the history
Add Share via Email Button
  • Loading branch information
Morphclue authored Mar 28, 2024
2 parents f4bff45 + 3148d36 commit 25e3d55
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ All features are completely free and can be used without registration.
<dd>Keep track of your polled events and 1-1 meetings using your favorite calendar app</dd>
</dl>

### Poll Management

<dl>
<img src="docs/bootstrap-icons/icons/send.svg" alt="send" align="right" height="50">
<dt>Invite Participants</dt>
<dd>Invite participants via email or other means</dd>
</dl>


<!-- features:end -->

Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/app/about/features/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"title": "Invite Participants",
"description": "Invite participants via email or other means",
"support": {
"Apollusia": "Simple link sharing is possible",
"Apollusia": true,
"Doodle": true,
"DuD-Poll": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
&nbsp;
<button class="btn p-0 btn-link bi-clipboard" ngbTooltip="Copy to clipboard"
(click)="copyToClipboard()"></button>
<button class="btn p-0 btn-link bi-envelope-at" ngbTooltip="Share via email"
(click)="draftEmail()"></button>
</td>
</tr>
@if (stats) {
Expand Down
15 changes: 15 additions & 0 deletions apps/frontend/src/app/core/info-table/info-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,19 @@ export class InfoTableComponent implements OnInit {
this.toastService.error('Copy Poll Link', 'Failed to copy link to clipboard', e);
});
}

draftEmail() {
const subject = `Poll Invitation: ${this.poll!.title}`;
const body = `Hello,
I would like to invite you to participate in a poll.
Please click the link below to participate.
${this.url}
Thank you!`;

const mailto = `mailto:?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
open(mailto, '_self');
}
}

0 comments on commit 25e3d55

Please sign in to comment.