UNPKG

@zextras/carbonio-admin-ui

Version:

The Zextras Carbonio web admin

31 lines (27 loc) 1.02 kB
/* * SPDX-FileCopyrightText: 2021 Zextras <https://www.zextras.com> * * SPDX-License-Identifier: AGPL-3.0-only */ import { create } from 'zustand'; export type LoginConfigStore = { carbonioWebUiDarkMode?: boolean; carbonioAdminUiAppLogo?: string; carbonioAdminUiDarkAppLogo?: string; carbonioAdminUiTitle?: string; carbonioAdminUiFavicon?: string; carbonioLogoURL?: string; carbonioWebUiPrimaryColor?: string; carbonioWebUiDarkPrimaryColor?: string; carbonioAdminUiLogoutURL?: string; carbonioWebUiFavicon?: string; }; // extra currying as suggested in https://github.com/pmndrs/zustand/blob/main/docs/guides/typescript.md#basic-usage export const useLoginConfigStore = create<LoginConfigStore>()(() => ({ loaded: false, isCarbonioCE: undefined, // setup defaults for fields which does not depend on dark mode carbonioWebUiTitle: 'Carbonio Client', // default to png because this icon is used also in notification, and svg are not supported there carbonioWebUiFavicon: `${BASE_PATH}favicon.png` }));