Skip to content

Commit

Permalink
Run /vendor/bin/pint
Browse files Browse the repository at this point in the history
  • Loading branch information
Poseidon281 committed Apr 24, 2024
1 parent eb4fa78 commit 849434b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
7 changes: 3 additions & 4 deletions app/Filament/Resources/UserResource/Pages/ListUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Filament\Resources\Pages\ListRecords;
use Filament\Tables\Table;
use Filament\Tables;
use Filament\Forms\Components\Toggle;

class ListUsers extends ListRecords
{
Expand Down Expand Up @@ -57,7 +56,7 @@ public function table(Table $table): Table
->icon('tabler-users')
// ->formatStateUsing(fn (string $state, $record): string => (string) ($record->servers_count + $record->subusers_count))
->label('Subuser Accounts'),
Tables\Columns\ToggleColumn::make('is_suspended')
Tables\Columns\ToggleColumn::make('is_suspended')
->label(trans('strings.suspended'))
->onColor('danger')
->offColor('success')
Expand All @@ -69,9 +68,9 @@ public function table(Table $table): Table
} else {
$user->servers()->update(['status' => 'active']);
}
$user->update(['is_suspended' => ! $user->is_suspended]);
$user->update(['is_suspended' => !$user->is_suspended]);
}),

])
->filters([
//
Expand Down
11 changes: 6 additions & 5 deletions app/Http/Middleware/CheckBanned.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ public function handle($request, Closure $next)
if (auth()->check() && auth()->user()->is_suspended) {
$message = trans('server/users.suspend.suspend_message');
Notification::make()
->title(trans('strings.suspended'))
->danger()
->seconds(7)
->body($message)
->send();
->title(trans('strings.suspended'))
->danger()
->seconds(7)
->body($message)
->send();
auth()->logout();

return redirect('panel/login');
}

Expand Down
2 changes: 1 addition & 1 deletion lang/en/server/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
],
'suspend' => [
'suspend_message' => 'Your account has been suspended.',
]
],
];

0 comments on commit 849434b

Please sign in to comment.