diff --git a/api/src/unraid-api/unraid-file-modifier/modifications/default-page-layout.modification.ts b/api/src/unraid-api/unraid-file-modifier/modifications/default-page-layout.modification.ts index 2a198ce52..f4dba13cb 100644 --- a/api/src/unraid-api/unraid-file-modifier/modifications/default-page-layout.modification.ts +++ b/api/src/unraid-api/unraid-file-modifier/modifications/default-page-layout.modification.ts @@ -66,6 +66,9 @@ if (is_localhost() && !is_good_session()) { } private addModalsWebComponent(source: string): string { + if (source.includes('')) { + return source; + } return source.replace('', '\n'); } diff --git a/plugin/plugins/dynamix.unraid.net.plg b/plugin/plugins/dynamix.unraid.net.plg index 6af35728f..208a74b22 100755 --- a/plugin/plugins/dynamix.unraid.net.plg +++ b/plugin/plugins/dynamix.unraid.net.plg @@ -155,6 +155,11 @@ exit 0 # Remove the old header logo from DefaultPageLayout.php if present if [ -f "/usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php" ]; then sed -i 's|||g' "/usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php" + + # Add unraid-modals element if not already present + if ! grep -q '' "/usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php"; then + sed -i 's||\n|' "/usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php" + fi fi ]]>