BookStack/resources/js/components/setting-homepage-control.js
Dan Brown e711290d8b
Ran eslint fix on existing codebase
Had to do some manual fixing of the app.js file due to misplaced
comments
2023-04-18 22:20:02 +01:00

19 lines
576 B
JavaScript

import {Component} from './component';
export class SettingHomepageControl extends Component {
setup() {
this.typeControl = this.$refs.typeControl;
this.pagePickerContainer = this.$refs.pagePickerContainer;
this.typeControl.addEventListener('change', this.controlPagePickerVisibility.bind(this));
this.controlPagePickerVisibility();
}
controlPagePickerVisibility() {
const showPagePicker = this.typeControl.value === 'page';
this.pagePickerContainer.style.display = (showPagePicker ? 'block' : 'none');
}
}