<!DOCTYPE html>
<html class="settings-page hidden-during-load" tabindex="0">
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
        <meta name="apple-mobile-web-app-capable" content="yes"/>
        <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';"/>

        <title>Gauge - Settings - Sauce for Zwiftâ„¢</title>

        <script src="../src/preloads.js"></script>

        <link id="favicon" rel="shortcut icon" href="../images/favicon.png"/>
        <link rel="stylesheet" href="../css/common.css"/>

        <script type="module">
            import {settingsMain} from '../src/gauge.mjs';
            settingsMain();
        </script>
    </head>
    <body>
        <div id="titlebar">
            <header>
                <div class="logo"><img src="../images/icon128.png"/></div>
                <div class="title">Gauge - Settings</div>
                <div class="filler"></div>
                <div class="buttons">
                    <div title="Close this window" class="button close electron-only"><ms>close</ms></div>
                </div>
            </header>
        </div>
        <div id="settings">
            <form>
                <label>
                    <key>Min value:</key>
                    <input type="number" min="0" step="1" name="min"/>
                </label>
                <label>
                    <key>Max value:</key>
                    <input type="number" min="0" step="1" name="max"/>
                </label>
                <label>
                    <key>Refresh interval:</key>
                    <input type="number" min="0" step="0.2" name="refreshInterval"/> <small>(seconds)</small>
                </label>
                <label>
                    <key>Data smoothing:</key>
                    <select data-type="number" name="dataSmoothing">
                        <option value="0">None</option>
                        <option value="5" data-period="short">5 seconds</option>
                        <option value="15" data-period="short">15 seconds</option>
                        <option value="60" data-period="long">1 minute</option>
                        <option value="300" data-period="long">5 minutes</option>
                        <option value="1200" data-period="long">20 minutes</option>
                    </select>
                </label>
                <!--<label>
                    <key>Show average:</key>
                    <input type="checkbox" name="showAverage"/>
                </label>
                <label>
                    <key>Show max:</key>
                    <input type="checkbox" name="showMax"/>
                </label>
                <label title="Show lap average and max instead of whole activity">
                    <key>Current lap avg/max:</key>
                    <input type="checkbox" name="currentLap"/>
                </label>-->
                <label>
                    <key>Boring mode:</key>
                    <input type="checkbox" name="boringMode"/>
                </label>
                <label>
                    <key>Theme override:</key>
                    <select is="sauce-theme" override></select>
                </label>
                <label class="electron-only">
                    <key>Transparency:</key>
                    <input type="range" name="gaugeTransparency" min="0" max="100" step="1"/>
                    <input type="number" name="gaugeTransparency" style="--size: 4"/>%
                </label>
                <label>
                    <key>Color override:</key>
                    <input type="checkbox" name="colorOverride"/>
                </label>
                <label>
                    <key>Color:</key>
                    <input type="color" name="color" data-depends-on="colorOverride"/>
                    <input type="text" name="color" data-depends-on="colorOverride" size="7"/>
                </label>
                <label title="Mostly useful for streamers using OBS window and browser sources">
                    <key>Solid background:</key>
                    <input type="checkbox" name="solidBackground"/>
                </label>
                <label>
                    <key>Background color:</key>
                    <input type="color" name="backgroundColor" data-depends-on="solidBackground"/>
                    <input type="text" name="backgroundColor" data-depends-on="solidBackground" size="7"/>
                </label>
            </form>
        </div>
    </body>
</html>
