mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 08:43:21 +08:00
Added search input types to 3 inputs total, closes #726
* Added type search to search bar (forum) * Added CSS `box-sizing: inherit` to search <input> because bootstrap styles mess up the search box * Added type color to both color settings in appearance (admin)
This commit is contained in:
parent
ab912ba1ad
commit
fcdf36b3d0
4
js/admin/dist/app.js
vendored
4
js/admin/dist/app.js
vendored
|
@ -17834,8 +17834,8 @@ System.register('flarum/components/AppearancePage', ['flarum/components/Page', '
|
||||||
m(
|
m(
|
||||||
'div',
|
'div',
|
||||||
{ className: 'AppearancePage-colors-input' },
|
{ className: 'AppearancePage-colors-input' },
|
||||||
m('input', { className: 'FormControl', placeholder: '#aaaaaa', value: this.primaryColor(), onchange: m.withAttr('value', this.primaryColor) }),
|
m('input', { className: 'FormControl', type: 'color', placeholder: '#aaaaaa', value: this.primaryColor(), onchange: m.withAttr('value', this.primaryColor) }),
|
||||||
m('input', { className: 'FormControl', placeholder: '#aaaaaa', value: this.secondaryColor(), onchange: m.withAttr('value', this.secondaryColor) })
|
m('input', { className: 'FormControl', type: 'color', placeholder: '#aaaaaa', value: this.secondaryColor(), onchange: m.withAttr('value', this.secondaryColor) })
|
||||||
),
|
),
|
||||||
Switch.component({
|
Switch.component({
|
||||||
state: this.darkMode(),
|
state: this.darkMode(),
|
||||||
|
|
|
@ -28,8 +28,8 @@ export default class AppearancePage extends Page {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="AppearancePage-colors-input">
|
<div className="AppearancePage-colors-input">
|
||||||
<input className="FormControl" placeholder="#aaaaaa" value={this.primaryColor()} onchange={m.withAttr('value', this.primaryColor)}/>
|
<input className="FormControl" type="color" placeholder="#aaaaaa" value={this.primaryColor()} onchange={m.withAttr('value', this.primaryColor)}/>
|
||||||
<input className="FormControl" placeholder="#aaaaaa" value={this.secondaryColor()} onchange={m.withAttr('value', this.secondaryColor)}/>
|
<input className="FormControl" type="color" placeholder="#aaaaaa" value={this.secondaryColor()} onchange={m.withAttr('value', this.secondaryColor)}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{Switch.component({
|
{Switch.component({
|
||||||
|
|
1
js/forum/dist/app.js
vendored
1
js/forum/dist/app.js
vendored
|
@ -26653,6 +26653,7 @@ System.register('flarum/components/Search', ['flarum/Component', 'flarum/compone
|
||||||
'div',
|
'div',
|
||||||
{ className: 'Search-input' },
|
{ className: 'Search-input' },
|
||||||
m('input', { className: 'FormControl',
|
m('input', { className: 'FormControl',
|
||||||
|
type: 'search',
|
||||||
placeholder: extractText(app.translator.trans('core.forum.header.search_placeholder')),
|
placeholder: extractText(app.translator.trans('core.forum.header.search_placeholder')),
|
||||||
value: this.value(),
|
value: this.value(),
|
||||||
oninput: m.withAttr('value', this.value),
|
oninput: m.withAttr('value', this.value),
|
||||||
|
|
|
@ -83,6 +83,7 @@ export default class Search extends Component {
|
||||||
})}>
|
})}>
|
||||||
<div className="Search-input">
|
<div className="Search-input">
|
||||||
<input className="FormControl"
|
<input className="FormControl"
|
||||||
|
type="search"
|
||||||
placeholder={extractText(app.translator.trans('core.forum.header.search_placeholder'))}
|
placeholder={extractText(app.translator.trans('core.forum.header.search_placeholder'))}
|
||||||
value={this.value()}
|
value={this.value()}
|
||||||
oninput={m.withAttr('value', this.value)}
|
oninput={m.withAttr('value', this.value)}
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
padding-left: 32px;
|
padding-left: 32px;
|
||||||
padding-right: 32px;
|
padding-right: 32px;
|
||||||
.transition(all 0.4s);
|
.transition(all 0.4s);
|
||||||
|
box-sizing: inherit !important;
|
||||||
}
|
}
|
||||||
.Button {
|
.Button {
|
||||||
float: left;
|
float: left;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user