fix: Various editor header and metadata fixes (#2361)
* fix: Publish button disabled on drafts in read-only mode fix: Template selector appears on edited documents * fix: Save button does not immediately come available when selecting a template * fix: Template menu item alignment closes #2204 * fixes: Use policy for display of star in document title closes #2354 * fix: Modified time is sometimes bold when last edited user is current user closes #2355 * fix: Allow starring of drafts
This commit is contained in:
@@ -76,6 +76,10 @@ class DocumentScene extends React.Component<Props> {
|
||||
@observable title: string = this.props.document.title;
|
||||
getEditorText: () => string = () => this.props.document.text;
|
||||
|
||||
componentDidMount() {
|
||||
this.updateIsDirty();
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
const { auth, document, t } = this.props;
|
||||
|
||||
@@ -113,6 +117,7 @@ class DocumentScene extends React.Component<Props> {
|
||||
document.injectTemplate = false;
|
||||
this.title = document.title;
|
||||
this.isDirty = true;
|
||||
this.updateIsDirty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -529,6 +534,6 @@ const MaxWidth = styled(Flex)`
|
||||
|
||||
export default withRouter(
|
||||
withTranslation()<DocumentScene>(
|
||||
inject("ui", "auth", "policies", "revisions", "toasts")(DocumentScene)
|
||||
inject("ui", "auth", "toasts")(DocumentScene)
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user