Skip to content

Commit 474bca3

Browse files
committed
fix: DefaultPageLayout patch rollback omits legacy header logo
1 parent 79c57b8 commit 474bca3

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

api/src/unraid-api/unraid-file-modifier/modifications/__test__/snapshots/DefaultPageLayout.php.modified.snapshot.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ function flashReport() {
711711
<div class="upgrade_notice" style="display:none"></div>
712712
<div id="header" class="<?=$display['banner']?>">
713713
<div class="logo">
714-
<a href="https://unraid.net" target="_blank"><?readfile("$docroot/webGui/images/UN-logotype-gradient.svg")?></a>
714+
715715
<unraid-i18n-host><unraid-header-os-version></unraid-header-os-version></unraid-i18n-host>
716716
</div>
717717
<?include "$docroot/plugins/dynamix.my.servers/include/myservers2.php"?>

api/src/unraid-api/unraid-file-modifier/modifications/default-page-layout.modification.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,22 @@ if (is_localhost() && !is_good_session()) {
6868
private addModalsWebComponent(source: string): string {
6969
return source.replace('<body>', '<body>\n<unraid-modals></unraid-modals>');
7070
}
71+
72+
private hideHeaderLogo(source: string): string {
73+
return source.replace(
74+
'<a href="https://unraid.net" target="_blank"><?readfile("$docroot/webGui/images/UN-logotype-gradient.svg")?></a>',
75+
''
76+
);
77+
}
78+
7179
private applyToSource(fileContent: string): string {
7280
const transformers = [
7381
this.removeNotificationBell.bind(this),
7482
this.replaceToasts.bind(this),
7583
this.addToaster.bind(this),
7684
this.patchGuiBootAuth.bind(this),
7785
this.addModalsWebComponent.bind(this),
86+
this.hideHeaderLogo.bind(this),
7887
];
7988

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

api/src/unraid-api/unraid-file-modifier/modifications/patches/default-page-layout.patch

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Index: /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php
5353
}
5454

5555
function closeNotifier() {
56-
@@ -695,10 +704,11 @@
56+
@@ -695,15 +704,16 @@
5757
});
5858
</script>
5959
<?include "$docroot/plugins/dynamix.my.servers/include/myservers1.php"?>
@@ -64,7 +64,13 @@ Index: /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php
6464
<div class="upgrade_notice" style="display:none"></div>
6565
<div id="header" class="<?=$display['banner']?>">
6666
<div class="logo">
67-
<a href="https://unraid.net" target="_blank"><?readfile("$docroot/webGui/images/UN-logotype-gradient.svg")?></a>
67+
- <a href="https://unraid.net" target="_blank"><?readfile("$docroot/webGui/images/UN-logotype-gradient.svg")?></a>
68+
+
69+
<unraid-i18n-host><unraid-header-os-version></unraid-header-os-version></unraid-i18n-host>
70+
</div>
71+
<?include "$docroot/plugins/dynamix.my.servers/include/myservers2.php"?>
72+
</div>
73+
<a href="#" class="move_to_end" title="<?=_('Move To End')?>"><i class="fa fa-arrow-circle-down"></i></a>
6874
@@ -748,12 +758,12 @@
6975
}
7076
// create list of nchan scripts to be started

0 commit comments

Comments
 (0)