mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Added static mockup of basic publish flow
refs https://github.com/TryGhost/Team/issues/1542 - adds `<EditorLabs::PublishManagement>` component that displays the relevant button for triggering publishing flows and will eventually store publish options for the editing session duration and manage the saving flow - displays a "Publish" button that triggers the publish flow modal - adds `editor-labs/publish-flow` full-screen modal containing a static mockup of the desired sentence-structure publish options design
This commit is contained in:
parent
f5fef46856
commit
8ca2c6935a
@ -0,0 +1,8 @@
|
|||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="gh-btn gh-btn-editor green gh-publishmenu-trigger"
|
||||||
|
{{on "click" this.openPublishFlow}}
|
||||||
|
data-test-button="publish-flow"
|
||||||
|
>
|
||||||
|
<span>Publish</span>
|
||||||
|
</button>
|
20
ghost/admin/app/components/editor-labs/publish-management.js
Normal file
20
ghost/admin/app/components/editor-labs/publish-management.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import Component from '@glimmer/component';
|
||||||
|
import PublishFlowModal from '../modals/editor-labs/publish-flow';
|
||||||
|
import {action} from '@ember/object';
|
||||||
|
import {inject as service} from '@ember/service';
|
||||||
|
|
||||||
|
export default class PublishFlow extends Component {
|
||||||
|
@service modals;
|
||||||
|
|
||||||
|
publishFlowModal = null;
|
||||||
|
|
||||||
|
willDestroy() {
|
||||||
|
super.willDestroy(...arguments);
|
||||||
|
this.publishFlowModal?.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
@action
|
||||||
|
openPublishFlow() {
|
||||||
|
this.publishFlowModal = this.modals.open(PublishFlowModal);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
<div class="flex flex-column h-100 items-center">
|
||||||
|
<header class="gh-editor-header" data-test-modal="publish">
|
||||||
|
<div class="ml3">
|
||||||
|
<button class="gh-editor-back-button" title="Close" type="button" {{on "click" @close}}>
|
||||||
|
<span>{{svg-jar "arrow-left"}} Back to edit</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="flex-grow-1"></div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="flex flex-column flex-auto justify-center items-center w-50">
|
||||||
|
<div class="mb8 f1 fw6 midgrey">
|
||||||
|
Ready?
|
||||||
|
<strong class="darkgrey">Right now</strong>
|
||||||
|
this post will be
|
||||||
|
<strong class="darkgrey">published and sent</strong>
|
||||||
|
to
|
||||||
|
<strong class="darkgrey">all subscribers</strong>
|
||||||
|
of
|
||||||
|
<strong class="darkgrey">The Weekly Roundup</strong>.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-row w-100">
|
||||||
|
<button type="button" class="gh-btn gh-btn-black" {{on "click" (noop)}}><span>Continue</span></button>
|
||||||
|
<button type="button" class="gh-btn gh-btn-link" {{on "click" @close}}><span>Cancel</span></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,8 @@
|
|||||||
|
import Component from '@glimmer/component';
|
||||||
|
|
||||||
|
export default class PublishModalComponent extends Component {
|
||||||
|
static modalOptions = {
|
||||||
|
className: 'fullscreen-modal-total-overlay',
|
||||||
|
omitBackdrop: true
|
||||||
|
};
|
||||||
|
}
|
@ -78,6 +78,10 @@
|
|||||||
background: var(--white)
|
background: var(--white)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fullscreen-modal-total-overlay .modal-content {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.fullscreen-modal-action {
|
.fullscreen-modal-action {
|
||||||
margin: 6vw 0;
|
margin: 6vw 0;
|
||||||
}
|
}
|
||||||
|
@ -43,14 +43,18 @@
|
|||||||
@task={{this.save}}
|
@task={{this.save}}
|
||||||
@runningText="Saving"
|
@runningText="Saving"
|
||||||
@class="gh-btn gh-btn-icon gh-btn-editor contributor-save-button"
|
@class="gh-btn gh-btn-icon gh-btn-editor contributor-save-button"
|
||||||
data-test-contributor-save=true />
|
data-test-contributor-save />
|
||||||
{{else}}
|
{{else}}
|
||||||
<GhPublishmenu
|
{{#if (feature "publishingFlow")}}
|
||||||
@post={{this.post}}
|
<EditorLabs::PublishManagement @post={{this.post}} />
|
||||||
@postStatus={{this.post.status}}
|
{{else}}
|
||||||
@saveTask={{this.saveTask}}
|
<GhPublishmenu
|
||||||
@setSaveType={{action "setSaveType"}}
|
@post={{this.post}}
|
||||||
@onOpen={{action "cancelAutosave"}} />
|
@postStatus={{this.post.status}}
|
||||||
|
@saveTask={{this.saveTask}}
|
||||||
|
@setSaveType={{action "setSaveType"}}
|
||||||
|
@onOpen={{action "cancelAutosave"}} />
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#unless this.showSettingsMenu}}
|
{{#unless this.showSettingsMenu}}
|
||||||
|
Loading…
Reference in New Issue
Block a user