Merge pull request #17370 from Scroody/I-17330

Fixed: Error when trying to apply custom styles via URL.
This commit is contained in:
Anton Georgiev 2023-04-05 15:15:57 -04:00 committed by GitHub
commit cc820ad02d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,6 @@ import { defineMessages, injectIntl } from 'react-intl';
import { LAYOUT_TYPE } from '/imports/ui/components/layout/enums';
import { withModalMounter } from '/imports/ui/components/common/modal/service';
import SettingsService from '/imports/ui/components/settings/service';
import getFromUserSettings from '/imports/ui/services/users-settings';
import deviceInfo from '/imports/utils/deviceInfo';
import Toggle from '/imports/ui/components/common/switch/component';
import Button from '/imports/ui/components/common/button/component';
@ -26,10 +25,8 @@ const LayoutModalComponent = (props) => {
const [isKeepPushingLayout, setIsKeepPushingLayout] = useState(application.pushLayout);
const BASE_NAME = Meteor.settings.public.app.basename;
const CUSTOM_STYLE_URL = Boolean(Meteor.settings.public.app.customStyleUrl);
const customStyleUrl = Boolean(getFromUserSettings('bbb_custom_style_url', CUSTOM_STYLE_URL));
const LAYOUTS_PATH = `${BASE_NAME}/resources/images/layouts/${customStyleUrl ? 'customStyle/' : ''}`;
const LAYOUTS_PATH = `${BASE_NAME}/resources/images/layouts/`;
const isKeepPushingLayoutEnabled = SettingsService.isKeepPushingLayoutEnabled();
const intlMessages = defineMessages({