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