Initial commit

This commit is contained in:
root
2026-05-09 17:28:23 +02:00
commit 9d73f82529
5575 changed files with 281989 additions and 0 deletions
+140
View File
@@ -0,0 +1,140 @@
<x-app-layout>
@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="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 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-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="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="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>
<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>
@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");
Toast.fire({
icon: "success",
title: '{{ __('Your referral code has been copied to your clipbord!') }}'
});
}
</script>
@endpush
</x-app-layout>