2021-01-22 12:24:33 +03:00
|
|
|
import ModalBase from 'ghost-admin/components/modal-base';
|
|
|
|
import classic from 'ember-classic-decorator';
|
|
|
|
import {action} from '@ember/object';
|
|
|
|
import {tracked} from '@glimmer/tracking';
|
|
|
|
|
|
|
|
// TODO: update modals to work fully with Glimmer components
|
|
|
|
@classic
|
|
|
|
export default class ModalPostPreviewComponent extends ModalBase {
|
2021-01-27 01:49:05 +03:00
|
|
|
@tracked tab = 'browser';
|
2021-01-22 12:24:33 +03:00
|
|
|
|
|
|
|
@action
|
|
|
|
changeTab(tab) {
|
|
|
|
this.tab = tab;
|
|
|
|
}
|
|
|
|
|
|
|
|
@action
|
|
|
|
close() {
|
|
|
|
this.closeModal();
|
|
|
|
}
|
2021-01-27 01:49:05 +03:00
|
|
|
|
|
|
|
actions = {
|
|
|
|
confirm() {
|
|
|
|
// noop - needed to override ModalBase.actions.confirm
|
|
|
|
},
|
|
|
|
|
|
|
|
// needed because ModalBase uses .send() for keyboard events
|
|
|
|
closeModal() {
|
|
|
|
this.closeModal();
|
|
|
|
}
|
|
|
|
}
|
2021-01-22 12:24:33 +03:00
|
|
|
}
|