✨ feat(fleetledger): add initial implementation of FleetLedger app
- introduce Dockerfile for Python environment setup - create FastAPI app with authentication and user management - implement server management features with CRUD operations - add PWA support with service worker and manifest - set up initial templates for UI components 📝 docs(fleetledger): add README for FleetLedger application - describe app features and functionalities - provide security notes and quick start guide 📦 build(fleetledger): configure Docker and docker-compose setup - define Dockerfile for application container - create docker-compose.yml for service orchestration - specify environment variables and volumes for persistence
This commit is contained in:
parent
0151bf19f6
commit
b9cfefa3a9
24 changed files with 2598 additions and 0 deletions
68
fleetledger/app/templates/users_list.html
Normal file
68
fleetledger/app/templates/users_list.html
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="space-y-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 class="text-lg font-semibold tracking-tight">Benutzerverwaltung</h1>
|
||||
<p class="text-xs text-slate-400">
|
||||
Admins können Benutzer aktivieren/deaktivieren. Der eigene Account kann nicht deaktiviert werden.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="overflow-hidden rounded-xl border border-slate-800 bg-slate-900/60">
|
||||
<table class="min-w-full text-sm">
|
||||
<thead class="bg-slate-900/80 text-xs uppercase tracking-wide text-slate-400">
|
||||
<tr>
|
||||
<th class="px-3 py-2 text-left">Benutzername</th>
|
||||
<th class="px-3 py-2 text-left">E-Mail</th>
|
||||
<th class="px-3 py-2 text-left">Rolle</th>
|
||||
<th class="px-3 py-2 text-left">Status</th>
|
||||
<th class="px-3 py-2 text-right">Aktion</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for u in users %}
|
||||
<tr class="border-t border-slate-800/80 hover:bg-slate-800/50">
|
||||
<td class="px-3 py-2">
|
||||
<span class="font-medium text-slate-100">{{ u.username }}</span>
|
||||
</td>
|
||||
<td class="px-3 py-2 text-slate-200">
|
||||
{% if u.email %}{{ u.email }}{% else %}<span class="text-slate-500">–</span>{% endif %}
|
||||
</td>
|
||||
<td class="px-3 py-2 text-slate-200">
|
||||
{% if u.is_admin %}Admin{% else %}User{% endif %}
|
||||
</td>
|
||||
<td class="px-3 py-2 text-slate-200">
|
||||
{% if u.is_active %}
|
||||
<span class="inline-flex rounded-full bg-emerald-500/10 px-2 py-0.5 text-[11px] text-emerald-200 border border-emerald-500/50">
|
||||
aktiv
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="inline-flex rounded-full bg-slate-800 px-2 py-0.5 text-[11px] text-slate-300 border border-slate-600">
|
||||
deaktiviert
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="px-3 py-2 text-right">
|
||||
{% if u.id != current_user.id %}
|
||||
<form method="post" action="/users/{{ u.id }}/toggle-active">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}" />
|
||||
<button
|
||||
type="submit"
|
||||
class="rounded-lg border border-slate-700 px-3 py-1 text-xs text-slate-200 hover:border-slate-500 hover:text-white"
|
||||
>
|
||||
{% if u.is_active %}Deaktivieren{% else %}Aktivieren{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<span class="text-[11px] text-slate-500">Eigener Account</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue