mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-01 02:41:39 -05:00
Added function for copying publication link
ref https://linear.app/tryghost/issue/IPC-90/add-share-modal
This commit is contained in:
parent
aa7d294162
commit
53310b52c1
1 changed files with 11 additions and 1 deletions
|
@ -1,5 +1,15 @@
|
|||
import ModalComponent from 'ghost-admin/components/modal-base';
|
||||
import copyTextToClipboard from 'ghost-admin/utils/copy-text-to-clipboard';
|
||||
import {inject} from 'ghost-admin/decorators/inject';
|
||||
import {task, timeout} from 'ember-concurrency';
|
||||
|
||||
export default ModalComponent.extend({
|
||||
config: inject(),
|
||||
|
||||
});
|
||||
copySiteUrl: task(function* () {
|
||||
copyTextToClipboard(this.config.blogUrl);
|
||||
yield timeout(1000);
|
||||
return true;
|
||||
})
|
||||
|
||||
});
|
Loading…
Add table
Reference in a new issue