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 {
|
get emailShareUrl(): string {
|
||||||
return `mailto:?to=&body=${this.event.url}${encodeURIComponent(
|
return `mailto:?to=&body=${this.event.url}&subject=${this.event.title}`;
|
||||||
"\n\n"
|
|
||||||
// @ts-ignore
|
|
||||||
)}${ShareEventModal.textDescription}&subject=${this.event.title}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get diasporaShareUrl(): string {
|
get diasporaShareUrl(): string {
|
||||||
@ -78,13 +75,6 @@ export default class ShareEventModal extends Vue {
|
|||||||
this.event.title
|
this.event.title
|
||||||
)}&url=${encodeURIComponent(this.event.url)}`;
|
)}&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>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -944,7 +944,6 @@ export default class Event extends EventMixin {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
.share({
|
.share({
|
||||||
title: this.event.title,
|
title: this.event.title,
|
||||||
text: Event.textDescription,
|
|
||||||
url: this.event.url,
|
url: this.event.url,
|
||||||
})
|
})
|
||||||
.then(() => console.log("Successful share"))
|
.then(() => console.log("Successful share"))
|
||||||
@ -985,13 +984,6 @@ export default class Event extends EventMixin {
|
|||||||
: this.event.beginsOn;
|
: 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 {
|
get eventCapacityOK(): boolean {
|
||||||
if (this.event.draft) return true;
|
if (this.event.draft) return true;
|
||||||
if (!this.event.options.maximumAttendeeCapacity) return true;
|
if (!this.event.options.maximumAttendeeCapacity) return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user