code editor: add content changed hint
This commit is contained in:
parent
daa4fbfecf
commit
3da569700a
3 changed files with 10 additions and 1 deletions
|
|
@ -141,6 +141,8 @@ class CodeEditor {
|
|||
editor.textarea.osc_input = input
|
||||
editor.textarea.tabIndex = 0
|
||||
|
||||
this.field.classList.remove('dirty')
|
||||
|
||||
editor.removeAllListeners('focus')
|
||||
this.editor.on('focus', (e)=>{
|
||||
this.parent.focusedInput = this.input
|
||||
|
|
@ -153,6 +155,9 @@ class CodeEditor {
|
|||
this.editor.on('change', (e)=>{
|
||||
this.input.value = this.editor.getValue()
|
||||
this.editor.dirty = true
|
||||
if (this.editor.fullscreen) {
|
||||
this.field.classList.add('dirty')
|
||||
}
|
||||
})
|
||||
|
||||
this.typing = false
|
||||
|
|
|
|||
|
|
@ -190,6 +190,9 @@ osc-inspector-field {
|
|||
> label:before {
|
||||
content: var(--prefix);
|
||||
}
|
||||
&.dirty label:after{
|
||||
content: "*"
|
||||
}
|
||||
.btn {
|
||||
margin-top: 50rem;
|
||||
margin-right: 50rem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue