Ghost/ghost/admin/app/components/modals/post-preview/browser.js
Kevin Ansfield b2bbaf153d Converted post-preview modal to EPM based modal
refs https://github.com/TryGhost/Team/issues/559

- moved the modal component class, template, and sub-components into a `components/modals/` directory to keep the top-level dir cleaner
- migrated component class to full glimmer syntax
2021-09-13 13:01:12 +01:00

13 lines
438 B
JavaScript

import Component from '@glimmer/component';
import copyTextToClipboard from 'ghost-admin/utils/copy-text-to-clipboard';
import {task} from 'ember-concurrency-decorators';
import {timeout} from 'ember-concurrency';
export default class ModalPostPreviewBrowserComponent extends Component {
@task
*copyPreviewUrl() {
copyTextToClipboard(this.args.post.previewUrl);
yield timeout(this.isTesting ? 50 : 3000);
}
}