feat(frontend): set read-only on load if read-only whiteboard
This commit is contained in:
parent
522d1b72a7
commit
fd05f220f3
@ -685,6 +685,9 @@ function initWhiteboard() {
|
|||||||
ReadOnlyService.deactivateReadOnlyMode();
|
ReadOnlyService.deactivateReadOnlyMode();
|
||||||
InfoService.displayInfo();
|
InfoService.displayInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In any case, if we are on read-only whiteboard we activate read-only mode
|
||||||
|
if (ConfigService.isReadOnly) ReadOnlyService.activateReadOnlyMode();
|
||||||
});
|
});
|
||||||
|
|
||||||
//Prevent site from changing tab on drag&drop
|
//Prevent site from changing tab on drag&drop
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import ConfigService from "./ConfigService";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class the handle the read-only logic
|
* Class the handle the read-only logic
|
||||||
*/
|
*/
|
||||||
@ -40,6 +42,8 @@ class ReadOnlyService {
|
|||||||
* Deactivate read-only mode
|
* Deactivate read-only mode
|
||||||
*/
|
*/
|
||||||
deactivateReadOnlyMode() {
|
deactivateReadOnlyMode() {
|
||||||
|
if (ConfigService.isReadOnly) return;
|
||||||
|
|
||||||
this.#readOnlyActive = false;
|
this.#readOnlyActive = false;
|
||||||
|
|
||||||
$(".whiteboard-tool").prop("disabled", false);
|
$(".whiteboard-tool").prop("disabled", false);
|
||||||
|
Loading…
Reference in New Issue
Block a user