mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-30 14:22:07 +03:00
35cf6c9829
closes https://github.com/TryGhost/Ghost/issues/8249 - replaces the old split-button publish/schedule/update button with a less confusing menu system - adds a `{{gh-date-time-picker}}` component that contains a datepicker with separate time input - replaces the date text input in the post settings menu with `{{gh-date-time-picker}}` - disabled when post is scheduled, only way to update a scheduled time is via the publish menu - validates date is in the past when draft/published so there's no confusion with scheduling - displays saving status in top-left of editor screen - refactor editor (auto)saving processes to use ember-concurrency Other minor changes: - adds `post.publishedAtBlog{TZ,Date,Time}` properties to Post model to allow working with `publishedAt` datetime in the selected blog timezone rather than UTC - adds a `beforeSave` hook to `validation-engine` that is called after successful validation and before the Ember Data save call is made - adds validation of `publishedAtBlog{Date,Time}` to post validator - prevent gh-task-button showing last task state on first render - fixes bug where clicking into and out of the published date input in the PSM without making any changes saves a published date for draft posts
208 lines
4.1 KiB
CSS
208 lines
4.1 KiB
CSS
/* Publish Menu
|
|
/* ---------------------------------------------------------- */
|
|
|
|
.gh-publishmenu-trigger {
|
|
color: var(--blue);
|
|
border: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.gh-publishmenu-trigger svg {
|
|
height: 8px;
|
|
width: auto;
|
|
}
|
|
|
|
.gh-publishmenu-trigger svg path {
|
|
stroke: var(--blue);
|
|
stroke-width: 1px;
|
|
}
|
|
|
|
.gh-publishmenu-trigger:focus {
|
|
outline: 0;
|
|
}
|
|
|
|
.gh-publishmenu {
|
|
position: relative;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.gh-publishmenu-dropdown {
|
|
position: absolute;
|
|
top: 100%;
|
|
right: 0;
|
|
margin: 5px 0 20px 0;
|
|
padding: 20px;
|
|
width: 300px;
|
|
background-color: #fff;
|
|
background-clip: padding-box;
|
|
border-radius: 4px;
|
|
box-shadow: 0 0 0 1px rgba(99,114,130,0.16), 0 8px 16px rgba(27,39,51,0.08);
|
|
list-style: none;
|
|
text-align: left;
|
|
text-transform: none;
|
|
font-size: 1.4rem;
|
|
font-weight: normal;
|
|
will-change: transform, opacity;
|
|
}
|
|
|
|
.gh-publishmenu-dropdown.ember-basic-dropdown--transitioning-in {
|
|
animation: fade-in-scale 0.2s;
|
|
animation-fill-mode: forwards;
|
|
}
|
|
|
|
.gh-publishmenu-dropdown.ember-basic-dropdown--transitioning-out {
|
|
animation: fade-out 0.5s;
|
|
animation-fill-mode: forwards;
|
|
}
|
|
|
|
.gh-publishmenu-heading {
|
|
margin: 0 0 15px 0;
|
|
font-size: 1.8rem;
|
|
line-height: 1.15em;
|
|
}
|
|
|
|
.gh-publishmenu-content {
|
|
margin: 20px 0;
|
|
border-top: var(--lightgrey) 1px solid;
|
|
border-bottom: var(--lightgrey) 1px solid;
|
|
}
|
|
|
|
.gh-publishmenu-footer {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
margin: 15px 0 0 0;
|
|
}
|
|
|
|
.gh-publishmenu-button {
|
|
float: right;
|
|
}
|
|
|
|
.gh-publishmenu-radio {
|
|
display: flex;
|
|
margin: 25px 0;
|
|
}
|
|
|
|
.gh-publishmenu-radio-button {
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
width: 15px;
|
|
height: 15px;
|
|
border: color(var(--lightgrey) l(-10%)) 1px solid;
|
|
border-radius: 100%;
|
|
background: #fff;
|
|
}
|
|
|
|
.gh-publishmenu-radio-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin: 0 0 0 15px;
|
|
}
|
|
|
|
.gh-publishmenu-radio-label {
|
|
font-size: 1.4rem;
|
|
line-height: 1.2em;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.gh-publishmenu-radio-desc {
|
|
font-size: 1.3rem;
|
|
line-height: 1.4em;
|
|
font-weight: 200;
|
|
color: color(var(--midgrey) l(+10%));
|
|
}
|
|
|
|
.gh-publishmenu-radio-label:hover,
|
|
.gh-publishmenu-radio-button:hover {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.gh-publishmenu-radio.active .gh-publishmenu-radio-button {
|
|
border-color: color(var(--blue) l(-12%));
|
|
background: var(--blue);
|
|
}
|
|
|
|
.gh-publishmenu-radio.active .gh-publishmenu-radio-button:before {
|
|
display: block;
|
|
content: "";
|
|
position: absolute;
|
|
top: 3px;
|
|
left: 3px;
|
|
width: 7px;
|
|
height: 7px;
|
|
background: #fff;
|
|
border-radius: 100%;
|
|
box-shadow: rgba(0,0,0,0.25) 0 1px 3px;
|
|
}
|
|
|
|
.gh-date-time-picker {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.gh-date-time-picker-date,
|
|
.gh-date-time-picker-time {
|
|
display: flex;
|
|
align-items: center;
|
|
position: relative;
|
|
margin: 7px 0 4px;
|
|
padding: 6px 8px;
|
|
border: color(var(--lightgrey) l(-5%) s(-10%)) 1px solid;
|
|
border-radius: 3px;
|
|
transition: border-color 0.15s linear;
|
|
background: #fff;
|
|
}
|
|
|
|
.gh-date-time-picker-time {
|
|
margin-left: 10px;
|
|
width: 170px;
|
|
}
|
|
|
|
.gh-date-time-picker-date.error,
|
|
.gh-date-time-picker-time.error {
|
|
border-color: var(--red);
|
|
}
|
|
|
|
.gh-date-time-picker input {
|
|
display: block;
|
|
padding: 0;
|
|
width: 100%;
|
|
border: none;
|
|
color: color(var(--midgrey) l(-18%));
|
|
font-size: 1.3rem;
|
|
line-height: 1em;
|
|
font-weight: 400;
|
|
user-select: text;
|
|
|
|
-webkit-appearance: none;
|
|
}
|
|
|
|
.gh-date-time-picker input:focus {
|
|
outline: 0;
|
|
}
|
|
|
|
.gh-date-time-picker-date:focus,
|
|
.gh-date-time-picker-time:focus {
|
|
border-color: color(var(--lightgrey) l(-15%) s(-10%));
|
|
}
|
|
|
|
.gh-date-time-picker-date svg {
|
|
height: 14px;
|
|
fill: color(var(--midgrey) l(+15%));
|
|
}
|
|
|
|
.gh-date-time-picker-timezone {
|
|
font-size: 1.1rem;
|
|
font-weight: 200;
|
|
color: color(var(--midgrey) l(+17%));
|
|
}
|
|
|
|
.gh-date-time-picker-error {
|
|
display: block;
|
|
font-size: 1.3rem;
|
|
line-height: 1.4em;
|
|
font-weight: 200;
|
|
color: var(--red);
|
|
}
|