mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Allow configuring (mostly hiding) various little bits of UI
Summary: Adds two new env vars GRIST_HIDE_UI_ELEMENTS and GRIST_PAGE_TITLE_SUFFIX which translate to values in GristLoadConfig that the server sends the client when loading. For checkin task https://gristlabs.getgrist.com/doc/check-ins/p/5#a1.s9.r1882.c19 Test Plan: Tested manually Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3449
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {commonUrls, getSingleOrg} from 'app/common/gristUrls';
|
||||
import {commonUrls, getSingleOrg, shouldHideUiElement} from 'app/common/gristUrls';
|
||||
import {getOrgName} from 'app/common/UserAPI';
|
||||
import {dom, makeTestId, styled} from 'grainjs';
|
||||
import {AppModel} from 'app/client/models/AppModel';
|
||||
@@ -14,7 +14,7 @@ const testId = makeTestId('test-site-switcher-');
|
||||
*/
|
||||
export function maybeAddSiteSwitcherSection(appModel: AppModel) {
|
||||
const orgs = appModel.topAppModel.orgs;
|
||||
return dom.maybe((use) => use(orgs).length > 0 && !getSingleOrg(), () => [
|
||||
return dom.maybe((use) => use(orgs).length > 0 && !getSingleOrg() && !shouldHideUiElement("multiSite"), () => [
|
||||
menuDivider(),
|
||||
buildSiteSwitcher(appModel),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user