2021-06-05 09:26:32 +00:00
|
|
|
|
@extends('layouts.main')
|
|
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
<!-- CONTENT HEADER -->
|
|
|
|
|
<section class="content-header">
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
<div class="row mb-2">
|
|
|
|
|
<div class="col-sm-6">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<h1>{{ __('Dashboard') }}</h1>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="col-sm-6">
|
|
|
|
|
<ol class="breadcrumb float-sm-right">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<li class="breadcrumb-item"><a class="text-muted" href="">{{ __('Dashboard') }}</a></li>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</ol>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<!-- END CONTENT HEADER -->
|
|
|
|
|
|
2023-04-30 00:22:59 +00:00
|
|
|
|
@if (!file_exists(base_path() . '/install.lock') && Auth::User()->hasRole("Admin"))
|
2022-01-24 11:39:01 +00:00
|
|
|
|
<div class="callout callout-danger">
|
|
|
|
|
<h4>{{ __('The installer is not locked!') }}</h4>
|
2023-02-03 16:38:03 +00:00
|
|
|
|
<p>{{ __('please create a file called "install.lock" in your dashboard Root directory. Otherwise no settings will be loaded!') }}
|
|
|
|
|
</p>
|
|
|
|
|
<a href="/install?step=7"><button class="btn btn-outline-danger">{{ __('or click here') }}</button></a>
|
2022-01-25 06:29:48 +00:00
|
|
|
|
|
2022-01-24 11:39:01 +00:00
|
|
|
|
</div>
|
|
|
|
|
@endif
|
2023-01-10 18:45:19 +00:00
|
|
|
|
|
2023-02-03 16:38:03 +00:00
|
|
|
|
@if ($general_settings->alert_enabled && !empty($general_settings->alert_message))
|
|
|
|
|
<div class="alert mt-4 alert-{{ $general_settings->alert_type }}" role="alert">
|
|
|
|
|
{!! $general_settings->alert_message !!}
|
2023-01-10 18:45:19 +00:00
|
|
|
|
</div>
|
|
|
|
|
@endif
|
2021-06-05 09:26:32 +00:00
|
|
|
|
<!-- MAIN CONTENT -->
|
|
|
|
|
<section class="content">
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-12 col-sm-6 col-md-3">
|
|
|
|
|
<div class="info-box">
|
|
|
|
|
<span class="info-box-icon bg-info elevation-1"><i class="fas fa-server"></i></span>
|
|
|
|
|
|
|
|
|
|
<div class="info-box-content">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<span class="info-box-text">{{ __('Servers') }}</span>
|
|
|
|
|
<span class="info-box-number">{{ Auth::user()->servers()->count() }}</span>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box-content -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.col -->
|
|
|
|
|
<div class="col-12 col-sm-6 col-md-3">
|
|
|
|
|
<div class="info-box mb-3">
|
2021-09-22 16:07:19 +00:00
|
|
|
|
<span class="info-box-icon bg-secondary elevation-1"><i class="fas fa-coins"></i></span>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
|
|
|
|
|
<div class="info-box-content">
|
2023-02-03 16:38:03 +00:00
|
|
|
|
<span class="info-box-text">{{ $general_settings->credits_display_name }}</span>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<span class="info-box-number">{{ Auth::user()->Credits() }}</span>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box-content -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.col -->
|
|
|
|
|
|
|
|
|
|
<!-- fix for small devices only -->
|
|
|
|
|
<div class="clearfix hidden-md-up"></div>
|
|
|
|
|
|
|
|
|
|
<div class="col-12 col-sm-6 col-md-3">
|
|
|
|
|
<div class="info-box mb-3">
|
|
|
|
|
<span class="info-box-icon bg-warning elevation-1"><i class="fas fa-chart-line"></i></span>
|
|
|
|
|
|
|
|
|
|
<div class="info-box-content">
|
2023-02-03 16:38:03 +00:00
|
|
|
|
<span class="info-box-text">{{ $general_settings->credits_display_name }}
|
|
|
|
|
{{ __('Usage') }}</span>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<span class="info-box-number">{{ number_format($usage, 2, '.', '') }}
|
|
|
|
|
<sup>{{ __('per month') }}</sup></span>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box-content -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.info-box -->
|
|
|
|
|
</div>
|
|
|
|
|
|
2021-09-27 16:42:55 +00:00
|
|
|
|
<!-- /.col -->
|
2023-02-03 16:38:03 +00:00
|
|
|
|
@if ($credits > 0.01 && $usage > 0)
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<div class="col-12 col-sm-6 col-md-3">
|
2021-10-26 14:53:53 +00:00
|
|
|
|
<div class="info-box mb-3">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<span class="info-box-icon {{ $bg }} elevation-1">
|
|
|
|
|
<i class="fas fa-hourglass-half"></i></span>
|
2021-10-26 14:53:53 +00:00
|
|
|
|
<div class="info-box-content">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<span
|
2023-02-03 16:38:03 +00:00
|
|
|
|
class="info-box-text">{{ __('Out of Credits in', ['credits' => $general_settings->credits_display_name]) }}
|
2021-12-28 19:05:03 +00:00
|
|
|
|
</span>
|
|
|
|
|
<span class="info-box-number">{{ $boxText }}<sup>{{ $unit }}</sup></span>
|
2021-10-26 14:53:53 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<!-- /.info-box -->
|
2021-10-26 14:53:53 +00:00
|
|
|
|
@endif
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<!-- /.col -->
|
2021-06-05 09:26:32 +00:00
|
|
|
|
|
2021-12-28 19:05:03 +00:00
|
|
|
|
</div>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
|
2021-09-27 16:42:55 +00:00
|
|
|
|
|
2021-10-26 14:53:53 +00:00
|
|
|
|
|
2021-12-28 19:05:03 +00:00
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-6">
|
2023-02-03 16:38:03 +00:00
|
|
|
|
@if ($website_settings->motd_enabled)
|
2023-01-12 14:43:24 +00:00
|
|
|
|
<div class="card card-default">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<h3 class="card-title">
|
|
|
|
|
<i class="fas fa-home mr-2"></i>
|
2023-01-12 14:51:58 +00:00
|
|
|
|
{{ config('app.name', 'MOTD') }} - MOTD
|
2023-01-12 14:43:24 +00:00
|
|
|
|
</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-header -->
|
|
|
|
|
<div class="card-body">
|
2023-02-03 16:38:03 +00:00
|
|
|
|
{!! $website_settings->motd_message !!}
|
2023-01-12 14:43:24 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-body -->
|
|
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
<!-- /.card -->
|
2023-02-03 16:38:03 +00:00
|
|
|
|
@if ($website_settings->useful_links_enabled)
|
|
|
|
|
<div class="card card-default">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<h3 class="card-title">
|
|
|
|
|
<i class="fas fa-link mr-2"></i>
|
|
|
|
|
{{ __('Useful Links') }}
|
|
|
|
|
</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-header -->
|
|
|
|
|
<div class="card-body">
|
2023-04-29 22:39:57 +00:00
|
|
|
|
@foreach ($useful_links_dashboard as $useful_link)
|
2023-02-03 16:38:03 +00:00
|
|
|
|
<div class="alert alert-dismissible">
|
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
|
|
|
<h5>
|
|
|
|
|
<a class="alert-link text-decoration-none" target="__blank"
|
2023-04-29 22:39:57 +00:00
|
|
|
|
href="{{ $useful_link->link }}">
|
2023-02-03 16:38:03 +00:00
|
|
|
|
<i class="{{ $useful_link->icon }} mr-2"></i>{{ $useful_link->title }}
|
|
|
|
|
</a>
|
|
|
|
|
</h5>
|
|
|
|
|
{!! $useful_link->description !!}
|
|
|
|
|
</div>
|
|
|
|
|
@endforeach
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-body -->
|
2021-12-28 19:05:03 +00:00
|
|
|
|
</div>
|
2023-05-08 12:48:07 +00:00
|
|
|
|
@endif
|
2021-12-28 19:05:03 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
2023-03-02 15:00:06 +00:00
|
|
|
|
<div class="col-md-6">
|
2021-12-28 19:05:03 +00:00
|
|
|
|
<div class="card card-default">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<h3 class="card-title">
|
2023-03-02 15:00:06 +00:00
|
|
|
|
<i class="fas fa-history mr-2"></i>
|
|
|
|
|
{{ __('Activity Logs') }}
|
2021-12-28 19:05:03 +00:00
|
|
|
|
</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-header -->
|
|
|
|
|
<div class="card-body py-0 pb-2">
|
2023-03-02 15:00:06 +00:00
|
|
|
|
<ul class="list-group list-group-flush">
|
|
|
|
|
@foreach (Auth::user()->actions()->take(8)->orderBy('created_at', 'desc')->get() as $log)
|
|
|
|
|
<li class="list-group-item d-flex justify-content-between text-muted">
|
|
|
|
|
<span>
|
|
|
|
|
@if (str_starts_with($log->description, 'created'))
|
|
|
|
|
<small><i class="fas text-success fa-plus mr-2"></i></small>
|
|
|
|
|
@elseif(str_starts_with($log->description, 'redeemed'))
|
|
|
|
|
<small><i class="fas text-success fa-money-check-alt mr-2"></i></small>
|
|
|
|
|
@elseif(str_starts_with($log->description, 'deleted'))
|
|
|
|
|
<small><i class="fas text-danger fa-times mr-2"></i></small>
|
|
|
|
|
@elseif(str_starts_with($log->description, 'gained'))
|
|
|
|
|
<small><i class="fas text-success fa-money-bill mr-2"></i></small>
|
|
|
|
|
@elseif(str_starts_with($log->description, 'updated'))
|
|
|
|
|
<small><i class="fas text-info fa-pen mr-2"></i></small>
|
|
|
|
|
@endif
|
|
|
|
|
{{ explode('\\', $log->subject_type)[2] }}
|
|
|
|
|
{{ ucfirst($log->description) }}
|
2023-02-03 16:38:03 +00:00
|
|
|
|
</span>
|
2023-03-02 15:00:06 +00:00
|
|
|
|
<small>
|
|
|
|
|
{{ $log->created_at->diffForHumans() }}
|
|
|
|
|
</small>
|
|
|
|
|
</li>
|
|
|
|
|
@endforeach
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-body -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card -->
|
|
|
|
|
@if ($referral_settings->enabled)
|
|
|
|
|
<!--PartnerDiscount::getDiscount()--->
|
|
|
|
|
<div class="card card-default">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<h3 class="card-title">
|
|
|
|
|
<i class="fas fa-handshake mr-2"></i>
|
|
|
|
|
{{ __('Partner program') }}
|
|
|
|
|
</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-header -->
|
|
|
|
|
<div class="card-body py-0 pb-2">
|
2023-05-07 16:57:57 +00:00
|
|
|
|
@if (Auth::user()->can("user.referral"))
|
2023-03-02 15:00:06 +00:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="mt-3 col-md-8">
|
|
|
|
|
<span class="badge badge-success" style="font-size: 14px">
|
|
|
|
|
<i class="fa fa-user-check mr-2"></i>
|
|
|
|
|
{{ __('Your referral URL') }}:
|
|
|
|
|
<span onmouseover="hoverIn()" onmouseout="hoverOut()" onclick="onClickCopy()"
|
|
|
|
|
id="RefLink" style="cursor: pointer;">
|
|
|
|
|
{{ __('Click to copy') }}
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mt-3 col-md-4">
|
|
|
|
|
<span class="badge badge-info"
|
|
|
|
|
style="font-size: 14px">{{ __('Number of referred users:') }}
|
|
|
|
|
{{ $numberOfReferrals }}</span>
|
|
|
|
|
</div>
|
2023-02-03 16:38:03 +00:00
|
|
|
|
</div>
|
2023-03-02 15:00:06 +00:00
|
|
|
|
@if ($partnerDiscount)
|
|
|
|
|
<hr
|
|
|
|
|
style="width: 100%; height:1px; border-width:0; background-color:#6c757d; margin-bottom: 0px">
|
|
|
|
|
<table class="table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>{{ __('Your discount') }}</th>
|
|
|
|
|
<th>{{ __('Discount for your new users') }}</th>
|
|
|
|
|
<th>{{ __('Reward per registered user') }}</th>
|
|
|
|
|
<th>{{ __('New user payment commision') }}</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{{ $partnerDiscount->partner_discount }}%</td>
|
|
|
|
|
<td>{{ $partnerDiscount->registered_user_discount }}%</td>
|
|
|
|
|
<td>{{ $referral_settings->reward }}
|
|
|
|
|
{{ $general_settings->credits_display_name }}</td>
|
|
|
|
|
<td>{{ $partnerDiscount->referral_system_commission == -1 ? $referral_settings->percentage : $partnerDiscount->referral_system_commission }}%
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<hr
|
|
|
|
|
style="width: 100%; height:1px; border-width:0; background-color:#6c757d; margin-top: 0px">
|
|
|
|
|
@else
|
|
|
|
|
<hr
|
|
|
|
|
style="width: 100%; height:1px; border-width:0; background-color:#6c757d; margin-bottom: 0px">
|
|
|
|
|
<table class="table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2023-05-07 16:57:57 +00:00
|
|
|
|
@if(in_array($referral_settings->mode, ["Commission","Both"]))<th>{{ __('Reward per registered user') }}</th> @endif
|
|
|
|
|
@if(in_array($referral_settings->mode, ["Sign-Up","Both"]))<th>{{ __('New user payment commision') }}</th> @endif
|
2023-03-02 15:00:06 +00:00
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
2023-05-07 16:57:57 +00:00
|
|
|
|
@if(in_array($referral_settings->mode, ["Commission","Both"]))<td>{{ $referral_settings->reward }} {{ $general_settings->credits_display_name }}</td> @endif
|
|
|
|
|
@if(in_array($referral_settings->mode, ["Sign-Up","Both"]))<td>{{ $referral_settings->percentage }}%</td> @endif
|
2023-03-02 15:00:06 +00:00
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<hr
|
|
|
|
|
style="width: 100%; height:1px; border-width:0; background-color:#6c757d; margin-top: 0px">
|
|
|
|
|
@endif
|
2022-10-18 15:35:10 +00:00
|
|
|
|
@else
|
2023-03-02 15:00:06 +00:00
|
|
|
|
<span class="badge badge-warning"><i class="fa fa-user-check mr-2"></i>
|
|
|
|
|
{{ __('Make a purchase to reveal your referral-URL') }}</span>
|
2022-10-18 15:35:10 +00:00
|
|
|
|
@endif
|
2023-03-02 15:00:06 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- /.card-body -->
|
2022-10-18 15:35:10 +00:00
|
|
|
|
</div>
|
2023-03-02 15:00:06 +00:00
|
|
|
|
@endif
|
|
|
|
|
<!-- /.card -->
|
|
|
|
|
</div>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<!-- END CONTENT -->
|
2022-10-18 15:35:10 +00:00
|
|
|
|
<script>
|
|
|
|
|
var originalText = document.getElementById('RefLink').innerText;
|
2023-02-03 16:38:03 +00:00
|
|
|
|
var link = "<?php echo route('register') . '?ref=' . Auth::user()->referral_code; ?>";
|
2022-10-18 15:35:10 +00:00
|
|
|
|
var timeoutID;
|
2023-02-03 16:38:03 +00:00
|
|
|
|
|
2022-10-18 15:35:10 +00:00
|
|
|
|
function hoverIn() {
|
|
|
|
|
document.getElementById('RefLink').innerText = link;
|
|
|
|
|
timeoutID = setTimeout(function() {
|
|
|
|
|
document.getElementById('RefLink').innerText = originalText;
|
|
|
|
|
}, 2000);
|
|
|
|
|
}
|
2023-02-03 16:38:03 +00:00
|
|
|
|
|
2022-10-18 15:35:10 +00:00
|
|
|
|
function hoverOut() {
|
|
|
|
|
document.getElementById('RefLink').innerText = originalText;
|
|
|
|
|
clearTimeout(timeoutID);
|
|
|
|
|
}
|
2023-02-03 16:38:03 +00:00
|
|
|
|
|
2022-10-18 15:35:10 +00:00
|
|
|
|
function onClickCopy() {
|
2023-02-03 16:38:03 +00:00
|
|
|
|
if (navigator.clipboard) {
|
2022-10-18 15:35:10 +00:00
|
|
|
|
navigator.clipboard.writeText(link).then(() => {
|
|
|
|
|
Swal.fire({
|
|
|
|
|
icon: 'success',
|
2023-02-03 16:38:03 +00:00
|
|
|
|
title: '{{ __('URL copied to clipboard') }}',
|
2022-10-18 15:35:10 +00:00
|
|
|
|
position: 'top-middle',
|
|
|
|
|
showConfirmButton: false,
|
|
|
|
|
background: '#343a40',
|
|
|
|
|
toast: false,
|
|
|
|
|
timer: 1000,
|
|
|
|
|
timerProgressBar: true,
|
|
|
|
|
didOpen: (toast) => {
|
|
|
|
|
toast.addEventListener('mouseenter', Swal.stopTimer)
|
|
|
|
|
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
console.log('Browser Not compatible')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
2021-06-05 09:26:32 +00:00
|
|
|
|
@endsection
|