You've already forked Atomcms-edit
Add client open mode preference (same tab / new window) to user settings
This commit is contained in:
@@ -22,30 +22,31 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-y-2 md:flex-row md:gap-x-4">
|
||||
<a data-turbolinks="false" href="{{ route('nitro-client') }}">
|
||||
<button
|
||||
class="font-bold py-3 px-6 rounded-xl shadow-xl border-2 transition-all duration-300 hover:scale-110 hover:shadow-2xl text-base tracking-wide"
|
||||
style="background-color: var(--button-color); color: var(--button-text-color); border-color: rgba(255,255,255,0.3);">
|
||||
<span class="flex items-center gap-2">
|
||||
<i class="fa-solid fa-gamepad"></i>
|
||||
<span class="-md">{{ __('Nitro client') }}</span>
|
||||
</span>
|
||||
</button>
|
||||
</a>
|
||||
@php $clientOpenMode = auth()->user()->preferences['client_open_mode'] ?? 'same'; @endphp
|
||||
<a data-turbolinks="false" href="{{ route('nitro-client') }}" @if($clientOpenMode === 'new_window') target="_blank" rel="noopener" @endif>
|
||||
<button
|
||||
class="font-bold py-3 px-6 rounded-xl shadow-xl border-2 transition-all duration-300 hover:scale-110 hover:shadow-2xl text-base tracking-wide"
|
||||
style="background-color: var(--button-color); color: var(--button-text-color); border-color: rgba(255,255,255,0.3);">
|
||||
<span class="flex items-center gap-2">
|
||||
<i class="fa-solid fa-gamepad"></i>
|
||||
<span class="-md">{{ __('Nitro client') }}</span>
|
||||
</span>
|
||||
</button>
|
||||
</a>
|
||||
|
||||
@if (config('habbo.client.flash_enabled'))
|
||||
<a data-turbolinks="false" href="{{ route('flash-client') }}">
|
||||
<button
|
||||
class="font-bold py-3 px-6 rounded-xl shadow-xl border-2 transition-all duration-300 hover:scale-110 hover:shadow-2xl text-base tracking-wide"
|
||||
style="background-color: var(--button-color); color: var(--button-text-color); border-color: rgba(255,255,255,0.3);">
|
||||
<span class="flex items-center gap-2">
|
||||
<i class="fa-solid fa-bolt"></i>
|
||||
<span class="-md">{{ __('Flash client') }}</span>
|
||||
</span>
|
||||
</button>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
@if (config('habbo.client.flash_enabled'))
|
||||
<a data-turbolinks="false" href="{{ route('flash-client') }}" @if($clientOpenMode === 'new_window') target="_blank" rel="noopener" @endif>
|
||||
<button
|
||||
class="font-bold py-3 px-6 rounded-xl shadow-xl border-2 transition-all duration-300 hover:scale-110 hover:shadow-2xl text-base tracking-wide"
|
||||
style="background-color: var(--button-color); color: var(--button-text-color); border-color: rgba(255,255,255,0.3);">
|
||||
<span class="flex items-center gap-2">
|
||||
<i class="fa-solid fa-bolt"></i>
|
||||
<span class="-md">{{ __('Flash client') }}</span>
|
||||
</span>
|
||||
</button>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endauth
|
||||
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<a data-turbolinks="false" href="{{ route('nitro-client') }}">
|
||||
<button
|
||||
class="font-bold py-2 px-4 rounded-lg shadow-lg transition-all duration-300 hover:scale-105 hover:opacity-90"
|
||||
style="background-color: var(--button-color); color: var(--button-text-color);">
|
||||
{{ __('Go to :hotel', ['hotel' => setting('hotel_name')]) }}
|
||||
</button>
|
||||
</a>
|
||||
@php $clientOpenMode = auth()->user()->preferences['client_open_mode'] ?? 'same'; @endphp
|
||||
<a data-turbolinks="false" href="{{ route('nitro-client') }}" @if($clientOpenMode === 'new_window') target="_blank" rel="noopener" @endif>
|
||||
<button
|
||||
class="font-bold py-2 px-4 rounded-lg shadow-lg transition-all duration-300 hover:scale-105 hover:opacity-90"
|
||||
style="background-color: var(--button-color); color: var(--button-text-color);">
|
||||
{{ __('Go to :hotel', ['hotel' => setting('hotel_name')]) }}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -85,6 +85,24 @@
|
||||
|
||||
<hr style="border-color: var(--color-text-muted);">
|
||||
|
||||
{{-- Client Settings --}}
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold mb-4" style="color: var(--color-text);">{{ __('Client Settings') }}</h3>
|
||||
<div class="space-y-4">
|
||||
<label class="flex items-center justify-between cursor-pointer p-3 rounded" style="background-color: var(--color-surface);">
|
||||
<div>
|
||||
<span class="font-semibold" style="color: var(--color-text);">{{ __('Open client in new window') }}</span>
|
||||
<p class="text-sm" style="color: var(--color-text-muted);">{{ __('When enabled, the game client will open in a new browser tab instead of navigating away from the site') }}</p>
|
||||
</div>
|
||||
<input type="hidden" name="client_open_mode" value="same">
|
||||
<input type="checkbox" name="client_open_mode" value="new_window" {{ old('client_open_mode', $preferences['client_open_mode'] ?? 'same') === 'new_window' ? 'checked' : '' }}
|
||||
class="w-5 h-5 rounded cursor-pointer" style="accent-color: var(--color-primary);">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr style="border-color: var(--color-text-muted);">
|
||||
|
||||
{{-- Notification Settings --}}
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold mb-4" style="color: var(--color-text);">{{ __('Notification Settings') }}</h3>
|
||||
|
||||
Reference in New Issue
Block a user