From 9e35f96ce5284c9e6a7d5807ee72ac05315e8af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 2 Jun 2021 09:58:00 +0200 Subject: [PATCH] Fixing absolute/relative layouts of Svelte layers --- front/src/Components/App.svelte | 47 ++++++++++------ front/src/Components/CameraControls.svelte | 44 +++++++-------- .../EnableCamera/EnableCameraScene.svelte | 54 ++++++++++++------- front/style/style.scss | 10 ++-- 4 files changed, 97 insertions(+), 58 deletions(-) diff --git a/front/src/Components/App.svelte b/front/src/Components/App.svelte index cba741fe..d1a18f21 100644 --- a/front/src/Components/App.svelte +++ b/front/src/Components/App.svelte @@ -22,31 +22,48 @@
-{#if $gameOverlayVisibilityStore} - - -{/if} -
{#if $loginSceneVisibleStore} - +
+ +
{/if} {#if $selectCharacterSceneVisibleStore} - +
+ +
{/if} {#if $customCharacterSceneVisibleStore} - +
+ +
{/if} {#if $selectCompanionSceneVisibleStore} - +
+ +
{/if} {#if $enableCameraSceneVisibilityStore} - +
+ +
+ {/if} + + + {#if $gameOverlayVisibilityStore} +
+ + +
{/if} - {#if $helpCameraSettingsVisibleStore} - +
+ +
{/if}
-
diff --git a/front/src/Components/CameraControls.svelte b/front/src/Components/CameraControls.svelte index bd35d230..5c17a9fe 100644 --- a/front/src/Components/CameraControls.svelte +++ b/front/src/Components/CameraControls.svelte @@ -34,26 +34,28 @@ -
-
- {#if $requestedScreenSharingState} - Start screen sharing - {:else} - Stop screen sharing - {/if} -
-
- {#if $requestedCameraState} - Turn on webcam - {:else} - Turn off webcam - {/if} -
-
- {#if $requestedMicrophoneState} - Turn on microphone - {:else} - Turn off microphone - {/if} +
+
+
+ {#if $requestedScreenSharingState} + Start screen sharing + {:else} + Stop screen sharing + {/if} +
+
+ {#if $requestedCameraState} + Turn on webcam + {:else} + Turn off webcam + {/if} +
+
+ {#if $requestedMicrophoneState} + Turn on microphone + {:else} + Turn off microphone + {/if} +
diff --git a/front/src/Components/EnableCamera/EnableCameraScene.svelte b/front/src/Components/EnableCamera/EnableCameraScene.svelte index 36e31cf6..b5b2748a 100644 --- a/front/src/Components/EnableCamera/EnableCameraScene.svelte +++ b/front/src/Components/EnableCamera/EnableCameraScene.svelte @@ -11,6 +11,8 @@ import {onDestroy} from "svelte"; import HorizontalSoundMeterWidget from "./HorizontalSoundMeterWidget.svelte"; import cinemaCloseImg from "../images/cinema-close.svg"; + import cinemaImg from "../images/cinema.svg"; + import microphoneImg from "../images/microphone.svg"; export let game: Game; let selectedCamera : string|null = null; @@ -86,27 +88,33 @@
{#if $cameraListStore.length > 1 } -
- -
+
+ Camera +
+ +
+
{/if} {#if $microphoneListStore.length > 1 } -
- -
+
+ Microphone +
+ +
+
{/if}
@@ -190,6 +198,16 @@ font-size: 200%; } + .control-group { + display: flex; + flex-direction: row; + + img { + width: 30px; + margin-right: 10px; + } + } + .webrtcsetup{ /*position: absolute; top: 140px; diff --git a/front/style/style.scss b/front/style/style.scss index 78cfcc66..ef3df5c5 100644 --- a/front/style/style.scss +++ b/front/style/style.scss @@ -1212,13 +1212,15 @@ div.action.danger p.action-body{ height: 100%; pointer-events: none; - .absolute-overlay { - position: absolute; + & > div { + position: relative; width: 100%; height: 100%; - & > * { - position: relative; + & > div { + position: absolute; + width: 100%; + height: 100%; } } }