Skip to content

Commit

Permalink
do not allow publishing if components are saving (#1512)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Mera authored Jan 13, 2021
1 parent abe17d7 commit e0a9b34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/drawers/publish-page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</form>
<span class="action-info-message">Time Zone: {{ timezone }}</span>
<ui-button v-if="showSchedule" :disabled="disableSchedule || isArchived || hasErrors || !isLayoutPublished" class="action-button" buttonType="button" color="orange" @click.stop="schedulePage">{{ actionMessage }}</ui-button>
<ui-button v-else :disabled="isPublishing || isArchived || hasErrors || !isLayoutPublished" class="action-button" buttonType="button" color="accent" @click.stop="publishPage">{{ actionMessage }}</ui-button>
<ui-button v-else :disabled="isPublishing || isArchived || hasErrors || !isLayoutPublished || isComponentSaving" class="action-button" buttonType="button" color="accent" @click.stop="publishPage">{{ actionMessage }}</ui-button>
<span v-if="!isLayoutPublished && isAdmin" class="action-error-message" @click="goToLayout">Layout must be published first</span>
<span v-else-if="!isLayoutPublished" class="action-error-message">Layout must be published first (by an admin)</span>
<span v-else-if="hasErrors" class="action-error-message" @click="goToHealth">Please fix errors before publishing</span>
Expand Down Expand Up @@ -128,6 +128,7 @@
isPublishing: state => state.ui.currentlyPublishing,
isScheduled: state => state.page.state.scheduled,
isArchived: state => state.page.state.archived,
isComponentSaving: state => state.ui.currentlySaving,
uri: state => state.page.uri,
url: state => state.page.state.url,
publishedDate: state => state.page.state.publishTime,
Expand Down

0 comments on commit e0a9b34

Please sign in to comment.