mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-02-15 03:20:52 +01:00
Update display and styling
This commit is contained in:
parent
3d532ee098
commit
dd9491aa7d
@ -19,6 +19,18 @@ class UsersTable extends DataTableComponent
|
||||
$this->setDefaultSort('created_at', 'asc');
|
||||
$this->setPerPageAccepted([50, 100, 250, 500, 1000, -1]);
|
||||
$this->setColumnSelectEnabled();
|
||||
|
||||
$attributes = [
|
||||
'default' => false,
|
||||
'default-colors' => true,
|
||||
'default-styling' => false,
|
||||
];
|
||||
|
||||
$this->setTableAttributes(['class' => 'table table-striped']);
|
||||
$this->setTrAttributes(fn($row, $index) => $attributes);
|
||||
$this->setTheadAttributes($attributes);
|
||||
$this->setTbodyAttributes($attributes);
|
||||
$this->setTrAttributes(fn($row, $index) => $attributes);
|
||||
}
|
||||
|
||||
public function rendered()
|
||||
@ -43,7 +55,7 @@ class UsersTable extends DataTableComponent
|
||||
->searchable()
|
||||
->format(function ($value, $row, Column $column) {
|
||||
if (!$row->littlelink_name == NULL) {
|
||||
return "<a href='" . url('') . "/@" . htmlspecialchars($row->littlelink_name) . "' target='_blank' class='text-warning'><i class='bi bi-box-arrow-up-right'></i> " . htmlspecialchars($row->littlelink_name) . " </a>";
|
||||
return "<a href='" . url('') . "/@" . htmlspecialchars($row->littlelink_name) . "' target='_blank' class='text-info'><i class='bi bi-box-arrow-up-right'></i> " . htmlspecialchars($row->littlelink_name) . " </a>";
|
||||
} else {
|
||||
return 'N/A';
|
||||
}
|
||||
@ -63,31 +75,27 @@ class UsersTable extends DataTableComponent
|
||||
return $clicksSum;
|
||||
}),
|
||||
Column::make(__('messages.E-Mail'), "email_verified_at")
|
||||
->hideIf(env('REGISTER_AUTH') === 'auth')
|
||||
->sortable()
|
||||
->format(function ($value, $row, Column $column) {
|
||||
if (env('REGISTER_AUTH') !== 'auth') {
|
||||
if ($row->role == 'admin' && $row->email_verified_at != '') {
|
||||
return '<div class="text-center">-</div>';
|
||||
} else {
|
||||
if($row->email_verified_at == ''){
|
||||
$verifyLinkBool = 'true';
|
||||
} else {
|
||||
$verifyLinkBool = 'false';
|
||||
}
|
||||
$verifyLink = route('verifyUser', [
|
||||
'verify' => $verifyLinkBool,
|
||||
'id' => $row->id
|
||||
]);
|
||||
if ($row->email_verified_at == '') {
|
||||
return '<div class="text-center"><a style="cursor:pointer" data-id="'.$verifyLink.'" class="user-email text-danger"><span class="badge bg-danger">' . __('messages.Pending') . '</span></a></div>';
|
||||
} else {
|
||||
return '<div class="text-center"><a style="cursor:pointer" data-id="'.$verifyLink.'" class="user-email text-danger"><span class="badge bg-success">' . __('messages.Verified') . '</span></a></div>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($row->role == 'admin' && $row->email_verified_at != '') {
|
||||
return '<div class="text-center">-</div>';
|
||||
} else {
|
||||
if($row->email_verified_at == ''){
|
||||
$verifyLinkBool = 'true';
|
||||
} else {
|
||||
$verifyLinkBool = 'false';
|
||||
}
|
||||
$verifyLink = route('verifyUser', [
|
||||
'verify' => $verifyLinkBool,
|
||||
'id' => $row->id
|
||||
]);
|
||||
if ($row->email_verified_at == '') {
|
||||
return '<div class="text-center"><a style="cursor:pointer" data-id="'.$verifyLink.'" class="user-email text-danger"><span class="badge bg-danger">' . __('messages.Pending') . '</span></a></div>';
|
||||
} else {
|
||||
return '<div class="text-center"><a style="cursor:pointer" data-id="'.$verifyLink.'" class="user-email text-danger"><span class="badge bg-success">' . __('messages.Verified') . '</span></a></div>';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
})->html(),
|
||||
Column::make(__('messages.Status'), "block")
|
||||
->sortable()
|
||||
|
@ -12,7 +12,6 @@
|
||||
<div class="conatiner-fluid content-inner mt-n5 py-0">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="card rounded">
|
||||
<div class="card-body">
|
||||
@ -33,11 +32,11 @@
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
height: 1.5rem;
|
||||
height: 1.2rem;
|
||||
background-color: #8a92a6;
|
||||
background: linear-gradient(90deg, var(--spinnerColor) 25%, #b8bcc5 50%, var(--spinnerColor) 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: shimmer 3s infinite linear;
|
||||
animation: shimmer 2s infinite linear;
|
||||
}
|
||||
|
||||
@keyframes shimmer {
|
||||
@ -59,7 +58,7 @@
|
||||
<div class="d-md-flex">
|
||||
<div class="">
|
||||
<div class="dropdown d-block d-md-inline">
|
||||
<button disabled="" class="btn dropdown-toggle d-block w-100 d-md-inline" type="button">
|
||||
<button disabled="" style="border:none" class="btn dropdown-toggle d-block w-100 d-md-inline" type="button">
|
||||
Columns
|
||||
</button>
|
||||
</div>
|
||||
@ -82,13 +81,13 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for ($ii = 0; $ii < 2; $ii++)
|
||||
<tr class="bg-light rappasoft-striped-row">
|
||||
@for ($ii = 0; $ii < 4; $ii++)
|
||||
<tr>
|
||||
@for ($i = 0; $i < 5; $i++)
|
||||
<td><div class="placeholder"></div></td>
|
||||
@endfor
|
||||
</tr>
|
||||
<tr class="bg-white rappasoft-striped-row">
|
||||
<tr>
|
||||
@for ($i = 0; $i < 5; $i++)
|
||||
<td><div class="placeholder"></div></td>
|
||||
@endfor
|
||||
|
Loading…
x
Reference in New Issue
Block a user