This commit is contained in:
@@ -562,12 +562,14 @@ async fn render_table(
|
||||
.map_err(|e| ApiError::Internal(e.to_string()))?;
|
||||
let now = chrono::Utc::now();
|
||||
let mut s = String::new();
|
||||
// No `overflow-hidden` on the table wrapper: the per-row action menu is
|
||||
// an absolutely-positioned `<details>` popover inside a <td>, and the
|
||||
// wrapper's clipping was hiding the bottom half of the menu.
|
||||
// `overflow-x-auto` on the inner wrapper gives the wide table a
|
||||
// horizontal scrollbar instead of pushing past the viewport. The
|
||||
// action-menu popover compensates for the implicit `overflow-y: auto`
|
||||
// (CSS spec) by switching to `position: fixed` on toggle — see
|
||||
// `actionMenuToggle` in admin_ui/index.html.
|
||||
let _ = write!(
|
||||
s,
|
||||
r##"<div class="rounded-md border border-slate-800 bg-slate-900">
|
||||
r##"<div class="rounded-md border border-slate-800 bg-slate-900 overflow-x-auto">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="text-xs uppercase text-slate-500 bg-slate-950">
|
||||
<tr>
|
||||
@@ -1065,9 +1067,9 @@ fn render_device_row(
|
||||
s,
|
||||
r##"
|
||||
<td class="px-3 py-2">
|
||||
<details class="text-right relative">
|
||||
<details class="text-right relative" ontoggle="actionMenuToggle(this)">
|
||||
<summary class="cursor-pointer list-none text-xs text-slate-400 hover:text-slate-200 select-none">···</summary>
|
||||
<div class="absolute right-2 mt-1 z-10 w-56 bg-slate-900 border border-slate-700 rounded shadow-lg p-2 space-y-1 text-left">
|
||||
<div data-action-menu class="absolute right-2 mt-1 z-50 w-56 bg-slate-900 border border-slate-700 rounded shadow-lg p-2 space-y-1 text-left">
|
||||
<a class="block w-full text-left px-2 py-1 text-xs text-sky-300 hover:bg-sky-900/40 rounded"
|
||||
href="/admin/connect/{id}" target="_blank" rel="noopener"
|
||||
data-confirm="{confirm_connect}"
|
||||
|
||||
Reference in New Issue
Block a user