aboutsummaryrefslogtreecommitdiff
path: root/src/common/attributes/useServerAttributes.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/attributes/useServerAttributes.js')
-rw-r--r--src/common/attributes/useServerAttributes.js62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/common/attributes/useServerAttributes.js b/src/common/attributes/useServerAttributes.js
new file mode 100644
index 00000000..80ac3c7d
--- /dev/null
+++ b/src/common/attributes/useServerAttributes.js
@@ -0,0 +1,62 @@
+import { useMemo } from 'react';
+
+export default (t) => useMemo(() => ({
+ support: {
+ name: t('settingsSupport'),
+ type: 'string',
+ },
+ title: {
+ name: t('serverName'),
+ type: 'string',
+ },
+ description: {
+ name: t('serverDescription'),
+ type: 'string',
+ },
+ logo: {
+ name: t('serverLogo'),
+ type: 'string',
+ },
+ logoInverted: {
+ name: t('serverLogoInverted'),
+ type: 'string',
+ },
+ colorPrimary: {
+ name: t('serverColorPrimary'),
+ type: 'string',
+ subtype: 'color',
+ },
+ colorSecondary: {
+ name: t('serverColorSecondary'),
+ type: 'string',
+ subtype: 'color',
+ },
+ disableChange: {
+ name: t('serverChangeDisable'),
+ type: 'boolean',
+ },
+ darkMode: {
+ name: t('settingsDarkMode'),
+ type: 'boolean',
+ },
+ totpEnable: {
+ name: t('settingsTotpEnable'),
+ type: 'boolean',
+ },
+ totpForce: {
+ name: t('settingsTotpForce'),
+ type: 'boolean',
+ },
+ serviceWorkerUpdateInterval: {
+ name: t('settingsServiceWorkerUpdateInterval'),
+ type: 'number',
+ },
+ 'ui.disableLoginLanguage': {
+ name: t('attributeUiDisableLoginLanguage'),
+ type: 'boolean',
+ },
+ disableShare: {
+ name: t('serverDisableShare'),
+ type: 'boolean',
+ },
+}), [t]);