From fbbda5926b1d7959916c19a87694bedc18f47426 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Mon, 30 Sep 2024 11:56:37 -0700 Subject: [PATCH] refactor: update my servers include file to handle CSS values This commit updates the `myservers1.php` file in the `dynamix.my.servers` plugin. It adds functionality to handle CSS values in addition to the existing file handling logic. The code now checks for CSS values in the local manifest and includes them in the rendered HTML if found. --- .../plugins/dynamix.my.servers/include/myservers1.php | 8 ++++++++ web/components/Notifications/Sidebar.vue | 7 ++++++- web/components/UserProfile.ce.vue | 1 - 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/myservers1.php b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/myservers1.php index c3cf40c1e..47879167b 100644 --- a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/myservers1.php +++ b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/include/myservers1.php @@ -46,17 +46,25 @@ $localManifest = json_decode(file_get_contents($localManifestFile), true); $searchText = 'unraid-components.client.mjs'; $fileValue = null; +$cssValues = []; foreach ($localManifest as $key => $value) { if (strpos($key, $searchText) !== false && isset($value["file"])) { $fileValue = $value["file"]; break; } + + if (strpos($key, $searchText) !== false && isset($value["css"])) { + $cssValues = $value["css"]; + break; + } } if ($fileValue !== null) { $prefixedPath = '/plugins/dynamix.my.servers/unraid-components/'; echo ''; + + echo '' . PHP_EOL; } else { echo ''; } diff --git a/web/components/Notifications/Sidebar.vue b/web/components/Notifications/Sidebar.vue index 22a4a86da..23eab13e9 100644 --- a/web/components/Notifications/Sidebar.vue +++ b/web/components/Notifications/Sidebar.vue @@ -1,5 +1,10 @@ diff --git a/web/components/UserProfile.ce.vue b/web/components/UserProfile.ce.vue index 0bd6a095d..7736be70b 100644 --- a/web/components/UserProfile.ce.vue +++ b/web/components/UserProfile.ce.vue @@ -129,7 +129,6 @@ onBeforeMount(() => { -