diff --git a/dynamix.unraid.net.plg b/dynamix.unraid.net.plg
index 5a43888c1..2a1ff2c54 100644
--- a/dynamix.unraid.net.plg
+++ b/dynamix.unraid.net.plg
@@ -33,13 +33,13 @@ if [ -e /etc/rc.d/rc.unraid-api ]; then
mv -f /usr/local/emhttp/plugins/dynamix.unraid.net/Registration.page- /usr/local/emhttp/plugins/dynamix/Registration.page
mv -f /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php- /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php
mv -f /usr/local/emhttp/plugins/dynamix/DisplaySettings.page- /usr/local/emhttp/plugins/dynamix/DisplaySettings.page
- rm -rf /boot/config/plugins/Unraid.net/wc
+ rm -rf /boot/config/plugins/Unraid.net/webComps
rm -f /boot/config/plugins/Unraid.net/unraid-api.tgz
rm -f /boot/config/plugins/Unraid.net/.gitignore
rm -rf /usr/local/emhttp/plugins/dynamix.unraid.net
rm -f /usr/local/emhttp/webGui/javascript/vue.js
rm -f /usr/local/emhttp/webGui/javascript/vue.min.js
- rm -rf /usr/local/emhttp/webGui/wc
+ rm -rf /usr/local/emhttp/webGui/webComps
find /usr/local/emhttp/languages -type f \( -iname unraidnet.txt -o -iname unraidnet.dot \) -delete
exit 0
fi
@@ -277,9 +277,9 @@ _install() {
cp $node_base_directory/unraid-api/.env.$env $node_base_directory/unraid-api/.env
# Copy across wc files
- rm -rf /usr/local/emhttp/webGui/wc
- mkdir -p /usr/local/emhttp/webGui/wc
- cp /boot/config/plugins/Unraid.net/wc/* /usr/local/emhttp/webGui/wc
+ rm -rf /usr/local/emhttp/webGui/webComps
+ mkdir -p /usr/local/emhttp/webGui/webComps
+ cp /boot/config/plugins/Unraid.net/webComps/* /usr/local/emhttp/webGui/webComps
}
install() {
# Stop old process
@@ -1691,24 +1691,24 @@ window.addEventListener('message', handleMessage, false);
// Determine what source we should use for web components
$UPC_ENV = $_COOKIE['UPC_ENV'] ? $_COOKIE['UPC_ENV'] : 'production'; // @TODO - it would be great if this was auto-set when PLG was built
-$upcBase = file_exists('/boot/config/plugins/Unraid.net/wc/unraid.js') ? 'unraid.js' : 'unraid.min.js'; // needed for the server to be agnostic of min or non min versions of the web components
-$upcSrc = 'https://registration.unraid.net/wc/unraid.min.js'; // by default prod is loaded from hosted sources
+$upcBase = file_exists('/boot/config/plugins/Unraid.net/webComps/unraid.js') ? 'unraid.js' : 'unraid.min.js'; // needed for the server to be agnostic of min or non min versions of the web components
+$upcSrc = 'https://registration.unraid.net/webComps/unraid.min.js'; // by default prod is loaded from hosted sources
switch ($UPC_ENV) {
case 'staging':
// min version of staging
- $upcSrc = 'https://registration-dev.unraid.net/wc/unraid.min.js';
+ $upcSrc = 'https://registration-dev.unraid.net/webComps/unraid.min.js';
break;
case 'staging-debug':
// non-min version of staging
- $upcSrc = 'https://registration-dev.unraid.net/wc/unraid.js';
+ $upcSrc = 'https://registration-dev.unraid.net/webComps/unraid.js';
break;
case 'local':
// forces load from webGUI filesystem
- $upcSrc = autov('/webGui/wc/' . $upcBase);
+ $upcSrc = autov('/webGui/webComps/' . $upcBase);
break;
case 'development':
// local filesystem Vue.js + external "local" dev server for RegWiz development
- $upcSrc = 'https://launchpad.unraid.test:6969/wc/unraid.js';
+ $upcSrc = 'https://launchpad.unraid.test:6969/webComps/unraid.js';
break;
default: // prod
break;
@@ -1723,10 +1723,10 @@ if (currentUpcEnv !== 'production') console.debug('[UPC_ENV] ✨', currentUpcEnv
setTimeout(() => {
if (!window.customElements.get('unraid-user-profile')) {
console.log('[UPC] Fallback to filesystem src 😖');
- document.getElementById('unraid-wc').remove();
+ document.getElementById('unraid-wc').remove(); // remove original source, jic
const el = document.createElement('script');
el.type = 'text/javascript';
- el.src = '';
+ el.src = '';
return document.head.appendChild(el);
}
return false;
@@ -1739,9 +1739,9 @@ setTimeout(() => {
@@ -1789,7 +1789,7 @@ rsync -r --exclude="$MANIFEST_JSON" /boot/config/plugins/Unraid.net/wc/ /usr/loc
@@ -2749,7 +2749,7 @@ elif grep -q 6.9.0-beta35 /etc/unraid-version; then
fi
if [ -f /boot/.git ]; then
- git -C /boot rm --quiet --cached /boot/config/plugins/Unraid.net/wc/* &>/dev/null && echo "Removed old javascript files from repo" || exit 0
+ git -C /boot rm --quiet --cached /boot/config/plugins/Unraid.net/webComps/* &>/dev/null && echo "Removed old javascript files from repo" || exit 0
fi
]]>