feat: remove licensing system and bump version to 4.0.0-cloudhost

- Remove AS3CF_Pro_Licences_Updates instantiation and all $this->licence
  references from the PHP backend; stub methods return safe defaults
  (is_valid_licence → true, is_licence_over_media_limit → false,
  feature_enabled → true, is_pro_plugin_setup bypasses licence check)
- Remove Licences REST API endpoint from add_api_endpoints()
- Remove 'licence' from allowed settings keys
- Bump version from 3.2.12 to 4.0.0-cloudhost in version.php and plugin header
- Replace licence derived store with hardcoded always-valid writable store
- Simplify enableAssets store to depend only on config.assets_settings
- Remove licence panel row from Nav flyout; remove licence check from
  offload remaining button disabled logic
- Replace Header licence display with "Internal Build" label
- Remove LicencePage route registration from pages.js; drop licence
  import and is_valid guards from all isNextRoute functions
- Rebuild compiled Svelte bundle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 12:57:35 +01:00
parent 3248cbb029
commit dec5ad7f2d
9 changed files with 1275 additions and 2884 deletions

View File

@@ -1,7 +1,6 @@
<script>
import {link} from "svelte-spa-router";
import {bucket_writable, counts, strings, urls} from "../js/stores";
import {licence, offloadRemainingWithCount, running, tools} from "./stores";
import {bucket_writable, counts, strings} from "../js/stores";
import {offloadRemainingWithCount, running, tools} from "./stores";
import Nav from "../components/Nav.svelte";
import OffloadStatus from "../components/OffloadStatus.svelte";
import ToolRunningStatus from "./ToolRunningStatus.svelte";
@@ -16,16 +15,11 @@
/**
* Get a message describing why the offload remaining button is disabled, if it is.
*
* @param {Object} licence
* @param {Object} counts
*
* @return {string}
*/
function getOffloadRemainingDisabledMessage( licence, counts ) {
if ( !licence.is_set ) {
return $strings.no_licence;
}
function getOffloadRemainingDisabledMessage( counts ) {
if ( counts.total < 1 ) {
return $strings.no_media;
}
@@ -34,19 +28,6 @@
return $strings.all_media_offloaded;
}
if (
licence.limit_info.counts_toward_limit &&
licence.limit_info.total > 0 &&
licence.limit_info.limit > 0 &&
licence.limit_info.total >= licence.limit_info.limit
) {
if ( licence.limit_info.total > licence.limit_info.limit ) {
return $strings.licence_limit_exceeded;
}
return $strings.licence_limit_reached;
}
if ( ! $bucket_writable ) {
return $strings.disabled_tool_bucket_access;
}
@@ -54,7 +35,7 @@
return "";
}
$: offloadRemainingDisabledMessage = getOffloadRemainingDisabledMessage( $licence, $counts );
$: offloadRemainingDisabledMessage = getOffloadRemainingDisabledMessage( $counts );
/**
* Close the flyout panel and kick off the offloader.
@@ -85,22 +66,6 @@
{$offloadRemainingWithCount}
</Button>
</PanelRow>
<PanelRow footer class="licence">
<div class="details">
<p class="title">{$strings.plan_usage_title}</p>
<p>{$licence.plan_usage}</p>
</div>
{#if !$licence.is_set}
<a href="/license" use:link>
{$strings.activate_licence}
</a>
{:else if $licence.limit_info.limit !== 0}
<a href={$urls.licenses} target="_blank" class="upgrade">
{$strings.upgrade_plan_cta}
</a>
{/if}
</PanelRow>
</svelte:fragment>
</OffloadStatusFlyout>
</svelte:fragment>