You've already forked Atomcms-edit
Remove all auto-update functionality (commands, services, widgets, blades, translations)
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
<div class="w-22 h-22 rounded-full overflow-hidden border-4 transition-all duration-300 group-hover:scale-110 group-hover:rotate-3"
|
||||
style="border-color: {{ $staffColor }}; box-shadow: 0 0 15px {{ $staffColor }}50, inset 0 0 15px {{ $staffColor }}20;">
|
||||
<img style="image-rendering: pixelated;"
|
||||
src="{{ setting('avatar_imager') }}{{ $user->look }}&direction=2&head_direction=3&gesture=sml&action=wav&size=n"
|
||||
src="{{ setting('avatar_imager') }}{{ $user->look }}&direction=3&head_direction=3&gesture=sml&action=wlk%2Cwav&size=l&img_format=gif&size=n"
|
||||
alt="{{ $user->username }}"
|
||||
class="w-full h-full object-cover">
|
||||
</div>
|
||||
|
||||
@@ -1,140 +1,139 @@
|
||||
<x-app-layout>
|
||||
@push('title', auth()->user()->username)
|
||||
@push('title', auth()->user()->username)
|
||||
|
||||
<div class="col-span-12 space-y-4 lg:col-span-9">
|
||||
<x-user.me-backdrop :user="$user" />
|
||||
<div class="col-span-12 space-y-4 lg:col-span-9">
|
||||
<x-user.me-backdrop :user="$user" />
|
||||
|
||||
<div class="rounded-xl border-2 shadow-sm lg:flex lg:items-center lg:justify-between overflow-hidden"
|
||||
style="background-color: var(--color-surface); border-color: var(--border-color);">
|
||||
<div class="flex items-center gap-3 p-3" style="background-color: var(--color-primary);">
|
||||
<img src="{{ asset('/assets/images/icons/online-friends.png') }}" alt="{{ __('Online Friends') }}"
|
||||
class="w-6 h-6">
|
||||
<span class="text-sm font-semibold" style="color: var(--button-text-color)">{{ __('Online Friends') }}</span>
|
||||
</div>
|
||||
<div class="rounded-xl border-2 shadow-sm lg:flex lg:items-center lg:justify-between overflow-hidden"
|
||||
style="background-color: var(--color-surface); border-color: var(--border-color);">
|
||||
<div class="flex items-center gap-3 p-3" style="background-color: var(--color-primary);">
|
||||
<img src="{{ asset('/assets/images/icons/online-friends.png') }}" alt="{{ __('Online Friends') }}"
|
||||
class="w-6 h-6">
|
||||
<span class="text-sm font-semibold" style="color: var(--button-text-color)">{{ __('Online Friends') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="relative flex flex-wrap items-center justify-center gap-3 p-3">
|
||||
@foreach ($onlineFriends as $friend)
|
||||
<div data-popover-target="friend-{{ $friend->username }}"
|
||||
style="image-rendering: pixelated; background-image: url({{ setting('avatar_imager') }}{{ $friend->look }}&direction=2&head_direction=3&gesture=sml&action=wav&headonly=1&size=s)"
|
||||
class="inline-block h-12 w-12 rounded-full border-2 bg-center bg-no-repeat hover:border-[var(--border-color)] hover:scale-110 transition-all duration-300 cursor-pointer"
|
||||
style="border-color: var(--color-text-muted)">
|
||||
</div>
|
||||
<div class="relative flex flex-wrap items-center justify-center gap-3 p-3">
|
||||
@foreach ($onlineFriends as $friend)
|
||||
<div data-popover-target="friend-{{ $friend->username }}"
|
||||
class="inline-block h-12 w-12 rounded-full border-2 bg-center bg-no-repeat hover:border-[var(--border-color)] hover:scale-110 transition-all duration-300 cursor-pointer"
|
||||
style="image-rendering: pixelated; border-color: var(--color-text-muted); background-image: url({{ setting('avatar_imager') }}{{ $friend->look }}&direction=3&head_direction=3&gesture=sml&action=wlk,wav&size=l&img_format=gif);">
|
||||
</div>
|
||||
|
||||
<div data-popover id="friend-{{ $friend->username }}" role="tooltip"
|
||||
class="invisible absolute z-10 inline-block w-64 rounded-lg border shadow-xl opacity-0 transition-opacity duration-300"
|
||||
style="background-color: var(--color-surface); border-color: var(--color-text-muted); color: var(--color-text);">
|
||||
<div class="rounded-t-lg border-b px-4 py-3" style="border-color: var(--color-text-muted); background-color: var(--color-surface);">
|
||||
<div class="flex items-center justify-between font-semibold" style="color: var(--color-text)">
|
||||
{{ $friend->username }}
|
||||
<span class="w-2 h-2 rounded-full bg-green-500"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-4 py-3 space-y-1">
|
||||
<div class="text-sm">
|
||||
<span class="font-medium" style="color: var(--color-text-muted)">{{ __('Motto') }}:</span>
|
||||
<span class="ml-1" style="color: var(--color-text)">{{ $friend->motto }}</span>
|
||||
</div>
|
||||
<div class="text-sm">
|
||||
<span class="font-medium" style="color: var(--color-text-muted)">{{ __('Online Since') }}:</span>
|
||||
<span class="ml-1" style="color: var(--color-text)">{{ date(config('habbo.site.date_format'), $friend->last_online) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div data-popper-arrow class="absolute h-2 w-2 rotate-45 border-l border-b" style="border-color: var(--color-text-muted); background-color: var(--color-surface);"></div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div data-popover id="friend-{{ $friend->username }}" role="tooltip"
|
||||
class="invisible absolute z-10 inline-block w-64 rounded-lg border shadow-xl opacity-0 transition-opacity duration-300"
|
||||
style="background-color: var(--color-surface); border-color: var(--color-text-muted); color: var(--color-text);">
|
||||
<div class="rounded-t-lg border-b px-4 py-3" style="border-color: var(--color-text-muted); background-color: var(--color-surface);">
|
||||
<div class="flex items-center justify-between font-semibold" style="color: var(--color-text)">
|
||||
{{ $friend->username }}
|
||||
<span class="w-2 h-2 rounded-full bg-green-500"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-4 py-3 space-y-1">
|
||||
<div class="text-sm">
|
||||
<span class="font-medium" style="color: var(--color-text-muted)">{{ __('Motto') }}:</span>
|
||||
<span class="ml-1" style="color: var(--color-text)">{{ $friend->motto }}</span>
|
||||
</div>
|
||||
<div class="text-sm">
|
||||
<span class="font-medium" style="color: var(--color-text-muted)">{{ __('Online Since') }}:</span>
|
||||
<span class="ml-1" style="color: var(--color-text)">{{ date(config('habbo.site.date_format'), $friend->last_online) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div data-popper-arrow class="absolute h-2 w-2 rotate-45 border-l border-b" style="border-color: var(--color-text-muted); background-color: var(--color-surface);"></div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<x-content.content-card icon="friends-icon" classes="border-2 dark:border-gray-900" style="border-color: var(--border-color);">
|
||||
<x-slot:title>
|
||||
{{ sprintf(__('User Referrals (%s/%s)'), auth()->user()->referrals->referrals_total ?? 0, setting('referrals_needed')) }}
|
||||
</x-slot:title>
|
||||
<x-content.content-card icon="friends-icon" classes="border-2 dark:border-gray-900" style="border-color: var(--border-color);">
|
||||
<x-slot:title>
|
||||
{{ sprintf(__('User Referrals (%s/%s)'), auth()->user()->referrals->referrals_total ?? 0, setting('referrals_needed')) }}
|
||||
</x-slot:title>
|
||||
|
||||
<x-slot:under-title>
|
||||
{{ __('Referral new users and be rewarded by in-game goods') }}
|
||||
</x-slot:under-title>
|
||||
<x-slot:under-title>
|
||||
{{ __('Referral new users and be rewarded by in-game goods') }}
|
||||
</x-slot:under-title>
|
||||
|
||||
<div class="px-2 text-sm text-[var(--color-text)] space-y-4">
|
||||
<p>
|
||||
{{ __('Here at :hotel we have added a referral system, allowing you to obtain a bonus for every :needed users that registers through your referral link will allow you to claim a reward of :amount diamonds!', ['hotel' => setting('hotel_name'), 'needed' => setting('referrals_needed'), 'amount' => setting('referral_reward_amount')]) }}
|
||||
</p>
|
||||
<div class="px-2 text-sm text-[var(--color-text)] space-y-4">
|
||||
<p>
|
||||
{{ __('Here at :hotel we have added a referral system, allowing you to obtain a bonus for every :needed users that registers through your referral link will allow you to claim a reward of :amount diamonds!', ['hotel' => setting('hotel_name'), 'needed' => setting('referrals_needed'), 'amount' => setting('referral_reward_amount')]) }}
|
||||
</p>
|
||||
|
||||
<div class="bg-yellow-500/10 border border-yellow-500/30 rounded-lg p-3">
|
||||
<p class="text-yellow-400/80 text-xs">
|
||||
⚠️ {{ __('Boosting referrals by making own accounts will lead to removal of all progress, currency, inventory and a potential ban') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="bg-yellow-500/10 border border-yellow-500/30 rounded-lg p-3">
|
||||
<p class="text-yellow-400/80 text-xs">
|
||||
⚠️ {{ __('Boosting referrals by making own accounts will lead to removal of all progress, currency, inventory and a potential ban') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-12 gap-2">
|
||||
<x-form.input classes="col-span-12 md:col-span-10 text-sm" name="referral"
|
||||
value="{{ sprintf('%s/register/%s', config('habbo.site.site_url'), auth()->user()->referral_code) }}"
|
||||
:autofocus="false" :readonly="true" />
|
||||
<div class="grid grid-cols-12 gap-2">
|
||||
<x-form.input classes="col-span-12 md:col-span-10 text-sm" name="referral"
|
||||
value="{{ sprintf('%s/register/%s', config('habbo.site.site_url'), auth()->user()->referral_code) }}"
|
||||
:autofocus="false" :readonly="true" />
|
||||
|
||||
<div class="col-span-12 flex md:col-span-2" onclick="copyCode()">
|
||||
<x-form.secondary-button>
|
||||
{{ __('Copy code') }}
|
||||
</x-form.secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-12 flex md:col-span-2" onclick="copyCode()">
|
||||
<x-form.secondary-button>
|
||||
{{ __('Copy code') }}
|
||||
</x-form.secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (auth()->user()->referrals?->referrals_total >= (int) setting('referrals_needed'))
|
||||
<a href="{{ route('claim.referral-reward') }}" class="text-decoration-none">
|
||||
<x-form.secondary-button classes="mt-2">
|
||||
{{ __('Claim your referrals reward!') }}
|
||||
</x-form.secondary-button>
|
||||
</a>
|
||||
@else
|
||||
<button disabled class="mt-2 w-full rounded bg-[var(--color-text-muted)] p-3 text-[var(--color-text)] cursor-not-allowed opacity-60">
|
||||
{{ sprintf(__('You need to refer :needed more users, before being able to claim your reward', ['needed' =>auth()->user()->referralsNeeded() ?? 0]),auth()->user()->referrals->referrals_total ?? 0) }}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</x-content.content-card>
|
||||
</div>
|
||||
@if ((auth()->user()->referrals->referrals_total ?? 0) >= (int) setting('referrals_needed'))
|
||||
<a href="{{ route('claim.referral-reward') }}" class="text-decoration-none">
|
||||
<x-form.secondary-button classes="mt-2">
|
||||
{{ __('Claim your referrals reward!') }}
|
||||
</x-form.secondary-button>
|
||||
</a>
|
||||
@else
|
||||
<button disabled class="mt-2 w-full rounded bg-[var(--color-text-muted)] p-3 text-[var(--color-text)] cursor-not-allowed opacity-60">
|
||||
{{ sprintf(__('You need to refer :needed more users, before being able to claim your reward', ['needed' => max(0, (int) setting('referrals_needed') - (auth()->user()->referrals->referrals_total ?? 0))]), auth()->user()->referrals->referrals_total ?? 0) }}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</x-content.content-card>
|
||||
</div>
|
||||
|
||||
<div class="col-span-12 space-y-4 lg:col-span-3">
|
||||
<div class="relative w-full" style="height: 213px">
|
||||
<div class="relative swiper articles-slider">
|
||||
<div class="swiper-wrapper">
|
||||
@forelse ($articles as $article)
|
||||
<x-article-card :for-slider="true" :article="$article" />
|
||||
@empty
|
||||
<x-filler-article-card />
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-pagination" style="bottom: 0px !important; z-index: 0;"></div>
|
||||
</div>
|
||||
<div class="col-span-12 space-y-4 lg:col-span-3">
|
||||
<div class="relative w-full" style="height: 213px">
|
||||
<div class="relative swiper articles-slider">
|
||||
<div class="swiper-wrapper">
|
||||
@forelse ($articles as $article)
|
||||
<x-article-card :for-slider="true" :article="$article" />
|
||||
@empty
|
||||
<x-filler-article-card />
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-pagination" style="bottom: 0px !important; z-index: 0;"></div>
|
||||
</div>
|
||||
|
||||
<div class="!mt-3">
|
||||
<x-user.discord-widget />
|
||||
</div>
|
||||
</div>
|
||||
<div class="!mt-3">
|
||||
<x-user.discord-widget />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('javascript')
|
||||
<script>
|
||||
var Toast = Swal.mixin({
|
||||
toast: true,
|
||||
position: "top-end",
|
||||
showConfirmButton: false,
|
||||
timer: 4000,
|
||||
timerProgressBar: true,
|
||||
didOpen: (toast) => {
|
||||
toast.addEventListener("mouseenter", Swal.stopTimer);
|
||||
toast.addEventListener("mouseleave", Swal.resumeTimer);
|
||||
}
|
||||
});
|
||||
@push('javascript')
|
||||
<script>
|
||||
var Toast = Swal.mixin({
|
||||
toast: true,
|
||||
position: "top-end",
|
||||
showConfirmButton: false,
|
||||
timer: 4000,
|
||||
timerProgressBar: true,
|
||||
didOpen: (toast) => {
|
||||
toast.addEventListener("mouseenter", Swal.stopTimer);
|
||||
toast.addEventListener("mouseleave", Swal.resumeTimer);
|
||||
}
|
||||
});
|
||||
|
||||
function copyCode() {
|
||||
let copyText = document.querySelector("#referral");
|
||||
copyText.select();
|
||||
document.execCommand("copy");
|
||||
function copyCode() {
|
||||
let copyText = document.querySelector("#referral");
|
||||
copyText.select();
|
||||
document.execCommand("copy");
|
||||
|
||||
Toast.fire({
|
||||
icon: "success",
|
||||
title: '{{ __('Your referral code has been copied to your clipbord!') }}'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
</x-app-layout>
|
||||
Toast.fire({
|
||||
icon: "success",
|
||||
title: '{{ __('Your referral code has been copied to your clipboard!') }}'
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
</x-app-layout>
|
||||
@@ -1,38 +0,0 @@
|
||||
@props(['backups'])
|
||||
|
||||
@if (empty($backups))
|
||||
<div style="text-align:center;padding:32px;color:#64748b;background:#f8fafc;border-radius:12px;border:1px solid #e2e8f0;">
|
||||
<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;">{{ __('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;">
|
||||
@foreach ($backups as $backup)
|
||||
@php
|
||||
$dateFormatted = str_replace('_', ' ', $backup['date']);
|
||||
@endphp
|
||||
<div style="background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px;box-shadow:0 1px 3px rgba(0,0,0,0.06);">
|
||||
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;">
|
||||
<div style="display:flex;align-items:center;gap:8px;">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#f59e0b" stroke-width="2">
|
||||
<path d="M21 8v13H3V8M1 3h22v5H1zM10 12h4"/>
|
||||
</svg>
|
||||
<span style="font-weight:600;color:#1e293b;font-size:14px;">{{ $backup['jar'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="font-size:12px;color:#64748b;margin-bottom:12px;">{{ $dateFormatted }}</div>
|
||||
<button
|
||||
wire:click="restoreBackup('{{ $backup['name'] }}')"
|
||||
style="width:100%;background:linear-gradient(135deg,#3b82f6,#2563eb);padding:10px;border-radius:8px;color:white;border:none;cursor:pointer;font-weight:600;font-size:13px;box-shadow:0 2px 8px rgba(37,99,235,0.3);transition:transform 0.2s;"
|
||||
onmouseover="this.style.transform='translateY(-1px)'"
|
||||
onmouseout="this.style.transform='translateY(0)'"
|
||||
>
|
||||
🔄 {{ __('commandocentrum.restore') }}
|
||||
</button>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@@ -1,49 +0,0 @@
|
||||
@props([
|
||||
'emulatorBranchesHtml',
|
||||
'emulatorStatusHtml',
|
||||
])
|
||||
|
||||
<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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('commandocentrum.status') }}</label>
|
||||
{!! $emulatorStatusHtml !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,85 +0,0 @@
|
||||
@props([
|
||||
'emulatorOnline',
|
||||
'jarExists',
|
||||
'serviceName',
|
||||
'sourceCommit',
|
||||
'remoteVersion',
|
||||
'canBuild',
|
||||
'jarPath',
|
||||
'sourcePath',
|
||||
])
|
||||
|
||||
@php
|
||||
$sourceCommitShort = substr($sourceCommit, 0, 7);
|
||||
$hasUpdate = $sourceCommit !== 'N/A' && $remoteVersion !== 'N/A' && $sourceCommitShort !== $remoteVersion;
|
||||
$updateColor = $hasUpdate ? '#f59e0b' : '#22c55e';
|
||||
$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 ? '⚡ ' . __('commandocentrum.update') : '🔄 ' . __('commandocentrum.rebuild');
|
||||
|
||||
$jarFileName = '';
|
||||
if ($jarExists) {
|
||||
$jarSize = shell_exec('ls -lh ' . escapeshellarg($jarPath) . '/*.jar 2>/dev/null | head -1');
|
||||
if ($jarSize) {
|
||||
preg_match('/(\S+\.jar)/', $jarSize, $matches);
|
||||
if (isset($matches[1])) {
|
||||
$jarFileName = basename($matches[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div style="display:flex;flex-direction:column;gap:8px;font-size:13px;">
|
||||
<div style="display:flex;gap:16px;">
|
||||
@if ($emulatorOnline)
|
||||
<span style="color:#22c55e;">✓ {{ __('commandocentrum.online') }}</span>
|
||||
@else
|
||||
<span style="color:#ef4444;">✗ {{ __('commandocentrum.offline') }}</span>
|
||||
@endif
|
||||
@if ($jarExists)
|
||||
<span style="color:#22c55e;">✓ JAR {{ __('commandocentrum.ok') }}</span>
|
||||
@else
|
||||
<span style="color:#ef4444;">✗ JAR {{ __('commandocentrum.missing') }}</span>
|
||||
@endif
|
||||
<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 {{ __('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 }};">
|
||||
{{ $updateText }}
|
||||
</div>
|
||||
<button
|
||||
wire:click="checkEmulatorUpdates"
|
||||
style="background:{{ $btnGradient }};padding:8px 16px;border-radius:6px;color:white;border:none;cursor:pointer;font-weight:600;font-size:12px;box-shadow:0 2px 8px rgba(0,0,0,0.2);transition:transform 0.2s,box-shadow 0.2s;"
|
||||
onmouseover="this.style.transform='translateY(-1px)';this.style.boxShadow='0 4px 12px rgba(0,0,0,0.3)'"
|
||||
onmouseout="this.style.transform='translateY(0)';this.style.boxShadow='0 2px 8px rgba(0,0,0,0.2)'"
|
||||
>
|
||||
{{ $btnText }}
|
||||
</button>
|
||||
</div>
|
||||
</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>{{ __('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>{{ __('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>{{ __('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;">{{ __('commandocentrum.method') }}:</div>
|
||||
@if ($jarExists)
|
||||
<div style="color:#3b82f6;font-weight:600;">📦 {{ __('commandocentrum.jar_download_restart') }}</div>
|
||||
@elseif ($canBuild)
|
||||
<div style="color:#3b82f6;font-weight:600;">🔨 {{ __('commandocentrum.maven_build_restart') }}</div>
|
||||
@else
|
||||
<div style="color:#64748b;">{{ __('commandocentrum.manual_download') }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,41 +0,0 @@
|
||||
@props([
|
||||
'nitroBranchesHtml',
|
||||
'nitroStatusHtml',
|
||||
])
|
||||
|
||||
<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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('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;">{{ __('commandocentrum.status') }}</label>
|
||||
{!! $nitroStatusHtml !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,65 +0,0 @@
|
||||
@props([
|
||||
'clientExists',
|
||||
'rendererExists',
|
||||
'webrootExists',
|
||||
'clientCommit',
|
||||
'rendererCommit',
|
||||
'clientRemote',
|
||||
'rendererRemote',
|
||||
])
|
||||
|
||||
@php
|
||||
$clientCommitShort = substr($clientCommit, 0, 7);
|
||||
$rendererCommitShort = substr($rendererCommit, 0, 7);
|
||||
$hasClientUpdate = $clientCommitShort !== 'N/A' && $clientRemote !== 'N/A' && $clientCommitShort !== $clientRemote;
|
||||
$hasRendererUpdate = $rendererCommitShort !== 'N/A' && $rendererRemote !== 'N/A' && $rendererCommitShort !== $rendererRemote;
|
||||
$hasUpdate = $hasClientUpdate || $hasRendererUpdate;
|
||||
$updateColor = $hasUpdate ? '#f59e0b' : '#22c55e';
|
||||
$updateText = $hasUpdate ? '🔄 ' . __('commandocentrum.update_available') : '✓ ' . __('commandocentrum.up_to_date');
|
||||
$clientColor = $hasClientUpdate ? '#f59e0b' : '#22c55e';
|
||||
$clientIcon = $hasClientUpdate ? '🔄' : '✓';
|
||||
$rendererColor = $hasRendererUpdate ? '#f59e0b' : '#22c55e';
|
||||
$rendererIcon = $hasRendererUpdate ? '🔄' : '✓';
|
||||
@endphp
|
||||
|
||||
<div style="display:flex;flex-direction:column;gap:4px;font-size:13px;">
|
||||
@if ($clientExists)
|
||||
<span style="color:#22c55e;">✓ {{ __('commandocentrum.client') }} {{ __('commandocentrum.ok') }}</span>
|
||||
@else
|
||||
<span style="color:#ef4444;">✗ {{ __('commandocentrum.client') }} {{ __('commandocentrum.missing') }}</span>
|
||||
@endif
|
||||
@if ($rendererExists)
|
||||
<span style="color:#22c55e;">✓ {{ __('commandocentrum.renderer') }} {{ __('commandocentrum.ok') }}</span>
|
||||
@else
|
||||
<span style="color:#ef4444;">✗ {{ __('commandocentrum.renderer') }} {{ __('commandocentrum.missing') }}</span>
|
||||
@endif
|
||||
@if ($webrootExists)
|
||||
<span style="color:#22c55e;">✓ {{ __('commandocentrum.webroot_status') }} {{ __('commandocentrum.ok') }}</span>
|
||||
@else
|
||||
<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 {{ __('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 }};">
|
||||
{{ $updateText }}
|
||||
</div>
|
||||
@if ($hasUpdate)
|
||||
<button
|
||||
wire:click="checkNitroUpdates"
|
||||
style="background:linear-gradient(135deg,#ec4899,#db2777);padding:8px 16px;border-radius:6px;color:white;border:none;cursor:pointer;font-weight:600;font-size:12px;box-shadow:0 2px 8px rgba(236,72,153,0.4);transition:transform 0.2s,box-shadow 0.2s;"
|
||||
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)'"
|
||||
>
|
||||
⚡ {{ __('commandocentrum.update') }}
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</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>
|
||||
@@ -1,23 +0,0 @@
|
||||
@props(['history'])
|
||||
|
||||
@if (empty($history))
|
||||
<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)
|
||||
@php
|
||||
$statusColor = $update->status === 'success' ? '#22c55e' : ($update->status === 'pending' ? '#f59e0b' : '#ef4444');
|
||||
@endphp
|
||||
<div style="display:flex;align-items:center;justify-content:space-between;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:12px 16px;">
|
||||
<div>
|
||||
<span style="font-weight:600;color:#1e293b;">{{ e($update->type) }}</span>
|
||||
<span style="color:#64748b;margin-left:8px;">{{ e($update->message) }}</span>
|
||||
</div>
|
||||
<div style="display:flex;align-items:center;gap:8px;">
|
||||
<span style="color:{{ $statusColor }};font-weight:600;">{{ e($update->status) }}</span>
|
||||
<span style="color:#94a3b8;font-size:12px;">{{ e($update->created_at) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@@ -1,73 +0,0 @@
|
||||
<x-filament-widgets::widget>
|
||||
<div class="fi-section rounded-xl border-2 {{ $hasAnyUpdate ? 'border-orange-400 dark:border-orange-600' : 'border-green-400 dark:border-green-600' }} bg-white dark:bg-gray-800 shadow-sm p-5 mb-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-4">
|
||||
<div class="w-12 h-12 rounded-full {{ $hasAnyUpdate ? 'bg-orange-100 dark:bg-orange-900/50' : 'bg-green-100 dark:bg-green-900/50' }} flex items-center justify-center text-2xl">
|
||||
{{ $hasAnyUpdate ? '🔄' : '✅' }}
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
@if($hasAnyUpdate)
|
||||
<div class="font-bold text-lg text-gray-900 dark:text-white">Updates Beschikbaar!</div>
|
||||
<div class="text-gray-500 dark:text-gray-400 text-sm mt-1">Er zijn nieuwe updates beschikbaar</div>
|
||||
@else
|
||||
<div class="font-bold text-lg text-gray-900 dark:text-white">Emulator Status</div>
|
||||
<div class="text-gray-500 dark:text-gray-400 text-sm mt-1">Systeem is up-to-date</div>
|
||||
@endif
|
||||
<div class="flex flex-wrap gap-3 mt-3">
|
||||
@if($emulatorUpdate)
|
||||
<span class="inline-flex items-center gap-2 bg-orange-100 dark:bg-orange-900/30 rounded-lg px-3 py-1.5 text-sm text-orange-700 dark:text-orange-300 font-medium">
|
||||
🖥️ <span class="font-bold">Emulator</span> v{{ $emulatorVersion }} → v{{ $latestEmulatorVersion }}
|
||||
</span>
|
||||
@else
|
||||
<span class="inline-flex items-center gap-2 bg-gray-100 dark:bg-gray-700 rounded-lg px-3 py-1.5 text-sm text-gray-700 dark:text-gray-300 font-medium">
|
||||
🖥️ <span class="font-bold">Emulator</span> v{{ $emulatorVersion }}
|
||||
</span>
|
||||
@endif
|
||||
@if($nitroUpdate)
|
||||
<span class="inline-flex items-center gap-2 bg-orange-100 dark:bg-orange-900/30 rounded-lg px-3 py-1.5 text-sm text-orange-700 dark:text-orange-300 font-medium">
|
||||
🎮 <span class="font-bold">Client</span> v{{ $nitroVersion }} → v{{ $latestNitroVersion }}
|
||||
</span>
|
||||
@else
|
||||
<span class="inline-flex items-center gap-2 bg-gray-100 dark:bg-gray-700 rounded-lg px-3 py-1.5 text-sm text-gray-700 dark:text-gray-300 font-medium">
|
||||
🎮 <span class="font-bold">Client</span> v{{ $nitroVersion ?? 'Niet ingesteld' }}
|
||||
</span>
|
||||
@endif
|
||||
<span class="inline-flex items-center gap-2 bg-gray-100 dark:bg-gray-700 rounded-lg px-3 py-1.5 text-sm text-gray-700 dark:text-gray-300 font-medium">
|
||||
👥 {{ $onlineUsers }} online
|
||||
</span>
|
||||
<span class="inline-flex items-center gap-2 bg-gray-100 dark:bg-gray-700 rounded-lg px-3 py-1.5 text-sm text-gray-700 dark:text-gray-300 font-medium">
|
||||
💾 {{ $dbSize }} DB
|
||||
</span>
|
||||
<span class="inline-flex items-center gap-2 {{ $sqlPending > 0 ? 'bg-orange-100 dark:bg-orange-900/30 text-orange-700 dark:text-orange-300' : 'bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300' }} rounded-lg px-3 py-1.5 text-sm font-medium">
|
||||
📊 SQL: {{ $sqlApplied }} toegepast{{ $sqlPending > 0 ? ', ' . $sqlPending . ' pending' : '' }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-3 ml-4">
|
||||
<a href="/housekeeping/alert-settings" class="inline-flex items-center justify-center rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-4 py-2 text-sm font-semibold text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600 transition">
|
||||
⚙️ Instellingen
|
||||
</a>
|
||||
<button wire:click="diagnoseSystem" wire:loading.attr="disabled" class="inline-flex items-center justify-center rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600 transition disabled:opacity-50">
|
||||
<span wire:loading.remove wire:target="diagnoseSystem">🔍 Diagnose</span>
|
||||
<span wire:loading wire:target="diagnoseSystem">⏳...</span>
|
||||
</button>
|
||||
<button wire:click="repairSystem" wire:loading.attr="disabled" wire:confirm="Systeem repareren? Dit kan eventuele problemen oplossen." class="inline-flex items-center justify-center rounded-lg border border-yellow-500 dark:border-yellow-600 bg-yellow-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-yellow-600 transition disabled:opacity-50">
|
||||
<span wire:loading.remove wire:target="repairSystem">🔧 Reparerer</span>
|
||||
<span wire:loading wire:target="repairSystem">⏳...</span>
|
||||
</button>
|
||||
@if($hasAnyUpdate)
|
||||
<button wire:click="updateAll" wire:loading.attr="disabled" wire:confirm="Alle updates nu installeren?" class="inline-flex items-center justify-center rounded-lg bg-orange-500 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-orange-600 transition disabled:opacity-50">
|
||||
<span wire:loading.remove wire:target="updateAll">🔄 Alles Updaten</span>
|
||||
<span wire:loading wire:target="updateAll">⏳ Bezig...</span>
|
||||
</button>
|
||||
@else
|
||||
<button wire:click="forceCheck" wire:loading.attr="disabled" class="inline-flex items-center justify-center rounded-lg bg-blue-500 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-600 transition disabled:opacity-50">
|
||||
<span wire:loading.remove wire:target="forceCheck">🔍 Check Nu</span>
|
||||
<span wire:loading wire:target="forceCheck">⏳ Bezig...</span>
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-filament-widgets::widget>
|
||||
Reference in New Issue
Block a user