diff --git a/apps/client/src/features/app-settings/AppSettings.tsx b/apps/client/src/features/app-settings/AppSettings.tsx index 7cedf7999..dfca4eff1 100644 --- a/apps/client/src/features/app-settings/AppSettings.tsx +++ b/apps/client/src/features/app-settings/AppSettings.tsx @@ -5,6 +5,7 @@ import { useKeyDown } from '../../common/hooks/useKeyDown'; import AboutPanel from './panel/about-panel/AboutPanel'; import LogPanel from './panel/log-panel/LogPanel'; import ProjectPanel from './panel/project-panel/ProjectPanel'; +import ProjectSettingsPanel from './panel/project-settings-panel/ProjectSettingsPanel'; import PanelContent from './panel-content/PanelContent'; import PanelList from './panel-list/PanelList'; import { useSettingsStore } from './settingsStore'; @@ -26,6 +27,7 @@ export default function AppSettings() { {selectedPanel === 'project' && } + {selectedPanel === 'project_settings' && } {selectedPanel === 'about' && } {selectedPanel === 'log' && } diff --git a/apps/client/src/features/app-settings/panel/project-settings-panel/ProjectSettingsPanel.module.scss b/apps/client/src/features/app-settings/panel/project-settings-panel/ProjectSettingsPanel.module.scss new file mode 100644 index 000000000..be4a893d6 --- /dev/null +++ b/apps/client/src/features/app-settings/panel/project-settings-panel/ProjectSettingsPanel.module.scss @@ -0,0 +1,8 @@ +.fullWidth { + width: 100%; +} + +.actions { + display: flex; + gap: 0.5rem; +} diff --git a/apps/client/src/features/app-settings/panel/project-settings-panel/ProjectSettingsPanel.tsx b/apps/client/src/features/app-settings/panel/project-settings-panel/ProjectSettingsPanel.tsx new file mode 100644 index 000000000..c6f06a251 --- /dev/null +++ b/apps/client/src/features/app-settings/panel/project-settings-panel/ProjectSettingsPanel.tsx @@ -0,0 +1,79 @@ +import { IconButton } from '@chakra-ui/react'; +import { Alert, AlertDescription, AlertIcon } from '@chakra-ui/react'; +import { IoPencil } from '@react-icons/all-files/io5/IoPencil'; +import { IoTrash } from '@react-icons/all-files/io5/IoTrash'; + +import ExternalLink from '../../../../common/components/external-link/ExternalLink'; +import * as Panel from '../PanelUtils'; + +import style from './ProjectSettingsPanel.module.scss'; + +const demoCustomFields = { + Apple: { value: 'Fruit' }, + Dog: { value: 'Animal' }, + Sun: { value: 'Star' }, + Car: { value: 'Vehicle' }, + Tree: { value: 'Plant' }, + Bird: { value: 'Creature' }, + Book: { value: 'Reading' }, + Chair: { value: 'Furniture' }, + Music: { value: 'Melody' }, + Ocean: { value: 'Sea' }, +}; + +const userFieldsDocsUrl = 'https://ontime.gitbook.io/v2/features/user-fields'; + +export default function ProjectSettingsPanel() { + return ( + <> + Project Settings + + + Custom fields +
+ + + + Custom fields allow for additional information to be added to an event (eg. light, sound, camera).{' '} +
+ This data is not used by Ontime.
+ See the docs +
+
+
+ + + + Name + + + + + {Object.entries(demoCustomFields).map(([key, { value }]) => ( + + {value} + + } + aria-label='Edit entry' + /> + } + aria-label='Delete entry' + /> + + + ))} + + +
+
+ + ); +} diff --git a/apps/client/src/features/app-settings/settingsStore.ts b/apps/client/src/features/app-settings/settingsStore.ts index e7f439d8d..594040a70 100644 --- a/apps/client/src/features/app-settings/settingsStore.ts +++ b/apps/client/src/features/app-settings/settingsStore.ts @@ -13,7 +13,11 @@ export const settingPanels: Readonly = [ label: 'Project', secondary: [{ id: 'project__manage', label: 'Manage project files' }], }, - { id: 'general', label: 'General' }, + { + id: 'project_settings', + label: 'Project Settings', + secondary: [{ id: 'project_settings__custom', label: 'Custom Fields' }], + }, { id: 'interface', label: 'Interface' }, { id: 'views', label: 'Views' }, { diff --git a/apps/client/src/theme/OntimeAlert.ts b/apps/client/src/theme/OntimeAlert.ts index 29c0fc16c..f6f7970c7 100644 --- a/apps/client/src/theme/OntimeAlert.ts +++ b/apps/client/src/theme/OntimeAlert.ts @@ -9,3 +9,15 @@ export const ontimeAlertOnLight = { color: '#578AF4', // $blue-500 }, }; + +export const ontimeAlertOnDark = { + container: { + fontSize: 'calc(1rem - 1px)', + backgroundColor: '#1a1a1a', // $gray-1300 + color: '#e2e2e2', // $gray-200 + borderRadius: '3px', + }, + icon: { + color: '#578AF4', // $blue-500 + }, +}; diff --git a/apps/client/src/theme/theme.ts b/apps/client/src/theme/theme.ts index 0515b96f9..00ddeb4e0 100644 --- a/apps/client/src/theme/theme.ts +++ b/apps/client/src/theme/theme.ts @@ -1,6 +1,6 @@ import { extendTheme } from '@chakra-ui/react'; -import { ontimeAlertOnLight } from './OntimeAlert'; +import { ontimeAlertOnDark, ontimeAlertOnLight } from './OntimeAlert'; import { ontimeButtonFilled, ontimeButtonGhosted, @@ -34,6 +34,7 @@ const theme = extendTheme({ Alert: { variants: { 'ontime-on-light-info': { ...ontimeAlertOnLight }, + 'ontime-on-dark-info': { ...ontimeAlertOnDark }, }, }, Button: {