mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2026-02-04 06:50:31 -07:00
Hid (by default) Site Enrollment Code Rotation Button
This commit is contained in:
@@ -53,6 +53,7 @@ const MAGIC_UI = {
|
|||||||
const PAGE_TITLE = "Sites";
|
const PAGE_TITLE = "Sites";
|
||||||
const PAGE_SUBTITLE = "Manage site enrollment codes, rotate secrets, and open device inventories by site.";
|
const PAGE_SUBTITLE = "Manage site enrollment codes, rotate secrets, and open device inventories by site.";
|
||||||
const PAGE_ICON = LocationCityIcon;
|
const PAGE_ICON = LocationCityIcon;
|
||||||
|
const SHOW_ROTATE_ENROLLMENT_BUTTON = false;
|
||||||
|
|
||||||
const RAINBOW_BUTTON_SX = {
|
const RAINBOW_BUTTON_SX = {
|
||||||
borderRadius: 999,
|
borderRadius: 999,
|
||||||
@@ -227,18 +228,20 @@ export default function SiteList({ onOpenDevicesForSite, onPageMetaChange }) {
|
|||||||
const busy = rotatingId === site.id;
|
const busy = rotatingId === site.id;
|
||||||
return (
|
return (
|
||||||
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
|
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
|
||||||
<Tooltip title="Rotate Code">
|
{SHOW_ROTATE_ENROLLMENT_BUTTON ? (
|
||||||
<span>
|
<Tooltip title="Rotate Code">
|
||||||
<IconButton
|
<span>
|
||||||
size="small"
|
<IconButton
|
||||||
onClick={() => handleRotate(site)}
|
size="small"
|
||||||
disabled={busy}
|
onClick={() => handleRotate(site)}
|
||||||
sx={{ color: MAGIC_UI.accentA, border: "1px solid rgba(148,163,184,0.35)" }}
|
disabled={busy}
|
||||||
>
|
sx={{ color: MAGIC_UI.accentA, border: "1px solid rgba(148,163,184,0.35)" }}
|
||||||
{busy ? <CircularProgress size={16} color="inherit" /> : <RefreshIcon fontSize="small" />}
|
>
|
||||||
</IconButton>
|
{busy ? <CircularProgress size={16} color="inherit" /> : <RefreshIcon fontSize="small" />}
|
||||||
</span>
|
</IconButton>
|
||||||
</Tooltip>
|
</span>
|
||||||
|
</Tooltip>
|
||||||
|
) : null}
|
||||||
<Typography variant="body2" sx={{ fontFamily: "monospace", color: MAGIC_UI.textBright }}>
|
<Typography variant="body2" sx={{ fontFamily: "monospace", color: MAGIC_UI.textBright }}>
|
||||||
{code}
|
{code}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
Reference in New Issue
Block a user