Add Bluesky to inbox entry sharing dialog
This commit is contained in:
parent
e90b4b8580
commit
4ed9cf5a32
|
@ -1,9 +1,10 @@
|
|||
import { Controller } from '@hotwired/stimulus';
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ['twitter', 'tumblr', 'telegram', 'other', 'custom', 'clipboard'];
|
||||
static targets = ['twitter', 'bluesky', 'tumblr', 'telegram', 'other', 'custom', 'clipboard'];
|
||||
|
||||
declare readonly twitterTarget: HTMLAnchorElement;
|
||||
declare readonly blueskyTarget: HTMLAnchorElement;
|
||||
declare readonly tumblrTarget: HTMLAnchorElement;
|
||||
declare readonly telegramTarget: HTMLAnchorElement;
|
||||
declare readonly customTarget: HTMLAnchorElement;
|
||||
|
@ -22,6 +23,7 @@ export default class extends Controller {
|
|||
connect(): void {
|
||||
if (this.autoCloseValue) {
|
||||
this.twitterTarget.addEventListener('click', () => this.close());
|
||||
this.blueskyTarget.addEventListener('click', () => this.close());
|
||||
this.tumblrTarget.addEventListener('click', () => this.close());
|
||||
this.telegramTarget.addEventListener('click', () => this.close());
|
||||
this.otherTarget.addEventListener('click', () => this.closeAfterShare());
|
||||
|
@ -41,6 +43,7 @@ export default class extends Controller {
|
|||
this.element.classList.remove('d-none');
|
||||
|
||||
this.twitterTarget.href = this.configValue['twitter'];
|
||||
this.blueskyTarget.href = this.configValue['bluesky'];
|
||||
this.tumblrTarget.href = this.configValue['tumblr'];
|
||||
this.telegramTarget.href = this.configValue['telegram'];
|
||||
|
||||
|
|
|
@ -21,9 +21,12 @@
|
|||
.align-self-center
|
||||
%p.fs-3.fw-bold= t(".sharing.heading")
|
||||
%p
|
||||
%a.btn.btn-primary.mb-1{ href: "https://twitter.com/intent/tweet?text=", data: { inbox_sharing_target: "twitter" }, target: "_blank" }
|
||||
%a.btn.btn-primary.mb-1{ href: "#", data: { inbox_sharing_target: "twitter" }, target: "_blank" }
|
||||
%i.fab.fa-twitter.fa-fw
|
||||
Twitter
|
||||
%a.btn.btn-primary.mb-1{ href: "#", data: { inbox_sharing_target: "bluesky" }, target: "_blank" }
|
||||
%i.fas.fa-cloud.fa-fw
|
||||
Bluesky
|
||||
%a.btn.btn-primary.mb-1{ href: "#", data: { inbox_sharing_target: "tumblr" }, target: "_blank" }
|
||||
%i.fab.fa-tumblr.fa-fw
|
||||
Tumblr
|
||||
|
|
Loading…
Reference in New Issue