2021-05-12 18:32:55 +02:00
|
|
|
<script lang="typescript">
|
2021-12-06 16:12:37 +01:00
|
|
|
import logoTalk from "../images/logo-message-pixel.png";
|
2021-12-01 11:14:54 +01:00
|
|
|
import logoWA from "../images/logo-WA-pixel.png";
|
2021-12-23 13:09:28 +01:00
|
|
|
import logoInvite from "../images/logo-invite-pixel.png";
|
|
|
|
import logoRegister from "../images/logo-register-pixel.png";
|
2021-12-06 16:12:37 +01:00
|
|
|
import { menuVisiblilityStore } from "../../Stores/MenuStore";
|
|
|
|
import { chatVisibilityStore } from "../../Stores/ChatStore";
|
2021-12-23 13:09:28 +01:00
|
|
|
import { limitMapStore } from "../../Stores/GameStore";
|
2021-12-06 16:12:37 +01:00
|
|
|
import { get } from "svelte/store";
|
2021-12-23 13:09:28 +01:00
|
|
|
import {ADMIN_URL} from "../../Enum/EnvironmentVariable";
|
|
|
|
import {showShareLinkMapModalStore} from "../../Stores/ModalStore";
|
2021-05-12 18:32:55 +02:00
|
|
|
|
2021-12-06 16:12:37 +01:00
|
|
|
function showMenu() {
|
|
|
|
menuVisiblilityStore.set(!get(menuVisiblilityStore));
|
2021-08-26 12:01:07 +02:00
|
|
|
}
|
2021-12-06 16:12:37 +01:00
|
|
|
function showChat() {
|
2021-10-06 15:36:42 +02:00
|
|
|
chatVisibilityStore.set(true);
|
|
|
|
}
|
2021-12-23 13:09:28 +01:00
|
|
|
|
|
|
|
function register() {
|
|
|
|
window.open(`${ADMIN_URL}/second-step-register`, '_self');
|
|
|
|
}
|
|
|
|
function showInvite() {
|
|
|
|
showShareLinkMapModalStore.set(true);
|
|
|
|
}
|
2021-05-12 18:32:55 +02:00
|
|
|
</script>
|
|
|
|
|
2021-12-06 16:12:37 +01:00
|
|
|
<svelte:window />
|
2021-08-26 12:01:07 +02:00
|
|
|
|
2021-05-12 18:32:55 +02:00
|
|
|
<main class="menuIcon">
|
2021-12-23 13:09:28 +01:00
|
|
|
{#if $limitMapStore}
|
|
|
|
<img src={logoInvite} alt="open menu" class="nes-pointer" on:click|preventDefault={showInvite} />
|
|
|
|
<img src={logoRegister} alt="open menu" class="nes-pointer" on:click|preventDefault={register} />
|
|
|
|
{:else}
|
|
|
|
<img src={logoWA} alt="open menu" class="nes-pointer" on:click|preventDefault={showMenu} />
|
|
|
|
<img src={logoTalk} alt="open menu" class="nes-pointer" on:click|preventDefault={showChat} />
|
|
|
|
{/if}
|
2021-05-12 18:32:55 +02:00
|
|
|
</main>
|
|
|
|
|
2021-05-17 14:30:54 +02:00
|
|
|
<style lang="scss">
|
2021-08-26 12:01:07 +02:00
|
|
|
.menuIcon {
|
2021-12-06 16:12:37 +01:00
|
|
|
display: inline-grid;
|
|
|
|
z-index: 90;
|
|
|
|
position: relative;
|
|
|
|
margin: 25px;
|
|
|
|
img {
|
|
|
|
pointer-events: auto;
|
|
|
|
width: 60px;
|
|
|
|
padding-top: 0;
|
|
|
|
margin: 3px;
|
2021-12-07 13:56:28 +01:00
|
|
|
image-rendering: pixelated;
|
|
|
|
}
|
2021-05-12 18:32:55 +02:00
|
|
|
}
|
2021-12-06 16:12:37 +01:00
|
|
|
.menuIcon img:hover {
|
|
|
|
transform: scale(1.2);
|
2021-12-01 10:26:09 +01:00
|
|
|
}
|
2021-12-06 16:12:37 +01:00
|
|
|
@media only screen and (max-width: 800px), only screen and (max-height: 800px) {
|
|
|
|
.menuIcon {
|
2021-12-07 13:56:28 +01:00
|
|
|
display: inline-grid;
|
|
|
|
z-index: 90;
|
|
|
|
position: relative;
|
|
|
|
margin: 25px;
|
2021-12-06 16:12:37 +01:00
|
|
|
img {
|
2021-12-07 13:56:28 +01:00
|
|
|
pointer-events: auto;
|
|
|
|
width: 60px;
|
|
|
|
padding-top: 0;
|
|
|
|
margin: 3px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.menuIcon img:hover {
|
|
|
|
transform: scale(1.2);
|
|
|
|
}
|
|
|
|
@media only screen and (max-width: 800px), only screen and (max-height: 800px) {
|
|
|
|
.menuIcon {
|
|
|
|
margin: 3px;
|
|
|
|
img {
|
|
|
|
width: 50px;
|
|
|
|
}
|
2021-12-06 16:12:37 +01:00
|
|
|
}
|
|
|
|
}
|
2021-05-12 18:32:55 +02:00
|
|
|
}
|
|
|
|
</style>
|