feat: ✨ Added "voucher" as store parameter -> opens voucher redeem modal and fill the input
This commit is contained in:
parent
74bdcffe75
commit
035be9f201
|
@ -1,5 +1,6 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
@ -19,7 +20,8 @@
|
|||
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
|
||||
|
||||
{{-- datetimepicker --}}
|
||||
<link rel="stylesheet" href="{{asset('plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css')}}">
|
||||
<link rel="stylesheet"
|
||||
href="{{ asset('plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
|
||||
|
||||
{{-- select2 --}}
|
||||
<link rel="stylesheet" href="{{ asset('plugins/select2/css/select2.min.css') }}">
|
||||
|
@ -31,17 +33,39 @@
|
|||
<link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
|
||||
</noscript>
|
||||
</head>
|
||||
|
||||
<body class="sidebar-mini layout-fixed dark-mode" style="height: auto;">
|
||||
<!-- Scripts -->
|
||||
<script src="{{ asset('js/app.js') }}"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.js"></script>
|
||||
<!-- Summernote -->
|
||||
<script src="{{ asset('plugins/summernote/summernote-bs4.min.js') }}"></script>
|
||||
<!-- select2 -->
|
||||
<script src="{{ asset('plugins/select2/js/select2.min.js') }}"></script>
|
||||
|
||||
<!-- Moment.js -->
|
||||
<script src="{{ asset('plugins/moment/moment.min.js') }}"></script>
|
||||
|
||||
<!-- Datetimepicker -->
|
||||
<script src="{{ asset('plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}"></script>
|
||||
|
||||
<!-- Select2 -->
|
||||
<script src={{ asset('plugins/select2/js/select2.min.js') }}></script>
|
||||
|
||||
<div class="wrapper">
|
||||
<!-- Navbar -->
|
||||
<nav class="main-header sticky-top navbar navbar-expand navbar-dark navbar-light">
|
||||
<!-- Left navbar links -->
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
|
||||
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
|
||||
class="fas fa-bars"></i></a>
|
||||
</li>
|
||||
<li class="nav-item d-none d-sm-inline-block">
|
||||
<a href="{{route('home')}}" class="nav-link"><i class="fas fa-home mr-2"></i>{{__('Home')}}</a>
|
||||
<a href="{{ route('home') }}" class="nav-link"><i
|
||||
class="fas fa-home mr-2"></i>{{ __('Home') }}</a>
|
||||
</li>
|
||||
<li class="nav-item d-none d-sm-inline-block">
|
||||
<a href="{{ env('DISCORD_INVITE_URL') }}" class="nav-link" target="__blank"><i
|
||||
|
@ -50,16 +74,16 @@
|
|||
<!-- Language Selection -->
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" href="#" id="languageDropdown" role="button" data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
<span class="mr-1 d-lg-inline text-gray-600">
|
||||
<small><i class="fa fa-language mr-2"></i></small>{{__("Languages")}}
|
||||
<small><i class="fa fa-language mr-2"></i></small>{{ __('Languages') }}
|
||||
</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="changeLocale">
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
||||
aria-labelledby="changeLocale">
|
||||
<form method="post" action="{{ route('changeLocale') }}" class="nav-item text-center">
|
||||
@csrf
|
||||
@foreach (config("app.available_locales") as $key=>$value)
|
||||
@foreach (config('app.available_locales') as $key => $value)
|
||||
@if (!in_array(strtolower($key), UNSUPPORTED_LANGS))
|
||||
<button class="dropdown-item" name="inputLocale" value="{{ $value }}">
|
||||
{{ $key }}
|
||||
|
@ -86,16 +110,18 @@
|
|||
@endif
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
|
||||
<span
|
||||
class="dropdown-item dropdown-header">{{Auth::user()->unreadNotifications->count()}} {{__('Notifications')}}</span>
|
||||
<span class="dropdown-item dropdown-header">{{ Auth::user()->unreadNotifications->count() }}
|
||||
{{ __('Notifications') }}</span>
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
@foreach(Auth::user()->unreadNotifications->sortBy('created_at')->take(5) as $notification)
|
||||
@foreach (Auth::user()->unreadNotifications->sortBy('created_at')->take(5)
|
||||
as $notification)
|
||||
<a href="{{ route('notifications.show', $notification->id) }}" class="dropdown-item">
|
||||
<span class="d-inline-block text-truncate" style="max-width: 150px;"><i
|
||||
class="fas fa-envelope mr-2"></i>{{ $notification->data['title'] }}</span>
|
||||
<span
|
||||
class="float-right text-muted text-sm">{{$notification->created_at->longAbsoluteDiffForHumans()}} ago</span>
|
||||
class="float-right text-muted text-sm">{{ $notification->created_at->longAbsoluteDiffForHumans() }}
|
||||
ago</span>
|
||||
</a>
|
||||
@endforeach
|
||||
|
||||
|
@ -107,13 +133,13 @@
|
|||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link" href="#" id="userDropdown" role="button" data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
<span class="mr-1 d-lg-inline text-gray-600">
|
||||
<small><i class="fas fa-coins mr-2"></i></small>{{ Auth::user()->credits() }}
|
||||
</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
||||
aria-labelledby="userDropdown">
|
||||
<a class="dropdown-item" href="{{ route('store.index') }}">
|
||||
<i class="fas fa-coins fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
{{ __('Store') }}
|
||||
|
@ -129,15 +155,16 @@
|
|||
|
||||
<li class="nav-item dropdown no-arrow">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
<span class="mr-1 d-lg-inline text-gray-600 small">
|
||||
{{ Auth::user()->name }}
|
||||
<img width="28px" height="28px" class="rounded-circle ml-1" src="{{Auth::user()->getAvatar()}}">
|
||||
<img width="28px" height="28px" class="rounded-circle ml-1"
|
||||
src="{{ Auth::user()->getAvatar() }}">
|
||||
</span>
|
||||
</a>
|
||||
<!-- Dropdown - User Information -->
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
|
||||
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
|
||||
aria-labelledby="userDropdown">
|
||||
<a class="dropdown-item" href="{{ route('profile.index') }}">
|
||||
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
|
||||
{{ __('Profile') }}
|
||||
|
@ -172,7 +199,8 @@
|
|||
<a href="{{ route('home') }}" class="brand-link">
|
||||
<img width="64" height="64"
|
||||
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('icon.png') ? asset('storage/icon.png') : asset('images/bitsec.png') }}"
|
||||
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle" style="opacity: .8">
|
||||
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle"
|
||||
style="opacity: .8">
|
||||
<span class="brand-text font-weight-light">{{ config('app.name', 'Laravel') }}</span>
|
||||
</a>
|
||||
|
||||
|
@ -193,20 +221,18 @@
|
|||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{route('servers.index')}}"
|
||||
class="nav-link @if(Request::routeIs('servers.*')) active @endif">
|
||||
<a href="{{ route('servers.index') }}" class="nav-link @if (Request::routeIs('servers.*')) active @endif">
|
||||
<i class="nav-icon fa fa-server"></i>
|
||||
<p>{{ __('Servers') }}
|
||||
<span
|
||||
class="badge badge-info right">{{Auth::user()->servers()->count()}} / {{Auth::user()->server_limit}}</span>
|
||||
<span class="badge badge-info right">{{ Auth::user()->servers()->count() }} /
|
||||
{{ Auth::user()->server_limit }}</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@if(env('PAYPAL_SECRET') && env('PAYPAL_CLIENT_ID') || env('APP_ENV', 'local') == 'local')
|
||||
@if ((env('PAYPAL_SECRET') && env('PAYPAL_CLIENT_ID')) || env('APP_ENV', 'local') == 'local')
|
||||
<li class="nav-item">
|
||||
<a href="{{route('store.index')}}"
|
||||
class="nav-link @if(Request::routeIs('store.*') || Request::routeIs('checkout')) active @endif">
|
||||
<a href="{{ route('store.index') }}" class="nav-link @if (Request::routeIs('store.*') || Request::routeIs('checkout')) active @endif">
|
||||
<i class="nav-icon fa fa-coins"></i>
|
||||
<p>{{ __('Store') }}</p>
|
||||
</a>
|
||||
|
@ -242,8 +268,7 @@
|
|||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{route('admin.api.index')}}"
|
||||
class="nav-link @if(Request::routeIs('admin.api.*')) active @endif">
|
||||
<a href="{{ route('admin.api.index') }}" class="nav-link @if (Request::routeIs('admin.api.*')) active @endif">
|
||||
<i class="nav-icon fa fa-gamepad"></i>
|
||||
<p>{{ __('Application API') }}</p>
|
||||
</a>
|
||||
|
@ -252,8 +277,7 @@
|
|||
<li class="nav-header">{{ __('Management') }}</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{{route('admin.users.index')}}"
|
||||
class="nav-link @if(Request::routeIs('admin.users.*')) active @endif">
|
||||
<a href="{{ route('admin.users.index') }}" class="nav-link @if (Request::routeIs('admin.users.*')) active @endif">
|
||||
<i class="nav-icon fas fa-users"></i>
|
||||
<p>{{ __('Users') }}</p>
|
||||
</a>
|
||||
|
@ -327,7 +351,8 @@
|
|||
class="nav-link @if (Request::routeIs('admin.payments.*')) active @endif">
|
||||
<i class="nav-icon fas fa-money-bill-wave"></i>
|
||||
<p>{{ __('Payments') }}
|
||||
<span class="badge badge-success right">{{\App\Models\Payment::count()}}</span>
|
||||
<span
|
||||
class="badge badge-success right">{{ \App\Models\Payment::count() }}</span>
|
||||
</p>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -371,7 +396,8 @@
|
|||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<footer class="main-footer">
|
||||
<strong>Copyright © 2021-{{date('Y')}} <a href="{{url('/')}}">{{env('APP_NAME' , 'Laravel')}}</a>.</strong>
|
||||
<strong>Copyright © 2021-{{ date('Y') }} <a
|
||||
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
|
||||
All rights
|
||||
reserved. Powered by <a href="https://controlpanel.gg">ControlPanel</a>. Version
|
||||
<b>{{ config('app')['version'] }}</b>
|
||||
|
@ -385,28 +411,6 @@
|
|||
</div>
|
||||
<!-- ./wrapper -->
|
||||
|
||||
<!-- Scripts -->
|
||||
{{--<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>--}}
|
||||
{{--<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>--}}
|
||||
{{--<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>--}}
|
||||
{{--<script src="{{ asset('js/adminlte.min.js') }}"></script>--}}
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
|
||||
<script src="{{asset('js/app.js')}}"></script>
|
||||
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.js"></script>
|
||||
<!-- Summernote -->
|
||||
<script src="{{asset('plugins/summernote/summernote-bs4.min.js')}}"></script>
|
||||
<!-- select2 -->
|
||||
<script src="{{asset('plugins/select2/js/select2.min.js')}}"></script>
|
||||
|
||||
<!-- Moment.js -->
|
||||
<script src="{{asset('plugins/moment/moment.min.js')}}"></script>
|
||||
|
||||
<!-- Datetimepicker -->
|
||||
<script src="{{asset('plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js')}}"></script>
|
||||
|
||||
<!-- Select2 -->
|
||||
<script src={{asset('plugins/select2/js/select2.min.js')}}>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('[data-toggle="popover"]').popover();
|
||||
|
@ -445,4 +449,5 @@
|
|||
@endif
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -81,4 +81,23 @@
|
|||
</section>
|
||||
<!-- END CONTENT -->
|
||||
|
||||
<script>
|
||||
const getUrlParameter = (param) => {
|
||||
const queryString = window.location.search;
|
||||
const urlParams = new URLSearchParams(queryString);
|
||||
return urlParams.get(param);
|
||||
}
|
||||
|
||||
const voucherCode = getUrlParameter('voucher');
|
||||
//if voucherCode not empty, open the modal and fill the input
|
||||
if (voucherCode) {
|
||||
$(function() {
|
||||
$('#redeemVoucherModal').modal('show');
|
||||
$('#redeemVoucherCode').val(voucherCode);
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
Loading…
Reference in a new issue