Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
abourtnik committed Dec 21, 2023
1 parent d811ef5 commit 9463545
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
6 changes: 4 additions & 2 deletions app/Filters/Users/SearchFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ function __invoke(Builder $query, string $search): Builder
{
$match = '%'.$search.'%';

return $query->where('username', 'LIKE', $match)
return $query->where(fn($query) => $query
->where('username', 'LIKE', $match)
->orWhere('email', 'LIKE', $match)
->orWhere('description', 'LIKE', $match);
->orWhere('description', 'LIKE', $match)
);
}
}
2 changes: 1 addition & 1 deletion app/Helpers/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private static function parseTimeCodes(string $string): string|null
return $carry + $times[$index] * pow(60, $index);
} , 0);

return "<button onclick='time($timecode)' class='btn btn-link btn-sm p-0 text-decoration-none' data-timecode='$timecode'>{$matches[0]}</button>";
return "<button style='vertical-align: inherit' onclick='time($timecode)' class='btn btn-link btn-sm p-0 text-decoration-none' data-timecode='$timecode'>{$matches[0]}</button>";

}, $string);
}
Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/Admin/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class UserController
public function index (UserFilters $filters) : View {
return view('admin.users.index', [
'users' => User::filter($filters)
->with('premium_subscription')
->withCount([
'subscribers',
'videos',
Expand Down
2 changes: 0 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Models;

use App\Enums\VideoStatus;
use App\Models\Interfaces\Likeable;
use App\Models\Interfaces\Reportable;
use App\Models\Pivots\FavoritePlaylist;
Expand All @@ -21,7 +20,6 @@
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/menus/sidebars/front.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div @class(["offcanvas offcanvas-start fixed overflow-auto", 'show_sidebar' => $show_sidebar ]) id="responsive-sidebar" data-bs-keyboard="false" data-bs-backdrop="true" data-bs-scroll="true" aria-modal="true" role="dialog">
<div @class(["offcanvas-header d-flex align-items-center bg-light border py-1", 'd-md-none' => $show_sidebar, 'd-flex gap-2' => Auth::user()?->is_premium, 'justify-content-between' => !Auth::user()?->is_premium])>
<div @class(["offcanvas-header d-flex align-items-center bg-light border py-2", 'd-md-none' => $show_sidebar, 'd-flex gap-2' => Auth::user()?->is_premium, 'justify-content-between' => !Auth::user()?->is_premium])>
<a
href="{{route('pages.home')}}"
@class(['offcanvas-title text-danger fw-bold text-decoration-none d-flex gap-2', 'h6' => Auth::user()?->is_premium, 'h5' => !Auth::user()?->is_premium])
Expand Down

0 comments on commit 9463545

Please sign in to comment.