From 29513a74bfafe75437236d3a7c16dbddf6a42e02 Mon Sep 17 00:00:00 2001 From: Felix Hellborg Date: Tue, 31 Mar 2026 16:47:24 +0200 Subject: [PATCH] Add a remove button for hosts as well on the admin page (you cannot kick yourself, but all other hosts can now be kicked). hosts as well on the admin page (you cannot kick yourself, but all other hosts can now be kicked). This only needed to change on the frontend because the API endpoint doesn't actually care about host status. This also justified the implementation of a panel telling the user that they aren't a host (similar to 'Not in a meeting' on the meeting page). --- frontend/src/routes/admin.tsx | 67 ++++++++++++++++++++++++-- frontend/src/signatures/voteSession.ts | 1 + 2 files changed, 65 insertions(+), 3 deletions(-) diff --git a/frontend/src/routes/admin.tsx b/frontend/src/routes/admin.tsx index aac7b4e..24152c7 100644 --- a/frontend/src/routes/admin.tsx +++ b/frontend/src/routes/admin.tsx @@ -10,11 +10,13 @@ import { Badge } from "@/components/Badge/Badge"; import { Panel } from "@/components/Panel/Panel"; import { VotePanel, type VoteState } from "@/components/VotePanel/VotePanel"; import { + apiFetch, apiUrl, startVoteRound, tally as tallyVote, getTally, endVoteRound, + getSessionIds, type TallyResult, } from "@/signatures/voteSession"; import { @@ -224,12 +226,14 @@ function QRPanel({ function VoterListPanel({ voters, loading, + selfUuuid, onRemove, onRemoveAll, onReload, }: { voters: VoterInfo[]; loading: boolean; + selfUuuid: string | null; onRemove: (uuid: string) => Promise; onRemoveAll: () => Promise; onReload: () => void; @@ -365,7 +369,7 @@ function VoterListPanel({ )} - {!v.is_host && ( + {v.uuid !== selfUuuid && (