mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
7f7d2cafc6
refs https://github.com/TryGhost/Team/issues/451 - disabled email tab when previewing a page (pages can't be emailed) - added share preview url footer to browser tab - added send preview footer to email tab - added first pass at social tab contents
32 lines
736 B
JavaScript
32 lines
736 B
JavaScript
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 {
|
|
@tracked tab = 'browser';
|
|
|
|
@action
|
|
changeTab(tab) {
|
|
this.tab = tab;
|
|
}
|
|
|
|
@action
|
|
close() {
|
|
this.closeModal();
|
|
}
|
|
|
|
actions = {
|
|
confirm() {
|
|
// noop - needed to override ModalBase.actions.confirm
|
|
},
|
|
|
|
// needed because ModalBase uses .send() for keyboard events
|
|
closeModal() {
|
|
this.closeModal();
|
|
}
|
|
}
|
|
}
|