Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3492e26
feat: upgrade nuxt-custom-elements
elibosley Jul 3, 2025
dc5a1fd
chore: extractor upgrade
elibosley Jul 3, 2025
f594695
fix: incorrect nuxt custom element types
elibosley Jul 3, 2025
98e2b7d
chore: attempt to fix nuxt CE
elibosley Jul 3, 2025
7d9a6bf
chore: progress on component upgrade
elibosley Jul 3, 2025
22601de
feat: manual imports
elibosley Jul 4, 2025
8ae2ddf
fix: jquery conflict
elibosley Jul 4, 2025
bdbd7c1
fix: dropdown menu
elibosley Jul 4, 2025
6a59a56
chore: remove unused dropdown menu component
elibosley Jul 4, 2025
f02c0a5
fix: global pinia instance
elibosley Jul 4, 2025
d58d9bc
fix: selection on logviewer component
elibosley Jul 4, 2025
50d445b
fix: apollo in shared plugin
elibosley Jul 4, 2025
33e1d35
chore: remove i18n host
elibosley Jul 4, 2025
56488ec
chore: remove console log
elibosley Jul 7, 2025
fe36e92
fix: imports and apollo
elibosley Jul 7, 2025
efd73b1
fix: another missing import
elibosley Jul 7, 2025
6e86c09
feat: add modals natively to pages
elibosley Jul 7, 2025
c8ecc7f
chore: unraid modal snapshots
elibosley Jul 7, 2025
94aae07
chore: move modals to the top of the body
elibosley Jul 7, 2025
d761539
chore: modals at the top of body
elibosley Jul 7, 2025
7ba0752
chore: delete useTeleport
elibosley Jul 7, 2025
9031df9
fix: select use teleport
elibosley Jul 7, 2025
c728468
let Sheet be modal to prevent conflict with select events
pujitm Jul 7, 2025
8e2be28
fix: user profile component responsiveness (#1467)
zackspear Jul 8, 2025
456b932
chore: remove unused teleport
elibosley Jul 8, 2025
9860b30
chore: remove wrappers
elibosley Jul 8, 2025
ecf520f
fix: select updates
elibosley Jul 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"permissions": {
"allow": [
"Bash(rg:*)",
"Bash(find:*)"
]
},
"enableAllProjectMcpServers": false
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1750864232307
1751630630443
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1750864231987
1751630630198
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1750864232160
1751630630343
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1750864232467
1751630630571
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1750864333264
1751630630810
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ function flashReport() {
<?include "$docroot/plugins/dynamix.my.servers/include/myservers1.php"?>
</head>
<body>
<unraid-modals></unraid-modals>
<div id="displaybox">
<div class="upgrade_notice" style="display:none"></div>
<div id="header" class="<?=$display['banner']?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,17 @@ if (is_localhost() && !is_good_session()) {
);
}

private addModalsWebComponent(source: string): string {
return source.replace('<body>', '<body>\n<unraid-modals></unraid-modals>');
}
private applyToSource(fileContent: string): string {
const transformers = [
this.removeNotificationBell.bind(this),
this.replaceToasts.bind(this),
this.addToaster.bind(this),
this.patchGuiBootAuth.bind(this),
this.hideHeaderLogo.bind(this),
this.addModalsWebComponent.bind(this),
];

return transformers.reduce((content, transformer) => transformer(content), fileContent);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ Index: /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php
}

function closeNotifier() {
@@ -699,11 +708,11 @@
@@ -695,15 +704,16 @@
});
</script>
<?include "$docroot/plugins/dynamix.my.servers/include/myservers1.php"?>
</head>
<body>
+<unraid-modals></unraid-modals>
<div id="displaybox">
<div class="upgrade_notice" style="display:none"></div>
<div id="header" class="<?=$display['banner']?>">
Expand All @@ -66,7 +71,7 @@ Index: /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php
<?include "$docroot/plugins/dynamix.my.servers/include/myservers2.php"?>
</div>
<a href="#" class="move_to_end" title="<?=_('Move To End')?>"><i class="fa fa-arrow-circle-down"></i></a>
@@ -748,12 +757,12 @@
@@ -748,12 +758,12 @@
}
// create list of nchan scripts to be started
if (isset($button['Nchan'])) nchan_merge($button['root'], $button['Nchan']);
Expand All @@ -80,7 +85,7 @@ Index: /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php
foreach ($buttons as $button) {
annotate($button['file']);
// include page specific stylesheets (if existing)
@@ -960,26 +969,18 @@
@@ -960,26 +970,18 @@
case 'warning': bell2++; break;
case 'normal' : bell3++; break;
}
Expand Down Expand Up @@ -112,7 +117,7 @@ Index: /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php
});

<?if ($wlan0):?>
@@ -1363,7 +1364,8 @@
@@ -1363,7 +1365,8 @@
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ Title="API Keys"
Icon="icon-u-key"
Tag="key"
---
<unraid-i18n-host>
<unraid-api-key-manager />
</unraid-i18n-host>
<unraid-api-key-manager />
Original file line number Diff line number Diff line change
Expand Up @@ -577,5 +577,5 @@ _(GraphQL API Developer Sandbox)_:
</div>

<!-- start unraid-api section -->
<unraid-i18n-host><unraid-connect-settings></unraid-connect-settings></unraid-i18n-host>
<unraid-connect-settings></unraid-connect-settings>
<!-- end unraid-api section -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Menu="UNRAID-OS"
Title="Log Viewer (new)"
Icon="icon-log"
Tag="list"
---
<unraid-log-viewer></unraid-log-viewer>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ require_once "$docroot/plugins/dynamix/include/ReplaceKey.php";
$replaceKey = new ReplaceKey();
$replaceKey->check(true);
?>
<unraid-i18n-host>
<unraid-registration></unraid-registration>
</unraid-i18n-host>
<unraid-registration></unraid-registration>
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,5 @@
?>
<script>
window.LOCALE_DATA = '<?= $wCTranslations->getTranslationsJson(true) ?>';
/**
* So we're not needing to modify DefaultLayout with an additional include, we'll add the Modals web component to the bottom of the body.
*/
const i18nHostWebComponent = 'unraid-i18n-host';
const modalsWebComponent = 'unraid-modals';
if (!document.getElementsByTagName(modalsWebComponent).length) {
const $body = document.getElementsByTagName('body')[0];
const $i18nHost = document.createElement(i18nHostWebComponent);
const $modals = document.createElement(modalsWebComponent);
$body.appendChild($i18nHost);
$i18nHost.appendChild($modals);
}
</script>

<unraid-i18n-host>
<unraid-user-profile server="<?= $serverState->getServerStateJsonForHtmlAttr() ?>"></unraid-user-profile>
</unraid-i18n-host>
<unraid-user-profile server="<?= $serverState->getServerStateJsonForHtmlAttr() ?>"></unraid-user-profile>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@
echo $wcExtractor->getScriptTagHtml();
?>

<unraid-i18n-host>
<unraid-sso-button ssoenabled="<?= $serverState->ssoEnabled ? "true" : "false" ?>"></unraid-sso-button>
</unraid-i18n-host>
<unraid-sso-button ssoenabled="<?= $serverState->ssoEnabled ? "true" : "false" ?>"></unraid-sso-button>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class WebComponentsExtractor
{
private const PREFIXED_PATH = '/plugins/dynamix.my.servers/unraid-components/';
private const RICH_COMPONENTS_ENTRY = 'unraid-components.client.mjs';
private const RICH_COMPONENTS_ENTRY_JS = 'unraid-components.client.js';
private const UI_ENTRY = 'src/register.ts';
private const UI_STYLES_ENTRY = 'style.css';

Expand Down Expand Up @@ -47,7 +48,16 @@ private function getRichComponentsFile(): string
$subfolder = $this->getRelativePath($manifestPath);

foreach ($manifest as $key => $value) {
if (strpos($key, self::RICH_COMPONENTS_ENTRY) !== false && isset($value["file"])) {
// Skip timestamp entries
if ($key === 'ts' || !is_array($value)) {
continue;
}

// Check for both old format (direct key match) and new format (path-based key)
$matchesMjs = strpos($key, self::RICH_COMPONENTS_ENTRY) !== false;
$matchesJs = strpos($key, self::RICH_COMPONENTS_ENTRY_JS) !== false;

if (($matchesMjs || $matchesJs) && isset($value["file"])) {
return ($subfolder ? $subfolder . '/' : '') . $value["file"];
}
}
Expand All @@ -59,7 +69,7 @@ private function getRichComponentsScript(): string
{
$jsFile = $this->getRichComponentsFile();
if (empty($jsFile)) {
return '<script>console.error("%cNo matching key containing \'' . self::RICH_COMPONENTS_ENTRY . '\' found.", "font-weight: bold; color: white; background-color: red");</script>';
return '<script>console.error("%cNo matching key containing \'' . self::RICH_COMPONENTS_ENTRY . '\' or \'' . self::RICH_COMPONENTS_ENTRY_JS . '\' found.", "font-weight: bold; color: white; background-color: red");</script>';
}
return '<script src="' . $this->getAssetPath($jsFile) . '"></script>';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@
echo $wcExtractor->getScriptTagHtml();
?>

<unraid-i18n-host>
<unraid-welcome-modal></unraid-welcome-modal>
</unraid-i18n-host>
<unraid-welcome-modal></unraid-welcome-modal>

Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ function confirmDowngrade() {
}
</script>

<unraid-i18n-host>
<unraid-downgrade-os
<unraid-downgrade-os
reboot-version="<?= $rebootDetails->rebootVersion ?>"
restore-version="<?= $rebootDetails->previousVersion ?>"
restore-release-date="<?= $rebootDetails->previousReleaseDate ?>"></unraid-downgrade-os>
</unraid-i18n-host>
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,4 @@ function flashBackup() {
}
</script>

<unraid-i18n-host>
<unraid-update-os reboot-version="<?= $rebootDetails->rebootVersion ?>"></unraid-update-os>
</unraid-i18n-host>
<unraid-update-os reboot-version="<?= $rebootDetails->rebootVersion ?>"></unraid-update-os>
Loading