From c66f82979db4ea5499559fcf2279af053482487c Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Fri, 12 Mar 2021 09:27:50 +0100 Subject: [PATCH] hide toolbar for frozen locales --- client/src/document/index.tsx | 4 ++-- client/src/document/types.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/document/index.tsx b/client/src/document/index.tsx index 20c74126c96f..cc955807cc7c 100644 --- a/client/src/document/index.tsx +++ b/client/src/document/index.tsx @@ -145,7 +145,7 @@ export function Document(props /* TODO: define a TS interface for this */) { <> {doc.isArchive && !doc.isTranslated && } - {/* if we have either breadcrumbs or translations for the current page, + {/* if we have either breadcrumbs or translations for the current page, continue rendering the section */} {(doc.parents || !!translations.length) && (
@@ -159,7 +159,7 @@ export function Document(props /* TODO: define a TS interface for this */) { {doc.toc && !!doc.toc.length && } - {!isServer && CRUD_MODE && !props.isPreview && !doc.isArchive && ( + {!isServer && CRUD_MODE && !props.isPreview && doc.isActive && ( Loading toolbar

} > diff --git a/client/src/document/types.tsx b/client/src/document/types.tsx index c9bc40dd3495..930399f823c3 100644 --- a/client/src/document/types.tsx +++ b/client/src/document/types.tsx @@ -126,4 +126,5 @@ export interface Doc { contributors: string[]; isArchive: boolean; isTranslated: boolean; + isActive: boolean; }