Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this._isEditingSource = false
this.autosaveEl.addEventListener('click', this.handleAutosaveClick.bind(this))
this.saveEl.addEventListener('click', () => { this.save(true) })
this.podPathEl.addEventListener('change', () => { this.load(this.podPath) })
this.podPathEl.addEventListener('keyup', () => { this.delayPodPath() })
this.mobileToggleMd = MDCIconToggle.attachTo(this.mobileToggleEl)
this.mobileToggleEl.addEventListener(
'MDCIconToggle:change', this.handleMobileClick.bind(this))
this.sourceToggleMd = MDCIconToggle.attachTo(this.sourceToggleEl)
this.sourceToggleEl.addEventListener(
'MDCIconToggle:change', this.handleSourceClick.bind(this))
this.podPathMd = new MDCTextField(
this.containerEl.querySelector('.content__path .mdc-text-field'))
this.saveProgressMd = MDCLinearProgress.attachTo(
this.containerEl.querySelector('.sidebar__save .mdc-linear-progress'))
this.saveProgressMd.close()
this.api = new EditorApi({
host: this.host,
port: this.port,
})
this.partials = new Partials(this.api)
// Default to loading with the UI.
this.load(this.podPath)
// TODO Start the autosave depending on local storage.
// this.startAutosave()
}
mounted () {
this.mdcLinearProgress = MDCLinearProgress.attachTo(this.$el)
this.mdcLinearProgress.determinate = !this.indeterminate
this.mdcLinearProgress.reverse = this.reverse
this.mdcLinearProgress.progress = this.progress
this.mdcLinearProgress.buffer = this.buffer
this.open ? this.mdcLinearProgress.open() : this.mdcLinearProgress.close()
},
beforeDestroy () {