Skip to content
Snippets Groups Projects
Commit 23f439f7 authored by Tóth Miklós Tibor's avatar Tóth Miklós Tibor :shrug:
Browse files

Fix some nil dereferences

parent f4dc2fce
No related branches found
No related tags found
No related merge requests found
Pipeline #9110 passed
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ .User.SchAcc }} {{ .User.SchAcc }}
</a> </a>
<div class="dropdown-menu {{ if .User.Dark }} bg-dark {{ end }}" style="width: auto; min-width: auto" aria-labelledby="navbarDropdown"> <div class="dropdown-menu {{ if $dark }} bg-dark {{ end }}" style="width: auto; min-width: auto" aria-labelledby="navbarDropdown">
<a class="nav-link" href="/logout" style="padding: 1em; width: auto">Log out</a> <a class="nav-link" href="/logout" style="padding: 1em; width: auto">Log out</a>
</div> </div>
</li> </li>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</nav> </nav>
<div class="container" style="padding: 2em"> <div class="container" style="padding: 2em">
{{ if .User.SchAcc }} {{ if .User }}
<div class="input-group mb-3"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-prepend">
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="langbutton"> <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="langbutton">
...@@ -79,13 +79,13 @@ ...@@ -79,13 +79,13 @@
btn.innerText = lang; btn.innerText = lang;
} }
</script> </script>
<div class="dropdown-menu {{ if .User.Dark }} bg-dark text-white {{ end }}"> <div class="dropdown-menu {{ if $dark }} bg-dark text-white {{ end }}">
{{ range .Langs }} {{ range .Langs }}
<a class="dropdown-item {{ if $.User.Dark }} text-white {{ end }}" onclick="changeLanguage({{ . }})">{{ . }} ({{ .ESpeak }})</a> <a class="dropdown-item {{ if $dark }} text-white {{ end }}" onclick="changeLanguage({{ . }})">{{ . }} ({{ .ESpeak }})</a>
{{ end }} {{ end }}
</div> </div>
</div> </div>
<input id="msg" type="text" class="form-control {{ if .User.Dark }} bg-secondary text-white {{ end }}" aria-label="Vox message"> <input id="msg" type="text" class="form-control {{ if $dark }} bg-secondary text-white {{ end }}" aria-label="Vox message">
<div class="input-group-append"> <div class="input-group-append">
<button class="btn btn-primary" type="button" id="send">Küldés!</button> <button class="btn btn-primary" type="button" id="send">Küldés!</button>
</div> </div>
...@@ -137,8 +137,8 @@ ...@@ -137,8 +137,8 @@
{{ if .Msgs }} {{ if .Msgs }}
<div class="container"> <div class="container">
<div class="card"> <div class="card">
<div class="card-body" {{ if .User.Dark }} style="background: #545b62" {{ end }}> <div class="card-body" {{ if $dark }} style="background: #545b62" {{ end }}>
<table class="table {{ if .User.Dark }} text-white {{ end }}"> <table class="table {{ if $dark }} text-white {{ end }}">
<thead> <thead>
<tr> <tr>
<th scope="row">Idő</th> <th scope="row">Idő</th>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment