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 15:06:32 +01:00
|
|
|
import { ADMIN_URL } from "../../Enum/EnvironmentVariable";
|
|
|
|
import { showShareLinkMapModalStore } from "../../Stores/ModalStore";
|
2022-01-21 17:06:03 +01:00
|
|
|
import LL from "../../i18n/i18n-svelte";
|
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
|
|
|
}
|
2022-01-05 10:27:40 +01: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() {
|
2021-12-23 15:06:32 +01:00
|
|
|
window.open(`${ADMIN_URL}/second-step-register`, "_self");
|
2021-12-23 13:09:28 +01:00
|
|
|
}
|
2022-01-05 10:27:40 +01:00
|
|
|
|
2021-12-23 13:09:28 +01:00
|
|
|
function showInvite() {
|
|
|
|
showShareLinkMapModalStore.set(true);
|
|
|
|
}
|
2022-01-05 10:27:40 +01:00
|
|
|
|
|
|
|
function noDrag() {
|
|
|
|
return false;
|
|
|
|
}
|
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
|
|
|
|
2022-01-05 10:27:40 +01:00
|
|
|
<main class="menuIcon noselect">
|
2021-12-23 13:09:28 +01:00
|
|
|
{#if $limitMapStore}
|
2021-12-19 16:01:51 +01:00
|
|
|
<img
|
|
|
|
src={logoInvite}
|
2022-01-21 17:06:03 +01:00
|
|
|
alt={$LL.menu.icon.open.invite()}
|
2021-12-19 16:01:51 +01:00
|
|
|
class="nes-pointer"
|
2022-01-05 10:27:40 +01:00
|
|
|
draggable="false"
|
|
|
|
on:dragstart|preventDefault={noDrag}
|
2021-12-19 16:01:51 +01:00
|
|
|
on:click|preventDefault={showInvite}
|
|
|
|
/>
|
|
|
|
<img
|
|
|
|
src={logoRegister}
|
2022-01-21 17:06:03 +01:00
|
|
|
alt={$LL.menu.icon.open.register()}
|
2021-12-19 16:01:51 +01:00
|
|
|
class="nes-pointer"
|
2022-01-05 10:27:40 +01:00
|
|
|
draggable="false"
|
|
|
|
on:dragstart|preventDefault={noDrag}
|
2021-12-19 16:01:51 +01:00
|
|
|
on:click|preventDefault={register}
|
|
|
|
/>
|
2021-12-23 13:09:28 +01:00
|
|
|
{:else}
|
2022-01-05 10:27:40 +01:00
|
|
|
<img
|
|
|
|
src={logoWA}
|
|
|
|
alt={$LL.menu.icon.open.menu()}
|
|
|
|
class="nes-pointer"
|
|
|
|
draggable="false"
|
|
|
|
on:dragstart|preventDefault={noDrag}
|
|
|
|
on:click|preventDefault={showMenu}
|
|
|
|
/>
|
|
|
|
<img
|
|
|
|
src={logoTalk}
|
|
|
|
alt={$LL.menu.icon.open.chat()}
|
|
|
|
class="nes-pointer"
|
|
|
|
draggable="false"
|
|
|
|
on:dragstart|preventDefault={noDrag}
|
|
|
|
on:click|preventDefault={showChat}
|
|
|
|
/>
|
2021-12-23 13:09:28 +01:00
|
|
|
{/if}
|
2021-05-12 18:32:55 +02:00
|
|
|
</main>
|
|
|
|
|
2021-05-17 14:30:54 +02:00
|
|
|
<style lang="scss">
|
2022-01-05 10:27:40 +01:00
|
|
|
@import "../../../style/breakpoints.scss";
|
2021-08-26 12:01:07 +02:00
|
|
|
.menuIcon {
|
2022-01-05 10:27:40 +01:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
margin-top: 20%;
|
|
|
|
z-index: 800;
|
2021-12-06 16:12:37 +01:00
|
|
|
position: relative;
|
2022-01-05 10:27:40 +01:00
|
|
|
|
2021-12-06 16:12:37 +01:00
|
|
|
img {
|
|
|
|
pointer-events: auto;
|
|
|
|
width: 60px;
|
|
|
|
padding-top: 0;
|
2022-01-05 10:27:40 +01:00
|
|
|
margin: 5%;
|
2021-12-07 13:56:28 +01:00
|
|
|
}
|
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
|
|
|
}
|
2022-01-05 10:27:40 +01:00
|
|
|
@include media-breakpoint-up(sm) {
|
2021-12-06 16:12:37 +01:00
|
|
|
.menuIcon {
|
2022-01-05 10:27:40 +01:00
|
|
|
margin-top: 10%;
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.menuIcon img:hover {
|
|
|
|
transform: scale(1.2);
|
|
|
|
}
|
2022-01-05 10:27:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@include media-breakpoint-up(md) {
|
|
|
|
.menuIcon {
|
|
|
|
img {
|
|
|
|
width: 50px;
|
2021-12-06 16:12:37 +01:00
|
|
|
}
|
|
|
|
}
|
2021-05-12 18:32:55 +02:00
|
|
|
}
|
|
|
|
</style>
|