Skip to content

Commit

Permalink
Properly set theme default configuration
Browse files Browse the repository at this point in the history
Instead of properly setting the default value for `admin.themes.enabled`
in the admin interface, we temporarily set it in the Opencast
configuration. That's not a great workaround and it has a few problems,
but I let us backport the admin interface to `r/15.x` to fix the major
problems there.

Not that 15 is our legacy release and we already have a two 16.x
versions out, it's time to properly set the default value.
  • Loading branch information
lkiesow committed Jul 21, 2024
1 parent bc134ca commit af82e2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/events/partials/modals/SeriesDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const SeriesDetails = ({

const user = useAppSelector(state => getUserInformation(state));
const orgProperties = useAppSelector(state => getOrgProperties(state));
const themesEnabled = (orgProperties['admin.themes.enabled'] || 'true').toLowerCase() === 'true';
const themesEnabled = (orgProperties['admin.themes.enabled'] || 'false').toLowerCase() === 'true';

// information about each tab
const tabs = [
Expand Down
2 changes: 1 addition & 1 deletion src/components/events/partials/wizards/NewSeriesWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const NewSeriesWizard: React.FC<{
const user = useAppSelector(state => getUserInformation(state));
const orgProperties = useAppSelector(state => getOrgProperties(state));

const themesEnabled = (orgProperties['admin.themes.enabled'] || 'true').toLowerCase() === 'true';
const themesEnabled = (orgProperties['admin.themes.enabled'] || 'false').toLowerCase() === 'true';

const initialValues = getInitialValues(metadataFields, extendedMetadata, user);

Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/MainNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const MainNav = ({
const orgProperties = useAppSelector(state => getOrgProperties(state));

const statisticsEnabled = (orgProperties['admin.statistics.enabled'] || 'false').toLowerCase() === 'true';
const themesEnabled = (orgProperties['admin.themes.enabled'] || 'true').toLowerCase() === 'true';
const themesEnabled = (orgProperties['admin.themes.enabled'] || 'false').toLowerCase() === 'true';

const loadEvents = () => {
dispatch(fetchFilters("events"));
Expand Down

0 comments on commit af82e2c

Please sign in to comment.