Add API Key visual protection (#851)

Add API Key visual protection
This commit is contained in:
vgpastor
2020-10-03 17:13:28 +02:00
committed by GitHub
parent 95a40d3565
commit 5363e4aa0f
5 changed files with 18 additions and 1 deletions

View File

@@ -114,7 +114,7 @@
</tr>
<tr>
<td>@lang('profile.apikey')&nbsp;&nbsp;<span class="description">(@lang('profile.dontshare'))</span></td>
<td>{{ $user->api_key }}</td>
<td><span id="apiKey_show" style="display: none">{{ $user->api_key }} <i class="fas fa-eye-slash" onclick="apiKeyHide()"></i></span><span id="apiKey_hide">@lang('profile.apikey-show') <i class="fas fa-eye" onclick="apiKeyShow()"></i></span></td>
</tr>
<tr>
<td>@lang('common.timezone')</td>
@@ -145,3 +145,16 @@
</div>
</div>
@endsection
@section('scripts')
<script>
function apiKeyShow(){
document.getElementById("apiKey_show").style = "display:block";
document.getElementById("apiKey_hide").style = "display:none";
}
function apiKeyHide(){
document.getElementById("apiKey_show").style = "display:none";
document.getElementById("apiKey_hide").style = "display:block";
}
</script>
@endsection