Merge branch 'develop' of github.com:thecodingmachine/workadventure into iframeMenuScript
This commit is contained in:
commit
833c15b2d5
9 changed files with 29 additions and 19 deletions
|
@ -1,5 +1,7 @@
|
|||
import { get, writable } from "svelte/store";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
import { userIsAdminStore } from "./GameStore";
|
||||
import { CONTACT_URL } from "../Enum/EnvironmentVariable";
|
||||
|
||||
export const menuIconVisiblilityStore = writable(false);
|
||||
export const menuVisiblilityStore = writable(false);
|
||||
|
@ -67,6 +69,18 @@ function createSubMenusStore() {
|
|||
|
||||
export const subMenusStore = createSubMenusStore();
|
||||
|
||||
function checkSubMenuToShow() {
|
||||
if (!get(userIsAdminStore)) {
|
||||
subMenusStore.removeMenu(SubMenusInterface.globalMessages);
|
||||
}
|
||||
|
||||
if (CONTACT_URL === undefined) {
|
||||
subMenusStore.removeMenu(SubMenusInterface.contact);
|
||||
}
|
||||
}
|
||||
|
||||
checkSubMenuToShow();
|
||||
|
||||
export const customMenuIframe = new Map<string, { url: string; allowApi: boolean }>();
|
||||
|
||||
export function handleMenuRegistrationEvent(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue