feat: Implement user authentication and database migration system
- Refactored AuthService to use UserRepository for user authentication. - Added .env file for environment configuration. - Created migration system with Migrator and ConnectionFactory classes. - Added database migration files for creating users table. - Implemented settings controller for managing database migrations. - Developed user repository for user data handling. - Created users controller for user management interface. - Added frontend standards and migration documentation. - Introduced reusable UI components and jQuery alerts module.
This commit is contained in:
@@ -10,16 +10,39 @@
|
||||
<link rel="stylesheet" href="/assets/css/app.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="topbar">
|
||||
<div class="brand"><?= $e($t('brand.name_prefix')) ?><strong><?= $e($t('brand.name_suffix')) ?></strong></div>
|
||||
<form action="/logout" method="post">
|
||||
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
||||
<button type="submit" class="logout-btn"><?= $e($t('actions.logout')) ?></button>
|
||||
</form>
|
||||
</header>
|
||||
<?php $currentMenu = (string) ($activeMenu ?? ''); ?>
|
||||
<div class="app-shell">
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar__brand"><?= $e($t('brand.name_prefix')) ?><strong><?= $e($t('brand.name_suffix')) ?></strong></div>
|
||||
|
||||
<main class="container">
|
||||
<?= $content ?>
|
||||
</main>
|
||||
<nav class="sidebar__nav" aria-label="<?= $e($t('navigation.main_menu')) ?>">
|
||||
<a class="sidebar__link<?= $currentMenu === 'dashboard' ? ' is-active' : '' ?>" href="/dashboard">
|
||||
<?= $e($t('navigation.dashboard')) ?>
|
||||
</a>
|
||||
<a class="sidebar__link<?= $currentMenu === 'users' ? ' is-active' : '' ?>" href="/users">
|
||||
<?= $e($t('navigation.users')) ?>
|
||||
</a>
|
||||
<a class="sidebar__link<?= $currentMenu === 'settings' ? ' is-active' : '' ?>" href="/settings/database">
|
||||
<?= $e($t('navigation.settings')) ?>
|
||||
</a>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
<div class="app-main">
|
||||
<header class="topbar">
|
||||
<div>
|
||||
<strong><?= $e((string) (($user['name'] ?? '') !== '' ? $user['name'] : ($user['email'] ?? ''))) ?></strong>
|
||||
</div>
|
||||
<form action="/logout" method="post">
|
||||
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
||||
<button type="submit" class="btn btn--secondary"><?= $e($t('actions.logout')) ?></button>
|
||||
</form>
|
||||
</header>
|
||||
|
||||
<main class="container">
|
||||
<?= $content ?>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user