<%# Canopy - The next generation of stoner streaming software
Copyright (C) 2024-2025 Rainbownapkin and the TTN Community

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>. %>

<!DOCTYPE html>
<html>
    <head>
        <%- include('partial/styles', {instance, user}); %>
        <%- include('partial/csrfToken', {csrfToken}); %>
        <link rel="stylesheet" type="text/css" href="/css/migrate.css">
        <link rel="stylesheet" type="text/css" href="/lib/altcha/altcha.css">
        <title><%= instance %> - Account Migration</title>
    </head>
    <body>
        <%- include('partial/navbar', {user}); %>
        <h1>Welcome Back!</h1>
        <h2><%= instance%> has received an update, and your account needs one too!</h2>
        <h2 class="danger-text">Remember your new password, you will need it for your first login!</h2>
        <form action="javascript:">
            <label>Username:</label>
            <input class="migrate-prompt" id="migrate-username" placeholder="Required">
            <label>Old Password:</label>
            <input class="migrate-prompt"  id="migrate-password-old" placeholder="Required" type="password">
            <label>Password:</label>
            <input class="migrate-prompt"  id="migrate-password" placeholder="Required" type="password">
            <label>Confirm Password:</label>
            <input class="migrate-prompt"  id="migrate-password-confirm" placeholder="Required" type="password">
            <altcha-widget floating challengejson="<%= JSON.stringify(challenge) %>"></altcha-widget>
            <button id="migrate-button" class='positive-button'>migrate</button>
        </form>
    </body>
    <footer>
        <%- include('partial/scripts', {user}); %>
        <script src="/js/migrate.js"></script>
        <script src="/lib/altcha/altcha.js" type="module"></script>
    </footer>
</html>
