From bb82198496ecedaa0f285adcfde4e2f1879e2634 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 26 Sep 2024 23:34:42 +0300 Subject: [PATCH] Place omitted on a separate line --- public/scripts/extensions/connection-manager/index.js | 5 +++-- public/scripts/extensions/connection-manager/view.html | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/public/scripts/extensions/connection-manager/index.js b/public/scripts/extensions/connection-manager/index.js index cb26c0ce9..b3a708ba5 100644 --- a/public/scripts/extensions/connection-manager/index.js +++ b/public/scripts/extensions/connection-manager/index.js @@ -390,10 +390,11 @@ async function renderDetailsContent(detailsContent) { const profile = extension_settings.connectionManager.profiles.find(p => p.id === selectedProfile); if (profile) { const profileForDisplay = makeFancyProfile(profile); + const templateParams = { profile: profileForDisplay }; if (Array.isArray(profile.exclude) && profile.exclude.length > 0) { - profileForDisplay['Omitted Settings'] = profile.exclude.map(e => FANCY_NAMES[e]).join(', '); + templateParams.omitted = profile.exclude.map(e => FANCY_NAMES[e]).join(', '); } - const template = await renderExtensionTemplateAsync(MODULE_NAME, 'view', { profile: profileForDisplay }); + const template = await renderExtensionTemplateAsync(MODULE_NAME, 'view', templateParams); detailsContent.innerHTML = template; } else { detailsContent.textContent = 'No profile selected'; diff --git a/public/scripts/extensions/connection-manager/view.html b/public/scripts/extensions/connection-manager/view.html index 42d1ad35f..78a648b31 100644 --- a/public/scripts/extensions/connection-manager/view.html +++ b/public/scripts/extensions/connection-manager/view.html @@ -3,3 +3,8 @@
  • {{@key}}: {{this}}
  • {{/each}} +{{#if omitted}} +
    + Omitted Settings: {{omitted}} +
    +{{/if}}