From 490ef421574073526a0e3563355907f4c2f52728 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 14 Aug 2023 12:38:26 +0200 Subject: [PATCH] Force a fresh search for updates for the notifier Closes #5546 --- wcfsetup/install/files/acp/js/WCF.ACP.js | 11 +++++++++-- wcfsetup/install/files/acp/style/layout.scss | 6 ++++++ .../install/files/acp/templates/pageHeaderUser.tpl | 4 ++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index 7f8e27bc47..337eb1d35d 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -822,7 +822,14 @@ WCF.ACP.Package.Update.Search = Class.extend({ } this._button = elBySel('.jsButtonSearchForUpdates'); - if (this._button) this._button.addEventListener('click', this._click.bind(this)); + if (this._button) { + this._button.addEventListener('click', this._click.bind(this)); + + const url = new URL(window.location.href); + if (url.searchParams.has("searchForUpdates")) { + this._click(); + } + } }, /** @@ -831,7 +838,7 @@ WCF.ACP.Package.Update.Search = Class.extend({ * @param {Event} event */ _click: function(event) { - event.preventDefault(); + event?.preventDefault(); if (this._button.classList.contains('disabled')) { return; diff --git a/wcfsetup/install/files/acp/style/layout.scss b/wcfsetup/install/files/acp/style/layout.scss index 3de05bb539..6047dd9d7c 100644 --- a/wcfsetup/install/files/acp/style/layout.scss +++ b/wcfsetup/install/files/acp/style/layout.scss @@ -206,6 +206,12 @@ html[data-color-scheme="dark"] { .pageHeaderPanel fa-icon[size="32"] { display: none; } + + #outstandingUpdatesNotification .badgeUpdate { + left: 29px; + top: -4px; + padding: 0 4px; + } } @include screen-md-down { diff --git a/wcfsetup/install/files/acp/templates/pageHeaderUser.tpl b/wcfsetup/install/files/acp/templates/pageHeaderUser.tpl index 742cd6410b..6fae9ee781 100644 --- a/wcfsetup/install/files/acp/templates/pageHeaderUser.tpl +++ b/wcfsetup/install/files/acp/templates/pageHeaderUser.tpl @@ -17,8 +17,8 @@ {if $__wcf->session->getPermission('admin.configuration.package.canUpdatePackage') && $__wcf->getAvailableUpdates()} -
  • - +
  • + {icon size=16 name='arrows-rotate'} {icon size=32 name='arrows-rotate'} {#$__wcf->getAvailableUpdates()} -- 2.20.1