@page "/changelog"

@{
    List<string[]> changelog = new List<string[]>
    {
        new[]
        {
            "Patch 1, 13.03.2023",
            "Service manager"
        },
        new[]
        {
            "Patch 2, 14.03.2023",
            "Added new image manager. CRUD implemeted"
        },
        new[]
        {
            "Patch 3, 20.03.2023",
            "Ddos detection",
            "Implemented server manager"
        },
        new[]
        {
            "Patch 4, 21.03.2023",
            "Added user edit form. Fixed edit link"
        },
        new[]
        {
            "Patch 5, 24.03.2023",
            "Update Discord Bot Branche",
            "Removed discord id and discriminator. Fixed oauth2.",
            "Updated discord bot branch",
            "Updated smart form branch",
            "Added smart form",
            "Updating PleskIntegration branch",
            "Revert \"Updating PleskIntegration branch\""
        },
        new[]
        {
            "Patch 6, 27.03.2023",
            "Update Index.razor",
            "User settings"
        },
        new[]
        {
            "Patch 7, 28.03.2023",
            "Added form proccessing screen (not finished). Some ui changes. User m."
        },
        new[]
        {
            "Patch 8, 02.04.2023",
            "Server manage enhancements",
            "Cleanup system",
            "Update WingsServerConverter.cs",
            "Added quick create dropdown",
            "fixed login form",
            "Login form fix"
        },
        new[]
        {
            "Patch 9, 03.04.2023",
            "Fixed cleanup",
            "Added server reset setting",
            "Totp",
            "Update from upstream because of database models",
            "Audit log",
            "Audit log",
            "Force password change",
            "Support chat redesign",
            "Subscriptions",
            "Added server rename setting"
        },
        new[]
        {
            "Patch 10, 04.04.2023",
            "Added server delete. Tweaked setting names",
            "Added server node status screen check thingy",
            "Update CacheLogger.cs",
            "Update to upstream branch",
            "Update View.razor",
            "Update to upstream branch",
            "Removed legacy aaPanel stuff",
            "Update DesignFixes",
            "Design fixes",
            "Create Changelog.razor"
        },
        new[]
        {
            "Patch 11, 05.04.2023",
            "Ftp file manager",
            "Update to upstream branch",
            "Added ActivityStatus"
        },
        new[]
        {
            "Patch 12, 06.04.2023",
            "Domain overview",
            "Plesk integration",
            "Add websites to statistics branch",
            "Removed legacy database ui",
            "Replaced legacy dependency resolve with server service function for w.",
            "masu is too stupid to use ulong",
            "Statistic system",
            "host file access + use in admin resource manager"
        },
        new[]
        {
            "Patch 13, 10.04.2023",
            "Removed old typeahead. Added own solution. Lang file, notes",
            "Implemented website order"
        },
        new[]
        {
            "Patch 14, 11.04.2023",
            "Implemented domain order. Fixed some bugs"
        },
        new[]
        {
            "Patch 15, 12.04.2023",
            "Implemented new soft error boundary crash handler",
            "Added ip locate. Fixed oauth2 mail send. Fixed mail send when generat.",
            "Implemented multi allocation",
            "register",
            "Fixed server lists",
            "News page",
            "Improved news system"
        },
        new[]
        {
            "Patch 16, 13.04.2023",
            "domain view redesigned | fixed some masu at midnight",
            "Persistent storage",
            "Removed old file manager stuff",
            "fixed design of delete button",
            "redesigned shared domains screen | split in view/add"
        },
        new[]
        {
            "Patch 17, 14.04.2023",
            "Removed legacy image tags",
            "Fixed server deletion and creation allocation bugs"
        },
        new[]
        {
            "Patch 18, 15.04.2023",
            "Update DiscordBot branch",
            "Fix backup delete",
            "Implemented default subscription",
            "Implemented random loading message",
            "Recode frontend js"
        },
        new[]
        {
            "Patch 19, 16.04.2023",
            "Optimized allocation search. Added sql command log interception",
            "Fixed my stupid mistakes",
            "Implemented file view loading animation"
        },
        new[]
        {
            "Patch 20, 19.04.2023",
            "Cloud panel interation"
        },
        new[]
        {
            "Patch 21, 20.04.2023",
            "Removed legacy website",
            "Added user change status try catch, implement logout. password change",
            "Added admin check to sftp login system",
            "Implemented new event system",
            "Rewritten support chat backend. Added discord notifications"
        },
        new[]
        {
            "Patch 22, 21.04.2023",
            "Removed old support system",
            "Deleted old message system. Replaced it with new event system",
            "Update ServerNavigation.razor",
            "Switched from internal smtp client to MailKit. Added ssl config"
        },
        new[]
        {
            "Patch 23, 23.04.2023",
            "Added missing refresh call",
            "Added better reconnect screens",
            "Removed useless logging. Switched to cache mode for support chat",
            "Fixed statistics system"
        },
        new[]
        {
            "Patch 24, 24.04.2023",
            "Add checking user status to login sequence where login form is currently",
            "Added config reload button"
        },
        new[]
        {
            "Patch 25, 25.04.2023",
            "Update Create.razor",
            "Added server count for image overview",
            "Implemented owner change option in admin ui"
        },
        new[]
        {
            "Patch 26, 26.04.2023",
            "Image import export",
            "Fixed import and export",
            "Prevent message duplication with sender check",
            "Implemented forge version switcher"
        }
    };

    changelog.Reverse();

    int i = 0;
}

<div class="card card-docs flex-row-fluid mb-2">
    <div class="card-body fs-6 py-15 px-10 py-lg-15 px-lg-15 text-gray-700">
        <div class="accordion accordion-flush accordion-icon-toggle" id="kt_accordion">
            @foreach (var prt in changelog)
            {
                i++;
                <div class="accordion-item mb-5">
                    <div class="accordion-header py-3 d-flex" data-bs-toggle="collapse" data-bs-target="#i@(i)" aria-expanded="@(i == 0)">
                        <span class="accordion-icon">
                            <span class="svg-icon svg-icon-3">
                                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                    <rect opacity="0.5" x="18" y="13" width="13" height="2" rx="1" transform="rotate(-180 18 13)" fill="currentColor"></rect>
                                    <path d="M15.4343 12.5657L11.25 16.75C10.8358 17.1642 10.8358 17.8358 11.25 18.25C11.6642 18.6642 12.3358 18.6642 12.75 18.25L18.2929 12.7071C18.6834 12.3166 18.6834 11.6834 18.2929 11.2929L12.75 5.75C12.3358 5.33579 11.6642 5.33579 11.25 5.75C10.8358 6.16421 10.8358 6.83579 11.25 7.25L15.4343 11.4343C15.7467 11.7467 15.7467 12.2533 15.4343 12.5657Z" fill="currentColor"></path>
                                </svg>
                            </span>
                        </span>
                        <h3 class="fs-2 text-gray-800 fw-bold mb-0 ms-4">@prt[0]</h3>
                    </div>

                    <div id="i@(i)" class="fs-6 mt-1 mb-1 py-0 ps-10 @(i == 0 ? "show" : "collapse")" data-bs-parent="#kt_accordion" style="">
                        <div class="accordion-body ps-0 pt-0">
                            <div class="mb-5">
                                @{
                                    var o = prt[1..];
                                }
                                <h3 class="fs-6 fw-bold mb-1">Changes</h3>
                                <ul class="my-0 py-0">
                                    @foreach (var v in o)
                                    {
                                        <li class="py-2">
                                            @v
                                        </li>
                                    }
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            }
        </div>
    </div>
</div>