From e45b4c870a1a9e6da3fb0a9254b99cd1f721de8a Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 23 Oct 2022 00:44:05 -0700 Subject: [PATCH] Hide app title on mobile. --- packages/editor/src/classes/action/action-type/index.ts | 1 + packages/editor/src/classes/action/capability/index.ts | 5 +++++ packages/editor/src/components/app-bar/index.tsx | 1 + 3 files changed, 7 insertions(+) diff --git a/packages/editor/src/classes/action/action-type/index.ts b/packages/editor/src/classes/action/action-type/index.ts index 72d345b3..7063760c 100644 --- a/packages/editor/src/classes/action/action-type/index.ts +++ b/packages/editor/src/classes/action/action-type/index.ts @@ -30,6 +30,7 @@ type ActionType = | 'edition-toolbar' | 'sign-up' | 'starred' + | 'appbar-title' | 'keyboard-shortcuts'; export default ActionType; diff --git a/packages/editor/src/classes/action/capability/index.ts b/packages/editor/src/classes/action/capability/index.ts index d34c4609..1090d88a 100644 --- a/packages/editor/src/classes/action/capability/index.ts +++ b/packages/editor/src/classes/action/capability/index.ts @@ -176,6 +176,11 @@ const ActionConfigByRenderMode: Record = { hidden: ['viewonly', 'showcase', 'edition-viewer', 'edition-editor', 'edition-owner'], }, }, + 'appbar-title': { + mobile: { + hidden: ['viewonly', 'showcase', 'edition-viewer', 'edition-editor', 'edition-owner'], + }, + }, 'sign-up': { desktop: { hidden: ['viewonly', 'edition-viewer', 'edition-editor', 'edition-owner'], diff --git a/packages/editor/src/components/app-bar/index.tsx b/packages/editor/src/components/app-bar/index.tsx index 36153b7d..3c81c9eb 100644 --- a/packages/editor/src/components/app-bar/index.tsx +++ b/packages/editor/src/components/app-bar/index.tsx @@ -88,6 +88,7 @@ const AppBar = ({ model, mapInfo, capability, onAction, accountConfig }: AppBarP }, { render: () => , + visible: !capability.isHidden('appbar-title'), }, { render: () => (