mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-04 04:10:33 +03:00
6fa8dafa79
Updates Admin UX for Contributors When logged in as a Contributor: - removes sidebar, added floating account menu and dark-mode switch to right side. Updated mobile menu accordingly - all post by the given user is listed in the Post list - changed post filtering - hides email columns in post list - removes publishmenu for Contributors in Post preview modal - visual tweaks
35 lines
822 B
JavaScript
35 lines
822 B
JavaScript
import Component from '@glimmer/component';
|
|
import {action} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
import {task} from 'ember-concurrency-decorators';
|
|
import {tracked} from '@glimmer/tracking';
|
|
|
|
export default class ModalPostPreviewComponent extends Component {
|
|
@tracked tab = 'browser';
|
|
@service settings;
|
|
@service session;
|
|
|
|
constructor() {
|
|
super(...arguments);
|
|
this.saveFirstTask.perform();
|
|
}
|
|
|
|
@action
|
|
changeTab(tab) {
|
|
this.tab = tab;
|
|
}
|
|
|
|
@task
|
|
*saveFirstTask() {
|
|
const {saveTask, post, hasDirtyAttributes} = this.args.data;
|
|
|
|
if (saveTask.isRunning) {
|
|
return yield saveTask.last;
|
|
}
|
|
|
|
if (post.isDraft && hasDirtyAttributes) {
|
|
yield saveTask.perform();
|
|
}
|
|
}
|
|
}
|