l3mpire / lemverse

The first-ever coworking metaverse
https://app.lemverse.com
GNU Affero General Public License v3.0
149 stars 40 forks source link

Report users #163

Closed Flowtter closed 1 year ago

Flowtter commented 1 year ago

Add a report option. Useful to report an user or a message. Available in:

video

Donorhan commented 1 year ago

This is a great idea for open levels, thanks! Would it be possible to move this to a module? The "modules" folder, I think you can put the css, hbs and JS in there. For the integration in the radial menu and other interfaces I could do it in a second time if you are not comfortable with that

Flowtter commented 1 year ago

ACK, I'll have a look next week probably ! Thanks for the fast feedback after the reopening off the PR.

Flowtter commented 1 year ago

I moved the three specified files, however, since @alimtunc is working on a ban feature, we agreed to let him extend this PR.

alimtunc commented 1 year ago

For the integration in the radial menu and other interfaces I could do it in a second time if you are not comfortable with that

What do you mean ? I don't see anything wrong with the implement, did I missed something ? 🙂

Donorhan commented 1 year ago

@alimtunc Sorry, maybe I misspoke. Instead of directly editing the radial-menu.js file to add the option, you can do something like I did in the textual-communication-tools.js:

 registerModules(
    [
      { id: 'report', icon: '🚨️', order: 4, label: 'Report', shortcut: 53, closeMenu: true, scope: 'other' },
    ],
    moduleType.RADIAL_MENU,
  );

And add a listener on the radial menu in the report.js file with:

window.addEventListener(eventTypes.onMenuOptionSelected, onMenuOptionSelected);

The advantage of this is that the core is not aware of the existence of your module and you can remove the module without affecting the simulation.