diff --git a/gdpr-content-blocker/includes/class-license.php b/gdpr-content-blocker/includes/class-license.php index 937ca04..7fd9e5a 100644 --- a/gdpr-content-blocker/includes/class-license.php +++ b/gdpr-content-blocker/includes/class-license.php @@ -323,7 +323,17 @@ class CB_License { } public static function render_tab(): void { - $lic = self::get_license(); + $lic = self::get_license(); + + // Keep the shown status honest: if this site was deactivated elsewhere + // (e.g. another site freed this slot), re-validate live when the tab is + // opened — throttled to at most once every 5 minutes. + if ( in_array( $lic['status'], [ 'active', 'invalid' ], true ) + && ( time() - (int) $lic['last_check'] ) > 5 * MINUTE_IN_SECONDS ) { + self::cron_check(); + $lic = self::get_license(); + } + $status = $lic['status']; $badge = match ( $status ) { @@ -349,27 +359,32 @@ class CB_License { - -
- - - - - - - - - -
+ +

+

+ +

+
diff --git a/gdpr-content-blocker/includes/class-settings.php b/gdpr-content-blocker/includes/class-settings.php index 30eea00..f085096 100644 --- a/gdpr-content-blocker/includes/class-settings.php +++ b/gdpr-content-blocker/includes/class-settings.php @@ -466,6 +466,25 @@ class CB_Settings { .cb-admin-wrap .cb-tab-content { padding-top: 20px; } + /* bound-domains list (license full) */ + .cb-admin-wrap .cb-domain-list { + margin: 10px 0 0; + max-width: 480px; + } + .cb-admin-wrap .cb-domain-list li { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + padding: 8px 12px; + margin: 0 0 6px; + background: #fff; + border: 1px solid #dcdcde; + border-radius: 4px; + } + .cb-admin-wrap .cb-domain-list form { + margin: 0; + } .cb-admin-wrap .cb-field label { display: block; font-weight: 600; diff --git a/gdpr-content-blocker/languages/gdpr-content-blocker-en_US.mo b/gdpr-content-blocker/languages/gdpr-content-blocker-en_US.mo index d49b61b..f68aaee 100644 Binary files a/gdpr-content-blocker/languages/gdpr-content-blocker-en_US.mo and b/gdpr-content-blocker/languages/gdpr-content-blocker-en_US.mo differ diff --git a/gdpr-content-blocker/languages/gdpr-content-blocker-en_US.po b/gdpr-content-blocker/languages/gdpr-content-blocker-en_US.po index 96376f3..1b1fe18 100644 --- a/gdpr-content-blocker/languages/gdpr-content-blocker-en_US.po +++ b/gdpr-content-blocker/languages/gdpr-content-blocker-en_US.po @@ -57,14 +57,17 @@ msgstr "Status" msgid "Domain" msgstr "Domain" -msgid "Domain freigeben" -msgstr "Release domain" +msgid "Belegte Domains" +msgstr "Bound domains" -msgid "Diese Lizenz ist bereits auf den genannten Domains aktiv. Wählen Sie eine zum Freigeben aus – sie wird deaktiviert und diese Seite stattdessen aktiviert." -msgstr "This license is already active on the domains listed. Choose one to release — it will be deactivated and this site activated instead." +msgid "Diese Lizenz ist bereits auf folgenden Domains aktiv. Entfernen Sie eine, um den Platz freizugeben – diese Seite wird anschließend automatisch aktiviert." +msgstr "This license is already active on the following domains. Remove one to free a seat — this site will then be activated automatically." -msgid "Freigeben und diese Seite aktivieren" -msgstr "Release and activate this site" +msgid "Diese Domain wirklich aus der Lizenz entfernen?" +msgstr "Really remove this domain from the license?" + +msgid "Domain entfernen" +msgstr "Remove domain" msgid "Aus Sicherheitsgründen verdeckt. Zum Ändern bitte zuerst deaktivieren." msgstr "Hidden for security. To change it, deactivate first." diff --git a/hilfsdaten/build-en-mo.py b/hilfsdaten/build-en-mo.py index 79811fa..2024822 100644 --- a/hilfsdaten/build-en-mo.py +++ b/hilfsdaten/build-en-mo.py @@ -22,9 +22,10 @@ EN = [ "Not activated", "Status", "Domain", - "Release domain", - "This license is already active on the domains listed. Choose one to release — it will be deactivated and this site activated instead.", - "Release and activate this site", + "Bound domains", + "This license is already active on the following domains. Remove one to free a seat — this site will then be activated automatically.", + "Really remove this domain from the license?", + "Remove domain", "Hidden for security. To change it, deactivate first.", "Deactivate license", "Try again",