diff --git a/src/components/modals/main/marketplace/sections/Create.jsx b/src/components/modals/main/marketplace/sections/Create.jsx index a1a4f7e8..db487dc4 100644 --- a/src/components/modals/main/marketplace/sections/Create.jsx +++ b/src/components/modals/main/marketplace/sections/Create.jsx @@ -208,12 +208,12 @@ export default class Create extends PureComponent { const writeDescription = ( <>

{getMessage('modals.main.marketplace.product.information')}

- setMetadata(e.target.value, 'name')}/> - setMetadata(e.target.value, 'version')}/> - setMetadata(e.target.value, 'author')}/> - setMetadata(e.target.value, 'icon_url')}/> - setMetadata(e.target.value, 'screenshot_url')}/> - setMetadata(e.target.value, 'description')}/> + setMetadata(e.target.value, 'name')}/> + setMetadata(e.target.value, 'version')}/> + setMetadata(e.target.value, 'author')}/> + setMetadata(e.target.value, 'icon_url')}/> + setMetadata(e.target.value, 'screenshot_url')}/> + setMetadata(e.target.value, 'description')}/>
diff --git a/src/components/modals/main/scss/settings/_buttons.scss b/src/components/modals/main/scss/settings/_buttons.scss index 7e682027..9e1182aa 100644 --- a/src/components/modals/main/scss/settings/_buttons.scss +++ b/src/components/modals/main/scss/settings/_buttons.scss @@ -99,3 +99,9 @@ } } } + +.customvideoicon { + position: absolute; + margin-bottom: 45px; + font-size: 3em !important; +} diff --git a/src/components/modals/main/scss/settings/_main.scss b/src/components/modals/main/scss/settings/_main.scss index f241fa89..ac61eca0 100644 --- a/src/components/modals/main/scss/settings/_main.scss +++ b/src/components/modals/main/scss/settings/_main.scss @@ -74,4 +74,8 @@ h4 { .keybind-table { text-align: left; + + th { + padding-right: 10px; + } } diff --git a/src/components/modals/main/scss/settings/modules/_material-ui.scss b/src/components/modals/main/scss/settings/modules/_material-ui.scss index 5d68f428..6aa3acf1 100644 --- a/src/components/modals/main/scss/settings/modules/_material-ui.scss +++ b/src/components/modals/main/scss/settings/modules/_material-ui.scss @@ -93,3 +93,7 @@ legend, fill: #818181 !important; } } + +.MuiPaper-root { + background-color: var(--background) !important; +} diff --git a/src/components/modals/main/settings/KeybindInput.jsx b/src/components/modals/main/settings/KeybindInput.jsx index 41801725..5412a16d 100644 --- a/src/components/modals/main/settings/KeybindInput.jsx +++ b/src/components/modals/main/settings/KeybindInput.jsx @@ -9,7 +9,7 @@ export default function KeybindInput(props) { if (!value) { return ;; } else if (value === variables.language.getMessage(variables.languagecode, 'modals.main.settings.sections.keybinds.recording')) { - return props.action('cancel', props.setting)}>{variables.language.getMessage(variables.languagecode, 'modals.main.settings.sections.advanced.reset_modal.cancel')} + return ; } else { return ; } @@ -17,8 +17,7 @@ export default function KeybindInput(props) { return ( <> -

{props.name}

- props.action('listen', props.setting)} value={value || variables.language.getMessage(variables.languagecode, 'modals.main.settings.sections.keybinds.click_to_record')} readOnly spellCheck={false} varient='outlined' /> + props.action('listen', props.setting)} value={value || variables.language.getMessage(variables.languagecode, 'modals.main.settings.sections.keybinds.click_to_record')} readOnly spellCheck={false} varient='outlined' InputLabelProps={{ shrink: true }} /> {getButton()} ); diff --git a/src/components/modals/main/settings/ResetModal.jsx b/src/components/modals/main/settings/ResetModal.jsx index f846c4b5..94e667c5 100644 --- a/src/components/modals/main/settings/ResetModal.jsx +++ b/src/components/modals/main/settings/ResetModal.jsx @@ -19,7 +19,7 @@ export default function ResetModal({ modalClose }) { - diff --git a/src/components/modals/main/settings/Text.jsx b/src/components/modals/main/settings/Text.jsx index 727b0ced..50ed0f17 100644 --- a/src/components/modals/main/settings/Text.jsx +++ b/src/components/modals/main/settings/Text.jsx @@ -50,7 +50,7 @@ export default class Text extends PureComponent { <> {(this.props.textarea === true) ? - : + : } {variables.language.getMessage(variables.languagecode, 'modals.main.settings.buttons.reset')} diff --git a/src/components/modals/main/settings/sections/Keybinds.jsx b/src/components/modals/main/settings/sections/Keybinds.jsx index f93ddb27..222a60f2 100644 --- a/src/components/modals/main/settings/sections/Keybinds.jsx +++ b/src/components/modals/main/settings/sections/Keybinds.jsx @@ -105,26 +105,33 @@ export default class KeybindSettings extends PureComponent {
- + + + - - + + + + + - - + + - - + + + + - +
this.action(type, e)}/> this.action(type, e)}/>
this.action(type, e)}/>
this.action(type, e)}/>
this.action(type, e)}/> this.action(type, e)}/>
this.action(type, e)}/>
this.action(type, e)}/>
this.action(type, e)}/> this.action(type, e)}/>
this.action(type, e)}/> this.action(type, e)}/>
this.action(type, e)}/>
diff --git a/src/components/modals/main/settings/sections/Search.jsx b/src/components/modals/main/settings/sections/Search.jsx index df1a2139..17db1d2a 100644 --- a/src/components/modals/main/settings/sections/Search.jsx +++ b/src/components/modals/main/settings/sections/Search.jsx @@ -87,7 +87,7 @@ export default class SearchSettings extends PureComponent {

    this.resetSearch()}>{this.getMessage('modals.main.settings.buttons.reset')}

    - this.setState({ customValue: e.target.value })} varient='outlined' /> + this.setState({ customValue: e.target.value })} varient='outlined' InputLabelProps={{ shrink: true }} />
diff --git a/src/components/modals/main/settings/sections/Weather.jsx b/src/components/modals/main/settings/sections/Weather.jsx index ce128b9b..e223a3eb 100644 --- a/src/components/modals/main/settings/sections/Weather.jsx +++ b/src/components/modals/main/settings/sections/Weather.jsx @@ -68,7 +68,7 @@ export default class TimeSettings extends PureComponent { return ( <>
- this.changeLocation(e)} placeholder='London' varient='outlined' /> + this.changeLocation(e)} placeholder='London' varient='outlined' InputLabelProps={{ shrink: true }} /> this.getAuto()}>{getMessage('modals.main.settings.sections.weather.auto')} diff --git a/src/components/modals/main/settings/sections/background/Custom.jsx b/src/components/modals/main/settings/sections/background/Custom.jsx index 1ccd5a8d..62b368e3 100644 --- a/src/components/modals/main/settings/sections/background/Custom.jsx +++ b/src/components/modals/main/settings/sections/background/Custom.jsx @@ -1,7 +1,7 @@ import variables from 'modules/variables'; -import { PureComponent, Fragment } from 'react'; +import { PureComponent } from 'react'; import { toast } from 'react-toastify'; -import { Cancel, AddLink, AddPhotoAlternate } from '@mui/icons-material'; +import { Cancel, AddLink, AddPhotoAlternate, PersonalVideo } from '@mui/icons-material'; import EventBus from 'modules/helpers/eventbus'; import Checkbox from '../../Checkbox'; @@ -60,12 +60,18 @@ export default class CustomSettings extends PureComponent { this.forceUpdate(); localStorage.setItem('customBackground', JSON.stringify(customBackground)); + document.querySelector('.reminder-info').style.display = 'block'; + localStorage.setItem('showReminder', true); + } + + videoCheck(url) { + return url.startsWith('data:video/') || url.endsWith('.mp4') || url.endsWith('.webm') || url.endsWith('.ogg'); } videoCustomSettings = () => { - const hasVideo = Object.keys(this.state.customBackground).filter(bg => bg.startsWith('data:video/') || bg.endsWith('.mp4') || bg.endsWith('.webm') || bg.endsWith('.ogg')); + const hasVideo = this.state.customBackground.filter(bg => this.videoCheck(bg)); - if (hasVideo) { + if (hasVideo.length > 0) { return ( <> @@ -114,14 +120,13 @@ export default class CustomSettings extends PureComponent {
- {this.state.customBackground.map((_url, index) => ( - -
- {this.state.customBackground.length > 0 ? : null} -
-
+ {this.state.customBackground.map((url, index) => ( +
+ {this.videoCheck(url) ? : null} + {this.state.customBackground.length > 0 ? : null} +
))}
this.customBackground(e, false, this.state.currentBackgroundIndex)} /> diff --git a/src/components/modals/main/settings/sections/background/CustomURLModal.jsx b/src/components/modals/main/settings/sections/background/CustomURLModal.jsx index 56e67a19..f042177b 100644 --- a/src/components/modals/main/settings/sections/background/CustomURLModal.jsx +++ b/src/components/modals/main/settings/sections/background/CustomURLModal.jsx @@ -4,13 +4,13 @@ import { Add } from '@mui/icons-material'; import { TextField } from '@mui/material'; export default function CustomURLModal({ modalClose, modalCloseOnly }) { - const [url, setURL] = useState('URL'); + const [url, setURL] = useState(); return ( <> ×

{variables.language.getMessage(variables.languagecode, 'modals.main.settings.sections.background.source.add_url')}

- setURL(e.target.value)} varient='outlined' /> + setURL(e.target.value)} varient='outlined'/>