sessions #2

Merged
admin merged 63 commits from sessions into main 2025-06-16 19:03:01 +02:00
51 changed files with 2539 additions and 190 deletions
Showing only changes of commit d17e154e42 - Show all commits

View File

@ -71,7 +71,7 @@ const AdminServiceSessionsPage: FC = () => {
Service Service
</th> </th>
<th className="px-6 py-3 text-left text-sm font-semibold text-gray-700 dark:text-white/70 border border-l-0 border-gray-300 dark:border-gray-700"> <th className="px-6 py-3 text-left text-sm font-semibold text-gray-700 dark:text-white/70 border border-l-0 border-gray-300 dark:border-gray-700">
Source User + IP
</th> </th>
<th className="px-6 py-3 text-left text-sm font-semibold text-gray-700 dark:text-white/70 border border-l-0 border-gray-300 dark:border-gray-700"> <th className="px-6 py-3 text-left text-sm font-semibold text-gray-700 dark:text-white/70 border border-l-0 border-gray-300 dark:border-gray-700">
Status Status
@ -110,6 +110,22 @@ const AdminServiceSessionsPage: FC = () => {
className="hover:bg-gray-50 dark:hover:bg-gray-800" className="hover:bg-gray-50 dark:hover:bg-gray-800"
> >
<td className="px-5 py-3 text-sm text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-700"> <td className="px-5 py-3 text-sm text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-700">
{/* <SessionSource deviceInfo={session.} /> */}
{typeof session.api_service?.icon_url === "string" && (
<Avatar
avatarId={session.api_service.icon_url}
className="w-7 h-7 min-w-7"
/>
)}
<Link to={`/admin/api-services/view/${session.service_id}`}>
<p className="cursor-pointer text-blue-500 text-nowrap">
{session.api_service?.name ?? session.client_id}
</p>
</Link>
</td>
<td className="px-5 py-3 text-sm text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-700">
<div className="flex flex-col items-stretch gap-2 justify-start">
<div className="flex flex-row items-center gap-2 justify-start"> <div className="flex flex-row items-center gap-2 justify-start">
{typeof session.user?.profile_picture === "string" && ( {typeof session.user?.profile_picture === "string" && (
<Avatar <Avatar
@ -118,17 +134,19 @@ const AdminServiceSessionsPage: FC = () => {
/> />
)} )}
<div className="flex flex-col items-stretch justify-center">
<Link to={`/admin/users/view/${session.user_id}`}> <Link to={`/admin/users/view/${session.user_id}`}>
<p className="cursor-pointer text-blue-500 text-nowrap"> <p className="cursor-pointer text-blue-500 text-nowrap">
{session.user?.full_name ?? ""}{" "} {session.user?.full_name ?? ""}{" "}
{session.user_id === profile?.id ? "(You)" : ""} {session.user_id === profile?.id ? "(You)" : ""}
</p> </p>
</Link> </Link>
<p className="opacity-75">
{session.ip_address ?? "No IP available"}
</p>
</div>
</div>
</div> </div>
</td>
<td className="px-5 py-3 text-sm text-gray-700 dark:text-gray-300 border border-gray-300 dark:border-gray-700">
{/* <SessionSource deviceInfo={session.} /> */}
<p>{session.client_id}</p>
</td> </td>
<td className="px-5 py-3 text-sm border border-gray-300 dark:border-gray-700"> <td className="px-5 py-3 text-sm border border-gray-300 dark:border-gray-700">
<span <span