mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-15 00:56:59 +02:00
Removed useless package
This commit is contained in:
parent
73432e2928
commit
b0f63ffb25
4 changed files with 1 additions and 13 deletions
|
@ -179,17 +179,7 @@ class HomeController extends Controller
|
|||
}
|
||||
return $response->withHeader('Location', '/dashboard')->withStatus(302);
|
||||
}
|
||||
|
||||
public function avatar(Request $request, Response $response)
|
||||
{
|
||||
$avatar = new \LasseRafn\InitialAvatarGenerator\InitialAvatar();
|
||||
$stream = $avatar->name($_SESSION['auth_username'])->length(2)->fontSize(0.5)->size(96)->background('#206bc4')->color('#fff')->generate()->stream('png', 100);
|
||||
$psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory();
|
||||
$psrResponse = $psr17Factory->createResponse(200)->withBody($stream);
|
||||
|
||||
return $psrResponse;
|
||||
}
|
||||
|
||||
public function lang(Request $request, Response $response)
|
||||
{
|
||||
$data = $request->getQueryParams();
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
"nyholm/psr7-server": "^1.1.0",
|
||||
"pinga/auth": "^0.3.4",
|
||||
"filp/whoops": "^2.15.3",
|
||||
"lasserafn/php-initial-avatar-generator": "^4.3",
|
||||
"mevdschee/php-crud-api": "^2.14",
|
||||
"gettext/gettext": "^5.7",
|
||||
"punic/punic": "^3.8",
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</div>
|
||||
<div class="nav-item dropdown">
|
||||
<a href="#" class="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown" aria-label="Open user menu">
|
||||
<span class="avatar avatar-sm" style="background-image: url(/avatar)"></span>
|
||||
<span class="avatar bg-{% if roles == 0 %}primary{% else %}green{% endif %}-lt">{{ auth.user.username|slice(0, 2)|upper }}</span>
|
||||
<div class="d-none d-xl-block ps-2">
|
||||
<div>{{auth.user.username}}</div>
|
||||
<div class="mt-1 small text-muted">{{auth.user.email}}</div>
|
||||
|
|
|
@ -138,7 +138,6 @@ $app->group('', function ($route) {
|
|||
|
||||
$route->get('/mode', HomeController::class .':mode')->setName('mode');
|
||||
$route->get('/lang', HomeController::class .':lang')->setName('lang');
|
||||
$route->get('/avatar', HomeController::class .':avatar')->setName('avatar');
|
||||
$route->get('/logout', AuthController::class . ':logout')->setName('logout');
|
||||
$route->post('/change-password', PasswordController::class . ':changePassword')->setName('change.password');
|
||||
})->add(new AuthMiddleware($container));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue