forked from potsda.mn/mobilizon
Stop using metadata for sharing text
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
5c3592cc63
commit
08b4fb9b08
|
@ -67,10 +67,7 @@ export default class ShareEventModal extends Vue {
|
|||
}
|
||||
|
||||
get emailShareUrl(): string {
|
||||
return `mailto:?to=&body=${this.event.url}${encodeURIComponent(
|
||||
"\n\n"
|
||||
// @ts-ignore
|
||||
)}${ShareEventModal.textDescription}&subject=${this.event.title}`;
|
||||
return `mailto:?to=&body=${this.event.url}&subject=${this.event.title}`;
|
||||
}
|
||||
|
||||
get diasporaShareUrl(): string {
|
||||
|
@ -78,13 +75,6 @@ export default class ShareEventModal extends Vue {
|
|||
this.event.title
|
||||
)}&url=${encodeURIComponent(this.event.url)}`;
|
||||
}
|
||||
|
||||
static get textDescription(): string {
|
||||
const meta = document.querySelector("meta[property='og:description']");
|
||||
if (!meta) return "";
|
||||
const desc = meta.getAttribute("content") || "";
|
||||
return desc.substring(0, 1000);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -944,7 +944,6 @@ export default class Event extends EventMixin {
|
|||
// @ts-ignore
|
||||
.share({
|
||||
title: this.event.title,
|
||||
text: Event.textDescription,
|
||||
url: this.event.url,
|
||||
})
|
||||
.then(() => console.log("Successful share"))
|
||||
|
@ -985,13 +984,6 @@ export default class Event extends EventMixin {
|
|||
: this.event.beginsOn;
|
||||
}
|
||||
|
||||
static get textDescription(): string {
|
||||
const meta = document.querySelector("meta[property='og:description']");
|
||||
if (!meta) return "";
|
||||
const desc = meta.getAttribute("content") || "";
|
||||
return desc.substring(0, 1000);
|
||||
}
|
||||
|
||||
get eventCapacityOK(): boolean {
|
||||
if (this.event.draft) return true;
|
||||
if (!this.event.options.maximumAttendeeCapacity) return true;
|
||||
|
|
Loading…
Reference in a new issue