<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="robots" content="noindex">
    <title>noVNC</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.8.4/dist/semantic.min.css">
    <link rel="stylesheet" href="/css/tunnel-proxy.css">
</head>

<body>
    <div class="wrapper">
        <div class="connect">
            <h3 class="ui dividing header">noVNC [RPort proxy connection]</h3>
            <form action="/vnc.html" method="GET" class="ui form">
                {{if not .noURLPassword}}
                <div class="field">
                    <label for="password">Password</label>
                    <input type="password" name="password" id="password" placeholder="Password" autofocus>
                </div>
                {{end}}

                <input type="hidden" name="path" id="path" value="vnc">
                <input type="hidden" name="autoconnect" id="autoconnect" value="true">

                {{range $key, $value := .params}}
                <input type="hidden" name="{{$key}}" id="{{$key}}" value="{{$value}}">
                {{end}}

                <input class="ui button" type="submit" value="Connect">

                {{if not .basicUI}}
                <h3 class="ui dividing header">Connection Options</h3>

                <div class="two fields">
                    <div class="inline field">
                        <div class="ui checkbox">
                            <input type="checkbox" name="reconnect" id="reconnect" value="true" checked>
                            <label for="reconnect">Reconnect automatically</label>
                        </div>
                    </div>
                    <div class="inline field">
                        <div class="ui checkbox">
                            <input type="checkbox" name="show_dot" id="show_dot" value="true" checked>
                            <label for="show_dot">Show dot when no cursor</label>
                        </div>
                    </div>
                </div>
                <div class="two fields">
                    <div class="inline field">
                        <div class="ui checkbox">
                            <input type="checkbox" name="bell" id="bell" value="true">
                            <label for="bell">Enable bell</label>
                        </div>
                    </div>
                    <div class="inline field">
                        <div class="ui checkbox">
                            <input type="checkbox" name="view_only" id="view_only" value="true" {{if .defaultViewOnly}}checked{{end}}>
                            <label for="view_only">View only</label>
                        </div>
                    </div>
                </div>
                {{else}}
                <input type="hidden" name="reconnect" id="reconnect" value="true">
                <input type="hidden" name="show_dot" id="show_dot" value="true">
                <input type="hidden" name="bell" id="bell" value="false">
                <input type="hidden" name="view_only" id="view_only" value="{{if .defaultViewOnly}}true{{else}}false{{end}}">
                {{end}}
            </form>
        </div>
    </div>
</body>

</html>