MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / renderEnvSettings

Function renderEnvSettings

deployments/desktop/static/app.js:1317–1336  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

1315}
1316
1317function renderEnvSettings(items) {
1318 const target = $("envSettingsForm");
1319 if (!target) return;
1320 if (!items.length) {
1321 target.className = "env-form empty";
1322 target.textContent = "没有可编辑的 .env 设置。";
1323 return;
1324 }
1325 target.className = "env-form";
1326 target.innerHTML = items.map((item) => {
1327 const type = item.is_secret ? "password" : "text";
1328 const value = item.value || "";
1329 return `
1330 <label class="env-field">
1331 <span>${escapeHtml(item.key)}</span>
1332 <input data-env-key="${escapeHtml(item.key)}" type="${type}" value="${escapeHtml(value)}" autocomplete="off">
1333 </label>
1334 `;
1335 }).join("");
1336}
1337
1338async function saveSettings() {
1339 const values = {};

Callers 2

refreshSettingsFunction · 0.85
saveSettingsFunction · 0.85

Calls 2

$Function · 0.70
escapeHtmlFunction · 0.70

Tested by

no test coverage detected