Options ui (#222)

* wip

* Commenting stuff to keep the build happy

* Revealing sections

* Custom select elements & more form work

* Range input styles

* Text fields with inputs do the right thing

* Safari & Firefox fixes

* Large compress select

* oops

* MozJPEG options updated

* OptPNG options

* These asserts weren't true

* Generic options

* WebP options

* Hiding "edit" when "original image"

* Download icon

* Copy setting button - still not happy with this

* Progress indicator

* Loading icon enter/exit anim

* Preventing controls going under options

* Ahh so that's what was causing scrolling

* Ahh so that's what was causing outlines

* Simplifying range styles and fixing cross-browser

* Processing custom element styles

* Get precision from step by default

* I don't know how or when this happened.

* Don't need that many steps

* Avoid having an element that covers the pinch zoom

* Preventing overlap with zoom controls

* Prevent ts warning

* Fixing spinner position

* Simplifying FileSize
This commit is contained in:
Jake Archibald
2018-11-06 13:36:23 +00:00
committed by GitHub
parent 0cec90c7ca
commit bdd3c11f1a
37 changed files with 1291 additions and 948 deletions

View File

@@ -1,6 +1,7 @@
import { h, Component } from 'preact';
import { bind } from '../../lib/initial-util';
import '../../custom-els/RangeInput';
import * as style from '../../components/Options/style.scss';
import Range from '../../components/range';
interface EncodeOptions {
quality: number;
@@ -33,18 +34,19 @@ export default function qualityOption(opts: QualityOptionArg = {}) {
render({ options }: Props) {
return (
<div>
<label>
Quality:
<range-input
<div class={style.optionsSection}>
<div class={style.optionOneCell}>
<Range
name="quality"
min={min}
max={max}
step={step || 'any'}
value={'' + options.quality}
onChange={this.onChange}
/>
</label>
value={options.quality}
onInput={this.onChange}
>
Quality:
</Range>
</div>
</div>
);
}