|
@@ -105,7 +105,10 @@
|
|
<div class="mt-1">
|
|
<div class="mt-1">
|
|
<span class="badge badge-success"><i
|
|
<span class="badge badge-success"><i
|
|
class="fa fa-user-check mr-2"></i>
|
|
class="fa fa-user-check mr-2"></i>
|
|
- {{_("Referral URL")}} : {{route("register")}}?ref={{$user->referral_code}}</span>
|
|
|
|
|
|
+ {{_("Referral URL")}} :
|
|
|
|
+ <span onclick="onClickCopy()" id="RefLink" style="cursor: pointer;">
|
|
|
|
+ {{route("register")}}?ref={{$user->referral_code}}</span>
|
|
|
|
+ </span>
|
|
@else
|
|
@else
|
|
<span class="badge badge-warning"><i
|
|
<span class="badge badge-warning"><i
|
|
class="fa fa-user-check mr-2"></i>
|
|
class="fa fa-user-check mr-2"></i>
|
|
@@ -115,9 +118,8 @@
|
|
@endif
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-
|
|
|
|
<div class="text-center text-sm-right"><span
|
|
<div class="text-center text-sm-right"><span
|
|
- class="badge badge-secondary">{{ $user->role }}</span>
|
|
|
|
|
|
+ class="badge {{$badgeColor}}">{{ $user->role }}</span>
|
|
<div class="text-muted">
|
|
<div class="text-muted">
|
|
<small>{{ $user->created_at->isoFormat('LL') }}</small>
|
|
<small>{{ $user->created_at->isoFormat('LL') }}</small>
|
|
</div>
|
|
</div>
|
|
@@ -304,5 +306,30 @@
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
<!-- END CONTENT -->
|
|
<!-- END CONTENT -->
|
|
-
|
|
|
|
|
|
+ <script>
|
|
|
|
+ function onClickCopy() {
|
|
|
|
+ let textToCopy = document.getElementById('RefLink').innerText;
|
|
|
|
+ if(navigator.clipboard) {
|
|
|
|
+ navigator.clipboard.writeText(textToCopy).then(() => {
|
|
|
|
+ Swal.fire({
|
|
|
|
+ icon: 'success',
|
|
|
|
+ title: '{{ __("URL copied to clipboard")}}',
|
|
|
|
+ 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>
|
|
@endsection
|
|
@endsection
|
|
|
|
+
|