From: Alexander Ebert Date: Mon, 14 Aug 2023 10:38:26 +0000 (+0200) Subject: Force a fresh search for updates for the notifier X-Git-Tag: 6.0.0_Beta_1~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=490ef421574073526a0e3563355907f4c2f52728;p=GitHub%2FWoltLab%2FWCF.git Force a fresh search for updates for the notifier Closes #5546 --- 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()}