<commit_before>﻿<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/Styles/site.css" rel="stylesheet" type="text/css" />
    <title>Games</title>
    @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic>
        <script>
            var checked = false;
            function reloadPage(checked)
            {
                if (checked == true) {
                    localStorage.setItem("Filter", true);
                }
                else {
                    localStorage.setItem("Filter", false);
                }
                location.reload();
            }

            window.onload = function SetCheckbox()
            {
                checked = localStorage.getItem("Filter");
                var cb = document.getElementById('cbfilter');
                if (checked == "true") {
                    cb.checked = true;
                    var tab = document.getElementById('tabAllGames');
                    tab.hidden = true;
                }
                else {
                    var tab = document.getElementById('tabMyGames');
                    tab.hidden = true;
                }
            }

        </script>
</head>
<body>
    <div>
        @if (@Html.IsAuthenticated)
        {
            <div>Bereits eingelogt als @Html.CurrentUser.UserName</div>
            @*<div><br />email: @Model.Email</div>*@
        }
        else
        {
            <div>Bitte einloggen</div>
        }
    </div>
    <div>
        Games here<br />

        all Games: <br />
        <div id="checkbox-container">
            <input type="checkbox" id="cbfilter" name="cbFilter" onclick="reloadPage(this.checked)" />
            <label for="GamesFilter">Show my games only</label>
        </div>
        <table border="1" id="tabMyGames">
            @foreach (var item in Model.myGames)
            {

                <tr>
                    <td width=0%>
                        @item.Id
                    </td>
                    <td width=30%>
                        @item.Name
                    </td>
                    <td width=70%>
                        @item.Description
                    </td>
                </tr>
            }<commit_msg>checkboxhandling vereinfacht<commit_after>﻿<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/Styles/site.css" rel="stylesheet" type="text/css" />
    <title>Games</title>
    @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<dynamic>
        <script>
            function SetTableVisibility()
            {
                var cb = document.getElementById('cbfilter');
                if (cb.checked == true) {
                    var tabAll = document.getElementById('tabMyGames');
                    tabAll.hidden = false;
                    var tabMy = document.getElementById('tabAllGames');
                    tabMy.hidden = true;
                }
                else {
                    var tabAll = document.getElementById('tabMyGames');
                    tabAll.hidden = true;
                    var tabMy = document.getElementById('tabAllGames');
                    tabMy.hidden = false;
                }
            }

        </script>
</head>
<body>
    <div>
        @if (@Html.IsAuthenticated)
        {
            <div>Bereits eingelogt als @Html.CurrentUser.UserName</div>
            @*<div><br />email: @Model.Email</div>*@
        }
        else
        {
            <div>Bitte einloggen</div>
        }
    </div>
    <div>
        Games here<br />

        all Games: <br />
        <div id="checkbox-container">
            <input type="checkbox" id="cbfilter" name="cbFilter" onclick="SetTableVisibility()" />
            <label for="GamesFilter">Show my games only</label>
        </div>
        <table border="1" id="tabMyGames" hidden="hidden">
            @foreach (var item in Model.myGames)
            {

                <tr>
                    <td width=0%>
                        @item.Id
                    </td>
                    <td width=30%>
                        @item.Name
                    </td>
                    <td width=70%>
                        @item.Description
                    </td>
                </tr>
            }
{'fraction_non_alphanumeric': 0.12337962962962963, 'fraction_numerical': 0.002777777777777778, 'mean_word_length': 1.2068437180796732, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4981423', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1139, 'n_words': 215}