#4-public-user-profile

This commit is contained in:
2026-05-12 10:57:21 +08:00
parent 53be5221e9
commit b6c9557f83
42 changed files with 2994 additions and 242 deletions

View File

@@ -25,9 +25,15 @@
<x-input-error class="mt-2" :messages="$errors->get('name')" />
</div>
<div>
<x-input-label for="username" :value="__('Username')" />
<x-text-input id="username" class="mt-1 block w-full" type="text" name="username" :value="old('username', $user->username)" required autocomplete="username" />
<x-input-error class="mt-2" :messages="$errors->get('username')" />
</div>
<div>
<x-input-label for="email" :value="__('Email')" />
<x-text-input id="email" class="mt-1 block w-full" type="email" name="email" :value="old('email', $user->email)" required autocomplete="username" />
<x-text-input id="email" class="mt-1 block w-full" type="email" name="email" :value="old('email', $user->email)" required autocomplete="email" />
<x-input-error class="mt-2" :messages="$errors->get('email')" />
</div>
@@ -67,4 +73,4 @@
</div>
</div>
</div>
</x-app-layout>
</x-app-layout>

View File

@@ -15,6 +15,7 @@
<tr>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Username</th>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Email</th>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Created</th>
<th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
@@ -25,6 +26,15 @@
<tr class="odd:bg-white even:bg-gray-50">
<td class="px-4 py-3 text-sm text-gray-700">{{ $user->id }}</td>
<td class="px-4 py-3 text-sm text-gray-900">{{ $user->name }}</td>
<td class="px-4 py-3 text-sm text-gray-700">
@if ($user->username)
<a href="{{ route('author.show', $user->username) }}" class="font-medium text-indigo-600 hover:text-indigo-500">
{{ $user->username }}
</a>
@else
<span class="text-gray-400">{{ __('Not set') }}</span>
@endif
</td>
<td class="px-4 py-3 text-sm text-gray-700">{{ $user->email }}</td>
<td class="px-4 py-3 text-sm text-gray-700">{{ $user->created_at?->format('Y-m-d H:i') }}</td>
<td class="px-4 py-3 text-sm text-gray-700">
@@ -35,7 +45,7 @@
</tr>
@empty
<tr>
<td colspan="5" class="px-4 py-6 text-sm text-center text-gray-500">
<td colspan="6" class="px-4 py-6 text-sm text-center text-gray-500">
No users found.
</td>
</tr>