From b35899a826d0534c000b4e5f8860d380f437f611 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 17 Jun 2023 16:35:17 +0200 Subject: [PATCH] Add some reminders --- .../install/files/acp/templates/license.tpl | 23 +++++++++++++++++++ .../files/lib/acp/page/LicensePage.class.php | 17 ++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/wcfsetup/install/files/acp/templates/license.tpl b/wcfsetup/install/files/acp/templates/license.tpl index 1b657acb22..f06fce084a 100644 --- a/wcfsetup/install/files/acp/templates/license.tpl +++ b/wcfsetup/install/files/acp/templates/license.tpl @@ -21,10 +21,17 @@
TODO: License Number
+ {* TODO: The WoltLab Cloud does not really follows the concept of + license numbers therefore this needs to be hidden for these. *}
{$licenseNumber}
TODO: License Type
+ {* TODO: Do we want to display additional information depending on the + license type? This could be useful for WoltLab Cloud installations + to show the subscription name. But this could also show a reminder + for developer licenses that they only qualify for demo/testing + purpose and not for production sites. *}
{$licenseData[license][type]}
@@ -43,8 +50,14 @@ {foreach from=$licenseData[woltlab] key=package item=majorVersion} + {* TODO: Install button? *} + {$package} {$majorVersion} + + {* TODO: We might want to suggest upgrading the license + if we can determine that this is an outdated version. + Maybe we can deeplink the LicenseExtend page here? *} {/foreach} @@ -66,8 +79,18 @@ {foreach from=$licenseData[pluginstore] key=package item=majorVersion} + {* TODO: Install button? *} + {$package} {$majorVersion} + + {* TODO: Are we able to suggest if there is a newer + version available? And if yes, how do we display this + without breaking the version filter? Or does it only + affect the availibility of the install button and not + the row itself? *} + + {* TODO: Do we want to display the time of purchase here? *} {/foreach} diff --git a/wcfsetup/install/files/lib/acp/page/LicensePage.class.php b/wcfsetup/install/files/lib/acp/page/LicensePage.class.php index da67af311f..a833182d0f 100644 --- a/wcfsetup/install/files/lib/acp/page/LicensePage.class.php +++ b/wcfsetup/install/files/lib/acp/page/LicensePage.class.php @@ -12,18 +12,35 @@ use wcf\system\WCF; final class LicensePage extends AbstractPage { + // TODO: This should be the actual menu item. public $activeMenuItem = 'wcf.acp.menu.link.package'; + // TODO: This untyped array is awful, maybe use a custom object intead and + // ask Valinor to hydrate it? private array $licenseData; + + // TODO: This could be part of the aforementioned custom object. private int $licenseNumber; public function readData() { parent::readData(); + // TODO: We actually need to fetch the data from the official package + // update servers first, because we rely on the human readable names. + + // TODO: We should cache this data for a certain amount of time. There + // also needs tobe a way to manually trigger a refresh in case of a + // recent purchase. $this->licenseData = $this->fetchLicenseData(); + // TODO: This might need to use `getAuthData()` to inject the correct + // credentials for the WoltLab Cloud. $this->licenseNumber = (new PackageUpdateServer(1))->loginUsername; + + // TODO: We need the data from the official package update servers to + // determine the human readable values for each package and to filter + // out those that are incompatible with the installed version. } public function assignVariables() -- 2.20.1