Update HomeView.vue
Remove Navigator share
This commit is contained in:
@@ -58,23 +58,6 @@ async function share() {
|
|||||||
const text = `Ich habe bei TramTrack schon ${tramStore.shortStats.found} BSAG Fahrzeuge gesehen, davon ${tramStore.shortStats.trams} Trams und ${tramStore.shortStats.busses} Busse!${tramStore.shortStats.specials > 0 ? ` Besondere Fahrzeuge habe ich schon ${tramStore.shortStats.specials} gesehen!` : ''}
|
const text = `Ich habe bei TramTrack schon ${tramStore.shortStats.found} BSAG Fahrzeuge gesehen, davon ${tramStore.shortStats.trams} Trams und ${tramStore.shortStats.busses} Busse!${tramStore.shortStats.specials > 0 ? ` Besondere Fahrzeuge habe ich schon ${tramStore.shortStats.specials} gesehen!` : ''}
|
||||||
|
|
||||||
Sammle auch du Fahrzeuge auf ${window.location.href}`;
|
Sammle auch du Fahrzeuge auf ${window.location.href}`;
|
||||||
if (navigator.share) {
|
|
||||||
const shareResult = await navigator
|
|
||||||
.share({
|
|
||||||
title: 'Statistik teilen',
|
|
||||||
text,
|
|
||||||
url: window.location.href
|
|
||||||
})
|
|
||||||
.then(() => true)
|
|
||||||
.catch((error) => {
|
|
||||||
console.log('Error sharing', error);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (shareResult) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const clipboardItem = new ClipboardItem({
|
const clipboardItem = new ClipboardItem({
|
||||||
'text/plain': text
|
'text/plain': text
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user