aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/StyleProvider.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-rw-r--r--src/client/views/StyleProvider.tsx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx
index 2d4fce899..c7616a9ba 100644
--- a/src/client/views/StyleProvider.tsx
+++ b/src/client/views/StyleProvider.tsx
@@ -323,13 +323,12 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<DocumentViewProps
}
export function DashboardToggleButton(doc: Doc, field: string, onIcon: IconProp, offIcon: IconProp, clickFunc?: () => void) {
- const color = StrCast(Doc.UserDoc().userColor)
- if (!doc[field]) return null
+ const color = StrCast(Doc.UserDoc().userColor);
return (
<IconButton
size={Size.XSMALL}
color={color}
- icon={<FontAwesomeIcon icon={(doc[field] ? (onIcon as any) : offIcon) as IconProp}/>}
+ icon={<FontAwesomeIcon icon={(doc[field] ? (onIcon as any) : offIcon) as IconProp} />}
onClick={undoBatch(
action((e: React.MouseEvent) => {
e.stopPropagation();
@@ -343,9 +342,8 @@ export function DashboardToggleButton(doc: Doc, field: string, onIcon: IconProp,
* add lock and hide button decorations for the "Dashboards" flyout TreeView
*/
export function DashboardStyleProvider(doc: Opt<Doc>, props: Opt<FieldViewProps | DocumentViewProps>, property: string) {
-
if (doc && property.split(':')[0] === StyleProp.Decorations) {
- return doc._type_collection === CollectionViewType.Docking
+ return doc._type_collection === CollectionViewType.Docking || Doc.IsSystem(doc)
? null
: DashboardToggleButton(doc, 'hidden', 'eye-slash', 'eye', () => DocFocusOrOpen(doc, { toggleTarget: true, willZoomCentered: true, zoomScale: 0 }, DocCast(doc?.embedContainer ?? doc?.annotationOn)));
}