mirror of
https://github.com/mue/mue.git
synced 2026-07-20 23:44:07 +02:00
Update styles and dependencies
Co-authored-by: David Ralph <me@davidcralph.co.uk>
This commit is contained in:
@@ -125,24 +125,11 @@ export default class BackgroundSettings extends PureComponent {
|
||||
</Dropdown>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
{/*<Dropdown
|
||||
label={variables.getMessage('modals.main.settings.sections.background.category')}
|
||||
name="apiCategories"
|
||||
>
|
||||
{this.state.backgroundCategories.map((category) => (
|
||||
<MenuItem value={category.name} key={category.name}>
|
||||
{category.name.charAt(0).toUpperCase() + category.name.slice(1)} (
|
||||
{category.count})
|
||||
</MenuItem>
|
||||
))}
|
||||
</Dropdown>*/}
|
||||
<ChipSelect
|
||||
label={variables.getMessage('modals.main.settings.sections.background.categories')}
|
||||
options={this.state.backgroundCategories}
|
||||
name="apiCategories"
|
||||
></ChipSelect>
|
||||
</>
|
||||
<ChipSelect
|
||||
label={variables.getMessage('modals.main.settings.sections.background.categories')}
|
||||
options={this.state.backgroundCategories}
|
||||
name="apiCategories"
|
||||
/>
|
||||
)}
|
||||
<Dropdown
|
||||
label={variables.getMessage(
|
||||
@@ -388,7 +375,7 @@ export default class BackgroundSettings extends PureComponent {
|
||||
/>
|
||||
</SettingsItem>
|
||||
) : null}
|
||||
{this.state.backgroundSettingsSection ? (
|
||||
{this.state.backgroundSettingsSection && (
|
||||
<>
|
||||
<SettingsItem
|
||||
title={variables.getMessage('modals.main.settings.sections.background.source.title')}
|
||||
@@ -444,7 +431,7 @@ export default class BackgroundSettings extends PureComponent {
|
||||
: null}*/}
|
||||
{backgroundSettings}
|
||||
</>
|
||||
) : null}
|
||||
)}
|
||||
{(this.state.backgroundType === 'api' ||
|
||||
this.state.backgroundType === 'custom' ||
|
||||
this.state.marketplaceEnabled) &&
|
||||
|
||||
@@ -76,17 +76,8 @@ export default class CustomSettings extends PureComponent {
|
||||
localStorage.setItem('showReminder', true);
|
||||
}
|
||||
|
||||
videoCheck(url) {
|
||||
return (
|
||||
url.startsWith('data:video/') ||
|
||||
url.endsWith('.mp4') ||
|
||||
url.endsWith('.webm') ||
|
||||
url.endsWith('.ogg')
|
||||
);
|
||||
}
|
||||
|
||||
videoCustomSettings = () => {
|
||||
const hasVideo = this.state.customBackground.filter((bg) => this.videoCheck(bg));
|
||||
const hasVideo = this.state.customBackground.filter((bg) => videoCheck(bg));
|
||||
|
||||
if (hasVideo.length > 0) {
|
||||
return (
|
||||
@@ -225,9 +216,9 @@ export default class CustomSettings extends PureComponent {
|
||||
<div key={index}>
|
||||
<img
|
||||
alt={'Custom background ' + (index || 0)}
|
||||
src={`${!this.videoCheck(url) ? this.state.customBackground[index] : ''}`}
|
||||
src={`${!videoCheck(url) ? this.state.customBackground[index] : ''}`}
|
||||
/>
|
||||
{this.videoCheck(url) && <MdPersonalVideo className="customvideoicon" />}
|
||||
{videoCheck(url) && <MdPersonalVideo className="customvideoicon" />}
|
||||
{this.state.customBackground.length > 0 && (
|
||||
<Tooltip
|
||||
title={variables.getMessage(
|
||||
|
||||
Reference in New Issue
Block a user