Add binoculars theme, auto reformat everything

This commit is contained in:
Pieter Vander Vennet 2021-09-09 00:05:51 +02:00
parent 38dea806c5
commit 78d6482c88
586 changed files with 115573 additions and 111842 deletions

View file

@ -1,9 +1,9 @@
import BaseUIElement from "../BaseUIElement";
export default class ShareButton extends BaseUIElement{
export default class ShareButton extends BaseUIElement {
private _embedded: BaseUIElement;
private _shareData: () => { text: string; title: string; url: string };
constructor(embedded: BaseUIElement, generateShareData: () => {
text: string,
title: string,
@ -19,7 +19,7 @@ export default class ShareButton extends BaseUIElement{
const e = document.createElement("button")
e.type = "button"
e.appendChild(this._embedded.ConstructElement())
e.addEventListener('click', () => {
if (navigator.share) {
navigator.share(this._shareData()).then(() => {
@ -32,7 +32,7 @@ export default class ShareButton extends BaseUIElement{
console.log('web share not supported');
}
});
return e;
}