From 62af7b0017cfab398866141593622238ec908886 Mon Sep 17 00:00:00 2001 From: Niek Rabelink Date: Wed, 9 Sep 2026 12:03:48 +0200 Subject: [PATCH] feat(ui): complete look and feel refactor with dark and light mode support --- admin.php | 241 +++++++++++++------------ api/theme.php | 47 +++++ auth/login.php | 98 ++++++---- brainstorm.php | 65 ++++--- brainstorm_canvas.php | 145 +++++++++------ includes/auth.php | 57 ++++++ includes/footer.php | 9 +- includes/header.php | 227 +++++++++++++++-------- planner.php | 180 +++++++++---------- profile.php | 405 ++++++++++++++++++++++++++++++------------ roadmap.php | 115 ++++++------ users.php | 102 +++++------ 12 files changed, 1059 insertions(+), 632 deletions(-) create mode 100644 api/theme.php diff --git a/admin.php b/admin.php index 6935fb9..65a2de5 100644 --- a/admin.php +++ b/admin.php @@ -129,30 +129,30 @@ require_once __DIR__ . '/includes/header.php';
-
+
-
+
Beheerderspaneel • Alleen toegankelijk voor Beheer
-

+

Systeembeheer & Integraties

-

+

Beheer hier de centrale organisatiekoppelingen zoals Microsoft 365 Azure App Registratie en Jira, inspecteer de teamstatus en configureer toekomstige modules.

- - + + Team & Invites () - + Mijn Persoonlijk Profiel @@ -162,55 +162,55 @@ require_once __DIR__ . '/includes/header.php'; -
- +
+
-
-
+
+
- Totaal Teamleden - - Beheerders • Collega's + Totaal Teamleden + + Beheerders • Collega's
-
-
+
+
- Outlook Live Gekoppeld - - + Outlook Live Gekoppeld + +
-
-
+
+
- Jira Gekoppeld - - + Jira Gekoppeld + +
-
-
+
+
- Openstaande Invites - - Beheer uitnodigingen → + Openstaande Invites + + Beheer uitnodigingen →
@@ -222,34 +222,34 @@ require_once __DIR__ . '/includes/header.php';
-
-
+
+
-
+
-

Microsoft 365 & Azure App Registratie

+

Microsoft 365 & Azure App Registratie

- + Geconfigureerd - + Configuratie Vereist
-

Centrale OAuth 2.0 instellingen voor de hele organisatie

+

Centrale OAuth 2.0 instellingen voor de hele organisatie

- - + + Admin Consent Verlenen - +
@@ -258,17 +258,17 @@ require_once __DIR__ . '/includes/header.php'; -
+
-
- - @@ -278,83 +278,83 @@ require_once __DIR__ . '/includes/header.php';
-
-
-
- -
-
+
Zodra opgeslagen kunnen al uw collega's met 1 klik hun Outlook agenda koppelen.
-
-
- - -
-
-
+
+
+
-

Atlassian Jira Organisatie-instellingen

+

Atlassian Jira Organisatie-instellingen

- + Actief - + Optioneel
-

Standaard Jira Cloud domein voor het hele team

+

Standaard Jira Cloud domein voor het hele team

@@ -388,17 +388,17 @@ require_once __DIR__ . '/includes/header.php';
-
-
@@ -406,56 +406,56 @@ require_once __DIR__ . '/includes/header.php';
-
-
-
+
+
+
-

Toekomstige Modules & Extensies

-

Voorbereid architectuurkader voor nieuwe bedrijfssystemen

+

Toekomstige Modules & Extensies

+

Voorbereid architectuurkader voor nieuwe bedrijfssystemen

-
+
- - + + AI & Brainstorm Co-Pilot - + Voorbereid
-

+

Centrale OpenAI of Anthropic Claude API-sleutels instellen voor automatische categorisatie van sticky notes en taakschattingen.

-
+
Gepland voor release v1.5
-
+
- - + + Organisatie Werkdag Standaarden - + Binnenkort
-

+

Standaard kantoortijden instellen (bijv. 08:30 - 17:00), standaard Pomodoro tijden (25m / 50m) en lunchpauze blokken.

-
+
Gepland voor release v1.4
@@ -467,35 +467,35 @@ require_once __DIR__ . '/includes/header.php';
-
-
+
+
- -

Team & Integratiestatus

+ +

Team & Integratiestatus

- + Alle gebruikers →
-
+
-
+
- - + +
- + - +
@@ -504,41 +504,41 @@ require_once __DIR__ . '/includes/header.php';
-
-
+
+
Systeem & Beveiliging
-
-
+
+
Tweestapsverificatie (2FA) - + Verplicht
-
+
Database Versie - MariaDB 10.x + MariaDB 10.x
-
+
Push Notificaties - Actief + Actief
-
+
Graph API Sync - Live v1.0 + Live v1.0
@@ -592,4 +592,3 @@ function toggleAdminGuide() { - diff --git a/api/theme.php b/api/theme.php new file mode 100644 index 0000000..aeafcef --- /dev/null +++ b/api/theme.php @@ -0,0 +1,47 @@ + true, + 'theme' => $currentTheme, + ]); + exit; +} + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + $raw = file_get_contents('php://input'); + $data = json_decode($raw, true); + + $theme = $data['theme'] ?? ($_POST['theme'] ?? 'dark'); + if (!in_array($theme, ['dark', 'light', 'system'])) { + http_response_code(400); + echo json_encode(['success' => false, 'error' => 'Ongeldig thema. Kies dark, light of system.']); + exit; + } + + $ok = update_user_theme($userId, $theme); + if ($ok) { + echo json_encode([ + 'success' => true, + 'theme' => $theme, + 'message' => 'Themavoorkeur succesvol opgeslagen.', + ]); + } else { + http_response_code(500); + echo json_encode(['success' => false, 'error' => 'Kon thema niet opslaan in database.']); + } + exit; +} + +http_response_code(405); +echo json_encode(['success' => false, 'error' => 'Method not allowed']); diff --git a/auth/login.php b/auth/login.php index b866bf7..636477f 100644 --- a/auth/login.php +++ b/auth/login.php @@ -59,23 +59,28 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { // STAP 2: 2FA TOTP Code verificatie elseif ($step === 2) { $userId = $_SESSION['pending_2fa_user_id'] ?? null; - $totpCode = trim(str_replace(' ', '', $_POST['totp_code'] ?? '')); + $totpCode = trim($_POST['totp_code'] ?? ''); - if (!$userId || empty($totpCode)) { - $error = "Vul de 6-cijferige 2FA verificatiecode in."; + if (!$userId) { + header('Location: /auth/login.php'); + exit; + } + + if (empty($totpCode)) { + $error = "Vul de 6-cijferige 2FA code in uit uw authenticator app."; } else { - $stmt = $db->prepare("SELECT id, name, email, role, two_factor_secret, backup_codes FROM users WHERE id = ?"); + $stmt = $db->prepare("SELECT * FROM users WHERE id = ?"); $stmt->execute([$userId]); $user = $stmt->fetch(); $isValid = false; - // 1. Controleer TOTP code - if (!empty($user['two_factor_secret']) && TOTP::verifyCode($user['two_factor_secret'], $totpCode)) { - $isValid = true; + // Controleer reguliere TOTP code + if (!empty($user['two_factor_secret'])) { + $isValid = verify_totp($user['two_factor_secret'], $totpCode); } - // 2. Controleer optioneel backup codes + // Fallback: controleer 8-karakter backup codes if (!$isValid && !empty($user['backup_codes'])) { $backupCodes = json_decode($user['backup_codes'], true) ?: []; $codeUpper = strtoupper($totpCode); @@ -119,28 +124,62 @@ $pageTitle = "Fociz — Inloggen"; <?= htmlspecialchars($pageTitle) ?> + + + - + + + + - + -
+
-
+
-

Fociz

-

+

Fociz

+

Veilig inloggen met tweestapsverificatie (2FA)

-
+
@@ -150,20 +189,20 @@ $pageTitle = "Fociz — Inloggen";
- +
- +
- +
- +
- @@ -174,29 +213,29 @@ $pageTitle = "Fociz — Inloggen";
-
+
-

+

Voer uw 6-cijferige verificatiecode in

-

- Gekoppeld aan +

+ Gekoppeld aan

- - + + Tip: U kunt ook een 8-cijferige herstelcode invoeren.
- + Terug - @@ -205,7 +244,7 @@ $pageTitle = "Fociz — Inloggen"; -
+
Toegang tot Fociz is strikt op uitnodiging. Vraag uw beheerder om een uitnodigingslink.
@@ -215,4 +254,3 @@ $pageTitle = "Fociz — Inloggen"; - diff --git a/brainstorm.php b/brainstorm.php index ead47d5..c16d4d6 100644 --- a/brainstorm.php +++ b/brainstorm.php @@ -40,30 +40,30 @@ $sessions = $stmtSessions->fetchAll(); require_once __DIR__ . '/includes/header.php'; ?> -
+
-
+
-
+
Creatie & Innovatie
-

+

Brainstorm Sessies

-

+

Brainstorm met collega's, verzamel ideeën en knelpunten, en transformeer ze direct tot een werkbare roadmap.

-
-
+
@@ -71,44 +71,44 @@ require_once __DIR__ . '/includes/header.php';
-
+
-

Nog geen brainstormsessies gestart

-

+

Nog geen brainstormsessies gestart

+

Start uw eerste brainstormsessie om ideeën te verzamelen en ze met één klik om te vormen naar planningsitems.

-
- +
- + - + kaarten
-

+

-

+

-
+
Door -
+
Open canvas
@@ -120,14 +120,14 @@ require_once __DIR__ . '/includes/header.php';
-