electron menu, about dialog

This commit is contained in:
Jan Prochazka
2021-03-17 19:04:28 +01:00
parent 08b5bce03c
commit 73bfac2bfb
5 changed files with 179 additions and 100 deletions

View File

@@ -0,0 +1,28 @@
<script lang="ts">
import getElectron from '../utility/getElectron';
export let href;
const electron = getElectron();
</script>
{#if electron}
<a on:click={() => electron.shell.openExternal(href)}>
<slot />
</a>
{:else}
<a {href} target="_blank" rel="noopener noreferrer">
<slot />
</a>
{/if}
<style>
a {
text-decoration: none;
cursor: pointer;
color: var(--theme-font-link);
}
a:hover {
text-decoration: underline;
}
</style>