3
0
Fork 0

Redesign + Fixes

This commit is contained in:
thomas 2021-06-29 22:05:00 +02:00
parent 7718ed6c32
commit 7fe8056e35
67 changed files with 1898 additions and 2799 deletions

View file

@ -1,135 +1,127 @@
@extends('layouts.profile')
@section('content')
<div class="container-fluid" style="margin-top: 75px">
<div class="row">
<div class="col-xs-12 col-md-4 col-md-offset-2">
<div class="panel panel-theme">
<div class="panel-heading">
<h3 class="panel-title">Change Password</h3>
<div class="wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-4 col-md-offset-2">
@component('components.panel', ['title' => 'Change Password'])
<form method="POST" action="{{ route('change.password') }}" class="col-xs-10 col-xs-offset-1">
@csrf
@if(session('pass_success'))
<div class="alert alert-success" role="alert">
{{ session('pass_success') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@endif
<div class="form-group @error('pass_password') has-error @enderror">
<label for="pass_password" class="text-md-right">{{ __('Current Password:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="pass_password" type="password" class="form-control" placeholder="Current Password" name="password" required autocomplete="off" autofocus>
</div>
@error('pass_password')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('new_password') has-error @enderror">
<label for="new_password" class="text-md-right">{{ __('New Password:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="new_password" type="password" class="form-control" placeholder="New Password" name="new_password" required autocomplete="off" autofocus>
</div>
@error('new_password')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('new_confirm_password') has-error @enderror">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="new_confirm_password" type="password" class="form-control" placeholder="Confirm New Password" name="new_confirm_password" required autocomplete="off" autofocus>
</div>
@error('new_confirm_password')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Change Password') }}</button>
</form>
@endcomponent
</div>
<div class="panel-body">
<form method="POST" action="{{ route('change.password') }}" class="col-xs-10 col-xs-offset-1">
@csrf
@if(session('pass_success'))
<div class="alert alert-success" role="alert">
{{ session('pass_success') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
<div class="col-xs-12 col-md-4">
@component('components.panel', ['title' => 'Change Email'])
<form method="POST" action="{{ route('change.email') }}" class="col-xs-10 col-xs-offset-1">
@csrf
@endif
<div class="form-group @error('pass_password') has-error @enderror">
<label for="pass_password" class="text-md-right">{{ __('Current Password:') }}</label>
@if(session('email_success'))
<div class="alert alert-success" role="alert">
{{ session('email_success') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="pass_password" type="password" class="form-control" placeholder="Current Password" name="password" required autocomplete="off" autofocus>
@endif
<div class="form-group @error('email_password') has-error @enderror">
<label for="email_password" class="text-md-right">{{ __('Current Password:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="email_password" type="password" class="form-control" placeholder="Current Password" name="password" required autocomplete="off" autofocus>
</div>
@error('email_password')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
@error('pass_password')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('new_password') has-error @enderror">
<label for="new_password" class="text-md-right">{{ __('New Password:') }}</label>
<div class="form-group @error('new_email') has-error @enderror">
<label for="new_email" class="text-md-right">{{ __('New Email:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="new_password" type="password" class="form-control" placeholder="New Password" name="new_password" required autocomplete="off" autofocus>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input id="new_email" type="email" class="form-control" placeholder="New Email" name="new_email" required autocomplete="off" autofocus>
</div>
@error('new_email')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
@error('new_password')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('new_confirm_password') has-error @enderror">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="new_confirm_password" type="password" class="form-control" placeholder="Confirm New Password" name="new_confirm_password" required autocomplete="off" autofocus>
<div class="form-group @error('new_confirm_email') has-error @enderror">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input id="new_confirm_email" type="email" class="form-control" placeholder="Confirm New Email" name="new_confirm_email" required autocomplete="off" autofocus>
</div>
@error('new_confirm_email')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
@error('new_confirm_password')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Change Password') }}</button>
</form>
</div>
</div>
</div>
<div class="col-xs-12 col-md-4">
<div class="panel panel-theme">
<div class="panel-heading">
<h3 class="panel-title">Change Email</h3>
</div>
<div class="panel-body">
<form method="POST" action="{{ route('change.email') }}" class="col-xs-10 col-xs-offset-1">
@csrf
@if(session('email_success'))
<div class="alert alert-success" role="alert">
{{ session('email_success') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@endif
<div class="form-group @error('email_password') has-error @enderror">
<label for="email_password" class="text-md-right">{{ __('Current Password:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="email_password" type="password" class="form-control" placeholder="Current Password" name="password" required autocomplete="off" autofocus>
</div>
@error('email_password')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('new_email') has-error @enderror">
<label for="new_email" class="text-md-right">{{ __('New Email:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input id="new_email" type="email" class="form-control" placeholder="New Email" name="new_email" required autocomplete="off" autofocus>
</div>
@error('new_email')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<div class="form-group @error('new_confirm_email') has-error @enderror">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input id="new_confirm_email" type="email" class="form-control" placeholder="Confirm New Email" name="new_confirm_email" required autocomplete="off" autofocus>
</div>
@error('new_confirm_email')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Change Email') }}</button>
</form>
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Change Email') }}</button>
</form>
@endcomponent
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script>
window.onload = function() {
const passInput = document.getElementById('new_confirm_password');
passInput.onpaste = function(e) {
e.preventDefault();
};
<script>
window.onload = () => {
const passInput = document.getElementById('new_confirm_password');
passInput.onpaste = (e) => {
e.preventDefault();
};
const emailInput = document.getElementById('new_confirm_email');
emailInput.onpaste = function(e) {
e.preventDefault();
};
};
</script>
const emailInput = document.getElementById('new_confirm_email');
emailInput.onpaste = (e) => {
e.preventDefault();
};
};
</script>
@endsection

View file

@ -1,46 +1,30 @@
@extends('layouts.profile')
@section('content')
<div class="container-fluid" style="margin-top: 75px">
@if(Auth::user()->hasShows())
@foreach(Auth::user()->getShows() as $show)
<div class="col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
<div class="panel panel-theme">
<div class="panel-heading">
<h3 class="panel-title">{{ $show->title }}</h3>
</div>
<div class="panel-body">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-lg-9 col-md-9 col-sm-9">
<p>{!! $show->description !!}</p>
@php($time = strtotime($show->date))
<p class="bottom"><strong>Date: </strong>{{ date('d-m-Y', $time) }} at {{ date('H:m', $time) }}</p>
<p><strong>Seat: </strong>{{ $show->seat }}</p>
<p><strong>Voucher: </strong>{{ $show->voucher }}</p>
</div>
<div class="hidden-xs col-lg-3 col-md-3 col-sm-3">
<img src="{{ $show->image }}" style="float: right; height: auto; width: 100%; margin: auto" alt="Image">
</div>
<div class="wrapper">
<div class="container-fluid">
<div class="col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
@if(env('SHOWS', false) && Auth::user()->hasShows())
<div class="row card-container">
@foreach(Auth::user()->getShows() as $show)
<div class="col-xs-12 col-md-6">
@component('components.show', ['show' => $show, 'style' => 'style="height: 100%"'])
@slot('body')
@php($time = strtotime($show->date))
<p style="margin: 0"><strong>Date: </strong>{{ date('d-m-Y', $time) }} at {{ date('H:m', $time) }}
<br><strong>Seat: </strong>{{ $show->seat }}
<br><strong>Voucher: </strong>{{ $show->voucher }}</p>
@endslot
@endcomponent
</div>
@endforeach
</div>
</div>
@else
@component('components.panel', ['title' => 'No Shows'])
<p>You have no tickets for shows.</p>
@endcomponent
@endif
</div>
</div>
</div>
@endforeach
@else
<div class="col-lg-6 col-lg-offset-3 col-md-8 col-md-offset-2">
<div class="panel panel-theme">
<div class="panel-heading">
<h3 class="panel-title">No Shows</h3>
</div>
<div class="panel-body">
<div class="container-fluid">
<p>You have no tickets for shows.</p>
</div>
</div>
</div>
</div>
@endif
</div>
@endsection

View file

@ -5,133 +5,126 @@
@endsection
@section('content')
<div class="container-fluid" style="margin-top: 75px">
<div class="row">
<div class="col-xs-12 col-md-4 hidden-xs">
<div class="panel panel-theme">
<div class="panel-heading">
<h3 class="panel-title">Two-Factor Authentication</h3>
</div>
<div class="panel-body">
@if($TFA)
<form method="POST" action="{{ route('2fa.toggle') }}" class="col-xs-10 col-xs-offset-1">
@csrf
<div class="wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-4 hidden-xs">
@component('components.panel', ['title' => 'Two-Factor Authentication'])
@if($TFA)
<form method="POST" action="{{ route('2fa.toggle') }}" class="col-xs-10 col-xs-offset-1">
@csrf
@if(session('success'))
<div class="alert alert-success" role="alert">
{{ session('success') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@if(session('success'))
<div class="alert alert-success" role="alert">
{{ session('success') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@endif
<div class="form-group @error('two_factor') has-error @enderror">
<label for="two_factor" class="text-md-right">{{ __('2FA Code:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="two_factor" type="text" maxlength="6" class="form-control" name="two_factor" required autocomplete="off" autofocus>
</div>
@error('two_factor')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Disable 2FA') }}</button>
</form>
@else
<form method="POST" action="{{ route('2fa.toggle') }}" class="col-xs-10 col-xs-offset-1">
@csrf
@if(session('success'))
<div class="alert alert-success" role="alert">
{{ session('success') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@endif
<div class="text-center">
<img src="{{ $QRCode }}" style="max-width: 250px; max-height: 250px; width: 100%; height: auto">
</div>
<div class="form-group @error('two_factor') has-error @enderror">
<label for="two_factor" class="text-md-right">{{ __('2FA Code:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="two_factor" type="text" maxlength="6" class="form-control" name="two_factor" required autocomplete="off" autofocus>
</div>
@error('two_factor')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Enable 2FA') }}</button>
</form>
@endif
<div class="form-group @error('two_factor') has-error @enderror">
<label for="two_factor" class="text-md-right">{{ __('2FA Code:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="two_factor" type="text" maxlength="6" class="form-control" name="two_factor" required autocomplete="off" autofocus>
</div>
@error('two_factor')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Disable 2FA') }}</button>
</form>
@else
<form method="POST" action="{{ route('2fa.toggle') }}" class="col-xs-10 col-xs-offset-1">
@csrf
@if(session('success'))
<div class="alert alert-success" role="alert">
{{ session('success') }}
<a class="close" data-dismiss="alert" aria-label="close">&times;</a>
</div>
@endif
<div class="text-center">
<img src="{{ $QRCode }}" style="max-width: 250px; max-height: 250px; width: 100%; height: auto">
</div>
<div class="form-group @error('two_factor') has-error @enderror">
<label for="two_factor" class="text-md-right">{{ __('2FA Code:') }}</label>
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="two_factor" type="text" maxlength="6" class="form-control" name="two_factor" required autocomplete="off" autofocus>
</div>
@error('two_factor')
<span class="help-block">{{ $message }}</span>
@enderror
</div>
<button type="submit" class="btn btn-custom" style="width: 100%">{{ __('Enable 2FA') }}</button>
</form>
@endif
@endcomponent
</div>
</div>
</div>
<div class="col-xs-12 col-md-8">
<div class="panel panel-theme">
<div class="panel-heading">
<h3 class="panel-title">Sessions</h3>
</div>
<div class="panel-body">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="ip">IP</th>
<th class="hidden-xs hidden-sm hidden-md">Country</th>
<th class="hidden-xs hidden-sm hidden-md">Browser</th>
<th class="hidden-xs">Last Activity</th>
<th style="width: 50px" class="text-center">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="ip">
<code><i class="fa fa-key"></i> {{ preg_replace('/([0-9a-zA-Z])/', '•', Request::ip()) }}</code>
<code class="hidden"><i class="fa fa-eye-slash"></i> {{ Request::ip() }}</code>
</td>
<td class="hidden-xs hidden-sm hidden-md">{{ geoip(Request::ip())['country'] }}</td>
<td class="hidden-xs hidden-sm hidden-md">{{ $agent->browser() }}</td>
<td class="hidden-xs">{{ date('H:i:s d-m-Y', time()) }}</td>
<td></td>
</tr>
@foreach($sessions as $session)
@php($agent->setUserAgent($session->user_agent))
<tr>
<td>
<code><i class="fa fa-key"></i> {{ preg_replace('/([0-9a-zA-Z])/', '•', $session->ip_address) }}</code>
<code class="hidden"><i class="fa fa-eye-slash"></i> {{ $session->ip_address }}</code>
</td>
<td class="hidden-xs hidden-sm hidden-md">{{ geoip($session->ip_address)['country'] }}</td>
<td class="hidden-xs hidden-sm hidden-md">{{ $agent->browser() }}</td>
<td class="hidden-xs">{{ date('H:i:s d-m-Y', $session->last_activity) }}</td>
<td><a href="{{ route('session.delete', ['id' => $session->id]) }}" class="btn btn-custom"><span class="glyphicon glyphicon-trash"></span></a></td>
</tr>
@endforeach
</tbody>
</table>
<nav style="float: right">
<ul class="pagination">
<li @if($page == 1) class="disabled" @endif>
<a @if($page != 1) href="{{ route('panel.account', ['page' => ($page - 1)]) }}" @endif aria-label="Previous"><span aria-hidden="true">&laquo;</span></a>
</li>
@for($i = 1; $i <= $pages; $i++)
<li @if($i == $page) class="active" @endif>
<a @if($i != $page)href="{{ route('panel.account', ['page' => $i]) }}" @endif><span>{{ $i }}</span></a>
</li>
@endfor
<li @if($page == $pages) class="disabled" @endif>
<a @if($page != $pages) href="{{ route('panel.account', ['page' => ($page + 1)]) }}" @endif aria-label="Next"><span aria-hidden="true">»</span></a>
</li>
</ul>
</nav>
<div class="col-xs-12 col-md-8">
@component('components.panel', ['title' => 'Sessions'])
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="ip">IP</th>
<th class="hidden-xs hidden-sm hidden-md">Country</th>
<th class="hidden-xs hidden-sm hidden-md">Browser</th>
<th class="hidden-xs">Last Activity</th>
<th style="width: 50px" class="text-center">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="ip">
<code><i class="fa fa-key"></i> {{ preg_replace('/([0-9a-zA-Z])/', '•', Request::ip()) }}</code>
<code class="hidden"><i class="fa fa-eye-slash"></i> {{ Request::ip() }}</code>
</td>
<td class="hidden-xs hidden-sm hidden-md">{{ geoip(Request::ip())['country'] }}</td>
<td class="hidden-xs hidden-sm hidden-md">{{ $agent->browser() }}</td>
<td class="hidden-xs">Current Session</td>
<td></td>
</tr>
@foreach($sessions as $session)
@php($agent->setUserAgent($session->user_agent))
<tr>
<td>
<code><i class="fa fa-key"></i> {{ preg_replace('/([0-9a-zA-Z])/', '•', $session->ip_address) }}</code>
<code class="hidden"><i class="fa fa-eye-slash"></i> {{ $session->ip_address }}</code>
</td>
<td class="hidden-xs hidden-sm hidden-md">{{ geoip($session->ip_address)['country'] }}</td>
<td class="hidden-xs hidden-sm hidden-md">{{ $agent->browser() }}</td>
<td class="hidden-xs">{{ date('H:i:s d-m-Y', $session->last_activity) }}</td>
<td><a href="{{ route('session.delete', ['id' => $session->id]) }}" class="btn btn-custom"><span class="glyphicon glyphicon-trash"></span></a></td>
</tr>
@endforeach
</tbody>
</table>
<nav style="float: right">
<ul class="pagination">
<li @if($page == 1) class="disabled" @endif>
<a @if($page != 1) href="{{ route('security', ['page' => ($page - 1)]) }}" @endif aria-label="Previous"><span aria-hidden="true">&laquo;</span></a>
</li>
@for($i = 1; $i <= $pages; $i++)
<li @if($i == $page) class="active" @endif>
<a @if($i != $page)href="{{ route('security', ['page' => $i]) }}" @endif><span>{{ $i }}</span></a>
</li>
@endfor
<li @if($page == $pages) class="disabled" @endif>
<a @if($page != $pages) href="{{ route('security', ['page' => ($page + 1)]) }}" @endif aria-label="Next"><span aria-hidden="true">»</span></a>
</li>
</ul>
</nav>
@endcomponent
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')