feat: add full i18n support to Commandocentrum

- Replace all hardcoded Dutch/English strings with __() translation calls
- Update 13 Blade components to use translation keys
- Update Commandocentrum.php controller with translation calls
- Add comprehensive Dutch (nl.json) and English (en.json) translations
- 150+ translation keys for UI labels, messages, and notifications
- Supports all 21 languages available in the lang/ directory
This commit is contained in:
root
2026-05-19 21:49:39 +02:00
parent c6246615bc
commit 2f30a058a4
16 changed files with 585 additions and 3003 deletions
+126 -124
View File
@@ -38,6 +38,8 @@ use Illuminate\Support\Facades\Process;
use Illuminate\Support\HtmlString; use Illuminate\Support\HtmlString;
use UnitEnum; use UnitEnum;
use function __;
final class Commandocentrum extends Page implements HasForms final class Commandocentrum extends Page implements HasForms
{ {
use InteractsWithForms; use InteractsWithForms;
@@ -126,27 +128,27 @@ final class Commandocentrum extends Page implements HasForms
{ {
return $schema return $schema
->components([ ->components([
Section::make('🎯 Live Status') Section::make(__('commandocentrum.live_status'))
->description('Real-time hotel statistieken') ->description(__('commandocentrum.live_status_desc'))
->icon('heroicon-o-heart') ->icon('heroicon-o-heart')
->columns(4) ->columns(4)
->schema([ ->schema([
Placeholder::make('online_users') Placeholder::make('online_users')
->label('Online') ->label(__('commandocentrum.online'))
->content(fn (): HtmlString => $this->getCardHtml('Online', $this->getOnlineUsersCount(), '#22c55e', 'heroicon-o-users')), ->content(fn (): HtmlString => $this->getCardHtml(__('commandocentrum.online'), $this->getOnlineUsersCount(), '#22c55e', 'heroicon-o-users')),
Placeholder::make('emulator_status') Placeholder::make('emulator_status')
->label('Emulator') ->label(__('commandocentrum.emulator'))
->content(fn (): HtmlString => $this->getCardHtml('Emulator', $this->getEmulatorStatusText(), $this->getEmulatorStatusColor(), 'heroicon-o-server')), ->content(fn (): HtmlString => $this->getCardHtml(__('commandocentrum.emulator'), $this->getEmulatorStatusText(), $this->getEmulatorStatusColor(), 'heroicon-o-server')),
Placeholder::make('database_status') Placeholder::make('database_status')
->label('Database') ->label(__('commandocentrum.database'))
->content(fn (): HtmlString => $this->getCardHtml('Database', $this->isDatabaseOnline() ? 'Online' : 'Offline', $this->isDatabaseOnline() ? '#22c55e' : '#ef4444', 'heroicon-o-circle-stack')), ->content(fn (): HtmlString => $this->getCardHtml(__('commandocentrum.database'), $this->isDatabaseOnline() ? __('commandocentrum.online') : __('commandocentrum.offline'), $this->isDatabaseOnline() ? '#22c55e' : '#ef4444', 'heroicon-o-circle-stack')),
Placeholder::make('server_load') Placeholder::make('server_load')
->label('Load') ->label(__('commandocentrum.load'))
->content(fn (): HtmlString => $this->getCardHtml('Load', $this->getServerLoad(), '#3b82f6', 'heroicon-o-cpu-chip')), ->content(fn (): HtmlString => $this->getCardHtml(__('commandocentrum.load'), $this->getServerLoad(), '#3b82f6', 'heroicon-o-cpu-chip')),
]), ]),
Section::make('📊 Server Informatie') Section::make(__('commandocentrum.server_info'))
->description('Gedetailleerde server status') ->description(__('commandocentrum.server_info_desc'))
->icon('heroicon-o-information-circle') ->icon('heroicon-o-information-circle')
->schema([ ->schema([
Placeholder::make('server_info') Placeholder::make('server_info')
@@ -154,12 +156,12 @@ final class Commandocentrum extends Page implements HasForms
->content(fn () => $this->renderServerInfoView()), ->content(fn () => $this->renderServerInfoView()),
]), ]),
Section::make('🩺 Systeem Gezondheid') Section::make(__('commandocentrum.system_health'))
->description('Automatische systeem diagnostiek') ->description(__('commandocentrum.system_health_desc'))
->icon('heroicon-o-heart') ->icon('heroicon-o-heart')
->afterHeader([ ->afterHeader([
Action::make('refresh_diagnostics') Action::make('refresh_diagnostics')
->label('Vernieuwen') ->label(__('commandocentrum.refresh'))
->icon('heroicon-o-arrow-path') ->icon('heroicon-o-arrow-path')
->color('info') ->color('info')
->action('refreshDiagnostics'), ->action('refreshDiagnostics'),
@@ -170,8 +172,8 @@ final class Commandocentrum extends Page implements HasForms
->content(fn (): HtmlString => $this->renderDiagnostics()), ->content(fn (): HtmlString => $this->renderDiagnostics()),
]), ]),
Section::make('🏨 Hotel Status') Section::make(__('commandocentrum.hotel_status'))
->description('Emulator en Nitro status') ->description(__('commandocentrum.hotel_status_desc'))
->icon('heroicon-o-building-office') ->icon('heroicon-o-building-office')
->schema([ ->schema([
Placeholder::make('hotel_status') Placeholder::make('hotel_status')
@@ -179,8 +181,8 @@ final class Commandocentrum extends Page implements HasForms
->content(fn () => $this->renderHotelStatusView()), ->content(fn () => $this->renderHotelStatusView()),
]), ]),
Section::make('📢 Hotel Alert') Section::make(__('commandocentrum.hotel_alert'))
->description('Stuur een bericht naar alle online gebruikers') ->description(__('commandocentrum.hotel_alert_desc'))
->icon('heroicon-o-megaphone') ->icon('heroicon-o-megaphone')
->schema([ ->schema([
Placeholder::make('alert_form') Placeholder::make('alert_form')
@@ -188,8 +190,8 @@ final class Commandocentrum extends Page implements HasForms
->content(fn () => view('filament.components.commandocentrum.alert-form')), ->content(fn () => view('filament.components.commandocentrum.alert-form')),
]), ]),
Section::make('📜 Emulator Logs') Section::make(__('commandocentrum.emulator_logs'))
->description('Live emulator log viewer') ->description(__('commandocentrum.emulator_logs_desc'))
->icon('heroicon-o-document-text') ->icon('heroicon-o-document-text')
->columnSpanFull() ->columnSpanFull()
->schema([ ->schema([
@@ -198,28 +200,28 @@ final class Commandocentrum extends Page implements HasForms
->content(fn () => view('filament.components.emulator-log-viewer')), ->content(fn () => view('filament.components.emulator-log-viewer')),
]), ]),
Section::make('🖥️ Emulator Control') Section::make(__('commandocentrum.emulator_control'))
->description('Volledige emulator controle') ->description(__('commandocentrum.emulator_control_desc'))
->icon('heroicon-o-server') ->icon('heroicon-o-server')
->columns(3) ->columns(3)
->afterHeader([ ->afterHeader([
Action::make('start_emulator') Action::make('start_emulator')
->label('Start') ->label(__('commandocentrum.start'))
->icon('heroicon-o-play') ->icon('heroicon-o-play')
->color('success') ->color('success')
->action('startEmulator'), ->action('startEmulator'),
Action::make('stop_emulator') Action::make('stop_emulator')
->label('Stop') ->label(__('commandocentrum.stop'))
->icon('heroicon-o-stop') ->icon('heroicon-o-stop')
->color('danger') ->color('danger')
->action('stopEmulator'), ->action('stopEmulator'),
Action::make('restart_emulator') Action::make('restart_emulator')
->label('Restart') ->label(__('commandocentrum.restart'))
->icon('heroicon-o-arrow-path') ->icon('heroicon-o-arrow-path')
->color('warning') ->color('warning')
->action('restartEmulator'), ->action('restartEmulator'),
Action::make('check_emulator') Action::make('check_emulator')
->label('Check') ->label(__('commandocentrum.check'))
->icon('heroicon-o-check-circle') ->icon('heroicon-o-check-circle')
->color('info') ->color('info')
->action('checkEmulator'), ->action('checkEmulator'),
@@ -230,24 +232,24 @@ final class Commandocentrum extends Page implements HasForms
->content(fn () => $this->renderEmulatorInfoView()), ->content(fn () => $this->renderEmulatorInfoView()),
]), ]),
Section::make('🔄 Emulator Updates') Section::make(__('commandocentrum.emulator_updates'))
->description('Configureer en update de emulator') ->description(__('commandocentrum.emulator_updates_desc'))
->icon('heroicon-o-arrow-down-circle') ->icon('heroicon-o-arrow-down-circle')
->afterHeader([ ->afterHeader([
Action::make('check_updates') Action::make('check_updates')
->label('Check Updates') ->label(__('commandocentrum.check_updates'))
->color('info') ->color('info')
->action('checkEmulatorUpdates'), ->action('checkEmulatorUpdates'),
Action::make('build_emulator') Action::make('build_emulator')
->label('🔨 Build') ->label('🔨 ' . __('commandocentrum.build'))
->color('success') ->color('success')
->action('buildEmulator'), ->action('buildEmulator'),
Action::make('run_sql') Action::make('run_sql')
->label('SQL Updates') ->label(__('commandocentrum.sql_updates'))
->color('purple') ->color('purple')
->action('runSqlUpdates'), ->action('runSqlUpdates'),
Action::make('save_emulator') Action::make('save_emulator')
->label('Opslaan') ->label(__('commandocentrum.save'))
->color('primary') ->color('primary')
->action('saveEmulator'), ->action('saveEmulator'),
]) ])
@@ -257,8 +259,8 @@ final class Commandocentrum extends Page implements HasForms
->content(fn () => $this->renderEmulatorSettingsView()), ->content(fn () => $this->renderEmulatorSettingsView()),
]), ]),
Section::make('💾 Emulator Backups') Section::make(__('commandocentrum.emulator_backups'))
->description('Bekijk en herstel emulator backups') ->description(__('commandocentrum.emulator_backups_desc'))
->icon('heroicon-s-archive-box') ->icon('heroicon-s-archive-box')
->schema([ ->schema([
Placeholder::make('backups_list') Placeholder::make('backups_list')
@@ -266,28 +268,28 @@ final class Commandocentrum extends Page implements HasForms
->content(fn () => $this->renderBackupsListView()), ->content(fn () => $this->renderBackupsListView()),
]), ]),
Section::make('📦 Nitro Client') Section::make(__('commandocentrum.nitro_client'))
->description('Configureer en update Nitro') ->description(__('commandocentrum.nitro_client_desc'))
->icon('heroicon-o-cloud-arrow-down') ->icon('heroicon-o-cloud-arrow-down')
->afterHeader([ ->afterHeader([
Action::make('detect_paths') Action::make('detect_paths')
->label('🔍 Auto Detect') ->label('🔍 ' . __('commandocentrum.auto_detect'))
->color('success') ->color('success')
->action('detectAndSavePaths'), ->action('detectAndSavePaths'),
Action::make('check_nitro') Action::make('check_nitro')
->label('Check') ->label(__('commandocentrum.check'))
->color('info') ->color('info')
->action('checkNitroUpdates'), ->action('checkNitroUpdates'),
Action::make('build_nitro') Action::make('build_nitro')
->label('Build') ->label(__('commandocentrum.build'))
->color('pink') ->color('pink')
->action('buildNitro'), ->action('buildNitro'),
Action::make('generate_configs') Action::make('generate_configs')
->label('Genereer Configs') ->label(__('commandocentrum.generate_configs'))
->color('indigo') ->color('indigo')
->action('generateNitroConfigs'), ->action('generateNitroConfigs'),
Action::make('save_nitro') Action::make('save_nitro')
->label('Opslaan') ->label(__('commandocentrum.save'))
->color('primary') ->color('primary')
->action('saveNitro'), ->action('saveNitro'),
]) ])
@@ -297,31 +299,31 @@ final class Commandocentrum extends Page implements HasForms
->content(fn () => $this->renderNitroSettingsView()), ->content(fn () => $this->renderNitroSettingsView()),
]), ]),
Section::make('⚙️ Automatische Updates') Section::make(__('commandocentrum.auto_updates'))
->description('Configureer automatische updates') ->description(__('commandocentrum.auto_updates_desc'))
->icon('heroicon-o-clock') ->icon('heroicon-o-clock')
->columns(2) ->columns(2)
->afterHeader([ ->afterHeader([
Action::make('save_auto') Action::make('save_auto')
->label('Opslaan') ->label(__('commandocentrum.save'))
->color('primary') ->color('primary')
->action('saveAutoUpdate'), ->action('saveAutoUpdate'),
]) ])
->schema([ ->schema([
Toggle::make('auto_update_enabled') Toggle::make('auto_update_enabled')
->label('Automatische Updates Inschakelen'), ->label(__('commandocentrum.enable_auto_updates')),
TextInput::make('auto_update_schedule') TextInput::make('auto_update_schedule')
->label('Schema (HH:MM)'), ->label(__('commandocentrum.schedule')),
TextInput::make('auto_update_days') TextInput::make('auto_update_days')
->label('Dagen (0-6)'), ->label(__('commandocentrum.days')),
]), ]),
Section::make('👔 Kleding Sync') Section::make(__('commandocentrum.clothing_sync'))
->description('Sync catalogus kleding uit FigureMap') ->description(__('commandocentrum.clothing_sync_desc'))
->icon('heroicon-o-user') ->icon('heroicon-o-user')
->afterHeader([ ->afterHeader([
Action::make('sync_clothing') Action::make('sync_clothing')
->label('🔄 Sync') ->label('🔄 ' . __('commandocentrum.sync'))
->color('success') ->color('success')
->action('syncClothing'), ->action('syncClothing'),
]) ])
@@ -331,41 +333,41 @@ final class Commandocentrum extends Page implements HasForms
->content(fn () => $this->renderClothingStatusView()), ->content(fn () => $this->renderClothingStatusView()),
]), ]),
Section::make('🔔 Meldingen') Section::make(__('commandocentrum.notifications'))
->description('E-mail en Discord alerts') ->description(__('commandocentrum.notifications_desc'))
->icon('heroicon-o-bell') ->icon('heroicon-o-bell')
->columns(2) ->columns(2)
->afterHeader([ ->afterHeader([
Action::make('save_alerts') Action::make('save_alerts')
->label('Opslaan') ->label(__('commandocentrum.save'))
->color('primary') ->color('primary')
->action('saveAlerts'), ->action('saveAlerts'),
Action::make('test_discord') Action::make('test_discord')
->label('Test Discord') ->label(__('commandocentrum.test_discord'))
->color('info') ->color('info')
->action('testDiscord'), ->action('testDiscord'),
]) ])
->schema([ ->schema([
Toggle::make('alert_email_enabled') Toggle::make('alert_email_enabled')
->label('E-mail Meldingen'), ->label(__('commandocentrum.email_notifications')),
TextInput::make('alert_email_address') TextInput::make('alert_email_address')
->label('E-mail Adres') ->label(__('commandocentrum.email_address'))
->email() ->email()
->columnSpanFull(), ->columnSpanFull(),
Toggle::make('alert_discord_enabled') Toggle::make('alert_discord_enabled')
->label('Discord Meldingen'), ->label(__('commandocentrum.discord_notifications')),
TextInput::make('alert_discord_webhook_url') TextInput::make('alert_discord_webhook_url')
->label('Webhook URL') ->label(__('commandocentrum.webhook_url'))
->columnSpanFull(), ->columnSpanFull(),
Select::make('discord_webhook_ranks') Select::make('discord_webhook_ranks')
->label('Ranks die Discord notificatie krijgen') ->label(__('commandocentrum.discord_ranks'))
->multiple() ->multiple()
->options(fn () => WebsitePermission::query()->pluck('permission', 'min_rank')->mapWithKeys(fn ($perm, $rank) => [$rank => "Rank {$rank} ({$perm})"])->toArray()) ->options(fn () => WebsitePermission::query()->pluck('permission', 'min_rank')->mapWithKeys(fn ($perm, $rank) => [$rank => "Rank {$rank} ({$perm})"])->toArray())
->helperText('Laat leeg voor alleen staff (min_staff_rank)'), ->helperText(__('commandocentrum.discord_ranks_helper')),
]), ]),
Section::make('📊 Update Geschiedenis') Section::make(__('commandocentrum.update_history'))
->description('Laatste systeem updates') ->description(__('commandocentrum.update_history_desc'))
->icon('heroicon-o-clock') ->icon('heroicon-o-clock')
->schema([ ->schema([
Placeholder::make('history') Placeholder::make('history')
@@ -373,42 +375,42 @@ final class Commandocentrum extends Page implements HasForms
->content(fn () => $this->renderUpdateHistoryView()), ->content(fn () => $this->renderUpdateHistoryView()),
]), ]),
Section::make('🔐 Social Login (v1.4)') Section::make(__('commandocentrum.social_login'))
->description('Enable social login providers') ->description(__('commandocentrum.social_login_desc'))
->icon('heroicon-o-user-circle') ->icon('heroicon-o-user-circle')
->schema([ ->schema([
Toggle::make('social_login_google_enabled') Toggle::make('social_login_google_enabled')
->label('Google Login') ->label(__('commandocentrum.google_login'))
->helperText('Allow users to login with Google'), ->helperText(__('commandocentrum.google_login_helper')),
TextInput::make('social_login_google_client_id') TextInput::make('social_login_google_client_id')
->label('Google Client ID') ->label(__('commandocentrum.google_client_id'))
->helperText('From Google Cloud Console'), ->helperText(__('commandocentrum.google_client_id_helper')),
TextInput::make('social_login_google_client_secret') TextInput::make('social_login_google_client_secret')
->label('Google Client Secret') ->label(__('commandocentrum.google_client_secret'))
->type('password'), ->type('password'),
Toggle::make('social_login_discord_enabled') Toggle::make('social_login_discord_enabled')
->label('Discord Login') ->label(__('commandocentrum.discord_login'))
->helperText('Allow users to login with Discord'), ->helperText(__('commandocentrum.discord_login_helper')),
TextInput::make('social_login_discord_client_id') TextInput::make('social_login_discord_client_id')
->label('Discord Client ID') ->label(__('commandocentrum.discord_client_id'))
->helperText('From Discord Developer Portal'), ->helperText(__('commandocentrum.discord_client_id_helper')),
TextInput::make('social_login_discord_client_secret') TextInput::make('social_login_discord_client_secret')
->label('Discord Client Secret') ->label(__('commandocentrum.discord_client_secret'))
->type('password'), ->type('password'),
Toggle::make('social_login_github_enabled') Toggle::make('social_login_github_enabled')
->label('GitHub Login') ->label(__('commandocentrum.github_login'))
->helperText('Allow users to login with GitHub'), ->helperText(__('commandocentrum.github_login_helper')),
TextInput::make('social_login_github_client_id') TextInput::make('social_login_github_client_id')
->label('GitHub Client ID') ->label(__('commandocentrum.github_client_id'))
->helperText('From GitHub Developer Settings'), ->helperText(__('commandocentrum.github_client_id_helper')),
TextInput::make('social_login_github_client_secret') TextInput::make('social_login_github_client_secret')
->label('GitHub Client Secret') ->label(__('commandocentrum.github_client_secret'))
->type('password'), ->type('password'),
]) ])
->columns(2), ->columns(2),
Section::make('👔 Staff Activity Log') Section::make(__('commandocentrum.staff_activity'))
->description('Recent staff activities in the housekeeping (v1.2)') ->description(__('commandocentrum.staff_activity_desc'))
->icon('heroicon-o-user-group') ->icon('heroicon-o-user-group')
->schema([ ->schema([
Placeholder::make('staff_activity') Placeholder::make('staff_activity')
@@ -453,9 +455,9 @@ final class Commandocentrum extends Page implements HasForms
$clientColor = $clientExists ? '#22c55e' : '#ef4444'; $clientColor = $clientExists ? '#22c55e' : '#ef4444';
$rendererColor = $rendererExists ? '#22c55e' : '#ef4444'; $rendererColor = $rendererExists ? '#22c55e' : '#ef4444';
$clientText = $clientExists ? '✓ ' . substr($clientCommit, 0, 7) : '✗ Niet gevonden'; $clientText = $clientExists ? '✓ ' . substr($clientCommit, 0, 7) : '✗ ' . __('commandocentrum.not_found');
$rendererText = $rendererExists ? '✓ ' . substr($rendererCommit, 0, 7) : '✗ Niet gevonden'; $rendererText = $rendererExists ? '✓ ' . substr($rendererCommit, 0, 7) : '✗ ' . __('commandocentrum.not_found');
$webrootText = $rendererExists ? '✓ ' . basename($nitroWebroot) : '✗ Niet gevonden'; $webrootText = $rendererExists ? '✓ ' . basename($nitroWebroot) : '✗ ' . __('commandocentrum.not_found');
$webrootColor = $rendererExists ? '#22c55e' : '#ef4444'; $webrootColor = $rendererExists ? '#22c55e' : '#ef4444';
return view('filament.components.commandocentrum.hotel-status', [ return view('filament.components.commandocentrum.hotel-status', [
@@ -463,7 +465,7 @@ final class Commandocentrum extends Page implements HasForms
'serviceColor' => $serviceColor, 'serviceColor' => $serviceColor,
'onlineUsers' => $this->getOnlineUsersCount(), 'onlineUsers' => $this->getOnlineUsersCount(),
'emulatorStatus' => $this->getEmulatorStatusText(), 'emulatorStatus' => $this->getEmulatorStatusText(),
'dbStatus' => $this->isDatabaseOnline() ? 'Online' : 'Offline', 'dbStatus' => $this->isDatabaseOnline() ? __('commandocentrum.online') : __('commandocentrum.offline'),
'dbColor' => $this->isDatabaseOnline() ? '#22c55e' : '#ef4444', 'dbColor' => $this->isDatabaseOnline() ? '#22c55e' : '#ef4444',
'clientExists' => $clientExists, 'clientExists' => $clientExists,
'clientColor' => $clientColor, 'clientColor' => $clientColor,
@@ -835,7 +837,7 @@ final class Commandocentrum extends Page implements HasForms
public function sendHotelAlert(): void public function sendHotelAlert(): void
{ {
$result = app(EmulatorControlAction::class)->sendAlert($this->data['hotel_alert_message'] ?? ''); $result = app(EmulatorControlAction::class)->sendAlert($this->data['hotel_alert_message'] ?? '');
$this->notify($result['success'] ? 'Success' : 'Error', $result['message'], $result['success'] ? 'success' : 'danger'); $this->notify($result['success'] ? __('commandocentrum.success') : __('commandocentrum.error'), $result['message'], $result['success'] ? 'success' : 'danger');
if ($result['success']) { if ($result['success']) {
$this->data['hotel_alert_message'] = ''; $this->data['hotel_alert_message'] = '';
} }
@@ -844,19 +846,19 @@ final class Commandocentrum extends Page implements HasForms
public function startEmulator(): void public function startEmulator(): void
{ {
$result = app(EmulatorControlAction::class)->start(); $result = app(EmulatorControlAction::class)->start();
$this->notify($result['success'] ? 'Success' : 'Error', $result['message'], $result['success'] ? 'success' : 'danger'); $this->notify($result['success'] ? __('commandocentrum.success') : __('commandocentrum.error'), $result['message'], $result['success'] ? 'success' : 'danger');
} }
public function stopEmulator(): void public function stopEmulator(): void
{ {
$result = app(EmulatorControlAction::class)->stop(); $result = app(EmulatorControlAction::class)->stop();
$this->notify($result['success'] ? 'Success' : 'Error', $result['message'], $result['success'] ? 'success' : 'danger'); $this->notify($result['success'] ? __('commandocentrum.success') : __('commandocentrum.error'), $result['message'], $result['success'] ? 'success' : 'danger');
} }
public function restartEmulator(): void public function restartEmulator(): void
{ {
$result = app(EmulatorControlAction::class)->restart(); $result = app(EmulatorControlAction::class)->restart();
$this->notify($result['success'] ? 'Success' : 'Error', $result['message'], $result['success'] ? 'success' : 'danger'); $this->notify($result['success'] ? __('commandocentrum.success') : __('commandocentrum.error'), $result['message'], $result['success'] ? 'success' : 'danger');
} }
public function checkEmulator(): void public function checkEmulator(): void
@@ -865,20 +867,20 @@ final class Commandocentrum extends Page implements HasForms
Artisan::call('monitor:emulator', ['--notify-online' => true]); Artisan::call('monitor:emulator', ['--notify-online' => true]);
$rconService = new RconService; $rconService = new RconService;
if ($rconService->isConnected()) { if ($rconService->isConnected()) {
$this->notify('Success', 'Emulator is online en reageert!', 'success'); $this->notify(__('commandocentrum.success'), __('commandocentrum.emulator_online'), 'success');
} else { } else {
$this->notify('Warning', 'Emulator is niet bereikbaar via RCON', 'warning'); $this->notify(__('commandocentrum.warning'), __('commandocentrum.emulator_unreachable'), 'warning');
} }
$this->fillForm(); $this->fillForm();
} catch (Exception $e) { } catch (Exception $e) {
$this->notify('Error', $e->getMessage(), 'danger'); $this->notify(__('commandocentrum.error'), $e->getMessage(), 'danger');
} }
} }
public function checkEmulatorUpdates(): void public function checkEmulatorUpdates(): void
{ {
$result = app(EmulatorControlAction::class)->update(); $result = app(EmulatorControlAction::class)->update();
$this->notify($result['success'] ?? false ? 'Success' : 'Error', $result['message'] ?? $result['error'] ?? 'Onbekende fout', ($result['success'] ?? false) ? 'success' : 'danger'); $this->notify($result['success'] ?? false ? __('commandocentrum.success') : __('commandocentrum.error'), $result['message'] ?? $result['error'] ?? __('commandocentrum.unknown'), ($result['success'] ?? false) ? 'success' : 'danger');
Cache::forget('all_updates_check'); Cache::forget('all_updates_check');
$this->fillForm(); $this->fillForm();
} }
@@ -886,19 +888,19 @@ final class Commandocentrum extends Page implements HasForms
public function buildEmulator(): void public function buildEmulator(): void
{ {
$result = app(EmulatorControlAction::class)->build(); $result = app(EmulatorControlAction::class)->build();
$this->notify($result['success'] ?? false ? 'Success' : 'Error', $result['message'] ?? $result['error'] ?? 'Onbekende fout', ($result['success'] ?? false) ? 'success' : 'danger'); $this->notify($result['success'] ?? false ? __('commandocentrum.success') : __('commandocentrum.error'), $result['message'] ?? $result['error'] ?? __('commandocentrum.unknown'), ($result['success'] ?? false) ? 'success' : 'danger');
} }
public function runSqlUpdates(): void public function runSqlUpdates(): void
{ {
$result = app(EmulatorControlAction::class)->runSqlUpdates(); $result = app(EmulatorControlAction::class)->runSqlUpdates();
$this->notify($result['success'] ?? false ? 'Success' : 'Error', $result['message'] ?? 'Onbekende fout', ($result['success'] ?? false) ? 'success' : 'danger'); $this->notify($result['success'] ?? false ? __('commandocentrum.success') : __('commandocentrum.error'), $result['message'] ?? __('commandocentrum.unknown'), ($result['success'] ?? false) ? 'success' : 'danger');
} }
public function restoreBackup(string $backupName): void public function restoreBackup(string $backupName): void
{ {
$result = app(EmulatorControlAction::class)->restoreBackup($backupName); $result = app(EmulatorControlAction::class)->restoreBackup($backupName);
$this->notify($result['success'] ? 'Success' : 'Error', $result['message'] ?? $result['error'] ?? 'Onbekende fout', $result['success'] ? 'success' : 'danger'); $this->notify($result['success'] ? __('commandocentrum.success') : __('commandocentrum.error'), $result['message'] ?? $result['error'] ?? __('commandocentrum.unknown'), $result['success'] ? 'success' : 'danger');
$this->fillForm(); $this->fillForm();
} }
@@ -915,9 +917,9 @@ final class Commandocentrum extends Page implements HasForms
$settings->set('emulator_database_host', $this->data['emulator_database_host'] ?? '127.0.0.1'); $settings->set('emulator_database_host', $this->data['emulator_database_host'] ?? '127.0.0.1');
$settings->set('emulator_database_name', $this->data['emulator_database_name'] ?? ''); $settings->set('emulator_database_name', $this->data['emulator_database_name'] ?? '');
$settings->set('emulator_service_name', $this->data['emulator_service_name'] ?? 'arcturus'); $settings->set('emulator_service_name', $this->data['emulator_service_name'] ?? 'arcturus');
$this->notify('Success', 'Emulator instellingen opgeslagen!', 'success'); $this->notify(__('commandocentrum.success'), __('commandocentrum.emulator_settings_saved'), 'success');
} catch (Exception $e) { } catch (Exception $e) {
$this->notify('Error', $e->getMessage(), 'danger'); $this->notify(__('commandocentrum.error'), $e->getMessage(), 'danger');
} }
} }
@@ -928,7 +930,7 @@ final class Commandocentrum extends Page implements HasForms
$branch = $this->getSetting('nitro_github_branch', 'main'); $branch = $this->getSetting('nitro_github_branch', 'main');
$result = app(NitroControlAction::class)->pullUpdates($clientPath, $rendererPath, $branch); $result = app(NitroControlAction::class)->pullUpdates($clientPath, $rendererPath, $branch);
$this->notify('Success', $result['message'], 'success'); $this->notify(__('commandocentrum.success'), $result['message'], 'success');
$this->fillForm(); $this->fillForm();
} }
@@ -939,7 +941,7 @@ final class Commandocentrum extends Page implements HasForms
$branch = $this->getSetting('nitro_github_branch', 'main'); $branch = $this->getSetting('nitro_github_branch', 'main');
$result = app(NitroControlAction::class)->build($clientPath, $rendererPath, $branch); $result = app(NitroControlAction::class)->build($clientPath, $rendererPath, $branch);
$this->notify($result['success'] ? 'Success' : 'Warning', $result['message'], $result['success'] ? 'success' : 'warning'); $this->notify($result['success'] ? __('commandocentrum.success') : __('commandocentrum.warning'), $result['message'], $result['success'] ? 'success' : 'warning');
} }
public function generateNitroConfigs(): void public function generateNitroConfigs(): void
@@ -949,7 +951,7 @@ final class Commandocentrum extends Page implements HasForms
$gamedataPath = $this->getSetting('gamedata_path', '/var/www/Gamedata'); $gamedataPath = $this->getSetting('gamedata_path', '/var/www/Gamedata');
$result = app(NitroControlAction::class)->generateConfigs($siteUrl, $webroot, $gamedataPath); $result = app(NitroControlAction::class)->generateConfigs($siteUrl, $webroot, $gamedataPath);
$this->notify($result['success'] ? 'Success' : 'Error', $result['message'], $result['success'] ? 'success' : 'danger'); $this->notify($result['success'] ? __('commandocentrum.success') : __('commandocentrum.error'), $result['message'], $result['success'] ? 'success' : 'danger');
$this->fillForm(); $this->fillForm();
} }
@@ -959,13 +961,13 @@ final class Commandocentrum extends Page implements HasForms
$catalogService = app(CatalogService::class); $catalogService = app(CatalogService::class);
$result = $catalogService->syncCatalogClothing(); $result = $catalogService->syncCatalogClothing();
$message = '👔 Kleding Sync Resultaat:' . PHP_EOL; $message = '👔 ' . __('commandocentrum.clothing_items') . ':' . PHP_EOL;
$message .= '• Toegevoegd: ' . $result['inserted'] . PHP_EOL; $message .= '• Toegevoegd: ' . $result['inserted'] . PHP_EOL;
$message .= '• Totaal: ' . $result['total']; $message .= '• Totaal: ' . $result['total'];
$this->notify('Success', $message, 'success'); $this->notify(__('commandocentrum.success'), $message, 'success');
} catch (Exception $e) { } catch (Exception $e) {
$this->notify('Error', $e->getMessage(), 'danger'); $this->notify(__('commandocentrum.error'), $e->getMessage(), 'danger');
} }
} }
@@ -984,9 +986,9 @@ final class Commandocentrum extends Page implements HasForms
$settings->set('emulator_source_path', $paths['emulator_source_path']); $settings->set('emulator_source_path', $paths['emulator_source_path']);
$this->fillForm(); $this->fillForm();
$this->notify('Success', 'Paths gedetecteerd en opgeslagen!', 'success'); $this->notify(__('commandocentrum.success'), __('commandocentrum.paths_detected'), 'success');
} catch (Exception $e) { } catch (Exception $e) {
$this->notify('Error', $e->getMessage(), 'danger'); $this->notify(__('commandocentrum.error'), $e->getMessage(), 'danger');
} }
} }
@@ -1002,9 +1004,9 @@ final class Commandocentrum extends Page implements HasForms
$settings->set('nitro_github_url', $this->data['nitro_github_url'] ?? ''); $settings->set('nitro_github_url', $this->data['nitro_github_url'] ?? '');
$settings->set('nitro_github_branch', $this->data['nitro_github_branch'] ?? 'main'); $settings->set('nitro_github_branch', $this->data['nitro_github_branch'] ?? 'main');
$settings->set('nitro_site_url', $this->data['nitro_site_url'] ?? ''); $settings->set('nitro_site_url', $this->data['nitro_site_url'] ?? '');
$this->notify('Success', 'Nitro instellingen opgeslagen!', 'success'); $this->notify(__('commandocentrum.success'), __('commandocentrum.nitro_settings_saved'), 'success');
} catch (Exception $e) { } catch (Exception $e) {
$this->notify('Error', $e->getMessage(), 'danger'); $this->notify(__('commandocentrum.error'), $e->getMessage(), 'danger');
} }
} }
@@ -1015,9 +1017,9 @@ final class Commandocentrum extends Page implements HasForms
$settings->set('auto_update_enabled', ($this->data['auto_update_enabled'] ?? false) ? '1' : '0'); $settings->set('auto_update_enabled', ($this->data['auto_update_enabled'] ?? false) ? '1' : '0');
$settings->set('auto_update_schedule', $this->data['auto_update_schedule'] ?? '03:00'); $settings->set('auto_update_schedule', $this->data['auto_update_schedule'] ?? '03:00');
$settings->set('auto_update_days', $this->data['auto_update_days'] ?? '0,6'); $settings->set('auto_update_days', $this->data['auto_update_days'] ?? '0,6');
$this->notify('Success', 'Auto update instellingen opgeslagen!', 'success'); $this->notify(__('commandocentrum.success'), __('commandocentrum.auto_update_saved'), 'success');
} catch (Exception $e) { } catch (Exception $e) {
$this->notify('Error', $e->getMessage(), 'danger'); $this->notify(__('commandocentrum.error'), $e->getMessage(), 'danger');
} }
} }
@@ -1030,9 +1032,9 @@ final class Commandocentrum extends Page implements HasForms
$settings->set('alert_discord_enabled', ($this->data['alert_discord_enabled'] ?? false) ? '1' : '0'); $settings->set('alert_discord_enabled', ($this->data['alert_discord_enabled'] ?? false) ? '1' : '0');
$settings->set('alert_discord_webhook_url', $this->data['alert_discord_webhook_url'] ?? ''); $settings->set('alert_discord_webhook_url', $this->data['alert_discord_webhook_url'] ?? '');
$settings->set('discord_webhook_ranks', json_encode($this->data['discord_webhook_ranks'] ?? [])); $settings->set('discord_webhook_ranks', json_encode($this->data['discord_webhook_ranks'] ?? []));
$this->notify('Success', 'Meldingen opgeslagen!', 'success'); $this->notify(__('commandocentrum.success'), __('commandocentrum.alerts_saved'), 'success');
} catch (Exception $e) { } catch (Exception $e) {
$this->notify('Error', $e->getMessage(), 'danger'); $this->notify(__('commandocentrum.error'), $e->getMessage(), 'danger');
} }
} }
@@ -1041,14 +1043,14 @@ final class Commandocentrum extends Page implements HasForms
try { try {
$webhookUrl = $this->data['alert_discord_webhook_url'] ?? ''; $webhookUrl = $this->data['alert_discord_webhook_url'] ?? '';
if (empty($webhookUrl)) { if (empty($webhookUrl)) {
$this->notify('Error', 'Webhook URL is leeg', 'danger'); $this->notify(__('commandocentrum.error'), __('commandocentrum.webhook_empty'), 'danger');
return; return;
} }
Http::post($webhookUrl, ['content' => '✅ Test van Atom CMS Commandocentrum']); Http::post($webhookUrl, ['content' => '✅ Test van Atom CMS Commandocentrum']);
$this->notify('Success', 'Test bericht verzonden!', 'success'); $this->notify(__('commandocentrum.success'), __('commandocentrum.test_sent'), 'success');
} catch (Exception $e) { } catch (Exception $e) {
$this->notify('Error', $e->getMessage(), 'danger'); $this->notify(__('commandocentrum.error'), $e->getMessage(), 'danger');
} }
} }
@@ -1064,7 +1066,7 @@ final class Commandocentrum extends Page implements HasForms
public function refreshDiagnostics(): void public function refreshDiagnostics(): void
{ {
$this->runDiagnostics(); $this->runDiagnostics();
$this->notify('Success', 'Diagnostiek vernieuwd', 'success'); $this->notify(__('commandocentrum.success'), __('commandocentrum.diagnostics_refreshed'), 'success');
} }
private function runDiagnostics(): void private function runDiagnostics(): void
@@ -1094,24 +1096,24 @@ final class Commandocentrum extends Page implements HasForms
default => '#22c55e', default => '#22c55e',
}; };
$overallLabel = match ($overallStatus) { $overallLabel = match ($overallStatus) {
'error' => 'Kritieke Problemen', 'error' => __('commandocentrum.critical_issues'),
'warning' => 'Waarschuwingen', 'warning' => __('commandocentrum.warnings'),
default => 'Gezond', default => __('commandocentrum.healthy'),
}; };
$html = '<div style="display:flex;flex-direction:column;gap:16px;">'; $html = '<div style="display:flex;flex-direction:column;gap:16px;">';
// Summary cards // Summary cards
$html .= '<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:12px;">'; $html .= '<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:12px;">';
$html .= $this->getSummaryCardHtml('Gezond', $okCount, '#22c55e', 'heroicon-o-check-circle'); $html .= $this->getSummaryCardHtml(__('commandocentrum.healthy'), $okCount, '#22c55e', 'heroicon-o-check-circle');
$html .= $this->getSummaryCardHtml('Waarschuwingen', $warningCount, '#f59e0b', 'heroicon-o-exclamation-triangle'); $html .= $this->getSummaryCardHtml(__('commandocentrum.warnings'), $warningCount, '#f59e0b', 'heroicon-o-exclamation-triangle');
$html .= $this->getSummaryCardHtml('Fouten', $errorCount, '#ef4444', 'heroicon-o-x-circle'); $html .= $this->getSummaryCardHtml(__('commandocentrum.errors'), $errorCount, '#ef4444', 'heroicon-o-x-circle');
$html .= '</div>'; $html .= '</div>';
// Overall status banner // Overall status banner
$html .= '<div style="background:{$overallColor}15;border:1px solid {$overallColor}30;border-radius:12px;padding:16px;display:flex;align-items:center;gap:12px;">'; $html .= '<div style="background:{$overallColor}15;border:1px solid {$overallColor}30;border-radius:12px;padding:16px;display:flex;align-items:center;gap:12px;">';
$html .= '<div style="width:12px;height:12px;border-radius:50%;background:{$overallColor};"></div>'; $html .= '<div style="width:12px;height:12px;border-radius:50%;background:{$overallColor};"></div>';
$html .= '<span style="font-weight:700;color:{$overallColor};font-size:16px;">Systeem Status: {$overallLabel}</span>'; $html .= '<span style="font-weight:700;color:{$overallColor};font-size:16px;">' . __('commandocentrum.system_status') . ': {$overallLabel}</span>';
$html .= '</div>'; $html .= '</div>';
// Detailed results // Detailed results
+185 -1392
View File
File diff suppressed because it is too large Load Diff
+185 -1398
View File
File diff suppressed because it is too large Load Diff
@@ -2,7 +2,7 @@
<input <input
type="text" type="text"
wire:model="data.hotel_alert_message" wire:model="data.hotel_alert_message"
placeholder="Typ hier je alert bericht..." placeholder="{{ __('commandocentrum.alert_message_placeholder') }}"
style="flex:1;padding:14px 16px;border:2px solid #e2e8f0;border-radius:10px;font-size:14px;transition:border-color 0.2s;" style="flex:1;padding:14px 16px;border:2px solid #e2e8f0;border-radius:10px;font-size:14px;transition:border-color 0.2s;"
onfocus="this.style.borderColor='#3b82f6'" onfocus="this.style.borderColor='#3b82f6'"
onblur="this.style.borderColor='#e2e8f0'" onblur="this.style.borderColor='#e2e8f0'"
@@ -13,6 +13,6 @@
onmouseover="this.style.transform='translateY(-2px)';this.style.boxShadow='0 6px 16px rgba(239,68,68,0.4)'" onmouseover="this.style.transform='translateY(-2px)';this.style.boxShadow='0 6px 16px rgba(239,68,68,0.4)'"
onmouseout="this.style.transform='translateY(0)';this.style.boxShadow='0 4px 12px rgba(239,68,68,0.3)'" onmouseout="this.style.transform='translateY(0)';this.style.boxShadow='0 4px 12px rgba(239,68,68,0.3)'"
> >
📢 Verstuur Alert 📢 {{ __('commandocentrum.send_alert') }}
</button> </button>
</div> </div>
@@ -5,8 +5,8 @@
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#94a3b8" stroke-width="2" style="margin:0 auto 16px;display:block;"> <svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#94a3b8" stroke-width="2" style="margin:0 auto 16px;display:block;">
<path d="M21 8v13H3V8M1 3h22v5H1zM10 12h4"/> <path d="M21 8v13H3V8M1 3h22v5H1zM10 12h4"/>
</svg> </svg>
<div style="font-size:14px;">Nog geen backups beschikbaar</div> <div style="font-size:14px;">{{ __('commandocentrum.no_backups') }}</div>
<div style="font-size:12px;margin-top:8px;">Backups worden automatisch aangemaakt bij elke emulator update</div> <div style="font-size:12px;margin-top:8px;">{{ __('commandocentrum.backups_auto') }}</div>
</div> </div>
@else @else
<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;"> <div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;">
@@ -30,7 +30,7 @@
onmouseover="this.style.transform='translateY(-1px)'" onmouseover="this.style.transform='translateY(-1px)'"
onmouseout="this.style.transform='translateY(0)'" onmouseout="this.style.transform='translateY(0)'"
> >
🔄 Herstellen 🔄 {{ __('commandocentrum.restore') }}
</button> </button>
</div> </div>
@endforeach @endforeach
@@ -2,7 +2,7 @@
<div style="display:flex;gap:16px;align-items:center;"> <div style="display:flex;gap:16px;align-items:center;">
<div style="background:#f8fafc;border-radius:12px;padding:16px;border:1px solid #e2e8f0;flex:1;"> <div style="background:#f8fafc;border-radius:12px;padding:16px;border:1px solid #e2e8f0;flex:1;">
<div style="font-size:12px;color:#64748b;margin-bottom:4px;">Kleding Items</div> <div style="font-size:12px;color:#64748b;margin-bottom:4px;">{{ __('commandocentrum.clothing_items') }}</div>
<div style="font-size:24px;font-weight:700;color:#1e293b;">{{ number_format($clothingCount) }}</div> <div style="font-size:24px;font-weight:700;color:#1e293b;">{{ number_format($clothingCount) }}</div>
</div> </div>
</div> </div>
@@ -16,22 +16,22 @@
default => '#22c55e', default => '#22c55e',
}; };
$overallLabel = match ($overallStatus) { $overallLabel = match ($overallStatus) {
'error' => 'Kritieke Problemen', 'error' => __('commandocentrum.critical_issues'),
'warning' => 'Waarschuwingen', 'warning' => __('commandocentrum.warnings'),
default => 'Gezond', default => __('commandocentrum.healthy'),
}; };
@endphp @endphp
<div style="display:flex;flex-direction:column;gap:16px;"> <div style="display:flex;flex-direction:column;gap:16px;">
<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:12px;"> <div style="display:grid;grid-template-columns:repeat(3,1fr);gap:12px;">
<x-filament-components::commandocentrum.summary-card label="Gezond" :count="$okCount" color="#22c55e" icon="check" /> <x-filament-components::commandocentrum.summary-card :label="__('commandocentrum.healthy')" :count="$okCount" color="#22c55e" icon="check" />
<x-filament-components::commandocentrum.summary-card label="Waarschuwingen" :count="$warningCount" color="#f59e0b" icon="warning" /> <x-filament-components::commandocentrum.summary-card :label="__('commandocentrum.warnings')" :count="$warningCount" color="#f59e0b" icon="warning" />
<x-filament-components::commandocentrum.summary-card label="Fouten" :count="$errorCount" color="#ef4444" icon="error" /> <x-filament-components::commandocentrum.summary-card :label="__('commandocentrum.errors')" :count="$errorCount" color="#ef4444" icon="error" />
</div> </div>
<div style="background:{{ $overallColor }}15;border:1px solid {{ $overallColor }}30;border-radius:12px;padding:16px;display:flex;align-items:center;gap:12px;"> <div style="background:{{ $overallColor }}15;border:1px solid {{ $overallColor }}30;border-radius:12px;padding:16px;display:flex;align-items:center;gap:12px;">
<div style="width:12px;height:12px;border-radius:50%;background:{{ $overallColor }};"></div> <div style="width:12px;height:12px;border-radius:50%;background:{{ $overallColor }};"></div>
<span style="font-weight:700;color:{{ $overallColor }};font-size:16px;">Systeem Status: {{ $overallLabel }}</span> <span style="font-weight:700;color:{{ $overallColor }};font-size:16px;">{{ __('commandocentrum.system_status') }}: {{ $overallLabel }}</span>
</div> </div>
@if ($errorCount > 0 || $warningCount > 0) @if ($errorCount > 0 || $warningCount > 0)
@@ -7,15 +7,15 @@
<div style="display:grid;grid-template-columns:repeat(2,1fr);gap:16px;"> <div style="display:grid;grid-template-columns:repeat(2,1fr);gap:16px;">
<div style="background:#f8fafc;border-radius:12px;padding:16px;border:1px solid #e2e8f0;"> <div style="background:#f8fafc;border-radius:12px;padding:16px;border:1px solid #e2e8f0;">
<div style="font-size:12px;color:#64748b;margin-bottom:4px;">Versie</div> <div style="font-size:12px;color:#64748b;margin-bottom:4px;">{{ __('commandocentrum.version') }}</div>
<div style="font-size:20px;font-weight:700;color:#1e293b;">{{ $version }}</div> <div style="font-size:20px;font-weight:700;color:#1e293b;">{{ $version }}</div>
</div> </div>
<div style="background:#f8fafc;border-radius:12px;padding:16px;border:1px solid #e2e8f0;"> <div style="background:#f8fafc;border-radius:12px;padding:16px;border:1px solid #e2e8f0;">
<div style="font-size:12px;color:#64748b;margin-bottom:4px;">Service</div> <div style="font-size:12px;color:#64748b;margin-bottom:4px;">{{ __('commandocentrum.service') }}</div>
<div style="font-size:20px;font-weight:700;color:#1e293b;">{{ $serviceName }}</div> <div style="font-size:20px;font-weight:700;color:#1e293b;">{{ $serviceName }}</div>
</div> </div>
<div style="background:{{ $color }}15;border-radius:12px;padding:16px;border:1px solid {{ $color }}30;grid-column:span 2;"> <div style="background:{{ $color }}15;border-radius:12px;padding:16px;border:1px solid {{ $color }}30;grid-column:span 2;">
<div style="font-size:12px;color:#64748b;margin-bottom:4px;">Status</div> <div style="font-size:12px;color:#64748b;margin-bottom:4px;">{{ __('commandocentrum.status') }}</div>
<div style="font-size:24px;font-weight:700;color:{{ $color }};"> {{ $status }}</div> <div style="font-size:24px;font-weight:700;color:{{ $color }};"> {{ $status }}</div>
</div> </div>
</div> </div>
@@ -5,45 +5,45 @@
<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:12px;"> <div style="display:grid;grid-template-columns:repeat(3,1fr);gap:12px;">
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">GitHub URL</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.github_url') }}</label>
<input type="text" wire:model="data.emulator_github_url" placeholder="https://github.com/..." style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.emulator_github_url" placeholder="https://github.com/..." style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">JAR Direct URL</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.jar_direct_url') }}</label>
<input type="text" wire:model="data.emulator_jar_direct_url" placeholder="https://..." style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.emulator_jar_direct_url" placeholder="https://..." style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">JAR Pad</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.jar_path') }}</label>
<input type="text" wire:model="data.emulator_jar_path" placeholder="/root/emulator" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.emulator_jar_path" placeholder="/root/emulator" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Source Repo</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.source_repo') }}</label>
<input type="text" wire:model="data.emulator_source_repo" placeholder="user/repo" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.emulator_source_repo" placeholder="user/repo" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Source Pad</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.source_path') }}</label>
<input type="text" wire:model="data.emulator_source_path" placeholder="/var/www/emulator" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.emulator_source_path" placeholder="/var/www/emulator" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Branch</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.branch') }}</label>
<select wire:model="data.emulator_github_branch" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;background:#fff;"> <select wire:model="data.emulator_github_branch" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;background:#fff;">
{!! $emulatorBranchesHtml !!} {!! $emulatorBranchesHtml !!}
</select> </select>
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">DB Host</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.db_host') }}</label>
<input type="text" wire:model="data.emulator_database_host" placeholder="127.0.0.1" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.emulator_database_host" placeholder="127.0.0.1" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">DB Naam</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.db_name') }}</label>
<input type="text" wire:model="data.emulator_database_name" placeholder="habbo" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.emulator_database_name" placeholder="habbo" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Service Naam</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.service_name') }}</label>
<input type="text" wire:model="data.emulator_service_name" placeholder="arcturus" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.emulator_service_name" placeholder="arcturus" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div style="grid-column:span 3;"> <div style="grid-column:span 3;">
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Status</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.status') }}</label>
{!! $emulatorStatusHtml !!} {!! $emulatorStatusHtml !!}
</div> </div>
</div> </div>
@@ -13,10 +13,10 @@
$sourceCommitShort = substr($sourceCommit, 0, 7); $sourceCommitShort = substr($sourceCommit, 0, 7);
$hasUpdate = $sourceCommit !== 'N/A' && $remoteVersion !== 'N/A' && $sourceCommitShort !== $remoteVersion; $hasUpdate = $sourceCommit !== 'N/A' && $remoteVersion !== 'N/A' && $sourceCommitShort !== $remoteVersion;
$updateColor = $hasUpdate ? '#f59e0b' : '#22c55e'; $updateColor = $hasUpdate ? '#f59e0b' : '#22c55e';
$updateText = $hasUpdate ? '🔄 Update beschikbaar' : '✓ Up-to-date'; $updateText = $hasUpdate ? '🔄 ' . __('commandocentrum.update_available') : '✓ ' . __('commandocentrum.up_to_date');
$btnColor = $hasUpdate ? '#f59e0b' : '#3b82f6'; $btnColor = $hasUpdate ? '#f59e0b' : '#3b82f6';
$btnGradient = $hasUpdate ? 'linear-gradient(135deg,#f59e0b,#d97706)' : 'linear-gradient(135deg,#3b82f6,#2563eb)'; $btnGradient = $hasUpdate ? 'linear-gradient(135deg,#f59e0b,#d97706)' : 'linear-gradient(135deg,#3b82f6,#2563eb)';
$btnText = $hasUpdate ? '⚡ Updaten' : '🔄 Herbouwen'; $btnText = $hasUpdate ? '⚡ ' . __('commandocentrum.update') : '🔄 ' . __('commandocentrum.rebuild');
$jarFileName = ''; $jarFileName = '';
if ($jarExists) { if ($jarExists) {
@@ -33,19 +33,19 @@
<div style="display:flex;flex-direction:column;gap:8px;font-size:13px;"> <div style="display:flex;flex-direction:column;gap:8px;font-size:13px;">
<div style="display:flex;gap:16px;"> <div style="display:flex;gap:16px;">
@if ($emulatorOnline) @if ($emulatorOnline)
<span style="color:#22c55e;"> Online</span> <span style="color:#22c55e;"> {{ __('commandocentrum.online') }}</span>
@else @else
<span style="color:#ef4444;"> Offline</span> <span style="color:#ef4444;"> {{ __('commandocentrum.offline') }}</span>
@endif @endif
@if ($jarExists) @if ($jarExists)
<span style="color:#22c55e;"> JAR OK</span> <span style="color:#22c55e;"> JAR {{ __('commandocentrum.ok') }}</span>
@else @else
<span style="color:#ef4444;"> JAR ontbreekt</span> <span style="color:#ef4444;"> JAR {{ __('commandocentrum.missing') }}</span>
@endif @endif
<span style="color:#3b82f6;">Service: {{ e($serviceName) }}</span> <span style="color:#3b82f6;">{{ __('commandocentrum.service') }}: {{ e($serviceName) }}</span>
</div> </div>
<div style="padding-top:8px;border-top:1px solid #e2e8f0;"> <div style="padding-top:8px;border-top:1px solid #e2e8f0;">
<div style="font-weight:600;color:#475569;margin-bottom:8px;">GitHub Status:</div> <div style="font-weight:600;color:#475569;margin-bottom:8px;">GitHub {{ __('commandocentrum.status') }}:</div>
<div style="background:{{ $hasUpdate ? '#fef3c7' : '#dcfce7' }};padding:12px;border-radius:8px;margin-bottom:12px;"> <div style="background:{{ $hasUpdate ? '#fef3c7' : '#dcfce7' }};padding:12px;border-radius:8px;margin-bottom:12px;">
<div style="display:flex;align-items:center;justify-content:space-between;"> <div style="display:flex;align-items:center;justify-content:space-between;">
<div style="display:flex;align-items:center;gap:8px;font-weight:600;color:{{ $updateColor }};"> <div style="display:flex;align-items:center;gap:8px;font-weight:600;color:{{ $updateColor }};">
@@ -61,24 +61,24 @@
</button> </button>
</div> </div>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>Latest:</span><span style="color:#22c55e;font-weight:600;"> {{ e($remoteVersion) }}</span></div> <div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>{{ __('commandocentrum.latest') }}:</span><span style="color:#22c55e;font-weight:600;"> {{ e($remoteVersion) }}</span></div>
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>Source:</span><span style="color:#22c55e;font-weight:600;"> {{ $sourceCommitShort }}</span></div> <div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>{{ __('commandocentrum.source') }}:</span><span style="color:#22c55e;font-weight:600;"> {{ $sourceCommitShort }}</span></div>
@if ($jarFileName !== '') @if ($jarFileName !== '')
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>JAR:</span><span style="color:#22c55e;font-weight:600;"> {{ e($jarFileName) }}</span></div> <div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>{{ __('commandocentrum.jars') }}:</span><span style="color:#22c55e;font-weight:600;"> {{ e($jarFileName) }}</span></div>
@endif @endif
@if ($canBuild) @if ($canBuild)
<div style="display:flex;justify-content:space-between;padding:6px 0;"><span>Bouwen:</span><span style="color:#22c55e;font-weight:600;"> Maven (pom.xml)</span></div> <div style="display:flex;justify-content:space-between;padding:6px 0;"><span>{{ __('commandocentrum.method') }}:</span><span style="color:#22c55e;font-weight:600;"> {{ __('commandocentrum.maven_pom') }}</span></div>
@else @else
<div style="display:flex;justify-content:space-between;padding:6px 0;"><span>Bouwen:</span><span style="color:#f59e0b;font-weight:600;">⚠️ Geen pom.xml</span></div> <div style="display:flex;justify-content:space-between;padding:6px 0;"><span>{{ __('commandocentrum.method') }}:</span><span style="color:#f59e0b;font-weight:600;">⚠️ {{ __('commandocentrum.no_pom') }}</span></div>
@endif @endif
<div style="margin-top:12px;padding:12px;background:#f8fafc;border-radius:8px;"> <div style="margin-top:12px;padding:12px;background:#f8fafc;border-radius:8px;">
<div style="font-size:11px;color:#64748b;font-weight:600;margin-bottom:8px;">METHODE:</div> <div style="font-size:11px;color:#64748b;font-weight:600;margin-bottom:8px;">{{ __('commandocentrum.method') }}:</div>
@if ($jarExists) @if ($jarExists)
<div style="color:#3b82f6;font-weight:600;">📦 JAR Download & Herstart</div> <div style="color:#3b82f6;font-weight:600;">📦 {{ __('commandocentrum.jar_download_restart') }}</div>
@elseif ($canBuild) @elseif ($canBuild)
<div style="color:#3b82f6;font-weight:600;">🔨 Maven Build & Herstart</div> <div style="color:#3b82f6;font-weight:600;">🔨 {{ __('commandocentrum.maven_build_restart') }}</div>
@else @else
<div style="color:#64748b;">Handmatig: Download JAR van GitHub</div> <div style="color:#64748b;">{{ __('commandocentrum.manual_download') }}</div>
@endif @endif
</div> </div>
</div> </div>
@@ -21,22 +21,22 @@
<div style="background:#3b82f615;padding:10px;border-radius:12px;"> <div style="background:#3b82f615;padding:10px;border-radius:12px;">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#3b82f6" stroke-width="2"><path d="M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"/></svg> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#3b82f6" stroke-width="2"><path d="M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"/></svg>
</div> </div>
<span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">Emulator</span> <span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">{{ __('commandocentrum.emulator') }}</span>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f1f5f9;"> <div style="display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f1f5f9;">
<span style="color:#64748b;">Status</span> <span style="color:#64748b;">{{ __('commandocentrum.status') }}</span>
<span style="font-weight:600;color:{{ $serviceColor }};background:{{ $serviceColor }}15;padding:2px 10px;border-radius:20px;font-size:12px;">{{ $serviceStatus }}</span> <span style="font-weight:600;color:{{ $serviceColor }};background:{{ $serviceColor }}15;padding:2px 10px;border-radius:20px;font-size:12px;">{{ $serviceStatus }}</span>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f1f5f9;"> <div style="display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f1f5f9;">
<span style="color:#64748b;">Online</span> <span style="color:#64748b;">{{ __('commandocentrum.online') }}</span>
<span style="font-weight:600;color:#1e293b;">{{ $emulatorStatus }}</span> <span style="font-weight:600;color:#1e293b;">{{ $emulatorStatus }}</span>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f1f5f9;"> <div style="display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f1f5f9;">
<span style="color:#64748b;">Gebruikers</span> <span style="color:#64748b;">{{ __('commandocentrum.users') }}</span>
<span style="font-weight:700;color:#22c55e;font-size:18px;">{{ $onlineUsers }}</span> <span style="font-weight:700;color:#22c55e;font-size:18px;">{{ $onlineUsers }}</span>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:10px 0;"> <div style="display:flex;justify-content:space-between;padding:10px 0;">
<span style="color:#64748b;">Database</span> <span style="color:#64748b;">{{ __('commandocentrum.database') }}</span>
<span style="font-weight:600;color:{{ $dbColor }};">{{ $dbStatus }}</span> <span style="font-weight:600;color:{{ $dbColor }};">{{ $dbStatus }}</span>
</div> </div>
</div> </div>
@@ -48,15 +48,15 @@
<span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">Nitro</span> <span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">Nitro</span>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f1f5f9;"> <div style="display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f1f5f9;">
<span style="color:#64748b;">Client</span> <span style="color:#64748b;">{{ __('commandocentrum.client') }}</span>
<span style="font-weight:600;color:{{ $clientColor }};background:{{ $clientColor }}15;padding:2px 10px;border-radius:20px;font-size:12px;">{{ $clientText }}</span> <span style="font-weight:600;color:{{ $clientColor }};background:{{ $clientColor }}15;padding:2px 10px;border-radius:20px;font-size:12px;">{{ $clientText }}</span>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f1f5f9;"> <div style="display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #f1f5f9;">
<span style="color:#64748b;">Renderer</span> <span style="color:#64748b;">{{ __('commandocentrum.renderer') }}</span>
<span style="font-weight:600;color:{{ $rendererColor }};background:{{ $rendererColor }}15;padding:2px 10px;border-radius:20px;font-size:12px;">{{ $rendererText }}</span> <span style="font-weight:600;color:{{ $rendererColor }};background:{{ $rendererColor }}15;padding:2px 10px;border-radius:20px;font-size:12px;">{{ $rendererText }}</span>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:10px 0;"> <div style="display:flex;justify-content:space-between;padding:10px 0;">
<span style="color:#64748b;">Webroot</span> <span style="color:#64748b;">{{ __('commandocentrum.webroot_status') }}</span>
<span style="font-weight:600;color:{{ $webrootColor }};background:{{ $webrootColor }}15;padding:2px 10px;border-radius:20px;font-size:12px;">{{ $webrootText }}</span> <span style="font-weight:600;color:{{ $webrootColor }};background:{{ $webrootColor }}15;padding:2px 10px;border-radius:20px;font-size:12px;">{{ $webrootText }}</span>
</div> </div>
</div> </div>
@@ -5,37 +5,37 @@
<div style="display:grid;grid-template-columns:repeat(2,1fr);gap:12px;"> <div style="display:grid;grid-template-columns:repeat(2,1fr);gap:12px;">
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Client Pad</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.client_path') }}</label>
<input type="text" wire:model="data.nitro_client_path" placeholder="/var/www/atomcms/nitro-client" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.nitro_client_path" placeholder="/var/www/atomcms/nitro-client" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Renderer Pad</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.renderer_path') }}</label>
<input type="text" wire:model="data.nitro_renderer_path" placeholder="/var/www/atomcms/nitro-renderer" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.nitro_renderer_path" placeholder="/var/www/atomcms/nitro-renderer" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Build Pad</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.build_path') }}</label>
<input type="text" wire:model="data.nitro_build_path" placeholder="/var/www/atomcms/nitro-client/dist" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.nitro_build_path" placeholder="/var/www/atomcms/nitro-client/dist" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Webroot</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.webroot') }}</label>
<input type="text" wire:model="data.nitro_webroot" placeholder="/var/www/Client" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.nitro_webroot" placeholder="/var/www/Client" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">GitHub URL</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.github_url') }}</label>
<input type="text" wire:model="data.nitro_github_url" placeholder="https://github.com/..." style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.nitro_github_url" placeholder="https://github.com/..." style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Branch</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.branch') }}</label>
<select wire:model="data.nitro_github_branch" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;background:#fff;"> <select wire:model="data.nitro_github_branch" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;background:#fff;">
{!! $nitroBranchesHtml !!} {!! $nitroBranchesHtml !!}
</select> </select>
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Site URL</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.site_url') }}</label>
<input type="text" wire:model="data.nitro_site_url" placeholder="https://hotel.nl" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" /> <input type="text" wire:model="data.nitro_site_url" placeholder="https://hotel.nl" style="width:100%;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:13px;" />
</div> </div>
<div> <div>
<label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">Status</label> <label style="display:block;font-size:12px;font-weight:600;color:#475569;margin-bottom:6px;">{{ __('commandocentrum.status') }}</label>
{!! $nitroStatusHtml !!} {!! $nitroStatusHtml !!}
</div> </div>
</div> </div>
@@ -15,7 +15,7 @@
$hasRendererUpdate = $rendererCommitShort !== 'N/A' && $rendererRemote !== 'N/A' && $rendererCommitShort !== $rendererRemote; $hasRendererUpdate = $rendererCommitShort !== 'N/A' && $rendererRemote !== 'N/A' && $rendererCommitShort !== $rendererRemote;
$hasUpdate = $hasClientUpdate || $hasRendererUpdate; $hasUpdate = $hasClientUpdate || $hasRendererUpdate;
$updateColor = $hasUpdate ? '#f59e0b' : '#22c55e'; $updateColor = $hasUpdate ? '#f59e0b' : '#22c55e';
$updateText = $hasUpdate ? '🔄 Update beschikbaar' : '✓ Up-to-date'; $updateText = $hasUpdate ? '🔄 ' . __('commandocentrum.update_available') : '✓ ' . __('commandocentrum.up_to_date');
$clientColor = $hasClientUpdate ? '#f59e0b' : '#22c55e'; $clientColor = $hasClientUpdate ? '#f59e0b' : '#22c55e';
$clientIcon = $hasClientUpdate ? '🔄' : '✓'; $clientIcon = $hasClientUpdate ? '🔄' : '✓';
$rendererColor = $hasRendererUpdate ? '#f59e0b' : '#22c55e'; $rendererColor = $hasRendererUpdate ? '#f59e0b' : '#22c55e';
@@ -24,22 +24,22 @@
<div style="display:flex;flex-direction:column;gap:4px;font-size:13px;"> <div style="display:flex;flex-direction:column;gap:4px;font-size:13px;">
@if ($clientExists) @if ($clientExists)
<span style="color:#22c55e;"> Client OK</span> <span style="color:#22c55e;"> {{ __('commandocentrum.client') }} {{ __('commandocentrum.ok') }}</span>
@else @else
<span style="color:#ef4444;"> Client ontbreekt</span> <span style="color:#ef4444;"> {{ __('commandocentrum.client') }} {{ __('commandocentrum.missing') }}</span>
@endif @endif
@if ($rendererExists) @if ($rendererExists)
<span style="color:#22c55e;"> Renderer OK</span> <span style="color:#22c55e;"> {{ __('commandocentrum.renderer') }} {{ __('commandocentrum.ok') }}</span>
@else @else
<span style="color:#ef4444;"> Renderer ontbreekt</span> <span style="color:#ef4444;"> {{ __('commandocentrum.renderer') }} {{ __('commandocentrum.missing') }}</span>
@endif @endif
@if ($webrootExists) @if ($webrootExists)
<span style="color:#22c55e;"> Webroot OK</span> <span style="color:#22c55e;"> {{ __('commandocentrum.webroot_status') }} {{ __('commandocentrum.ok') }}</span>
@else @else
<span style="color:#ef4444;"> Webroot ontbreekt</span> <span style="color:#ef4444;"> {{ __('commandocentrum.webroot_status') }} {{ __('commandocentrum.missing') }}</span>
@endif @endif
<div style="margin-top:8px;padding-top:8px;border-top:1px solid #e2e8f0;"> <div style="margin-top:8px;padding-top:8px;border-top:1px solid #e2e8f0;">
<div style="font-weight:600;color:#475569;margin-bottom:8px;">GitHub Status:</div> <div style="font-weight:600;color:#475569;margin-bottom:8px;">GitHub {{ __('commandocentrum.status') }}:</div>
<div style="background:{{ $hasUpdate ? '#fef3c7' : '#dcfce7' }};padding:12px;border-radius:8px;margin-bottom:12px;"> <div style="background:{{ $hasUpdate ? '#fef3c7' : '#dcfce7' }};padding:12px;border-radius:8px;margin-bottom:12px;">
<div style="display:flex;align-items:center;justify-content:space-between;"> <div style="display:flex;align-items:center;justify-content:space-between;">
<div style="display:flex;align-items:center;gap:8px;font-weight:600;color:{{ $updateColor }};"> <div style="display:flex;align-items:center;gap:8px;font-weight:600;color:{{ $updateColor }};">
@@ -52,14 +52,14 @@
onmouseover="this.style.transform='translateY(-1px)';this.style.boxShadow='0 4px 12px rgba(236,72,153,0.5)'" onmouseover="this.style.transform='translateY(-1px)';this.style.boxShadow='0 4px 12px rgba(236,72,153,0.5)'"
onmouseout="this.style.transform='translateY(0)';this.style.boxShadow='0 2px 8px rgba(236,72,153,0.4)'" onmouseout="this.style.transform='translateY(0)';this.style.boxShadow='0 2px 8px rgba(236,72,153,0.4)'"
> >
Updaten {{ __('commandocentrum.update') }}
</button> </button>
@endif @endif
</div> </div>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>Client Remote:</span><span style="color:#22c55e;font-weight:600;"> {{ e($clientRemote) }}</span></div> <div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>{{ __('commandocentrum.client') }} {{ __('commandocentrum.remote') }}:</span><span style="color:#22c55e;font-weight:600;"> {{ e($clientRemote) }}</span></div>
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>Client Local:</span><span style="color:{{ $clientColor }};font-weight:600;">{{ $clientIcon }} {{ $clientCommitShort }}</span></div> <div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>{{ __('commandocentrum.client') }} {{ __('commandocentrum.local') }}:</span><span style="color:{{ $clientColor }};font-weight:600;">{{ $clientIcon }} {{ $clientCommitShort }}</span></div>
<div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>Renderer Remote:</span><span style="color:#22c55e;font-weight:600;"> {{ e($rendererRemote) }}</span></div> <div style="display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #f1f5f9;"><span>{{ __('commandocentrum.renderer') }} {{ __('commandocentrum.remote') }}:</span><span style="color:#22c55e;font-weight:600;"> {{ e($rendererRemote) }}</span></div>
<div style="display:flex;justify-content:space-between;padding:6px 0;"><span>Renderer Local:</span><span style="color:{{ $rendererColor }};font-weight:600;">{{ $rendererIcon }} {{ $rendererCommitShort }}</span></div> <div style="display:flex;justify-content:space-between;padding:6px 0;"><span>{{ __('commandocentrum.renderer') }} {{ __('commandocentrum.local') }}:</span><span style="color:{{ $rendererColor }};font-weight:600;">{{ $rendererIcon }} {{ $rendererCommitShort }}</span></div>
</div> </div>
</div> </div>
@@ -16,7 +16,7 @@
<div style="background:#6366f115;padding:10px;border-radius:12px;"> <div style="background:#6366f115;padding:10px;border-radius:12px;">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#6366f1" stroke-width="2"><path d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"/></svg> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#6366f1" stroke-width="2"><path d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"/></svg>
</div> </div>
<span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">PHP & Laravel</span> <span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">{{ __('commandocentrum.php_laravel') }}</span>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #f1f5f9;"> <div style="display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #f1f5f9;">
<span style="color:#64748b;">PHP</span> <span style="color:#64748b;">PHP</span>
@@ -32,14 +32,14 @@
<div style="background:#ec489915;padding:10px;border-radius:12px;"> <div style="background:#ec489915;padding:10px;border-radius:12px;">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#ec4899" stroke-width="2"><path d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"/></svg> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#ec4899" stroke-width="2"><path d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"/></svg>
</div> </div>
<span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">Memory & Disk</span> <span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">{{ __('commandocentrum.memory_disk') }}</span>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #f1f5f9;"> <div style="display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #f1f5f9;">
<span style="color:#64748b;">Memory</span> <span style="color:#64748b;">{{ __('commandocentrum.memory') }}</span>
<span style="font-weight:600;color:#ec4899;">{{ $memoryUsage }}MB / {{ $memoryLimit }}</span> <span style="font-weight:600;color:#ec4899;">{{ $memoryUsage }}MB / {{ $memoryLimit }}</span>
</div> </div>
<div style="display:flex;justify-content:space-between;padding:8px 0;"> <div style="display:flex;justify-content:space-between;padding:8px 0;">
<span style="color:#64748b;">Disk</span> <span style="color:#64748b;">{{ __('commandocentrum.disk') }}</span>
<span style="font-weight:600;color:#ec4899;">{{ $diskUsage }}</span> <span style="font-weight:600;color:#ec4899;">{{ $diskUsage }}</span>
</div> </div>
</div> </div>
@@ -48,7 +48,7 @@
<div style="background:#22c55e15;padding:10px;border-radius:12px;"> <div style="background:#22c55e15;padding:10px;border-radius:12px;">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>
</div> </div>
<span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">Uptime</span> <span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">{{ __('commandocentrum.uptime') }}</span>
</div> </div>
<div style="font-size:16px;font-weight:700;color:#22c55e;">{{ $uptime }}</div> <div style="font-size:16px;font-weight:700;color:#22c55e;">{{ $uptime }}</div>
</div> </div>
@@ -57,7 +57,7 @@
<div style="background:#f59e0b15;padding:10px;border-radius:12px;"> <div style="background:#f59e0b15;padding:10px;border-radius:12px;">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#f59e0b" stroke-width="2"><path d="M13 10V3L4 14h7v7l9-11h-7z"/></svg> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#f59e0b" stroke-width="2"><path d="M13 10V3L4 14h7v7l9-11h-7z"/></svg>
</div> </div>
<span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">Load</span> <span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">{{ __('commandocentrum.load') }}</span>
</div> </div>
<div style="display:flex;gap:8px;"> <div style="display:flex;gap:8px;">
<div style="flex:1;text-align:center;padding:8px;background:#f8fafc;border-radius:8px;"> <div style="flex:1;text-align:center;padding:8px;background:#f8fafc;border-radius:8px;">
@@ -9,14 +9,14 @@
<svg width="48" height="48" fill="none" stroke="currentColor" viewBox="0 0 24 24" style="margin:0 auto 16px;opacity:0.5;"> <svg width="48" height="48" fill="none" stroke="currentColor" viewBox="0 0 24 24" style="margin:0 auto 16px;opacity:0.5;">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg> </svg>
<p>No staff activities recorded yet.</p> <p>{{ __('commandocentrum.no_staff_activities') }}</p>
<p style="font-size:12px;margin-top:8px;">Staff actions will appear here automatically.</p> <p style="font-size:12px;margin-top:8px;">{{ __('commandocentrum.staff_actions_auto') }}</p>
</div> </div>
@else @else
<div style="background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;"> <div style="background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;">
<div style="padding:16px;border-bottom:1px solid #e2e8f0;display:flex;justify-content:space-between;align-items:center;"> <div style="padding:16px;border-bottom:1px solid #e2e8f0;display:flex;justify-content:space-between;align-items:center;">
<span style="font-weight:600;color:#1e293b;">Recent Staff Activities</span> <span style="font-weight:600;color:#1e293b;">{{ __('commandocentrum.recent_staff_activities') }}</span>
<span style="font-size:12px;color:#9ca3af;">Last 20 actions</span> <span style="font-size:12px;color:#9ca3af;">{{ __('commandocentrum.last_20_actions') }}</span>
</div> </div>
<div style="max-height:400px;overflow-y:auto;"> <div style="max-height:400px;overflow-y:auto;">
@foreach ($activities as $activity) @foreach ($activities as $activity)
@@ -28,18 +28,18 @@
$now = \Carbon\Carbon::now(); $now = \Carbon\Carbon::now();
$diff = $now->diffInMinutes($carbon); $diff = $now->diffInMinutes($carbon);
if ($diff < 1) { if ($diff < 1) {
$timeAgo = 'Just now'; $timeAgo = __('commandocentrum.just_now');
} elseif ($diff < 60) { } elseif ($diff < 60) {
$timeAgo = $diff . 'm ago'; $timeAgo = $diff . __('commandocentrum.minutes_ago');
} elseif ($diff < 1440) { } elseif ($diff < 1440) {
$timeAgo = floor($diff / 60) . 'h ago'; $timeAgo = floor($diff / 60) . __('commandocentrum.hours_ago');
} else { } else {
$timeAgo = floor($diff / 1440) . 'd ago'; $timeAgo = floor($diff / 1440) . __('commandocentrum.days_ago');
} }
} catch (\Exception) { } catch (\Exception) {
$timeAgo = 'Unknown'; $timeAgo = __('commandocentrum.unknown');
} }
$username = $activity->user->username ?? 'Unknown'; $username = $activity->user->username ?? __('commandocentrum.unknown');
@endphp @endphp
<div style="display:flex;align-items:center;gap:12px;padding:12px;border-bottom:1px solid #e2e8f0;"> <div style="display:flex;align-items:center;gap:12px;padding:12px;border-bottom:1px solid #e2e8f0;">
<div style="width:36px;height:36px;border-radius:50%;background:#f1f5f9;display:flex;align-items:center;justify-content:center;font-size:18px;"> <div style="width:36px;height:36px;border-radius:50%;background:#f1f5f9;display:flex;align-items:center;justify-content:center;font-size:18px;">
@@ -1,7 +1,7 @@
@props(['history']) @props(['history'])
@if (empty($history)) @if (empty($history))
<div style="padding:20px;text-align:center;color:#64748b;">Geen updates gevonden</div> <div style="padding:20px;text-align:center;color:#64748b;">{{ __('commandocentrum.no_updates_found') }}</div>
@else @else
<div style="display:flex;flex-direction:column;gap:8px;"> <div style="display:flex;flex-direction:column;gap:8px;">
@foreach ($history as $update) @foreach ($history as $update)