feat(otter): show admin status in users view
parent
5017bd1c5f
commit
332c05491a
|
@ -12,12 +12,18 @@
|
|||
<table id="users">
|
||||
<thead>
|
||||
<th>Username</th>
|
||||
<th>Privileges</th>
|
||||
<th>Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{%- for user in users %}
|
||||
<tr>
|
||||
<th>{{ user.username }}</th>
|
||||
<th>{%- if user.admin -%}
|
||||
Admin
|
||||
{%- else -%}
|
||||
User
|
||||
{%- endif -%}
|
||||
<th>
|
||||
{%- if user.id != current_user_id -%}
|
||||
<a hx-delete="/users/{{ user.id }}"
|
||||
|
|
|
@ -28,6 +28,7 @@ struct Session {
|
|||
struct User {
|
||||
id: i64,
|
||||
username: String,
|
||||
admin: bool,
|
||||
}
|
||||
|
||||
impl Template for View {
|
||||
|
@ -103,6 +104,7 @@ impl From<gpodder::User> for User {
|
|||
Self {
|
||||
id: value.id,
|
||||
username: value.username,
|
||||
admin: value.admin,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue