mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Allow configuration to be static/readonly (#4315)
* Allow configuration to be static/readonly * Make all components disableable * Improve disabled component styling * Rename edits allowed field in configuration * Fix CI
This commit is contained in:
parent
badacdbb4a
commit
8d8a037e3f
23 changed files with 304 additions and 195 deletions
|
@ -45,6 +45,7 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
|
|||
previewHTML: SafeHtml | string = ''
|
||||
|
||||
isMaximized = false
|
||||
disabled = false
|
||||
|
||||
maximizeInText = $localize`Maximize editor`
|
||||
maximizeOutText = $localize`Exit maximized editor`
|
||||
|
@ -108,6 +109,10 @@ export class MarkdownTextareaComponent implements ControlValueAccessor, OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
setDisabledState (isDisabled: boolean) {
|
||||
this.disabled = isDisabled
|
||||
}
|
||||
|
||||
private lockBodyScroll () {
|
||||
this.scrollPosition = this.viewportScroller.getScrollPosition()
|
||||
document.getElementById('content').classList.add('lock-scroll')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue