milestone 20: declarative configuration for iac
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { useAuthority } from "./authority";
|
||||
|
||||
/**
|
||||
* File authority is a standing condition, not an event, so this banner has no
|
||||
* dismiss button: it stays up for as long as the process runs from a file.
|
||||
*/
|
||||
export default function ReadOnlyConfigBanner() {
|
||||
const authority = useAuthority();
|
||||
if (authority?.mode !== "managed_file") return null;
|
||||
return (
|
||||
<div
|
||||
role="status"
|
||||
className="border-b border-amber-300 bg-amber-50 px-4 py-2 text-sm text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100"
|
||||
>
|
||||
Configuration is managed by <code className="font-mono">{authority.path}</code>. Edit the file and restart
|
||||
nxdns to change it; the server rejects edits made here.
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user