<!DOCTYPE html>
<html class="settings-page" tabindex="0" data-settings-key="geo-settings-v1">
    <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>Map - 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/geo.mjs';
            settingsMain();
        </script>
    </head>
    <body>
        <div id="titlebar">
            <header>
                <div class="logo"><img src="images/icon128.png"/></div>
                <div class="title">Map - 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 class="section">
                <label>
                    <key>Data fields:</key>
                    <input type="number" name="fields"/>
                </label>
                <label>
                    <key>Map style:</key>
                    <select name="mapStyle">
                        <option value="default">Default</option>
                        <option value="neon">Neon</option>
                    </select>
                </label>
                <label title="How far to shift the view back or forward">
                    <key>Vertical offset:</key>
                    <input type="range" name="verticalOffset" min="-50" max="50"/>
                    <input type="number" name="verticalOffset" min="-50" max="50" style="--size: 5"/>%
                </label>
                <label>
                    <key>Zoom:</key>
                    <input type="range" name="zoom" min="0" max="10" step="0.1"/>
                    <input type="number" name="zoom" min="0" max="10" step="0.1" style="--size: 5"/>
                </label>
                <label title="Do not show chat bubbles on the map">
                    <key data-added="2024-02-05">Disable chat:</key>
                    <input type="checkbox" name="disableChat"/>
                </label>

                <hr/>

                <label>
                    <key>Profile overlay:</key>
                    <input type="checkbox" name="profileOverlay"/>
                </label>
                <label>
                    <key data-added="2023-05-30">Profile height:</key>
                    <input type="range" name="profileHeight" min="5" max="100" step="1" data-depends-on="profileOverlay" value="20"/>
                    <input type="number" name="profileHeight" min="5" max="100" step="1" style="--size: 5" value="20"/>%
                </label>
                <label title="Indicate what the max elevation is with a horizontal line on the chart">
                    <key data-added="2023-11-01">Show max elevation:</key>
                    <input type="checkbox" name="showElevationMaxLine" data-depends-on="profileOverlay" checked/>
                </label>
                <label title="Show the profile for the current route (instead of road) when available">
                    <key data-added="2023-11-01">Route mode:</key>
                    <input type="checkbox" name="routeProfile" data-depends-on="profileOverlay" checked/>
                </label>

                <hr/>

                <label>
                    <key>Theme override:</key>
                    <select is="sauce-theme" override></select>
                </label>
                <label>
                    <key>Transparency:</key>
                    <input type="range" name="transparency" min="0" max="100"/>
                    <input type="number" name="transparency" min="0" max="100" style="--size: 5"/>%
                </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"/>
                    <input type="number" title="Opacity" name="backgroundAlpha" data-depends-on="solidBackground"
                           style="--size: 5" min="0" max="100" value="100"/>%
                </label>

                <hr/>

                <div class="title">High Performance System Options:</div>
                <div><small>NOTE: These options require a powerful CPU and/or GPU.</small></div>
                <br/>
                <label title="This setting directly affects GPU memory and image quality.  High values may lead to visual corruption and instabilty.">
                    <key>Quality:</key>
                    <input type="range" name="quality" min="1" max="100"/>
                    <input type="number" name="quality" min="1" max="200" style="--size: 5"/>%
                </label>
                <label title="Higher values will require more CPU and GPU power">
                    <key>FPS limit:</key>
                    <input type="range" name="fpsLimit" min="1" max="120"/>
                    <input type="number" name="fpsLimit" min="1" max="120" style="--size: 5"/>fps
                </label>
                <label title="Flash a white or red shadow for high power outputs">
                    <key>Sparkle mode:</key>
                    <input type="checkbox" name="sparkle"/>
                </label>
                <label title="Support shifting the perspective when zoomed in">
                    <key>Tilt shift:</key>
                    <input type="checkbox" name="tiltShift"/>
                </label>
                <label title="Maximum tilt shift amount to use when zoomed in">
                    <key>Tilt shift amount:</key>
                    <input type="range" name="tiltShiftAmount" min="0" max="100" step="1" data-depends-on="tiltShift"/>
                    <input type="number" name="tiltShiftAmount" min="0" max="100" step="1" style="--size: 5"/>%
                </label>
                <label title="Adjust tilt angle based on zoom">
                    <key>Zoom Priority Tilt:</key>
                    <input type="checkbox" name="zoomPriorityTilt" checked data-depends-on="tiltShift"/>
                </label>
            </form>
        </div>
    </body>
</html>
