Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
20f89ac
Actualization of migration.
d3m37r4 Dec 7, 2024
8ddf55d
Reworking 'Reason' model, change name to 'PunishmentReason'. Update '…
d3m37r4 Dec 7, 2024
c462c9f
Actualization of seeder responsible for instances of the 'PunishmentR…
d3m37r4 Dec 7, 2024
fa02656
Updating the action controller with instances of the 'PunishmentReaso…
d3m37r4 Dec 7, 2024
243fbe4
Renaming other controllers according to selected controller naming po…
d3m37r4 Dec 7, 2024
3aca197
Update of the 'Show.vue' component. Added show of reasons for punishm…
d3m37r4 Dec 7, 2024
08b0979
Button components have been changed. Small changes in controllers and…
d3m37r4 Dec 7, 2024
c840da0
Updated the .gitignore and .gitattributes files. Removed files from t…
d3m37r4 Dec 7, 2024
7887e28
Deleted 'composer.phar'.
d3m37r4 Dec 7, 2024
03816b4
Fix error when creating/registering a new user.
d3m37r4 Dec 8, 2024
03ea2ae
Added a form to add new punishments reasons for a specified game server.
d3m37r4 Dec 8, 2024
7b262c9
Removed unnecessary standard values in the punish time fill form. Fix…
d3m37r4 Dec 9, 2024
c5eed99
Updated form for editing the reason for punishment.
d3m37r4 Dec 9, 2024
2003a88
Unused views removed.
d3m37r4 Dec 9, 2024
6323c63
Updated PunishmentReasonController.php
d3m37r4 Dec 21, 2024
c1ebeb2
Added 'laravel-vue-i18n' package to create translation.
d3m37r4 Jan 5, 2025
8ffb5b9
Added locale files (en, ru) in json format.
d3m37r4 Jan 5, 2025
25a5dfa
Connecting the translation package in 'app.js' and 'ssr.js'.
d3m37r4 Jan 5, 2025
5cd28eb
Added a field to the 'User' model to store the value of the user locale.
d3m37r4 Jan 5, 2025
dedd471
Added new vue-components.
d3m37r4 Jan 5, 2025
0308552
Added setting of available locales to the 'app.php' configuration file.
d3m37r4 Jan 5, 2025
80e44c5
Small changes to some vue components.
d3m37r4 Jan 5, 2025
c7ff43c
Added partial translations of page titles in some controllers.
d3m37r4 Jan 5, 2025
8b3a138
Added 'SetUserLocale' middleware to track and set custom locale.
d3m37r4 Jan 5, 2025
7add024
Added 'LocaleController' controller to change user locale. Middleware…
d3m37r4 Jan 5, 2025
73a4dd7
Added a route for changing the user's locale. Cleaned up the route fi…
d3m37r4 Jan 5, 2025
3d74cc0
Cleaned up file '.env.example' and 'cache.php'.
d3m37r4 Jan 5, 2025
1c111c9
Small changes in the 'HandleInertiaRequests.php' file.
d3m37r4 Jan 5, 2025
6c63782
New styles have been added and existing styles have been refactored.
d3m37r4 Jan 5, 2025
8ae8a53
Fix typo.
d3m37r4 Jan 5, 2025
5701391
InertiaJs update to version 2.0
d3m37r4 Jan 8, 2025
5e16dc3
Ziggy update to version 2.4. Changes to vue-components. And etc.
d3m37r4 Jan 8, 2025
e7f92e0
Localize pagination labels
d3m37r4 Jan 8, 2025
9404d71
Localize roles and genders
d3m37r4 Jan 8, 2025
bcbf98f
Merge pull request #41 from d3m37r4/add-localization
d3m37r4 Jan 23, 2025
5376335
Minor edits and corrections. Translations added.
d3m37r4 Jan 23, 2025
4c8a47c
Removed unused/unrelevant php-files of locales.
d3m37r4 Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,3 @@ PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

PAGINATION_SIZE=15
11 changes: 9 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
* text=auto
*.css linguist-vendored
* text=auto eol=lf
*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php
*.scss linguist-vendored
*.js linguist-vendored

/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
/bootstrap/ssr
/node_modules
/public/build
/public/сss
/public/js
/public/hot
/public/storage
/storage/*.key
/.phpunit.cache
/vendor
.idea
.fleet
.vscode
.phpunit.result.cache
.env
.env.backup
.phpunit.result.cache
.env.productio
.DS_Store
composer.phar
Thumbs.db
satisfiable
docker-compose.override.yml
Homestead.json
Homestead.yaml
Expand Down
7 changes: 5 additions & 2 deletions app/Http/Controllers/Auth/AuthenticatedSessionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AuthenticatedSessionController extends Controller
public function create()
{
return Inertia::render('Auth/Login', [
'title' => 'Авторизация',
'title' => 'Authorization',
'canResetPassword' => Route::has('password.request'),
'status' => session('status'),
]);
Expand All @@ -32,7 +32,10 @@ public function store(LoginRequest $request)
$request->authenticate();
$request->session()->regenerate();

return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended(RouteServiceProvider::HOME)->with([
'status' => 'success',
'message' => "Добро пожаловать! Вход выполнен."
]);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//use App\Http\Requests\StoreAccessRequest;
//use App\Http\Requests\UpdateAccessRequest;

class AccessManagementController extends Controller
class AccessController extends Controller
{
/**
* Show the form for creating a new access.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

//use App\Http\Requests\UpdateRequest;

class AccessGroupManagementController extends Controller
class AccessGroupController extends Controller
{
/**
* Show the form for creating a new access group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use App\Http\Requests\Dashboard\GameServer\DestroyRequest;
use App\Http\Requests\Dashboard\GameServer\DeleteSelectedRequest;

class GameServerManagementController extends Controller
class GameServerController extends Controller
{
/**
* The number of game servers to return for pagination.
Expand All @@ -26,7 +26,7 @@ class GameServerManagementController extends Controller
public function index()
{
return inertia('Dashboard/GameServers/Index', [
'title' => 'Управление серверами',
'title' => 'dashboard.page.game-servers.title',
'gameServers' => GameServer::paginate($this->perPage)->through(fn ($gameServer) => [
'id' => $gameServer->id,
'name' => $gameServer->name,
Expand Down Expand Up @@ -89,6 +89,17 @@ public function show(GameServer $gameServer)
'ip' => $gameServer->ip,
'port' => $gameServer->port,
],
'punishmentReasons' => $gameServer->punishmentReasons->sortBy(function($punishmentReason) {
return $punishmentReason->id;
})->values()->map(function ($punishmentReason) {
return [
'id' => $punishmentReason->id,
'name' => $punishmentReason->name,
'time' => $punishmentReason->time_for_humans,
'created_at' => $punishmentReason->created_at->format('d.m.Y - H:i:s'),
'updated_at' => $punishmentReason->updated_at->format('d.m.Y - H:i:s'),
];
}),
'serverInfo' => $serverInfo,
]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Illuminate\Http\Request;
use Illuminate\Http\Response;

class PlayerManagementController extends Controller
class PlayerController extends Controller
{
/**
* Show the form for editing the specified player.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php

namespace App\Http\Controllers\Dashboard\GameServer;

use App\Models\GameServer\PunishmentReason;
use App\Models\GameServer\GameServer;
use App\Http\Controllers\Controller;
use App\Http\Requests\Dashboard\GameServer\PunishmentReason\StoreRequest;
use App\Http\Requests\Dashboard\GameServer\PunishmentReason\UpdateRequest;

class PunishmentReasonController extends Controller
{
/**
* Show the form for creating a new punishment reason.
*/
public function create(GameServer $gameServer)
{
return inertia('Dashboard/GameServers/PunishmentReasons/Create', [
'title' => 'Новая причина наказания',
'gameServer' => $gameServer->only('id'),
]);
}

/**
* Store a newly created punishment reason in storage.
*/
public function store(StoreRequest $request, GameServer $gameServer)
{
$punishmentReason = PunishmentReason::create($request->safe()
->except('months', 'days', 'hours', 'minutes'));

return redirect()->route('dashboard.game-servers.show', $gameServer)->with([
'status' => 'success',
'message' => "Причина наказания \"$punishmentReason->name\" добавлена!"
]);
}

/**
* Show the form for editing the specified punishment reason.
*/
public function edit(GameServer $gameServer, PunishmentReason $punishmentReason)
{
return inertia('Dashboard/GameServers/PunishmentReasons/Edit', [
'title' => "Редактирование причины $punishmentReason->name",
'gameServer' => $gameServer->only('id'),
'punishmentReason' => [
'id' => $punishmentReason->id,
'name' => $punishmentReason->name,
'months' => $punishmentReason->formatTime('%m'),
'days' => $punishmentReason->formatTime('%d'),
'hours' => $punishmentReason->formatTime('%h'),
'minutes' => $punishmentReason->formatTime('%i'),
]
]);
}

/**
* Update the specified punishment reason in storage.
*/
public function update(UpdateRequest $request, GameServer $gameServer, PunishmentReason $punishmentReason)
{
$punishmentReason->update($request->safe()->except('id', 'months', 'days', 'hours', 'minutes'));

return back()->with([
'status' => 'success',
'message' => "Информация о причине наказания \"$punishmentReason->name\" обновлена!"
]);
}

/**
* Remove the specified punishment reason from storage.
*/
public function destroy(GameServer $gameServer, PunishmentReason $punishmentReason)
{
$punishmentReason->delete();

return back()->with([
'status' => 'deleted',
'message' => "Причина \"$punishmentReason->name\" удалена."
]);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;

class PermissionManagementController extends Controller
class PermissionController extends Controller
{
/**
* Get the permissions of the specified role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use App\Http\Requests\Dashboard\Role\DestroyRequest;
use App\Http\Requests\Dashboard\Role\DeleteSelectedRequest;

class RoleManagementController extends Controller
class RoleController extends Controller
{
/**
* The number of roles to return for pagination.
Expand All @@ -35,7 +35,7 @@ public function __construct()
public function index()
{
return inertia('Dashboard/Roles/Index', [
'title' => 'Управление ролями',
'title' => 'dashboard.page.roles.title',
'roles' => Role::paginate($this->perPage)->through(fn ($role) => [
'id' => $role->id,
'name' => $role->name,
Expand Down Expand Up @@ -67,7 +67,7 @@ public function store(StoreRequest $request)

return back()->with([
'status' => 'success',
'message' => "Роль \"$role->name\" создана."
'message' => "Роль \"$role->name\" добавлена."
]);
}

Expand Down
Loading
Loading