diff --git a/configs/backup/backup_engine b/configs/backup/backup_engine index ab8457f..29c8d36 100644 --- a/configs/backup/backup_engine +++ b/configs/backup/backup_engine @@ -1,5 +1,6 @@ # ================================================================================ # Backup Engine - **ADVANCED** Engine-level knobs most users won't need to touch +# @icon βš™οΈ # ================================================================================ CFG_BACKUP_ENGINE=restic # Default Backup Engine - Fallback engine for new locations (each location can override) [restic:Restic|borg:BorgBackup|kopia:Kopia] CFG_BACKUP_DEFAULT_PATH= # Default Backup Location - Base directory for locations set to Automatic path mode; each location lives in its own numbered subfolder (/). Empty = the LibrePortal backups root (own mount-able). diff --git a/configs/backup/backup_general b/configs/backup/backup_general index 5dfdba3..832a563 100755 --- a/configs/backup/backup_general +++ b/configs/backup/backup_general @@ -1,4 +1,5 @@ # ================================================================================ # Backup General - Scheduling +# @icon πŸ’Ύ # ================================================================================ CFG_BACKUP_CRONTAB_APP="0 5 * * *" # App Backup Schedule - Crontab schedule for application backups diff --git a/configs/backup/backup_retention b/configs/backup/backup_retention index b596800..a16979f 100644 --- a/configs/backup/backup_retention +++ b/configs/backup/backup_retention @@ -1,5 +1,6 @@ # ================================================================================ # Backup Retention - Default retention policy applied at every forget pass. +# @icon πŸ—“οΈ # Per-location overrides supported via the Locations edit modal. # # Most users should pick a "Backup style" preset on the Schedule page rather diff --git a/configs/general/general_basic b/configs/general/general_basic index 52702e3..af6b046 100755 --- a/configs/general/general_basic +++ b/configs/general/general_basic @@ -1,5 +1,6 @@ # ================================================================================ # General - Basic system settings and identification +# @icon 🏷️ # ================================================================================ CFG_INSTALL_NAME=Change-Me # Installation Name - The name for your LibrePortal instance CFG_TIMEZONE=Etc/UTC # System Timezone - Timezone for scheduled tasks and logging timestamps diff --git a/configs/general/general_catalogs b/configs/general/general_catalogs index a4ca06c..2d548b9 100644 --- a/configs/general/general_catalogs +++ b/configs/general/general_catalogs @@ -1,5 +1,6 @@ # ================================================================================ # App Catalogs - Extra app-catalog sources the App Center browses +# @icon πŸ—‚οΈ # ================================================================================ # Each slot is a catalog base URL served with a signed //index.json # (channel defaults to stable; append | for another). Sources are tried diff --git a/configs/general/general_docker_install b/configs/general/general_docker_install index 7389061..a6fc644 100755 --- a/configs/general/general_docker_install +++ b/configs/general/general_docker_install @@ -1,5 +1,6 @@ # ================================================================================ # Docker - Container runtime installation and configuration **ADVANCED** +# @icon 🐳 # ================================================================================ CFG_DOCKER_INSTALL_TYPE=rootless # Docker Installation Type - rootless (default, recommended): containers run unprivileged so a breakout isn't host root; rooted: legacy, containers run as root [rootless|rooted] CFG_DOCKER_INSTALL_USER=dockerinstall # Docker Install User - Username for Docker installation operations diff --git a/configs/general/general_install b/configs/general/general_install index 66e853b..9f7d591 100755 --- a/configs/general/general_install +++ b/configs/general/general_install @@ -1,5 +1,6 @@ # ================================================================================ # Installation Setup - Local or Git Repository configuration and version control +# @icon πŸ“¦ # ================================================================================ CFG_INSTALL_MODE=release # Installation Mode - How LibrePortal is fetched + updated. Hidden by default β€” only shown when Developer Mode is on (click the LibrePortal logo 10 times) or when the install is already on git/local (auto-enables Developer Mode). **DEV** [release:Release - Stable|git:Git clone|local:Local folder] CFG_RELEASE_BASE_URL=https://get.libreportal.org # Release Host - Base URL serving the release channels (override for self-hosting) **ADVANCED** diff --git a/configs/general/general_libreportal b/configs/general/general_libreportal index 523a463..90149ae 100755 --- a/configs/general/general_libreportal +++ b/configs/general/general_libreportal @@ -1,4 +1,5 @@ # ================================================================================ # LibrePortal - Specific LibrePortal configurations **ADVANCED** +# @icon πŸͺ # ================================================================================ CFG_LIBREPORTAL_USER_PASS=changeme # LibrePortal User Password - Password for the LibrePortal system user account diff --git a/configs/general/general_mail b/configs/general/general_mail index 78f344d..e9defbe 100755 --- a/configs/general/general_mail +++ b/configs/general/general_mail @@ -1,5 +1,6 @@ # ================================================================================ # Mail - Mail Server Settings +# @icon βœ‰οΈ # ================================================================================ CFG_MAIL_ENABLED=false # Mail Enabled - Enable mail server configuration for applications CFG_MAIL_HOST=mail.domain.com # Mail Server Host - Your mail server hostname diff --git a/configs/general/general_terminal b/configs/general/general_terminal index e28bb85..4b522f4 100755 --- a/configs/general/general_terminal +++ b/configs/general/general_terminal @@ -1,5 +1,6 @@ # ================================================================================ # Terminal - System utilities and advanced settings **ADVANCED** +# @icon πŸ–₯️ # ================================================================================ CFG_UPDATER_CHECK=60 # Update Check Interval - Hours between system update checks CFG_SWAPFILE_SIZE=2G # Swap File Size - Size of swap file for memory management diff --git a/configs/network/network_dns b/configs/network/network_dns index 93ad288..2f2e4ad 100755 --- a/configs/network/network_dns +++ b/configs/network/network_dns @@ -1,5 +1,6 @@ # ================================================================================ # DNS - Dynamic Name Server Addresses +# @icon 🌐 # ================================================================================ CFG_DNS_SERVER_1=9.9.9.9 # Primary DNS - Primary DNS server for network resolution diff --git a/configs/network/network_docker b/configs/network/network_docker index a3d9b30..6c88dee 100755 --- a/configs/network/network_docker +++ b/configs/network/network_docker @@ -1,5 +1,6 @@ # ================================================================================ # Docker Network - Network settings for the Docker Network **ADVANCED** +# @icon πŸ•ΈοΈ # ================================================================================ CFG_NETWORK_NAME=vpn # Network Name - Docker network name for container communication diff --git a/configs/network/network_domains b/configs/network/network_domains index 9651e9f..4caa149 100755 --- a/configs/network/network_domains +++ b/configs/network/network_domains @@ -1,5 +1,6 @@ # ================================================================================ # Domains - Domain configuration for Traefik web services +# @icon 🌍 # ================================================================================ CFG_DOMAIN_1= # Domain 1 - Domain slot 1 for a Traefik CFG_DOMAIN_2= # Domain 2 - Domain slot 2 for a Traefik diff --git a/configs/network/network_firewall b/configs/network/network_firewall index cbcaa06..0acf240 100644 --- a/configs/network/network_firewall +++ b/configs/network/network_firewall @@ -1,5 +1,6 @@ # ================================================================================ # Firewall - Host firewall and port-whitelist automation **ADVANCED** +# @icon 🧱 # ================================================================================ CFG_REQUIREMENT_UFW=true # Firewall Protection - Install and configure the Uncomplicated Firewall (UFW) for system security CFG_REQUIREMENT_UFWD=true # Docker Firewall - Install UFW-Docker for container-aware firewall management (rooted Docker only) diff --git a/configs/network/network_headscale b/configs/network/network_headscale index 27659de..d76c7d8 100755 --- a/configs/network/network_headscale +++ b/configs/network/network_headscale @@ -1,5 +1,6 @@ # ================================================================================ # Headscale - VPN service configuration **ADVANCED** +# @icon πŸ›°οΈ # ================================================================================ CFG_HEADSCALE_HOST= # Headscale Host - Headscale server hostname for VPN services CFG_HEADSCALE_KEY= # Headscale Key - Authentication key for Headscale server diff --git a/configs/network/network_ports b/configs/network/network_ports index 34b2e30..fc848a2 100755 --- a/configs/network/network_ports +++ b/configs/network/network_ports @@ -1,5 +1,6 @@ # ================================================================================ # Ports - Settings for the Network Ports **ADVANCED** +# @icon πŸ”Œ # ================================================================================ CFG_PORT_RANGE=3000-9999 # Port allocation range - Range for port allocation Start to End diff --git a/configs/network/network_rootless b/configs/network/network_rootless index 45bd106..e0033f7 100644 --- a/configs/network/network_rootless +++ b/configs/network/network_rootless @@ -1,5 +1,6 @@ # ================================================================================ # Rootless Networking - Network stack and behaviour for rootless Docker **ADVANCED** +# @icon πŸ”€ # ================================================================================ CFG_ROOTLESS_NET=pasta # Rootless Network Driver - Network stack for rootless Docker. pasta (default): actively maintained, preserves the real client source IP on inbound connections, lower idle CPU; slirp4netns: legacy fallback, maintenance-only upstream. The matching rootlesskit port driver is selected automatically. On Debian, the installer also applies the local AppArmor override pasta needs (see scripts/docker/install/rootless/rootless_apparmor.sh) so this is a single-toggle switch. **ADVANCED** [pasta:Pasta (default, actively maintained)|slirp4netns:slirp4netns (legacy fallback)] diff --git a/configs/network/network_whitelist b/configs/network/network_whitelist index 2a32a83..f64777d 100755 --- a/configs/network/network_whitelist +++ b/configs/network/network_whitelist @@ -1,4 +1,5 @@ # ================================================================================ # Whitelist - Allow specific IPs for Specified Treafik Apps +# @icon βœ… # ================================================================================ CFG_IPS_WHITELIST=HOSTIPHERE # IP Whitelist - Comma separated list of allowed IP addresses diff --git a/configs/security/security_logins b/configs/security/security_logins index 728d63a..79ef226 100755 --- a/configs/security/security_logins +++ b/configs/security/security_logins @@ -1,5 +1,6 @@ # ================================================================================ # Logins - User accounts and authentication credentials +# @icon πŸ”‘ # ================================================================================ CFG_TRAEFIK_USER=RANDOMIZEDUSERNAME1 # Traefik Username - Username for Traefik Admin Panel login and protected apps CFG_TRAEFIK_PASS=RANDOMIZEDPASSWORD2 # Traefik Password - Password for Traefik Admin Panel login and protected apps diff --git a/configs/security/security_ssh b/configs/security/security_ssh index b066457..0698689 100644 --- a/configs/security/security_ssh +++ b/configs/security/security_ssh @@ -1,5 +1,6 @@ # ================================================================================ # SSH & Access Hardening - Secure remote access and auth-storage toggles **ADVANCED** +# @icon πŸ” # ================================================================================ CFG_REQUIREMENT_SSHKEY_DOWNLOADER=false # SSH Key Downloader - Enable SSH key download functionality for remote access CFG_REQUIREMENT_SSH_DISABLE_PASSWORDS=false # Disable SSH Passwords - Disable password authentication for SSH (requires key-based access only) diff --git a/configs/webui/webui_logins b/configs/webui/webui_logins index 87db237..073f04f 100755 --- a/configs/webui/webui_logins +++ b/configs/webui/webui_logins @@ -1,5 +1,6 @@ # ================================================================================ # WebUI Logins - Web interface authentication settings +# @icon πŸͺŸ # ================================================================================ CFG_WEBUI_USERNAME=RANDOMIZEDUSERNAME1 # WebUI Username - Username for web interface login CFG_WEBUI_PASSWORD=RANDOMIZEDPASSWORD1 # WebUI Password - Password for web interface login diff --git a/configs/webui/webui_logs b/configs/webui/webui_logs index fa03fcf..be53788 100644 --- a/configs/webui/webui_logs +++ b/configs/webui/webui_logs @@ -1,5 +1,6 @@ # ================================================================================ # WebUI Logs - Log-streaming behaviour for the Services tab **ADVANCED** +# @icon πŸ“œ # ================================================================================ CFG_WEBUI_LOG_STREAM_IDLE_TIMEOUT_MINUTES=10 # Idle Timeout - Disconnect a log stream after this much silence. The viewer overlays a Resume button so the user can re-open the stream. 0 disables. CFG_WEBUI_LOG_STREAM_MAX_DURATION_MINUTES=60 # Max Duration - Hard cap on a single stream. Resume button appears at the cap. 0 disables (not recommended). diff --git a/configs/webui/webui_updater b/configs/webui/webui_updater index 77029cb..7f7c1c3 100644 --- a/configs/webui/webui_updater +++ b/configs/webui/webui_updater @@ -1,5 +1,6 @@ # ================================================================================ # WebUI Updater - Automatic app update, CVE & improvement scanning **ADVANCED** +# @icon πŸ”„ # ================================================================================ CFG_UPDATER_SCAN_INTERVAL=30 # App Scan Interval - Minutes between automatic app update/CVE/improvement scans. 0 disables. CFG_HOTFIX_AUTO=security-breakage # Hotfix Auto-Apply - Which signed hotfix severities apply automatically on the update check [security-breakage|all|off] diff --git a/containers/libreportal/frontend/components/admin/config/js/config-manager.js b/containers/libreportal/frontend/components/admin/config/js/config-manager.js index 857dddd..38c29ba 100755 --- a/containers/libreportal/frontend/components/admin/config/js/config-manager.js +++ b/containers/libreportal/frontend/components/admin/config/js/config-manager.js @@ -250,6 +250,12 @@ if (typeof window.ConfigManager === 'undefined') { if (typeof ConfigShared !== 'undefined' && ConfigShared.stripCategoryPrefix) { displaySubcategory = ConfigShared.stripCategoryPrefix(displaySubcategory, category); } + // Prepend the per-file icon (the "# @icon " directive, surfaced as + // subcategoryData.icon by the config generator) before the section name β€” + // every renderer drops displaySubcategory straight into its

. + if (subcategoryData && subcategoryData.icon) { + displaySubcategory = subcategoryData.icon + ' ' + displaySubcategory; + } var subcategoryDescription = this.utils.cleanDescription(subcategoryData.description || ''); // The subcategoryData IS the config items, not a container for them diff --git a/scripts/webui/data/generators/config/webui_generate_configs.sh b/scripts/webui/data/generators/config/webui_generate_configs.sh index 54301d8..c241ead 100755 --- a/scripts/webui/data/generators/config/webui_generate_configs.sh +++ b/scripts/webui/data/generators/config/webui_generate_configs.sh @@ -160,16 +160,22 @@ EOF config_file="$category_dir/$subcategory" [[ -f "$config_file" ]] || continue - # Find the first header comment ("# Title - Description") in the - # first 5 lines of the file. Was `head -5 | grep | head -1` (3 - # forks); now pure bash. + # Find the first header comment ("# Title - Description") AND an + # optional "# @icon " directive in the first 10 lines. The + # icon renders before the section name in the config editor. header_line="" + sub_icon="" _read_count=0 - while IFS= read -r _l && (( _read_count < 5 )); do + while IFS= read -r _l && (( _read_count < 10 )); do ((_read_count++)) - if [[ "$_l" == \#*' - '* ]]; then + if [[ -z "$header_line" && "$_l" == \#*' - '* ]]; then header_line="$_l" - break + fi + if [[ -z "$sub_icon" && "$_l" == '#'*'@icon '* ]]; then + sub_icon="${_l#*@icon }" + sub_icon="${sub_icon%$'\r'}" + sub_icon="${sub_icon#"${sub_icon%%[![:space:]]*}"}" + sub_icon="${sub_icon%"${sub_icon##*[![:space:]]}"}" fi done < "$config_file" @@ -190,6 +196,7 @@ EOF description="${description%"${description##*[![:space:]]}"}" title=$(jsonEscape "$title") description=$(jsonEscape "$description") + sub_icon=$(jsonEscape "$sub_icon") if [[ $first_subcategory == true ]]; then first_subcategory=false @@ -199,6 +206,7 @@ EOF fi printf ' "title": "%s",\n' "$title" >> "$temp_file" printf ' "description": "%s",\n' "$description" >> "$temp_file" + printf ' "icon": "%s",\n' "$sub_icon" >> "$temp_file" printf ' "category": "%s"\n' "$category_name" >> "$temp_file" printf ' }\n' >> "$temp_file" done