Skip to content
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

feat: option editor to disable built-in editor #1059

Merged
merged 8 commits into from
Sep 2, 2023

Conversation

JoeyGrajciar
Copy link
Contributor

proposed by user @15921483570 in linked issue

Closes #1048

@antfu
Copy link
Member

antfu commented Jul 31, 2023

It's intentional. The "Dev" more is intended to be used for the author themselves, and should not expose to the audience directly. Generally, it's recommended to use a built SPA for the audience.

I think it would be great to:

  • Disable the editor when a password is set to the presenter mode
  • Have an option to disable it

@JoeyGrajciar
Copy link
Contributor Author

Generally, it's recommended to use a built SPA for the audience

Yes, that is true. There is #889 which describes issue with the SPA, where you can have no presenter mode or unprotected presenter mode. So instead @nejci is using password protected presenter mode in dev mode allowing outside world to use code mirror.

Disable the editor when a password is set to the presenter mode
Have an option to disable it

Sounds great. I will take a look on that.

There is also third option, implementing password protection for presenter mode in SPA. What do you think about it @antfu ?

@antfu
Copy link
Member

antfu commented Aug 1, 2023

implementing password protection for presenter mode in SPA

I don't mind having it. Tho maybe we need to make clear that it only visually blocks the view, but does not prevent malware actions.

/cc @tonai in case you have any other opinions

@JoeyGrajciar
Copy link
Contributor Author

Thanks, that might be for another PR.
Implemented your suggested changes to hide code editor:

  • if password is set
  • disabled explicitly via config

@tonai
Copy link
Contributor

tonai commented Aug 4, 2023

implementing password protection for presenter mode in SPA

I don't mind having it. Tho maybe we need to make clear that it only visually blocks the view, but does not prevent malware actions.

/cc @tonai in case you have any other opinions

When you use static build, the presenter mode is not synced with other clients, so the need for a password is not obvious.
if we found a way to share it, that would then clearly become a problem, so this can still be a potential feature to add.
As you say, using a password in a client only app is clearly not a perfect protection, but I don't think we have another option.
And yes I also agree that this would be for another PR.

@JoeyGrajciar
Copy link
Contributor Author

JoeyGrajciar commented Aug 6, 2023

When you use static build, the presenter mode is not synced with other clients, so the need for a password is not obvious.

Okay, that is probably the missing piece of information for users. Documentation doesn't mention that so it might be why presenter with password in dev is used.

Is there anything else that needs to be done in this PR?

@JoeyGrajciar
Copy link
Contributor Author

@antfu or @tonai anything else to be done in this PR?

@antfu antfu changed the title fix: do not show code editor outside of presenter mode feat: option codeEditor to disable built-in editor Sep 2, 2023
@antfu antfu changed the title feat: option codeEditor to disable built-in editor feat: option editor to disable built-in editor Sep 2, 2023
@antfu antfu merged commit 5109c2e into slidevjs:main Sep 2, 2023
8 checks passed
@JoeyGrajciar JoeyGrajciar deleted the editor_only_in_presenter branch September 4, 2023 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to disable Integrated Editor? The little audience ruined my ppt and lots of related files...
3 participants