Ghost/ghost/admin/app/components/modal-post-preview.js
Kevin Ansfield 7f7d2cafc6 Added share/send preview footers to post preview modal
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
2021-02-02 16:08:05 +00:00

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();
}
}
}