mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Added source to beta editor feedback (#17586)
no refs - will return post, page, or settings
This commit is contained in:
parent
f26203f8cb
commit
af7ce52708
1 changed files with 4 additions and 1 deletions
|
@ -18,9 +18,11 @@ export default class FeedbackLexicalSendButtonComponent extends Component {
|
||||||
@task({drop: true})
|
@task({drop: true})
|
||||||
*submitFeedback() {
|
*submitFeedback() {
|
||||||
let url = `https://submit-form.com/us6uBWv8`;
|
let url = `https://submit-form.com/us6uBWv8`;
|
||||||
|
let source;
|
||||||
|
|
||||||
let postData;
|
let postData;
|
||||||
if (this.args?.post) {
|
if (this.args?.post) {
|
||||||
|
source = this.args?.post?.isPost ? 'Post' : 'Page';
|
||||||
postData = {
|
postData = {
|
||||||
PostId: this.args.post?.id,
|
PostId: this.args.post?.id,
|
||||||
PostTitle: this.args.post?.title
|
PostTitle: this.args.post?.title
|
||||||
|
@ -40,7 +42,8 @@ export default class FeedbackLexicalSendButtonComponent extends Component {
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
...ghostData,
|
...ghostData,
|
||||||
...postData
|
...postData,
|
||||||
|
Source: source || 'Settings'
|
||||||
};
|
};
|
||||||
|
|
||||||
let response = yield this.ajax.post(url, {data});
|
let response = yield this.ajax.post(url, {data});
|
||||||
|
|
Loading…
Add table
Reference in a new issue