Website access: one settings page, a list of independently switchable features.
The boss first asked for website modes — maintenance, a dev mode, a third nobody remembers — then wanted to mix and match what the modes do, which makes modes the wrong unit. So each feature is a checkbox with an explanation and, where it needs one, its own area of options.
The features, each in its own context:
Gate— the password gate, a hard block before anyone sees anythingRedirect— send public visitors to the production site- site closed —
PhoenixKit.Modules.Maintenance, part of core - hide from search engines — the crawlers module's
noindex, shared AllowedAddresses— addresses that pass the gate and the redirect
Every setting goes through PhoenixKit.Settings, so V184's history
records who switched what and when (opts carry actor_uuid: and
source:). Environment.read/0 describes how the install is running —
it drives the admin header's automatic "[dev]" tag, never a setting.
Summary
Functions
How this install is running — see Environment.
The features, in page order, each with its current state: on? is
"actually enforced right now", switched_on? the checkbox, ready?
whether the checkbox would take effect (a gate needs a password, a
redirect a URL), needs says what is missing.
Switches one feature's checkbox. opts carry the history's actor/source.
Types
Functions
How this install is running — see Environment.
@spec features() :: [feature()]
The features, in page order, each with its current state: on? is
"actually enforced right now", switched_on? the checkbox, ready?
whether the checkbox would take effect (a gate needs a password, a
redirect a URL), needs says what is missing.
Switches one feature's checkbox. opts carry the history's actor/source.