Merge branch 'develop' of github.com:thecodingmachine/workadventure

This commit is contained in:
_Bastler
2021-09-21 21:10:09 +02:00
8 changed files with 29 additions and 8 deletions
+9 -4
View File
@@ -74,13 +74,18 @@ function createSubMenusStore() {
export const subMenusStore = createSubMenusStore();
export const contactPageStore = writable<string | undefined>(CONTACT_URL);
export function checkSubMenuToShow() {
if (!get(userIsAdminStore)) {
subMenusStore.removeMenu(SubMenusInterface.globalMessages);
subMenusStore.removeMenu(SubMenusInterface.globalMessages);
subMenusStore.removeMenu(SubMenusInterface.contact);
if (get(userIsAdminStore)) {
subMenusStore.addMenu(SubMenusInterface.globalMessages);
}
if (CONTACT_URL === undefined) {
subMenusStore.removeMenu(SubMenusInterface.contact);
if (get(contactPageStore) !== undefined) {
subMenusStore.addMenu(SubMenusInterface.contact);
}
subMenusStore.removeMenu(SubMenusInterface.aboutRoom);