Resolve review

This commit is contained in:
GRL 2021-06-22 16:12:53 +02:00
parent 0728d462a5
commit 67d4c6e271
6 changed files with 21 additions and 21 deletions

View File

@ -21,7 +21,7 @@
import AudioPlaying from "./UI/AudioPlaying.svelte";
import {soundPlayingStore} from "../Stores/SoundPlayingStore";
import ErrorDialog from "./UI/ErrorDialog.svelte";
import {ConsoleGlobalMessageManagerVisibleStore} from "../Stores/ConsoleGlobalMessageManagerStore";
import {consoleGlobalMessageManagerVisibleStore} from "../Stores/ConsoleGlobalMessageManagerStore";
import ConsoleGlobalMessageManager from "./ConsoleGlobalMessageManager/ConsoleGlobalMessageManager.svelte";
export let game: Game;
@ -72,7 +72,7 @@
<CameraControls></CameraControls>
</div>
{/if}
{#if $ConsoleGlobalMessageManagerVisibleStore}
{#if $consoleGlobalMessageManagerVisibleStore}
<div>
<ConsoleGlobalMessageManager game={game}></ConsoleGlobalMessageManager>
</div>

View File

@ -1,5 +1,5 @@
<script lang="ts">
import {ConsoleGlobalMessageManagerFocusStore, ConsoleGlobalMessageManagerVisibleStore } from "../../Stores/ConsoleGlobalMessageManagerStore";
import {consoleGlobalMessageManagerFocusStore, consoleGlobalMessageManagerVisibleStore } from "../../Stores/ConsoleGlobalMessageManagerStore";
import {onMount} from "svelte";
import type {Game} from "../../Phaser/Game/Game";
import type {GameManager} from "../../Phaser/Game/GameManager";
@ -56,15 +56,15 @@
quill.on('selection-change', function (range, oldRange) {
if (range === null && oldRange !== null) {
ConsoleGlobalMessageManagerFocusStore.set(false);
consoleGlobalMessageManagerFocusStore.set(false);
} else if (range !== null && oldRange === null)
ConsoleGlobalMessageManagerFocusStore.set(true);
consoleGlobalMessageManagerFocusStore.set(true);
});
});
function disableConsole() {
ConsoleGlobalMessageManagerVisibleStore.set(false);
ConsoleGlobalMessageManagerFocusStore.set(false);
consoleGlobalMessageManagerVisibleStore.set(false);
consoleGlobalMessageManagerFocusStore.set(false);
}
function SendTextMessage() {

View File

@ -2,7 +2,7 @@
import {HtmlUtils} from "../../WebRtc/HtmlUtils";
import type {Game} from "../../Phaser/Game/Game";
import type {GameManager} from "../../Phaser/Game/GameManager";
import {ConsoleGlobalMessageManagerFocusStore, ConsoleGlobalMessageManagerVisibleStore} from "../../Stores/ConsoleGlobalMessageManagerStore";
import {consoleGlobalMessageManagerFocusStore, consoleGlobalMessageManagerVisibleStore} from "../../Stores/ConsoleGlobalMessageManagerStore";
import {AdminMessageEventTypes} from "../../Connexion/AdminMessagesService";
import type {PlayGlobalMessageInterface} from "../../Connexion/ConnexionModels";
import uploadFile from "../images/music-file.svg";
@ -78,8 +78,8 @@
}
function disableConsole() {
ConsoleGlobalMessageManagerVisibleStore.set(false);
ConsoleGlobalMessageManagerFocusStore.set(false);
consoleGlobalMessageManagerVisibleStore.set(false);
consoleGlobalMessageManagerFocusStore.set(false);
}
</script>

View File

@ -11,7 +11,7 @@ import {WarningContainer, warningContainerHtml, warningContainerKey} from "../Co
import {worldFullWarningStream} from "../../Connexion/WorldFullWarningStream";
import {menuIconVisible} from "../../Stores/MenuStore";
import {videoConstraintStore} from "../../Stores/MediaStore";
import {ConsoleGlobalMessageManagerVisibleStore} from "../../Stores/ConsoleGlobalMessageManagerStore";
import {consoleGlobalMessageManagerVisibleStore} from "../../Stores/ConsoleGlobalMessageManagerStore";
import {get} from "svelte/store";
export const MenuSceneName = 'MenuScene';
@ -161,7 +161,7 @@ export class MenuScene extends Phaser.Scene {
this.sideMenuOpened = false;
this.closeAll();
this.menuButton.getChildByID('openMenuButton').innerHTML = `<img src="/static/images/menu.svg">`;
ConsoleGlobalMessageManagerVisibleStore.set(false);
consoleGlobalMessageManagerVisibleStore.set(false);
this.tweens.add({
targets: this.menuElement,
x: closedSideMenuX,
@ -306,10 +306,10 @@ export class MenuScene extends Phaser.Scene {
this.toggleFullscreen();
break;
case 'adminConsoleButton':
if (get(ConsoleGlobalMessageManagerVisibleStore)) {
ConsoleGlobalMessageManagerVisibleStore.set(false);
if (get(consoleGlobalMessageManagerVisibleStore)) {
consoleGlobalMessageManagerVisibleStore.set(false);
} else {
ConsoleGlobalMessageManagerVisibleStore.set(true);
consoleGlobalMessageManagerVisibleStore.set(true);
}
break;
}

View File

@ -1,5 +1,5 @@
import { writable } from "svelte/store";
export const ConsoleGlobalMessageManagerVisibleStore = writable(false);
export const consoleGlobalMessageManagerVisibleStore = writable(false);
export const ConsoleGlobalMessageManagerFocusStore = writable(false);
export const consoleGlobalMessageManagerFocusStore = writable(false);

View File

@ -1,10 +1,10 @@
import {derived} from "svelte/store";
import {ConsoleGlobalMessageManagerFocusStore,} from "./ConsoleGlobalMessageManagerStore";
import {consoleGlobalMessageManagerFocusStore} from "./ConsoleGlobalMessageManagerStore";
//derived from the focus on Menu, ConsoleGlobal, Chat and ...
export const enableUserInputsStore = derived(
ConsoleGlobalMessageManagerFocusStore,
($ConsoleGlobalMessageManagerFocusStore) => {
return !$ConsoleGlobalMessageManagerFocusStore;
consoleGlobalMessageManagerFocusStore,
($consoleGlobalMessageManagerFocusStore) => {
return !$consoleGlobalMessageManagerFocusStore;
}
);