Fix svelte error
Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
parent
df3c618ffa
commit
96d46e96c2
@ -7,9 +7,9 @@
|
||||
}
|
||||
|
||||
const myNavigator : ExtNavigator = window.navigator;
|
||||
const haveNavigatorSharingFeature = myNavigator && myNavigator.canShare && myNavigator.share;
|
||||
const haveNavigatorSharingFeature:boolean = myNavigator && myNavigator.canShare != null && myNavigator.share != null;
|
||||
|
||||
let copied = false;
|
||||
let copied:boolean = false;
|
||||
|
||||
function copyLink() {
|
||||
try {
|
||||
@ -48,14 +48,14 @@
|
||||
<p>Share the link of the room!</p>
|
||||
</section>
|
||||
<section>
|
||||
{#if $haveNavigatorSharingFeature}
|
||||
{#if haveNavigatorSharingFeature}
|
||||
<input type="hidden" readonly id="input-share-link" value={location.toString()} />
|
||||
<button type="button" class="nes-btn is-primary" on:click={shareLink}>Share</button>
|
||||
{:else}
|
||||
<input type="text" readonly id="input-share-link" value={location.toString()} />
|
||||
<button type="button" class="nes-btn is-primary" on:click={copyLink}>Copy</button>
|
||||
{/if}
|
||||
{#if $copied}
|
||||
{#if copied}
|
||||
<p>Copied!</p>
|
||||
{/if}
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user