<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>统一认证授权中心</title>
    <meta name="description" content="统一认证授权中心">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link type="text/css" rel="stylesheet" th:href="@{/assets/css/normalize.css}" href="../static/assets/css/normalize.css">
    <link type="text/css" rel="stylesheet" th:href="@{/assets/bootstrap/css/bootstrap.min.css}" href="../static/assets/bootstrap/css/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" th:href="@{/assets/css/font-awesome.min.css}" href="../static/assets/css/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" th:href="@{/assets/css/style.css}" href="../static/assets/css/style.css">

</head>
<body class="bg-white">
<div class="d-flex align-content-center flex-wrap">
    <div class="container">
        <div class="login-content">
            <div class="login-logo">
                <h1>欢迎登录统一认证授权中心</h1>
            </div>
            <div class="login-form">
                <form th:action="@{/login}" method="post" th:method="post" class="mt-1">
                    <div class="form-group">
                        当前登录用户：<span th:text="${principal.name}">admin</span>, <a th:href="@{/logout}">退出</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" th:src="@{/assets/js/jquery-2.1.4.min.js}" src="../static/assets/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" th:src="@{/assets/bootstrap/js/bootstrap.min.js}" src="../static/assets/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" th:src="@{/assets/js/main.js}" src="../static/assets/js/main.js"></script>
<script th:inline="javascript">
    let desktopAddress = /*[[${desktopAddress}]]*/ "";
    let principal = /*[[${principal}]]*/ {};
    jQuery(function(){
        if(desktopAddress && principal){
            window.location.href = desktopAddress;
        }
    });
</script>
</html>