mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-16 09:35:00 +08:00
fix(prefs): Minor tweaks, see description
- Make the keymaps panel less wide - <select>'s now populate their current value properly - Items should blur after being interacted with so that `esc` still moves you back to parent sheet
This commit is contained in:
parent
e72d522b2b
commit
5ee8ffabbc
2 changed files with 8 additions and 2 deletions
|
@ -34,7 +34,7 @@ class ConfigSchemaItem extends React.Component
|
|||
else if @props.configSchema['enum']?
|
||||
<div className="item">
|
||||
<label htmlFor={@props.keyPath}>{@props.configSchema.title}:</label>
|
||||
<select onChange={@_onChangeValue}>
|
||||
<select onChange={@_onChangeValue} value={@props.config.get(@props.keyPath)}>
|
||||
{_.zip(@props.configSchema.enum, @props.configSchema.enumLabels).map ([value, label]) =>
|
||||
<option value={value}>{label}</option>
|
||||
}
|
||||
|
@ -54,10 +54,12 @@ class ConfigSchemaItem extends React.Component
|
|||
return true if process.platform in @props.configSchema.platforms
|
||||
return false
|
||||
|
||||
_onChangeChecked: =>
|
||||
_onChangeChecked: (event) =>
|
||||
@props.config.toggle(@props.keyPath)
|
||||
event.target.blur()
|
||||
|
||||
_onChangeValue: (event) =>
|
||||
@props.config.set(@props.keyPath, event.target.value)
|
||||
event.target.blur()
|
||||
|
||||
module.exports = ConfigSchemaItem
|
||||
|
|
|
@ -161,6 +161,8 @@
|
|||
}
|
||||
|
||||
.container-keymaps {
|
||||
max-width: 450px;
|
||||
|
||||
.shortcut {
|
||||
padding: 3px 0;
|
||||
&.shortcut-select {
|
||||
|
@ -184,6 +186,8 @@
|
|||
}
|
||||
|
||||
.container-accounts {
|
||||
max-width: 600px;
|
||||
|
||||
.account-name {
|
||||
font-size: @font-size-large;
|
||||
cursor:default;
|
||||
|
|
Loading…
Add table
Reference in a new issue