-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add alert for edit mode #2372
Comments
I probably should have used the term "notification" rather than "alert", because a JavaScript alert would be a pain. |
I think this would involve adjusting
The if(func == 'jeToggle')
this.room.jeToggle(args); Then probably something like Then something like export function jeToggle() {
null === jeEnabled && (jeInitTree(),
jeAddCommands(),
jeEmpty(),
$("#jeText").addEventListener("input", jeColorize),
$("#jeText").onscroll = (e => $("#jeTextHighlight").scrollTop = e.target.scrollTop)),
jeEnabled = !jeEnabled,
setJEenabled(jeEnabled),
jeLoggingHTML = "",
jeEnabled ? ($("body").classList.add("jsonEdit"),
jeWidget && !widgets.has(jeWidget.id) && jeEmpty(),
jeDebugViewing && (jeCallCommand(jeCommands.find(e => "je_toggleDebug" == e.id)),
jeShowCommands())) : $("body").classList.remove("jsonEdit")
} Also, I noticed that this seems redundant. jeEnabled = !jeEnabled,
setJEenabled(jeEnabled), function setJEenabled(v) {
jeEnabled = v;
} I don't really see the point of setJEenabled() if all the code to open the editor isn't in that function. And if there is a purpose I am missing, then those two lines above should probably just be On edit: It looks like |
Originally suggested by @bjalder26 in #1859
It may be a good idea to provide some type of alert when any player in the room is in edit mode. The purpose would be to detect possible cheating. Maybe it doesn't matter, but we can at least have the discussion.
The way it would look is to be determined, but I would think something like changing the color of the "Edit Mode" icon/text in the side panel would be enough. I don't know if this is even technically possible without significant changes. I guess the client would send to the server some kind of notification and that would be sent out to the other clients so all of their browsers would also show the change.
The text was updated successfully, but these errors were encountered: