refactor: small styling changes and 7.0.1 start

This commit is contained in:
David Ralph
2024-01-01 11:47:58 +00:00
parent de24d11463
commit d482deccb4
32 changed files with 134 additions and 125 deletions

View File

@@ -287,11 +287,11 @@ export default class BackgroundSettings extends PureComponent {
onChange={(value) => this.setState({ backgroundType: value })}
category="background"
>
{this.state.marketplaceEnabled ? (
{this.state.marketplaceEnabled && (
<option value="photo_pack">
{variables.getMessage('modals.main.navbar.marketplace')}
</option>
) : null}
)}
<option value="api">
{variables.getMessage('modals.main.settings.sections.background.type.api')}
</option>
@@ -406,11 +406,11 @@ export default class BackgroundSettings extends PureComponent {
onChange={(value) => this.setState({ backgroundType: value })}
category="background"
>
{this.state.marketplaceEnabled ? (
{this.state.marketplaceEnabled && (
<option value="photo_pack">
{variables.getMessage('modals.main.navbar.marketplace')}
</option>
) : null}
)}
<option value="api">
{variables.getMessage('modals.main.settings.sections.background.type.api')}
</option>
@@ -520,7 +520,7 @@ export default class BackgroundSettings extends PureComponent {
)}
</option>
</Dropdown>
{this.state.backgroundFilter !== 'none' ? (
{this.state.backgroundFilter !== 'none' && (
<Slider
title={variables.getMessage(
'modals.main.settings.sections.background.effects.filters.amount',
@@ -534,7 +534,7 @@ export default class BackgroundSettings extends PureComponent {
category="background"
element="#backgroundImage"
/>
) : null}
)}
</SettingsItem>
) : null}
</>

View File

@@ -207,13 +207,13 @@ export default class ColourSettings extends PureComponent {
colourSettings = (
<>
<div className="colourInput">{gradientInputs}</div>
{!gradientHasMoreThanOneColour ? (
{!gradientHasMoreThanOneColour && (
<>
<button type="button" className="add" onClick={this.addColour}>
{variables.getMessage('modals.main.settings.sections.background.source.add_colour')}
</button>
</>
) : null}
)}
</>
);
}

View File

@@ -227,8 +227,8 @@ export default class CustomSettings extends PureComponent {
alt={'Custom background ' + (index || 0)}
src={`${!this.videoCheck(url) ? this.state.customBackground[index] : ''}`}
/>
{this.videoCheck(url) ? <MdPersonalVideo className="customvideoicon" /> : null}
{this.state.customBackground.length > 0 ? (
{this.videoCheck(url) && <MdPersonalVideo className="customvideoicon" />}
{this.state.customBackground.length > 0 && (
<Tooltip
title={variables.getMessage(
'modals.main.settings.sections.background.source.remove',
@@ -238,7 +238,7 @@ export default class CustomSettings extends PureComponent {
<MdCancel />
</button>
</Tooltip>
) : null}
)}
</div>
))}
</div>