(env, key, label, fallback = "", aliases = [])
| 4888 | } |
| 4889 | |
| 4890 | function envRow(env, key, label, fallback = "", aliases = []) { |
| 4891 | const info = envInfo(env, key, fallback, aliases); |
| 4892 | const type = info.isSecret ? "password" : "text"; |
| 4893 | const value = info.isSecret && !info.value && info.present ? "***" : info.value; |
| 4894 | const wide = info.key.includes("BASE_URL") ? " wide-env" : ""; |
| 4895 | return ` |
| 4896 | <div class="env-row${wide}"> |
| 4897 | <label for="env_${escapeHtml(info.key)}">${escapeHtml(label)}</label> |
| 4898 | <input id="env_${escapeHtml(info.key)}" data-env-key="${escapeHtml(info.key)}" value="${escapeHtml(value)}" type="${type}" placeholder="${info.present ? "" : ui().settings.placeholderMissing}"> |
| 4899 | </div> |
| 4900 | `; |
| 4901 | } |
| 4902 | |
| 4903 | function boolValue(value) { |
| 4904 | return value === true || ["1", "true", "yes", "on"].includes(String(value).toLowerCase()); |
no test coverage detected