2023-04-18 23:20:02 +02:00
|
|
|
import {Component} from './component';
|
2018-09-20 16:27:30 +02:00
|
|
|
|
2022-11-15 13:44:57 +01:00
|
|
|
export class SettingHomepageControl extends Component {
|
2018-09-20 16:27:30 +02:00
|
|
|
|
2022-11-15 13:44:57 +01:00
|
|
|
setup() {
|
|
|
|
this.typeControl = this.$refs.typeControl;
|
|
|
|
this.pagePickerContainer = this.$refs.pagePickerContainer;
|
2018-09-20 16:27:30 +02:00
|
|
|
|
|
|
|
this.typeControl.addEventListener('change', this.controlPagePickerVisibility.bind(this));
|
|
|
|
this.controlPagePickerVisibility();
|
|
|
|
}
|
|
|
|
|
|
|
|
controlPagePickerVisibility() {
|
|
|
|
const showPagePicker = this.typeControl.value === 'page';
|
|
|
|
this.pagePickerContainer.style.display = (showPagePicker ? 'block' : 'none');
|
|
|
|
}
|
2023-04-18 23:20:02 +02:00
|
|
|
|
|
|
|
}
|