Skip to content

Commit

Permalink
Change footer control settings (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdaley authored Jul 24, 2023
1 parent 19f2a73 commit 751891e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion web/app/components/document/sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@

{{#if this.footerIsShown}}
<div class="sidebar-footer {{if this.editingIsDisabled 'locked'}}">
{{#if this.editingIsDisabled}}
{{#if this.footerControlsAreDisabled}}
<div class="px-3 -mb-1">
<div class="w-full pt-3.5 border-t border-color-border-primary">
<div class="text-body-200 text-color-foreground-faint">
Expand Down
12 changes: 12 additions & 0 deletions web/app/components/document/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,18 @@ export default class DocumentSidebarComponent extends Component<DocumentSidebarC
}
}

/**
* Whether the footer controls are disabled.
* True if the doc is locked or was created off-app.
* Determines if we show controls like "approve" and "request changes"
* or a message explaining their absence.
*/
protected get footerControlsAreDisabled() {
if (this.docIsLocked || !this.args.document.appCreated) {
return true;
}
}

/**
* Whether the footer is shown.
* True for editors who may need to see the "doc is locked" message,
Expand Down

0 comments on commit 751891e

Please sign in to comment.