diff --git a/assets/javascripts/discourse/initializers/community-landing-admin-tabs.js b/assets/javascripts/discourse/initializers/community-landing-admin-tabs.js index 3faa837..3970a17 100644 --- a/assets/javascripts/discourse/initializers/community-landing-admin-tabs.js +++ b/assets/javascripts/discourse/initializers/community-landing-admin-tabs.js @@ -30,15 +30,18 @@ const TABS = [ "hero_video_url", "hero_video_button_color", "hero_video_blur_on_hover", "hero_bg_dark", "hero_bg_light", "hero_min_height", "hero_border_style", "hero_card_bg_dark", "hero_card_bg_light", "hero_card_opacity", - "contributors_enabled", "contributors_days", "contributors_count" + "contributors_enabled", "contributors_title", "contributors_title_enabled", + "contributors_count_label", "contributors_count_label_enabled", + "contributors_days", "contributors_count" ]) }, { id: "stats", label: "Stats", settings: new Set([ - "stats_enabled", "stat_labels_enabled", - "stats_title", "stat_icon_color", "stat_icon_bg_color", "stat_icon_shape", "stat_counter_color", + "stats_enabled", "stat_labels_enabled", "stats_title_enabled", + "stats_title", "stat_card_style", + "stat_icon_color", "stat_icon_bg_color", "stat_icon_shape", "stat_counter_color", "stat_members_label", "stat_topics_label", "stat_posts_label", "stat_likes_label", "stat_chats_label", "stat_round_numbers", "stats_bg_dark", "stats_bg_light", "stats_min_height", "stats_border_style" @@ -141,31 +144,33 @@ function applyTabFilter() { } }); - // Update filter-active dimming on whichever tab container exists - const nativeTabs = container.querySelector(".admin-plugin-config-area__tabs"); - if (nativeTabs) { - nativeTabs.classList.toggle("cl-filter-active", filterActive); + // Update filter-active dimming on native nav or standalone tab bar + const nativeNav = document.querySelector(".d-nav-submenu__tabs"); + if (nativeNav) { + nativeNav.classList.toggle("cl-filter-active", filterActive); } - const standaloneTabs = container.querySelector(".cl-admin-tabs"); - if (standaloneTabs) { - standaloneTabs.classList.toggle("filter-active", filterActive); + const standaloneBar = document.querySelector(".cl-admin-tabs"); + if (standaloneBar) { + standaloneBar.classList.toggle("filter-active", filterActive); } } function updateActiveStates(activeId) { - const container = getContainer(); - if (!container) return; - - // Update all our injected tabs - container.querySelectorAll(".cl-admin-tab").forEach((btn) => { - btn.classList.toggle("active", btn.dataset.tab === activeId); + // Native nav: our injected