From 2ea7b0cff10549bf22d7695585599b8bf26e0845 Mon Sep 17 00:00:00 2001 From: GRL78 <80678534+GRL78@users.noreply.github.com> Date: Wed, 8 Sep 2021 15:43:46 +0200 Subject: [PATCH] Menu style will adapt if iframe in map is opened (#1422) --- front/src/Components/Menu/Menu.svelte | 39 ++++++++++++++++--- .../src/Components/Menu/ProfileSubMenu.svelte | 13 ++----- .../Components/Menu/SettingsSubMenu.svelte | 17 +++----- front/src/Stores/MenuStore.ts | 4 +- .../style/TextGlobalMessageSvelte-Style.scss | 4 +- 5 files changed, 45 insertions(+), 32 deletions(-) diff --git a/front/src/Components/Menu/Menu.svelte b/front/src/Components/Menu/Menu.svelte index 4086a9ae..6cbef9c1 100644 --- a/front/src/Components/Menu/Menu.svelte +++ b/front/src/Components/Menu/Menu.svelte @@ -7,7 +7,13 @@ import GlobalMessageSubMenu from "./GlobalMessagesSubMenu.svelte"; import ContactSubMenu from "./ContactSubMenu.svelte"; import CustomSubMenu from "./CustomSubMenu.svelte" - import {customMenuIframe, menuVisiblilityStore, SubMenusInterface, subMenusStore} from "../../Stores/MenuStore"; + import { + checkSubMenuToShow, + customMenuIframe, + menuVisiblilityStore, + SubMenusInterface, + subMenusStore + } from "../../Stores/MenuStore"; import {onDestroy, onMount} from "svelte"; import {get} from "svelte/store"; import type {Unsubscriber} from "svelte/store"; @@ -25,6 +31,8 @@ } }) + checkSubMenuToShow(); + switchMenu(SubMenusInterface.settings); }) @@ -95,6 +103,7 @@ @@ -110,9 +119,9 @@ font-family: "Press Start 2P"; pointer-events: auto; - height: 80vh; - width: 75vw; - top: 10vh; + height: 80%; + width: 75%; + top: 10%; position: relative; margin: auto; @@ -139,16 +148,34 @@ div.menu-submenu-container { background-color: #333333; color: whitesmoke; + + .nes-btn.is-error.close { + position: absolute; + top: -20px; + right: -20px; + } } } @media only screen and (max-width: 800px) { div.menu-container-main { --size-first-columns-grid: 120px; - height: 70vh; + height: 70%; top: 55px; - width: 100vw; + width: 100%; font-size: 0.5em; + + div.menu-nav-sidebar { + overflow-y: auto; + } + + div.menu-submenu-container { + .nes-btn.is-error.close { + position: absolute; + top: -35px; + right: 0; + } + } } } \ No newline at end of file diff --git a/front/src/Components/Menu/ProfileSubMenu.svelte b/front/src/Components/Menu/ProfileSubMenu.svelte index 39214b4f..83ec329c 100644 --- a/front/src/Components/Menu/ProfileSubMenu.svelte +++ b/front/src/Components/Menu/ProfileSubMenu.svelte @@ -52,11 +52,6 @@ enableCameraSceneVisibilityStore.showEnableCameraScene(); gameManager.leaveGame(EnableCameraSceneName,new EnableCameraScene()); } - - //TODO: Uncomment when login will be completely developed - /*function clickLogin() { - connectionManager.loadOpenIDScreen(); - }*/
@@ -71,20 +66,17 @@ {:else}
- Sing in + Sign in
{/if}
- +
-
\ No newline at end of file diff --git a/front/src/Stores/MenuStore.ts b/front/src/Stores/MenuStore.ts index 035ba174..96e731a9 100644 --- a/front/src/Stores/MenuStore.ts +++ b/front/src/Stores/MenuStore.ts @@ -71,7 +71,7 @@ function createSubMenusStore() { export const subMenusStore = createSubMenusStore(); -function checkSubMenuToShow() { +export function checkSubMenuToShow() { if (!get(userIsAdminStore)) { subMenusStore.removeMenu(SubMenusInterface.globalMessages); } @@ -81,8 +81,6 @@ function checkSubMenuToShow() { } } -checkSubMenuToShow(); - export const customMenuIframe = new Map(); export function handleMenuRegistrationEvent( diff --git a/front/style/TextGlobalMessageSvelte-Style.scss b/front/style/TextGlobalMessageSvelte-Style.scss index ce67b699..dda65d05 100644 --- a/front/style/TextGlobalMessageSvelte-Style.scss +++ b/front/style/TextGlobalMessageSvelte-Style.scss @@ -1,10 +1,10 @@ //TextGlobalMessage section.section-input-send-text { - --height-toolbar: 15%; + --height-toolbar: 20%; height: 100%; .ql-toolbar{ - height: var(--height-toolbar); + max-height: var(--height-toolbar); background: whitesmoke; }