mirror of
https://github.com/mue/mue.git
synced 2026-07-16 05:23:49 +02:00
feat: better keybinds ui, fix notes, improve search dropdown etc
This commit is contained in:
22
src/components/modals/main/settings/KeybindInput.jsx
Normal file
22
src/components/modals/main/settings/KeybindInput.jsx
Normal file
@@ -0,0 +1,22 @@
|
||||
export default function KeybindInput(props) {
|
||||
const language = window.language.modals.main.settings;
|
||||
|
||||
const getButton = () => {
|
||||
const value = props.state[props.settingsName];
|
||||
if (!value) {
|
||||
return null;
|
||||
} else if (value === language.sections.keybinds.recording) {
|
||||
return <span className='modalLink' onClick={() => props.cancel(props.settingsName)}>{language.sections.advanced.reset_modal.cancel}</span>
|
||||
} else {
|
||||
return <span className='modalLink' onClick={() => props.reset(props.settingsName)}>{language.buttons.reset}</span>;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<p>{props.name}</p>
|
||||
<input type='text' onClick={() => props.set(props.settingsName)} value={props.state[props.settingsName] || language.sections.keybinds.click_to_record} readOnly/>
|
||||
{getButton()}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user