admin-settings.html (31993B)
1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8" /> 5 <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> 6 <title>Admin realm settings mockup</title> 7 <link rel="stylesheet" href="../../app/shared/style/global.css" /> 8 <link rel="stylesheet" href="../../app/shared/component/select-menu.css" /> 9 <link rel="stylesheet" href="../../app/shared/component/user-menu.css" /> 10 <link rel="stylesheet" href="./mockups.css" /> 11 </head> 12 <body> 13 <header class="topbar"> 14 <a class="brand" href="./admin-dashboard.html"> 15 <svg class="brand-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 16 <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" /> 17 </svg> 18 <span class="brand-name">Auth</span> 19 </a> 20 <div class="topbar-actions"> 21 <button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation"> 22 <span class="mobile-nav-toggle-bars" aria-hidden="true"></span> 23 </button> 24 <details class="menu user-menu"> 25 <summary class="menu-trigger" aria-label="Account menu"> 26 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 27 <circle cx="12" cy="12" r="10" /> 28 <circle cx="12" cy="10" r="3" /> 29 <path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" /> 30 </svg> 31 </summary> 32 <div class="menu-panel"> 33 <div class="menu-heading"> 34 <span class="menu-heading-title">System Admin</span> 35 <span class="menu-heading-meta">admin@system.test</span> 36 </div> 37 <div class="menu-list"> 38 <a class="menu-item" href="#"> 39 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 40 <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /> 41 <circle cx="12" cy="12" r="3" /> 42 </svg> 43 <span>Account settings</span> 44 </a> 45 <button class="menu-item" type="button" data-user-theme> 46 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 47 <circle cx="12" cy="12" r="4" /> 48 <path d="M12 2v2" /> 49 <path d="M12 20v2" /> 50 <path d="m4.93 4.93 1.41 1.41" /> 51 <path d="m17.66 17.66 1.41 1.41" /> 52 <path d="M2 12h2" /> 53 <path d="M20 12h2" /> 54 <path d="m6.34 17.66-1.41 1.41" /> 55 <path d="m19.07 4.93-1.41 1.41" /> 56 </svg> 57 <span>Theme</span> 58 <span class="menu-value" data-user-theme-value>Auto</span> 59 </button> 60 <a class="menu-item" href="#"> 61 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 62 <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /> 63 <path d="m16 17 5-5-5-5" /> 64 <path d="M21 12H9" /> 65 </svg> 66 <span>Sign out</span> 67 </a> 68 </div> 69 </div> 70 </details> 71 </div> 72 </header> 73 74 <div class="mobile-nav" id="mobile-navigation" aria-hidden="true"> 75 <nav class="nav" aria-label="Administration"> 76 <p class="nav-label">Administration</p> 77 <a class="nav-item" href="./admin-dashboard.html"> 78 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 79 <rect x="3" y="3" width="7" height="7" /> 80 <rect x="14" y="3" width="7" height="7" /> 81 <rect x="3" y="14" width="7" height="7" /> 82 <rect x="14" y="14" width="7" height="7" /> 83 </svg> 84 <span>Overview</span> 85 </a> 86 <a class="nav-item is-active" data-realm-nav href="./admin-realms.html" aria-current="page"> 87 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 88 <path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" /> 89 <path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" /> 90 <path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" /> 91 <path d="M10 6h4" /> 92 <path d="M10 10h4" /> 93 <path d="M10 14h4" /> 94 <path d="M10 18h4" /> 95 </svg> 96 <span data-realm-nav-label>Realms</span> 97 </a> 98 <a class="nav-item" href="./admin-clients.html"> 99 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 100 <rect x="2" y="4" width="20" height="16" rx="2" /> 101 <path d="M10 4v4" /> 102 <path d="M2 8h20" /> 103 <path d="M6 4v4" /> 104 </svg> 105 <span>Clients</span> 106 </a> 107 <a class="nav-item" href="#"> 108 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 109 <path d="M22 12h-4l-3 8-6-16-3 8H2" /> 110 </svg> 111 <span>Sessions</span> 112 </a> 113 <a class="nav-item" href="./admin-users.html"> 114 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 115 <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /> 116 <circle cx="12" cy="7" r="4" /> 117 </svg> 118 <span>Users</span> 119 </a> 120 <a class="nav-item" data-settings-nav href="./admin-system-settings.html"> 121 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 122 <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /> 123 <circle cx="12" cy="12" r="3" /> 124 </svg> 125 <span>Settings</span> 126 </a> 127 </nav> 128 <div class="mobile-nav-divider" aria-hidden="true"></div> 129 <section class="mobile-nav-account" aria-label="Account"> 130 <div class="menu-heading"> 131 <span class="menu-heading-title">System Admin</span> 132 <span class="menu-heading-meta">admin@system.test</span> 133 </div> 134 <div class="menu-list"> 135 <a class="menu-item" href="#"> 136 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 137 <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /> 138 <circle cx="12" cy="12" r="3" /> 139 </svg> 140 <span>Account settings</span> 141 </a> 142 <button class="menu-item" type="button" data-user-theme> 143 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 144 <circle cx="12" cy="12" r="4" /> 145 <path d="M12 2v2" /> 146 <path d="M12 20v2" /> 147 <path d="m4.93 4.93 1.41 1.41" /> 148 <path d="m17.66 17.66 1.41 1.41" /> 149 <path d="M2 12h2" /> 150 <path d="M20 12h2" /> 151 <path d="m6.34 17.66-1.41 1.41" /> 152 <path d="m19.07 4.93-1.41 1.41" /> 153 </svg> 154 <span>Theme</span> 155 <span class="menu-value" data-user-theme-value>Auto</span> 156 </button> 157 <a class="menu-item" href="#"> 158 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 159 <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" /> 160 <path d="m16 17 5-5-5-5" /> 161 <path d="M21 12H9" /> 162 </svg> 163 <span>Sign out</span> 164 </a> 165 </div> 166 </section> 167 </div> 168 169 <div class="app"> 170 <aside class="sidebar"> 171 <nav class="nav" aria-label="Administration"> 172 <p class="nav-label">Administration</p> 173 <a class="nav-item" href="./admin-dashboard.html"> 174 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 175 <rect x="3" y="3" width="7" height="7" /> 176 <rect x="14" y="3" width="7" height="7" /> 177 <rect x="3" y="14" width="7" height="7" /> 178 <rect x="14" y="14" width="7" height="7" /> 179 </svg> 180 <span>Overview</span> 181 </a> 182 <a class="nav-item is-active" data-realm-nav href="./admin-realms.html" aria-current="page"> 183 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 184 <path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" /> 185 <path d="M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" /> 186 <path d="M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" /> 187 <path d="M10 6h4" /> 188 <path d="M10 10h4" /> 189 <path d="M10 14h4" /> 190 <path d="M10 18h4" /> 191 </svg> 192 <span data-realm-nav-label>Realms</span> 193 </a> 194 <a class="nav-item" href="./admin-clients.html"> 195 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 196 <rect x="2" y="4" width="20" height="16" rx="2" /> 197 <path d="M10 4v4" /> 198 <path d="M2 8h20" /> 199 <path d="M6 4v4" /> 200 </svg> 201 <span>Clients</span> 202 </a> 203 <a class="nav-item" href="#"> 204 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 205 <path d="M22 12h-4l-3 8-6-16-3 8H2" /> 206 </svg> 207 <span>Sessions</span> 208 </a> 209 <a class="nav-item" href="./admin-users.html"> 210 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 211 <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /> 212 <circle cx="12" cy="7" r="4" /> 213 </svg> 214 <span>Users</span> 215 </a> 216 <a class="nav-item" data-settings-nav href="./admin-system-settings.html"> 217 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 218 <path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" /> 219 <circle cx="12" cy="12" r="3" /> 220 </svg> 221 <span>Settings</span> 222 </a> 223 </nav> 224 </aside> 225 226 <div class="main"> 227 <main class="content"> 228 <div class="page-header page-header-row"> 229 <div> 230 <div class="breadcrumb"> 231 <a id="realm-breadcrumb-link" href="./admin-realms.html"><span data-realm-breadcrumb-root>Realms</span></a> 232 <span id="realm-breadcrumb-root-text" hidden><span data-realm-breadcrumb-root>Realm</span></span> 233 <span id="realm-breadcrumb-separator">/</span> 234 <span aria-current="page">Acme</span> 235 </div> 236 <h1>Realm settings</h1> 237 <p>Realm name, branding, and login behavior.</p> 238 </div> 239 <div class="field"> 240 <span class="field-label" id="settings-realm-label">Realm</span> 241 <div class="select" data-select data-value="acme"> 242 <button 243 class="select-trigger" 244 type="button" 245 id="settings-realm-trigger" 246 role="combobox" 247 aria-haspopup="listbox" 248 aria-expanded="false" 249 aria-controls="settings-realm-listbox" 250 aria-labelledby="settings-realm-label" 251 > 252 <span class="select-value">Acme</span> 253 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 254 <path d="m6 9 6 6 6-6" /> 255 </svg> 256 </button> 257 <div class="select-list" id="settings-realm-listbox" role="listbox" aria-labelledby="settings-realm-label" hidden> 258 <div class="select-option is-selected" id="settings-realm-acme" role="option" aria-selected="true" data-value="acme" data-label="Acme"> 259 <span class="select-option-mark" aria-hidden="true"> 260 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 261 <path d="M20 6 9 17l-5-5" /> 262 </svg> 263 </span> 264 <span class="select-option-label">Acme</span> 265 </div> 266 <div class="select-option" id="settings-realm-globex" role="option" aria-selected="false" data-value="globex" data-label="Globex"> 267 <span class="select-option-mark" aria-hidden="true"> 268 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 269 <path d="M20 6 9 17l-5-5" /> 270 </svg> 271 </span> 272 <span class="select-option-label">Globex</span> 273 </div> 274 </div> 275 </div> 276 </div> 277 </div> 278 279 <div class="stack"> 280 <section class="panel"> 281 <h2>Realm details</h2> 282 <form class="settings-form"> 283 <div class="field"> 284 <span class="field-label">Realm ID</span> 285 <input class="field-control" value="acme" disabled /> 286 </div> 287 288 <div class="field"> 289 <span class="field-label">Display name</span> 290 <input class="field-control" value="Acme" maxlength="100" /> 291 </div> 292 293 <label class="checkbox"> 294 <input type="checkbox" checked /> 295 <span>Show "Keep me signed in" on login</span> 296 </label> 297 </form> 298 </section> 299 300 <section class="panel"> 301 <h2>Realm branding</h2> 302 <p class="note">Shown on login and consent for clients in this realm.</p> 303 <div class="settings-form"> 304 <div class="grid"> 305 <div class="field"> 306 <span class="field-label">Logo URL</span> 307 <input 308 class="field-control" 309 type="url" 310 value="https://acme.example.test/logo.svg" 311 placeholder="https://app.example.test/logo.svg" 312 maxlength="2048" 313 /> 314 </div> 315 316 <div class="field"> 317 <span class="field-label">Primary color</span> 318 <input class="field-control" value="#2255aa" placeholder="#25a" maxlength="7" spellcheck="false" /> 319 </div> 320 </div> 321 322 <div class="branding-preview" aria-hidden="true"> 323 <span class="branding-logo-preview"> 324 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 325 <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" /> 326 </svg> 327 </span> 328 <span class="branding-color-preview" style="background: #2255aa"></span> 329 </div> 330 331 <div class="action-row"> 332 <button class="button button-primary" type="submit">Save changes</button> 333 </div> 334 </div> 335 </section> 336 337 <section class="panel"> 338 <h2>Realm access</h2> 339 <p class="note">Configure the hostnames, email domains and identity providers that route to this realm.</p> 340 <div class="u-cluster"> 341 <a id="settings-hosts-link" class="button button-secondary" href="./admin-realm-hosts.html?realm=acme">Hosts <span class="realm-access-count">2</span></a> 342 <a id="settings-domains-link" class="button button-secondary" href="./admin-realm-email-domains.html?realm=acme">Email domains <span class="realm-access-count">3</span></a> 343 <a id="settings-providers-link" class="button button-secondary" href="./admin-realm-providers.html?realm=acme">Providers <span class="realm-access-count">2</span></a> 344 </div> 345 </section> 346 </div> 347 348 <section class="state-preview"> 349 <h2>Loading state</h2> 350 <div class="panel" aria-busy="true"> 351 <div class="skeleton skeleton-title"></div> 352 <div class="skeleton"></div> 353 <div class="skeleton skeleton-short"></div> 354 </div> 355 </section> 356 357 <section class="state-preview"> 358 <h2>Saved state</h2> 359 <div class="notice" role="status">Realm settings saved.</div> 360 <div class="stack"> 361 <section class="panel"> 362 <h2>Realm details</h2> 363 <form class="settings-form"> 364 <div class="field"> 365 <span class="field-label">Realm ID</span> 366 <input class="field-control" value="acme" disabled /> 367 </div> 368 369 <div class="field"> 370 <span class="field-label">Display name</span> 371 <input class="field-control" value="Acme Inc" maxlength="100" /> 372 </div> 373 374 <label class="checkbox"> 375 <input type="checkbox" /> 376 <span>Show "Keep me signed in" on login</span> 377 </label> 378 </form> 379 </section> 380 381 <section class="panel"> 382 <h2>Realm branding</h2> 383 <p class="note">Shown on login and consent for clients in this realm.</p> 384 <div class="settings-form"> 385 <div class="grid"> 386 <div class="field"> 387 <span class="field-label">Logo URL</span> 388 <input 389 class="field-control" 390 type="url" 391 value="https://acme.example.test/logo.svg" 392 placeholder="https://app.example.test/logo.svg" 393 maxlength="2048" 394 /> 395 </div> 396 397 <div class="field"> 398 <span class="field-label">Primary color</span> 399 <input class="field-control" value="#2255aa" placeholder="#25a" maxlength="7" spellcheck="false" /> 400 </div> 401 </div> 402 403 <div class="branding-preview" aria-hidden="true"> 404 <span class="branding-logo-preview"> 405 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 406 <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" /> 407 </svg> 408 </span> 409 <span class="branding-color-preview" style="background: #2255aa"></span> 410 </div> 411 412 <div class="action-row"> 413 <button class="button button-primary" type="submit">Save changes</button> 414 </div> 415 </div> 416 </section> 417 </div> 418 </section> 419 420 <section class="state-preview"> 421 <h2>Validation error</h2> 422 <div class="alert" role="alert">Display name is required.</div> 423 <div class="stack"> 424 <section class="panel"> 425 <h2>Realm details</h2> 426 <form class="settings-form"> 427 <div class="field"> 428 <span class="field-label">Realm ID</span> 429 <input class="field-control" value="acme" disabled /> 430 </div> 431 432 <div class="field"> 433 <span class="field-label">Display name</span> 434 <input class="field-control" value="" aria-invalid="true" maxlength="100" /> 435 </div> 436 437 <label class="checkbox"> 438 <input type="checkbox" checked /> 439 <span>Show "Keep me signed in" on login</span> 440 </label> 441 </form> 442 </section> 443 444 <section class="panel"> 445 <h2>Realm branding</h2> 446 <p class="note">Shown on login and consent for clients in this realm.</p> 447 <div class="settings-form"> 448 <div class="grid"> 449 <div class="field"> 450 <span class="field-label">Logo URL</span> 451 <input 452 class="field-control" 453 type="url" 454 value="http://acme.example.test/logo.svg" 455 placeholder="https://app.example.test/logo.svg" 456 aria-invalid="true" 457 maxlength="2048" 458 /> 459 </div> 460 461 <div class="field"> 462 <span class="field-label">Primary color</span> 463 <input class="field-control" value="#25a" placeholder="#25a" maxlength="7" spellcheck="false" /> 464 </div> 465 </div> 466 467 <div class="branding-preview" aria-hidden="true"> 468 <span class="branding-logo-preview is-empty"></span> 469 <span class="branding-color-preview" style="background: #2255aa"></span> 470 </div> 471 472 <div class="action-row"> 473 <button class="button button-primary" type="submit">Save changes</button> 474 </div> 475 </div> 476 </section> 477 </div> 478 </section> 479 </main> 480 </div> 481 </div> 482 483 <div class="mockup-controls" aria-label="Mockup controls"> 484 <span class="mockup-label">Mockup</span> 485 <button class="mockup-button is-active" type="button" data-theme-target="auto">Auto</button> 486 <button class="mockup-button" type="button" data-theme-target="light">Light</button> 487 <button class="mockup-button" type="button" data-theme-target="dark">Dark</button> 488 <span class="mockup-separator" aria-hidden="true"></span> 489 <span class="mockup-label">View as</span> 490 <button class="mockup-button is-active" type="button" data-role-target="system" aria-pressed="true">System admin</button> 491 <button class="mockup-button" type="button" data-role-target="owner" aria-pressed="false">Realm owner</button> 492 <button class="mockup-button" type="button" data-role-target="admin" aria-pressed="false">Realm admin</button> 493 </div> 494 495 <script> 496 const root = document.documentElement; 497 const themeButtons = document.querySelectorAll('[data-theme-target]'); 498 const userThemeButtons = document.querySelectorAll('[data-user-theme]'); 499 const userThemeValues = document.querySelectorAll('[data-user-theme-value]'); 500 let currentTheme = 'auto'; 501 let currentRealm = 'acme'; 502 let currentRole = 'system'; 503 504 function setTheme(value) { 505 currentTheme = value; 506 if (value === 'auto') { 507 root.removeAttribute('data-theme'); 508 } else { 509 root.setAttribute('data-theme', value); 510 } 511 themeButtons.forEach((button) => { 512 button.classList.toggle('is-active', button.dataset.themeTarget === value); 513 }); 514 userThemeValues.forEach((element) => { 515 element.textContent = value.charAt(0).toUpperCase() + value.slice(1); 516 }); 517 518 if (typeof syncAccessLinks === 'function') syncAccessLinks(); 519 } 520 521 const queryTheme = new URLSearchParams(window.location.search).get('theme'); 522 if (queryTheme === 'light' || queryTheme === 'dark') { 523 setTheme(queryTheme); 524 } 525 526 themeButtons.forEach((button) => { 527 button.addEventListener('click', () => setTheme(button.dataset.themeTarget)); 528 }); 529 530 userThemeButtons.forEach((button) => { 531 button.addEventListener('click', () => { 532 const themes = ['auto', 'light', 'dark']; 533 setTheme(themes[(themes.indexOf(currentTheme) + 1) % themes.length]); 534 }); 535 }); 536 537 const userMenu = document.querySelector('.user-menu'); 538 document.addEventListener('click', (event) => { 539 if (userMenu && userMenu.open && !userMenu.contains(event.target)) { 540 userMenu.open = false; 541 } 542 }); 543 544 const identities = { 545 system: { name: 'System Admin', email: 'admin@system.test' }, 546 owner: { name: 'Realm Owner', email: 'owner@acme.test' }, 547 admin: { name: 'Realm Admin', email: 'realm-admin@managed.test' }, 548 }; 549 const realmCounts = { system: 2, owner: 1, admin: 1 }; 550 const roleButtons = document.querySelectorAll('[data-role-target]'); 551 const realmNavLinks = document.querySelectorAll('[data-realm-nav]'); 552 const realmNavLabels = document.querySelectorAll('[data-realm-nav-label]'); 553 const settingsNavLinks = document.querySelectorAll('[data-settings-nav]'); 554 const realmBreadcrumbLink = document.getElementById('realm-breadcrumb-link'); 555 const realmBreadcrumbRootText = document.getElementById('realm-breadcrumb-root-text'); 556 const realmBreadcrumbRootLabels = document.querySelectorAll('[data-realm-breadcrumb-root]'); 557 558 const hostsLink = document.getElementById('settings-hosts-link'); 559 const domainsLink = document.getElementById('settings-domains-link'); 560 const providersLink = document.getElementById('settings-providers-link'); 561 562 function subpageParams(realm) { 563 const params = new URLSearchParams(); 564 params.set('realm', realm); 565 params.set('role', currentRole); 566 if (currentTheme !== 'auto') params.set('theme', currentTheme); 567 return params.toString(); 568 } 569 570 function syncAccessLinks() { 571 if (hostsLink) hostsLink.href = `./admin-realm-hosts.html?${subpageParams(currentRealm)}`; 572 if (domainsLink) domainsLink.href = `./admin-realm-email-domains.html?${subpageParams(currentRealm)}`; 573 if (providersLink) providersLink.href = `./admin-realm-providers.html?${subpageParams(currentRealm)}`; 574 } 575 576 function setRole(role) { 577 currentRole = role; 578 const count = realmCounts[role] || 0; 579 const label = count === 1 ? 'Realm' : 'Realms'; 580 const identity = identities[role]; 581 582 document.querySelectorAll('.menu-heading-title').forEach((element) => { 583 element.textContent = identity.name; 584 }); 585 document.querySelectorAll('.menu-heading-meta').forEach((element) => { 586 element.textContent = identity.email; 587 }); 588 roleButtons.forEach((button) => { 589 const active = button.dataset.roleTarget === role; 590 button.classList.toggle('is-active', active); 591 button.setAttribute('aria-pressed', String(active)); 592 }); 593 realmNavLabels.forEach((element) => { 594 element.textContent = label; 595 }); 596 const realmHref = count === 1 597 ? `./admin-settings.html?${subpageParams(currentRealm)}` 598 : `./admin-realms.html?${subpageParams(currentRealm)}`; 599 realmNavLinks.forEach((link) => { 600 link.href = realmHref; 601 link.classList.toggle('is-active', true); 602 link.setAttribute('aria-current', 'page'); 603 }); 604 settingsNavLinks.forEach((link) => { 605 link.hidden = role !== 'system'; 606 }); 607 realmBreadcrumbRootLabels.forEach((element) => { 608 element.textContent = label; 609 }); 610 realmBreadcrumbLink.hidden = count === 1; 611 realmBreadcrumbRootText.hidden = count !== 1; 612 syncAccessLinks(); 613 } 614 615 roleButtons.forEach((button) => { 616 button.addEventListener('click', () => setRole(button.dataset.roleTarget)); 617 }); 618 const initialParams = new URLSearchParams(window.location.search); 619 const initialRealm = initialParams.get('realm'); 620 if (initialRealm) currentRealm = initialRealm; 621 const initialRole = initialParams.get('role'); 622 setRole(identities[initialRole] ? initialRole : 'system'); 623 </script> 624 <script src="./shell.js"></script> 625 </body> 626 </html>