<!--
Copyright (C) 2023 Nicola Murino

This WebUI uses the KeenThemes Mega Bundle, a proprietary theme:

https://keenthemes.com/products/templates-mega-bundle

KeenThemes HTML/CSS/JS components are allowed for use only within the
SFTPGo product and restricted to be used in a resealable HTML template
that can compete with KeenThemes products anyhow.

This WebUI is allowed for use only within the SFTPGo product and
therefore cannot be used in derivative works/products without an
explicit grant from the SFTPGo Team (support@sftpgo.com).
-->
{{template "base" .}}

{{- define "title"}}{{.Title}}{{- end}}
{{- define "page_body"}}
<div class="d-flex flex-center flex-column flex-column-fluid p-10 pb-lg-20">
    {{- if not .LoggedUser.Username}}
    {{- if .LoginURL}}
    <div class="mb-12">
        <a href="{{.LoginURL}}">
            <img alt="Logo" src="{{.StaticURL}}{{.Branding.LogoPath}}" class="h-80px h-md-90px h-lg-100px" />
        </a>
        <a href="{{.LoginURL}}" class="text-gray-900 fs-1 fw-bold ms-3 ps-5">
		    {{.Branding.ShortName}}
        </a>
    </div>
    {{- else}}
    <div class="mb-12">
        <span>
            <img alt="Logo" src="{{.StaticURL}}{{.Branding.LogoPath}}" class="h-80px h-md-90px h-lg-100px" />
        </span>
        <span class="text-gray-900 fs-1 fw-bold ms-3 ps-5">
		    {{.Branding.ShortName}}
        </span>
    </div>
    {{- end}}
    {{- end}}
    <div class="card shadow-sm w-lg-600px">
        <div class="card-header bg-light">
            <h3 class="card-title text-primary">{{.Title}}</h3>
        </div>
        <div class="card-body">
        {{- if .Error}}
            <div class="notice d-flex bg-light-warning rounded border-warning border border-dashed p-6">
                <i class="ki-duotone ki-information fs-2tx text-warning me-4">
                    <span class="path1"></span>
                    <span class="path2"></span>
                    <span class="path3"></span>
                </i>
                <div class="d-flex flex-stack flex-grow-1 ">
                    <div class=" fw-semibold">
                        <div class="fs-5 text-gray-800">
                            {{.Error}}
                        </div>
                    </div>
                </div>
            </div>
        {{- end}}
        {{- if .Success}}
            <div class="notice d-flex bg-light-primary rounded border-primary border border-dashed p-6">
                <i class="ki-duotone ki-information-2 fs-2tx text-primary me-4">
                    <span class="path1"></span>
                    <span class="path2"></span>
                    <span class="path3"></span>
                </i>
                <div class="d-flex flex-stack flex-grow-1 ">
                    <div class=" fw-semibold">
                        <div class="fs-5 text-gray-800">
                            {{.Success}}
                        </div>
                    </div>
                </div>
            </div>
        {{- end}}
        </div>
    </div>
</div>
{{- end}}