Merge branch 'develop' of github.com:thecodingmachine/workadventure
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user