You've already forked Atomcms-edit
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:
@@ -38,6 +38,8 @@ use Illuminate\Support\Facades\Process;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use UnitEnum;
|
||||
|
||||
use function __;
|
||||
|
||||
final class Commandocentrum extends Page implements HasForms
|
||||
{
|
||||
use InteractsWithForms;
|
||||
@@ -126,27 +128,27 @@ final class Commandocentrum extends Page implements HasForms
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Section::make('🎯 Live Status')
|
||||
->description('Real-time hotel statistieken')
|
||||
Section::make(__('commandocentrum.live_status'))
|
||||
->description(__('commandocentrum.live_status_desc'))
|
||||
->icon('heroicon-o-heart')
|
||||
->columns(4)
|
||||
->schema([
|
||||
Placeholder::make('online_users')
|
||||
->label('Online')
|
||||
->content(fn (): HtmlString => $this->getCardHtml('Online', $this->getOnlineUsersCount(), '#22c55e', 'heroicon-o-users')),
|
||||
->label(__('commandocentrum.online'))
|
||||
->content(fn (): HtmlString => $this->getCardHtml(__('commandocentrum.online'), $this->getOnlineUsersCount(), '#22c55e', 'heroicon-o-users')),
|
||||
Placeholder::make('emulator_status')
|
||||
->label('Emulator')
|
||||
->content(fn (): HtmlString => $this->getCardHtml('Emulator', $this->getEmulatorStatusText(), $this->getEmulatorStatusColor(), 'heroicon-o-server')),
|
||||
->label(__('commandocentrum.emulator'))
|
||||
->content(fn (): HtmlString => $this->getCardHtml(__('commandocentrum.emulator'), $this->getEmulatorStatusText(), $this->getEmulatorStatusColor(), 'heroicon-o-server')),
|
||||
Placeholder::make('database_status')
|
||||
->label('Database')
|
||||
->content(fn (): HtmlString => $this->getCardHtml('Database', $this->isDatabaseOnline() ? 'Online' : 'Offline', $this->isDatabaseOnline() ? '#22c55e' : '#ef4444', 'heroicon-o-circle-stack')),
|
||||
->label(__('commandocentrum.database'))
|
||||
->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')
|
||||
->label('Load')
|
||||
->content(fn (): HtmlString => $this->getCardHtml('Load', $this->getServerLoad(), '#3b82f6', 'heroicon-o-cpu-chip')),
|
||||
->label(__('commandocentrum.load'))
|
||||
->content(fn (): HtmlString => $this->getCardHtml(__('commandocentrum.load'), $this->getServerLoad(), '#3b82f6', 'heroicon-o-cpu-chip')),
|
||||
]),
|
||||
|
||||
Section::make('📊 Server Informatie')
|
||||
->description('Gedetailleerde server status')
|
||||
Section::make(__('commandocentrum.server_info'))
|
||||
->description(__('commandocentrum.server_info_desc'))
|
||||
->icon('heroicon-o-information-circle')
|
||||
->schema([
|
||||
Placeholder::make('server_info')
|
||||
@@ -154,12 +156,12 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn () => $this->renderServerInfoView()),
|
||||
]),
|
||||
|
||||
Section::make('🩺 Systeem Gezondheid')
|
||||
->description('Automatische systeem diagnostiek')
|
||||
Section::make(__('commandocentrum.system_health'))
|
||||
->description(__('commandocentrum.system_health_desc'))
|
||||
->icon('heroicon-o-heart')
|
||||
->afterHeader([
|
||||
Action::make('refresh_diagnostics')
|
||||
->label('Vernieuwen')
|
||||
->label(__('commandocentrum.refresh'))
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->color('info')
|
||||
->action('refreshDiagnostics'),
|
||||
@@ -170,8 +172,8 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn (): HtmlString => $this->renderDiagnostics()),
|
||||
]),
|
||||
|
||||
Section::make('🏨 Hotel Status')
|
||||
->description('Emulator en Nitro status')
|
||||
Section::make(__('commandocentrum.hotel_status'))
|
||||
->description(__('commandocentrum.hotel_status_desc'))
|
||||
->icon('heroicon-o-building-office')
|
||||
->schema([
|
||||
Placeholder::make('hotel_status')
|
||||
@@ -179,8 +181,8 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn () => $this->renderHotelStatusView()),
|
||||
]),
|
||||
|
||||
Section::make('📢 Hotel Alert')
|
||||
->description('Stuur een bericht naar alle online gebruikers')
|
||||
Section::make(__('commandocentrum.hotel_alert'))
|
||||
->description(__('commandocentrum.hotel_alert_desc'))
|
||||
->icon('heroicon-o-megaphone')
|
||||
->schema([
|
||||
Placeholder::make('alert_form')
|
||||
@@ -188,8 +190,8 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn () => view('filament.components.commandocentrum.alert-form')),
|
||||
]),
|
||||
|
||||
Section::make('📜 Emulator Logs')
|
||||
->description('Live emulator log viewer')
|
||||
Section::make(__('commandocentrum.emulator_logs'))
|
||||
->description(__('commandocentrum.emulator_logs_desc'))
|
||||
->icon('heroicon-o-document-text')
|
||||
->columnSpanFull()
|
||||
->schema([
|
||||
@@ -198,28 +200,28 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn () => view('filament.components.emulator-log-viewer')),
|
||||
]),
|
||||
|
||||
Section::make('🖥️ Emulator Control')
|
||||
->description('Volledige emulator controle')
|
||||
Section::make(__('commandocentrum.emulator_control'))
|
||||
->description(__('commandocentrum.emulator_control_desc'))
|
||||
->icon('heroicon-o-server')
|
||||
->columns(3)
|
||||
->afterHeader([
|
||||
Action::make('start_emulator')
|
||||
->label('Start')
|
||||
->label(__('commandocentrum.start'))
|
||||
->icon('heroicon-o-play')
|
||||
->color('success')
|
||||
->action('startEmulator'),
|
||||
Action::make('stop_emulator')
|
||||
->label('Stop')
|
||||
->label(__('commandocentrum.stop'))
|
||||
->icon('heroicon-o-stop')
|
||||
->color('danger')
|
||||
->action('stopEmulator'),
|
||||
Action::make('restart_emulator')
|
||||
->label('Restart')
|
||||
->label(__('commandocentrum.restart'))
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->color('warning')
|
||||
->action('restartEmulator'),
|
||||
Action::make('check_emulator')
|
||||
->label('Check')
|
||||
->label(__('commandocentrum.check'))
|
||||
->icon('heroicon-o-check-circle')
|
||||
->color('info')
|
||||
->action('checkEmulator'),
|
||||
@@ -230,24 +232,24 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn () => $this->renderEmulatorInfoView()),
|
||||
]),
|
||||
|
||||
Section::make('🔄 Emulator Updates')
|
||||
->description('Configureer en update de emulator')
|
||||
Section::make(__('commandocentrum.emulator_updates'))
|
||||
->description(__('commandocentrum.emulator_updates_desc'))
|
||||
->icon('heroicon-o-arrow-down-circle')
|
||||
->afterHeader([
|
||||
Action::make('check_updates')
|
||||
->label('Check Updates')
|
||||
->label(__('commandocentrum.check_updates'))
|
||||
->color('info')
|
||||
->action('checkEmulatorUpdates'),
|
||||
Action::make('build_emulator')
|
||||
->label('🔨 Build')
|
||||
->label('🔨 ' . __('commandocentrum.build'))
|
||||
->color('success')
|
||||
->action('buildEmulator'),
|
||||
Action::make('run_sql')
|
||||
->label('SQL Updates')
|
||||
->label(__('commandocentrum.sql_updates'))
|
||||
->color('purple')
|
||||
->action('runSqlUpdates'),
|
||||
Action::make('save_emulator')
|
||||
->label('Opslaan')
|
||||
->label(__('commandocentrum.save'))
|
||||
->color('primary')
|
||||
->action('saveEmulator'),
|
||||
])
|
||||
@@ -257,8 +259,8 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn () => $this->renderEmulatorSettingsView()),
|
||||
]),
|
||||
|
||||
Section::make('💾 Emulator Backups')
|
||||
->description('Bekijk en herstel emulator backups')
|
||||
Section::make(__('commandocentrum.emulator_backups'))
|
||||
->description(__('commandocentrum.emulator_backups_desc'))
|
||||
->icon('heroicon-s-archive-box')
|
||||
->schema([
|
||||
Placeholder::make('backups_list')
|
||||
@@ -266,28 +268,28 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn () => $this->renderBackupsListView()),
|
||||
]),
|
||||
|
||||
Section::make('📦 Nitro Client')
|
||||
->description('Configureer en update Nitro')
|
||||
Section::make(__('commandocentrum.nitro_client'))
|
||||
->description(__('commandocentrum.nitro_client_desc'))
|
||||
->icon('heroicon-o-cloud-arrow-down')
|
||||
->afterHeader([
|
||||
Action::make('detect_paths')
|
||||
->label('🔍 Auto Detect')
|
||||
->label('🔍 ' . __('commandocentrum.auto_detect'))
|
||||
->color('success')
|
||||
->action('detectAndSavePaths'),
|
||||
Action::make('check_nitro')
|
||||
->label('Check')
|
||||
->label(__('commandocentrum.check'))
|
||||
->color('info')
|
||||
->action('checkNitroUpdates'),
|
||||
Action::make('build_nitro')
|
||||
->label('Build')
|
||||
->label(__('commandocentrum.build'))
|
||||
->color('pink')
|
||||
->action('buildNitro'),
|
||||
Action::make('generate_configs')
|
||||
->label('Genereer Configs')
|
||||
->label(__('commandocentrum.generate_configs'))
|
||||
->color('indigo')
|
||||
->action('generateNitroConfigs'),
|
||||
Action::make('save_nitro')
|
||||
->label('Opslaan')
|
||||
->label(__('commandocentrum.save'))
|
||||
->color('primary')
|
||||
->action('saveNitro'),
|
||||
])
|
||||
@@ -297,31 +299,31 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn () => $this->renderNitroSettingsView()),
|
||||
]),
|
||||
|
||||
Section::make('⚙️ Automatische Updates')
|
||||
->description('Configureer automatische updates')
|
||||
Section::make(__('commandocentrum.auto_updates'))
|
||||
->description(__('commandocentrum.auto_updates_desc'))
|
||||
->icon('heroicon-o-clock')
|
||||
->columns(2)
|
||||
->afterHeader([
|
||||
Action::make('save_auto')
|
||||
->label('Opslaan')
|
||||
->label(__('commandocentrum.save'))
|
||||
->color('primary')
|
||||
->action('saveAutoUpdate'),
|
||||
])
|
||||
->schema([
|
||||
Toggle::make('auto_update_enabled')
|
||||
->label('Automatische Updates Inschakelen'),
|
||||
->label(__('commandocentrum.enable_auto_updates')),
|
||||
TextInput::make('auto_update_schedule')
|
||||
->label('Schema (HH:MM)'),
|
||||
->label(__('commandocentrum.schedule')),
|
||||
TextInput::make('auto_update_days')
|
||||
->label('Dagen (0-6)'),
|
||||
->label(__('commandocentrum.days')),
|
||||
]),
|
||||
|
||||
Section::make('👔 Kleding Sync')
|
||||
->description('Sync catalogus kleding uit FigureMap')
|
||||
Section::make(__('commandocentrum.clothing_sync'))
|
||||
->description(__('commandocentrum.clothing_sync_desc'))
|
||||
->icon('heroicon-o-user')
|
||||
->afterHeader([
|
||||
Action::make('sync_clothing')
|
||||
->label('🔄 Sync')
|
||||
->label('🔄 ' . __('commandocentrum.sync'))
|
||||
->color('success')
|
||||
->action('syncClothing'),
|
||||
])
|
||||
@@ -331,41 +333,41 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn () => $this->renderClothingStatusView()),
|
||||
]),
|
||||
|
||||
Section::make('🔔 Meldingen')
|
||||
->description('E-mail en Discord alerts')
|
||||
Section::make(__('commandocentrum.notifications'))
|
||||
->description(__('commandocentrum.notifications_desc'))
|
||||
->icon('heroicon-o-bell')
|
||||
->columns(2)
|
||||
->afterHeader([
|
||||
Action::make('save_alerts')
|
||||
->label('Opslaan')
|
||||
->label(__('commandocentrum.save'))
|
||||
->color('primary')
|
||||
->action('saveAlerts'),
|
||||
Action::make('test_discord')
|
||||
->label('Test Discord')
|
||||
->label(__('commandocentrum.test_discord'))
|
||||
->color('info')
|
||||
->action('testDiscord'),
|
||||
])
|
||||
->schema([
|
||||
Toggle::make('alert_email_enabled')
|
||||
->label('E-mail Meldingen'),
|
||||
->label(__('commandocentrum.email_notifications')),
|
||||
TextInput::make('alert_email_address')
|
||||
->label('E-mail Adres')
|
||||
->label(__('commandocentrum.email_address'))
|
||||
->email()
|
||||
->columnSpanFull(),
|
||||
Toggle::make('alert_discord_enabled')
|
||||
->label('Discord Meldingen'),
|
||||
->label(__('commandocentrum.discord_notifications')),
|
||||
TextInput::make('alert_discord_webhook_url')
|
||||
->label('Webhook URL')
|
||||
->label(__('commandocentrum.webhook_url'))
|
||||
->columnSpanFull(),
|
||||
Select::make('discord_webhook_ranks')
|
||||
->label('Ranks die Discord notificatie krijgen')
|
||||
->label(__('commandocentrum.discord_ranks'))
|
||||
->multiple()
|
||||
->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')
|
||||
->description('Laatste systeem updates')
|
||||
Section::make(__('commandocentrum.update_history'))
|
||||
->description(__('commandocentrum.update_history_desc'))
|
||||
->icon('heroicon-o-clock')
|
||||
->schema([
|
||||
Placeholder::make('history')
|
||||
@@ -373,42 +375,42 @@ final class Commandocentrum extends Page implements HasForms
|
||||
->content(fn () => $this->renderUpdateHistoryView()),
|
||||
]),
|
||||
|
||||
Section::make('🔐 Social Login (v1.4)')
|
||||
->description('Enable social login providers')
|
||||
Section::make(__('commandocentrum.social_login'))
|
||||
->description(__('commandocentrum.social_login_desc'))
|
||||
->icon('heroicon-o-user-circle')
|
||||
->schema([
|
||||
Toggle::make('social_login_google_enabled')
|
||||
->label('Google Login')
|
||||
->helperText('Allow users to login with Google'),
|
||||
->label(__('commandocentrum.google_login'))
|
||||
->helperText(__('commandocentrum.google_login_helper')),
|
||||
TextInput::make('social_login_google_client_id')
|
||||
->label('Google Client ID')
|
||||
->helperText('From Google Cloud Console'),
|
||||
->label(__('commandocentrum.google_client_id'))
|
||||
->helperText(__('commandocentrum.google_client_id_helper')),
|
||||
TextInput::make('social_login_google_client_secret')
|
||||
->label('Google Client Secret')
|
||||
->label(__('commandocentrum.google_client_secret'))
|
||||
->type('password'),
|
||||
Toggle::make('social_login_discord_enabled')
|
||||
->label('Discord Login')
|
||||
->helperText('Allow users to login with Discord'),
|
||||
->label(__('commandocentrum.discord_login'))
|
||||
->helperText(__('commandocentrum.discord_login_helper')),
|
||||
TextInput::make('social_login_discord_client_id')
|
||||
->label('Discord Client ID')
|
||||
->helperText('From Discord Developer Portal'),
|
||||
->label(__('commandocentrum.discord_client_id'))
|
||||
->helperText(__('commandocentrum.discord_client_id_helper')),
|
||||
TextInput::make('social_login_discord_client_secret')
|
||||
->label('Discord Client Secret')
|
||||
->label(__('commandocentrum.discord_client_secret'))
|
||||
->type('password'),
|
||||
Toggle::make('social_login_github_enabled')
|
||||
->label('GitHub Login')
|
||||
->helperText('Allow users to login with GitHub'),
|
||||
->label(__('commandocentrum.github_login'))
|
||||
->helperText(__('commandocentrum.github_login_helper')),
|
||||
TextInput::make('social_login_github_client_id')
|
||||
->label('GitHub Client ID')
|
||||
->helperText('From GitHub Developer Settings'),
|
||||
->label(__('commandocentrum.github_client_id'))
|
||||
->helperText(__('commandocentrum.github_client_id_helper')),
|
||||
TextInput::make('social_login_github_client_secret')
|
||||
->label('GitHub Client Secret')
|
||||
->label(__('commandocentrum.github_client_secret'))
|
||||
->type('password'),
|
||||
])
|
||||
->columns(2),
|
||||
|
||||
Section::make('👔 Staff Activity Log')
|
||||
->description('Recent staff activities in the housekeeping (v1.2)')
|
||||
Section::make(__('commandocentrum.staff_activity'))
|
||||
->description(__('commandocentrum.staff_activity_desc'))
|
||||
->icon('heroicon-o-user-group')
|
||||
->schema([
|
||||
Placeholder::make('staff_activity')
|
||||
@@ -453,9 +455,9 @@ final class Commandocentrum extends Page implements HasForms
|
||||
|
||||
$clientColor = $clientExists ? '#22c55e' : '#ef4444';
|
||||
$rendererColor = $rendererExists ? '#22c55e' : '#ef4444';
|
||||
$clientText = $clientExists ? '✓ ' . substr($clientCommit, 0, 7) : '✗ Niet gevonden';
|
||||
$rendererText = $rendererExists ? '✓ ' . substr($rendererCommit, 0, 7) : '✗ Niet gevonden';
|
||||
$webrootText = $rendererExists ? '✓ ' . basename($nitroWebroot) : '✗ Niet gevonden';
|
||||
$clientText = $clientExists ? '✓ ' . substr($clientCommit, 0, 7) : '✗ ' . __('commandocentrum.not_found');
|
||||
$rendererText = $rendererExists ? '✓ ' . substr($rendererCommit, 0, 7) : '✗ ' . __('commandocentrum.not_found');
|
||||
$webrootText = $rendererExists ? '✓ ' . basename($nitroWebroot) : '✗ ' . __('commandocentrum.not_found');
|
||||
$webrootColor = $rendererExists ? '#22c55e' : '#ef4444';
|
||||
|
||||
return view('filament.components.commandocentrum.hotel-status', [
|
||||
@@ -463,7 +465,7 @@ final class Commandocentrum extends Page implements HasForms
|
||||
'serviceColor' => $serviceColor,
|
||||
'onlineUsers' => $this->getOnlineUsersCount(),
|
||||
'emulatorStatus' => $this->getEmulatorStatusText(),
|
||||
'dbStatus' => $this->isDatabaseOnline() ? 'Online' : 'Offline',
|
||||
'dbStatus' => $this->isDatabaseOnline() ? __('commandocentrum.online') : __('commandocentrum.offline'),
|
||||
'dbColor' => $this->isDatabaseOnline() ? '#22c55e' : '#ef4444',
|
||||
'clientExists' => $clientExists,
|
||||
'clientColor' => $clientColor,
|
||||
@@ -835,7 +837,7 @@ final class Commandocentrum extends Page implements HasForms
|
||||
public function sendHotelAlert(): void
|
||||
{
|
||||
$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']) {
|
||||
$this->data['hotel_alert_message'] = '';
|
||||
}
|
||||
@@ -844,19 +846,19 @@ final class Commandocentrum extends Page implements HasForms
|
||||
public function startEmulator(): void
|
||||
{
|
||||
$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
|
||||
{
|
||||
$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
|
||||
{
|
||||
$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
|
||||
@@ -865,20 +867,20 @@ final class Commandocentrum extends Page implements HasForms
|
||||
Artisan::call('monitor:emulator', ['--notify-online' => true]);
|
||||
$rconService = new RconService;
|
||||
if ($rconService->isConnected()) {
|
||||
$this->notify('Success', 'Emulator is online en reageert!', 'success');
|
||||
$this->notify(__('commandocentrum.success'), __('commandocentrum.emulator_online'), 'success');
|
||||
} else {
|
||||
$this->notify('Warning', 'Emulator is niet bereikbaar via RCON', 'warning');
|
||||
$this->notify(__('commandocentrum.warning'), __('commandocentrum.emulator_unreachable'), 'warning');
|
||||
}
|
||||
$this->fillForm();
|
||||
} catch (Exception $e) {
|
||||
$this->notify('Error', $e->getMessage(), 'danger');
|
||||
$this->notify(__('commandocentrum.error'), $e->getMessage(), 'danger');
|
||||
}
|
||||
}
|
||||
|
||||
public function checkEmulatorUpdates(): void
|
||||
{
|
||||
$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');
|
||||
$this->fillForm();
|
||||
}
|
||||
@@ -886,19 +888,19 @@ final class Commandocentrum extends Page implements HasForms
|
||||
public function buildEmulator(): void
|
||||
{
|
||||
$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
|
||||
{
|
||||
$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
|
||||
{
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -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_name', $this->data['emulator_database_name'] ?? '');
|
||||
$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) {
|
||||
$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');
|
||||
|
||||
$result = app(NitroControlAction::class)->pullUpdates($clientPath, $rendererPath, $branch);
|
||||
$this->notify('Success', $result['message'], 'success');
|
||||
$this->notify(__('commandocentrum.success'), $result['message'], 'success');
|
||||
$this->fillForm();
|
||||
}
|
||||
|
||||
@@ -939,7 +941,7 @@ final class Commandocentrum extends Page implements HasForms
|
||||
$branch = $this->getSetting('nitro_github_branch', 'main');
|
||||
|
||||
$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
|
||||
@@ -949,7 +951,7 @@ final class Commandocentrum extends Page implements HasForms
|
||||
$gamedataPath = $this->getSetting('gamedata_path', '/var/www/Gamedata');
|
||||
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -959,13 +961,13 @@ final class Commandocentrum extends Page implements HasForms
|
||||
$catalogService = app(CatalogService::class);
|
||||
$result = $catalogService->syncCatalogClothing();
|
||||
|
||||
$message = '👔 Kleding Sync Resultaat:' . PHP_EOL;
|
||||
$message = '👔 ' . __('commandocentrum.clothing_items') . ':' . PHP_EOL;
|
||||
$message .= '• Toegevoegd: ' . $result['inserted'] . PHP_EOL;
|
||||
$message .= '• Totaal: ' . $result['total'];
|
||||
|
||||
$this->notify('Success', $message, 'success');
|
||||
$this->notify(__('commandocentrum.success'), $message, 'success');
|
||||
} 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']);
|
||||
|
||||
$this->fillForm();
|
||||
$this->notify('Success', 'Paths gedetecteerd en opgeslagen!', 'success');
|
||||
$this->notify(__('commandocentrum.success'), __('commandocentrum.paths_detected'), 'success');
|
||||
} 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_branch', $this->data['nitro_github_branch'] ?? 'main');
|
||||
$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) {
|
||||
$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_schedule', $this->data['auto_update_schedule'] ?? '03:00');
|
||||
$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) {
|
||||
$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_webhook_url', $this->data['alert_discord_webhook_url'] ?? '');
|
||||
$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) {
|
||||
$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 {
|
||||
$webhookUrl = $this->data['alert_discord_webhook_url'] ?? '';
|
||||
if (empty($webhookUrl)) {
|
||||
$this->notify('Error', 'Webhook URL is leeg', 'danger');
|
||||
$this->notify(__('commandocentrum.error'), __('commandocentrum.webhook_empty'), 'danger');
|
||||
|
||||
return;
|
||||
}
|
||||
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) {
|
||||
$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
|
||||
{
|
||||
$this->runDiagnostics();
|
||||
$this->notify('Success', 'Diagnostiek vernieuwd', 'success');
|
||||
$this->notify(__('commandocentrum.success'), __('commandocentrum.diagnostics_refreshed'), 'success');
|
||||
}
|
||||
|
||||
private function runDiagnostics(): void
|
||||
@@ -1094,24 +1096,24 @@ final class Commandocentrum extends Page implements HasForms
|
||||
default => '#22c55e',
|
||||
};
|
||||
$overallLabel = match ($overallStatus) {
|
||||
'error' => 'Kritieke Problemen',
|
||||
'warning' => 'Waarschuwingen',
|
||||
default => 'Gezond',
|
||||
'error' => __('commandocentrum.critical_issues'),
|
||||
'warning' => __('commandocentrum.warnings'),
|
||||
default => __('commandocentrum.healthy'),
|
||||
};
|
||||
|
||||
$html = '<div style="display:flex;flex-direction:column;gap:16px;">';
|
||||
|
||||
// Summary cards
|
||||
$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('Waarschuwingen', $warningCount, '#f59e0b', 'heroicon-o-exclamation-triangle');
|
||||
$html .= $this->getSummaryCardHtml('Fouten', $errorCount, '#ef4444', 'heroicon-o-x-circle');
|
||||
$html .= $this->getSummaryCardHtml(__('commandocentrum.healthy'), $okCount, '#22c55e', 'heroicon-o-check-circle');
|
||||
$html .= $this->getSummaryCardHtml(__('commandocentrum.warnings'), $warningCount, '#f59e0b', 'heroicon-o-exclamation-triangle');
|
||||
$html .= $this->getSummaryCardHtml(__('commandocentrum.errors'), $errorCount, '#ef4444', 'heroicon-o-x-circle');
|
||||
$html .= '</div>';
|
||||
|
||||
// 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="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>';
|
||||
|
||||
// Detailed results
|
||||
|
||||
+185
-1392
File diff suppressed because it is too large
Load Diff
+185
-1398
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
<input
|
||||
type="text"
|
||||
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;"
|
||||
onfocus="this.style.borderColor='#3b82f6'"
|
||||
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)'"
|
||||
onmouseout="this.style.transform='translateY(0)';this.style.boxShadow='0 4px 12px rgba(239,68,68,0.3)'"
|
||||
>
|
||||
📢 Verstuur Alert
|
||||
📢 {{ __('commandocentrum.send_alert') }}
|
||||
</button>
|
||||
</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;">
|
||||
<path d="M21 8v13H3V8M1 3h22v5H1zM10 12h4"/>
|
||||
</svg>
|
||||
<div style="font-size:14px;">Nog geen backups beschikbaar</div>
|
||||
<div style="font-size:12px;margin-top:8px;">Backups worden automatisch aangemaakt bij elke emulator update</div>
|
||||
<div style="font-size:14px;">{{ __('commandocentrum.no_backups') }}</div>
|
||||
<div style="font-size:12px;margin-top:8px;">{{ __('commandocentrum.backups_auto') }}</div>
|
||||
</div>
|
||||
@else
|
||||
<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)'"
|
||||
onmouseout="this.style.transform='translateY(0)'"
|
||||
>
|
||||
🔄 Herstellen
|
||||
🔄 {{ __('commandocentrum.restore') }}
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<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="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>
|
||||
</div>
|
||||
|
||||
@@ -16,22 +16,22 @@
|
||||
default => '#22c55e',
|
||||
};
|
||||
$overallLabel = match ($overallStatus) {
|
||||
'error' => 'Kritieke Problemen',
|
||||
'warning' => 'Waarschuwingen',
|
||||
default => 'Gezond',
|
||||
'error' => __('commandocentrum.critical_issues'),
|
||||
'warning' => __('commandocentrum.warnings'),
|
||||
default => __('commandocentrum.healthy'),
|
||||
};
|
||||
@endphp
|
||||
|
||||
<div style="display:flex;flex-direction:column;gap:16px;">
|
||||
<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="Waarschuwingen" :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.healthy')" :count="$okCount" color="#22c55e" icon="check" />
|
||||
<x-filament-components::commandocentrum.summary-card :label="__('commandocentrum.warnings')" :count="$warningCount" color="#f59e0b" icon="warning" />
|
||||
<x-filament-components::commandocentrum.summary-card :label="__('commandocentrum.errors')" :count="$errorCount" color="#ef4444" icon="error" />
|
||||
</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="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>
|
||||
|
||||
@if ($errorCount > 0 || $warningCount > 0)
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
|
||||
<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="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>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
@@ -5,45 +5,45 @@
|
||||
|
||||
<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:12px;">
|
||||
<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;" />
|
||||
</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;" />
|
||||
</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;" />
|
||||
</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;" />
|
||||
</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;" />
|
||||
</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;">
|
||||
{!! $emulatorBranchesHtml !!}
|
||||
</select>
|
||||
</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;" />
|
||||
</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;" />
|
||||
</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;" />
|
||||
</div>
|
||||
<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 !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
$sourceCommitShort = substr($sourceCommit, 0, 7);
|
||||
$hasUpdate = $sourceCommit !== 'N/A' && $remoteVersion !== 'N/A' && $sourceCommitShort !== $remoteVersion;
|
||||
$updateColor = $hasUpdate ? '#f59e0b' : '#22c55e';
|
||||
$updateText = $hasUpdate ? '🔄 Update beschikbaar' : '✓ Up-to-date';
|
||||
$updateText = $hasUpdate ? '🔄 ' . __('commandocentrum.update_available') : '✓ ' . __('commandocentrum.up_to_date');
|
||||
$btnColor = $hasUpdate ? '#f59e0b' : '#3b82f6';
|
||||
$btnGradient = $hasUpdate ? 'linear-gradient(135deg,#f59e0b,#d97706)' : 'linear-gradient(135deg,#3b82f6,#2563eb)';
|
||||
$btnText = $hasUpdate ? '⚡ Updaten' : '🔄 Herbouwen';
|
||||
$btnText = $hasUpdate ? '⚡ ' . __('commandocentrum.update') : '🔄 ' . __('commandocentrum.rebuild');
|
||||
|
||||
$jarFileName = '';
|
||||
if ($jarExists) {
|
||||
@@ -33,19 +33,19 @@
|
||||
<div style="display:flex;flex-direction:column;gap:8px;font-size:13px;">
|
||||
<div style="display:flex;gap:16px;">
|
||||
@if ($emulatorOnline)
|
||||
<span style="color:#22c55e;">✓ Online</span>
|
||||
<span style="color:#22c55e;">✓ {{ __('commandocentrum.online') }}</span>
|
||||
@else
|
||||
<span style="color:#ef4444;">✗ Offline</span>
|
||||
<span style="color:#ef4444;">✗ {{ __('commandocentrum.offline') }}</span>
|
||||
@endif
|
||||
@if ($jarExists)
|
||||
<span style="color:#22c55e;">✓ JAR OK</span>
|
||||
<span style="color:#22c55e;">✓ JAR {{ __('commandocentrum.ok') }}</span>
|
||||
@else
|
||||
<span style="color:#ef4444;">✗ JAR ontbreekt</span>
|
||||
<span style="color:#ef4444;">✗ JAR {{ __('commandocentrum.missing') }}</span>
|
||||
@endif
|
||||
<span style="color:#3b82f6;">Service: {{ e($serviceName) }}</span>
|
||||
<span style="color:#3b82f6;">{{ __('commandocentrum.service') }}: {{ e($serviceName) }}</span>
|
||||
</div>
|
||||
<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="display:flex;align-items:center;justify-content:space-between;">
|
||||
<div style="display:flex;align-items:center;gap:8px;font-weight:600;color:{{ $updateColor }};">
|
||||
@@ -61,24 +61,24 @@
|
||||
</button>
|
||||
</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>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.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.source') }}:</span><span style="color:#22c55e;font-weight:600;">✓ {{ $sourceCommitShort }}</span></div>
|
||||
@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
|
||||
@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
|
||||
<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
|
||||
<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)
|
||||
<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)
|
||||
<div style="color:#3b82f6;font-weight:600;">🔨 Maven Build & Herstart</div>
|
||||
<div style="color:#3b82f6;font-weight:600;">🔨 {{ __('commandocentrum.maven_build_restart') }}</div>
|
||||
@else
|
||||
<div style="color:#64748b;">Handmatig: Download JAR van GitHub</div>
|
||||
<div style="color:#64748b;">{{ __('commandocentrum.manual_download') }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,22 +21,22 @@
|
||||
<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>
|
||||
</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 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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,15 +48,15 @@
|
||||
<span style="font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#94a3b8;">Nitro</span>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,37 +5,37 @@
|
||||
|
||||
<div style="display:grid;grid-template-columns:repeat(2,1fr);gap:12px;">
|
||||
<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;" />
|
||||
</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;" />
|
||||
</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;" />
|
||||
</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;" />
|
||||
</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;" />
|
||||
</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;">
|
||||
{!! $nitroBranchesHtml !!}
|
||||
</select>
|
||||
</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;" />
|
||||
</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 !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
$hasRendererUpdate = $rendererCommitShort !== 'N/A' && $rendererRemote !== 'N/A' && $rendererCommitShort !== $rendererRemote;
|
||||
$hasUpdate = $hasClientUpdate || $hasRendererUpdate;
|
||||
$updateColor = $hasUpdate ? '#f59e0b' : '#22c55e';
|
||||
$updateText = $hasUpdate ? '🔄 Update beschikbaar' : '✓ Up-to-date';
|
||||
$updateText = $hasUpdate ? '🔄 ' . __('commandocentrum.update_available') : '✓ ' . __('commandocentrum.up_to_date');
|
||||
$clientColor = $hasClientUpdate ? '#f59e0b' : '#22c55e';
|
||||
$clientIcon = $hasClientUpdate ? '🔄' : '✓';
|
||||
$rendererColor = $hasRendererUpdate ? '#f59e0b' : '#22c55e';
|
||||
@@ -24,22 +24,22 @@
|
||||
|
||||
<div style="display:flex;flex-direction:column;gap:4px;font-size:13px;">
|
||||
@if ($clientExists)
|
||||
<span style="color:#22c55e;">✓ Client OK</span>
|
||||
<span style="color:#22c55e;">✓ {{ __('commandocentrum.client') }} {{ __('commandocentrum.ok') }}</span>
|
||||
@else
|
||||
<span style="color:#ef4444;">✗ Client ontbreekt</span>
|
||||
<span style="color:#ef4444;">✗ {{ __('commandocentrum.client') }} {{ __('commandocentrum.missing') }}</span>
|
||||
@endif
|
||||
@if ($rendererExists)
|
||||
<span style="color:#22c55e;">✓ Renderer OK</span>
|
||||
<span style="color:#22c55e;">✓ {{ __('commandocentrum.renderer') }} {{ __('commandocentrum.ok') }}</span>
|
||||
@else
|
||||
<span style="color:#ef4444;">✗ Renderer ontbreekt</span>
|
||||
<span style="color:#ef4444;">✗ {{ __('commandocentrum.renderer') }} {{ __('commandocentrum.missing') }}</span>
|
||||
@endif
|
||||
@if ($webrootExists)
|
||||
<span style="color:#22c55e;">✓ Webroot OK</span>
|
||||
<span style="color:#22c55e;">✓ {{ __('commandocentrum.webroot_status') }} {{ __('commandocentrum.ok') }}</span>
|
||||
@else
|
||||
<span style="color:#ef4444;">✗ Webroot ontbreekt</span>
|
||||
<span style="color:#ef4444;">✗ {{ __('commandocentrum.webroot_status') }} {{ __('commandocentrum.missing') }}</span>
|
||||
@endif
|
||||
<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="display:flex;align-items:center;justify-content:space-between;">
|
||||
<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)'"
|
||||
onmouseout="this.style.transform='translateY(0)';this.style.boxShadow='0 2px 8px rgba(236,72,153,0.4)'"
|
||||
>
|
||||
⚡ Updaten
|
||||
⚡ {{ __('commandocentrum.update') }}
|
||||
</button>
|
||||
@endif
|
||||
</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>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>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;"><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;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>{{ __('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>{{ __('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>{{ __('commandocentrum.renderer') }} {{ __('commandocentrum.local') }}:</span><span style="color:{{ $rendererColor }};font-weight:600;">{{ $rendererIcon }} {{ $rendererCommitShort }}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<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>
|
||||
</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 style="display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #f1f5f9;">
|
||||
<span style="color:#64748b;">PHP</span>
|
||||
@@ -32,14 +32,14 @@
|
||||
<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>
|
||||
</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 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>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,7 +48,7 @@
|
||||
<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>
|
||||
</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 style="font-size:16px;font-weight:700;color:#22c55e;">{{ $uptime }}</div>
|
||||
</div>
|
||||
@@ -57,7 +57,7 @@
|
||||
<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>
|
||||
</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 style="display:flex;gap: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;">
|
||||
<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>
|
||||
<p>No staff activities recorded yet.</p>
|
||||
<p style="font-size:12px;margin-top:8px;">Staff actions will appear here automatically.</p>
|
||||
<p>{{ __('commandocentrum.no_staff_activities') }}</p>
|
||||
<p style="font-size:12px;margin-top:8px;">{{ __('commandocentrum.staff_actions_auto') }}</p>
|
||||
</div>
|
||||
@else
|
||||
<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;">
|
||||
<span style="font-weight:600;color:#1e293b;">Recent Staff Activities</span>
|
||||
<span style="font-size:12px;color:#9ca3af;">Last 20 actions</span>
|
||||
<span style="font-weight:600;color:#1e293b;">{{ __('commandocentrum.recent_staff_activities') }}</span>
|
||||
<span style="font-size:12px;color:#9ca3af;">{{ __('commandocentrum.last_20_actions') }}</span>
|
||||
</div>
|
||||
<div style="max-height:400px;overflow-y:auto;">
|
||||
@foreach ($activities as $activity)
|
||||
@@ -28,18 +28,18 @@
|
||||
$now = \Carbon\Carbon::now();
|
||||
$diff = $now->diffInMinutes($carbon);
|
||||
if ($diff < 1) {
|
||||
$timeAgo = 'Just now';
|
||||
$timeAgo = __('commandocentrum.just_now');
|
||||
} elseif ($diff < 60) {
|
||||
$timeAgo = $diff . 'm ago';
|
||||
$timeAgo = $diff . __('commandocentrum.minutes_ago');
|
||||
} elseif ($diff < 1440) {
|
||||
$timeAgo = floor($diff / 60) . 'h ago';
|
||||
$timeAgo = floor($diff / 60) . __('commandocentrum.hours_ago');
|
||||
} else {
|
||||
$timeAgo = floor($diff / 1440) . 'd ago';
|
||||
$timeAgo = floor($diff / 1440) . __('commandocentrum.days_ago');
|
||||
}
|
||||
} catch (\Exception) {
|
||||
$timeAgo = 'Unknown';
|
||||
$timeAgo = __('commandocentrum.unknown');
|
||||
}
|
||||
$username = $activity->user->username ?? 'Unknown';
|
||||
$username = $activity->user->username ?? __('commandocentrum.unknown');
|
||||
@endphp
|
||||
<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;">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@props(['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
|
||||
<div style="display:flex;flex-direction:column;gap:8px;">
|
||||
@foreach ($history as $update)
|
||||
|
||||
Reference in New Issue
Block a user