Files
WPS3Media/ui/pro/SupportPage.svelte
Malin 3248cbb029 feat: add S3-compatible storage provider (MinIO, Ceph, R2, etc.)
Adds a new 'S3-Compatible Storage' provider that works with any
S3-API-compatible object storage service, including MinIO, Ceph,
Cloudflare R2, Backblaze B2, and others.

Changes:
- New provider class: classes/providers/storage/s3-compatible-provider.php
  - Provider key: s3compatible
  - Reads user-configured endpoint URL from settings
  - Uses path-style URL access (required by most S3-compatible services)
  - Supports credentials via AS3CF_S3COMPAT_ACCESS_KEY_ID /
    AS3CF_S3COMPAT_SECRET_ACCESS_KEY wp-config.php constants
  - Disables AWS-specific features (Block Public Access, Object Ownership)
- New provider SVG icons (s3compatible.svg, -link.svg, -round.svg)
- Registered provider in main plugin class with endpoint setting support
- Updated StorageProviderSubPage to show endpoint URL input for S3-compatible
- Built pro settings bundle with rollup (Svelte 4.2.19)
- Added package.json and updated rollup.config.mjs for pro-only builds
2026-03-03 12:30:18 +01:00

77 lines
2.1 KiB
Svelte

<script>
import {link} from "svelte-spa-router";
import {strings} from "../js/stores";
import {licence} from "./stores";
import SupportPage from "../components/SupportPage.svelte";
import DocumentationSidebar from "./DocumentationSidebar.svelte";
import SupportForm from "./SupportForm.svelte";
import Notification from "../components/Notification.svelte";
export let name = "support";
/**
* Potentially returns an error message detailing a problem with the currently set license key.
*
* @param {Object} licence
*
* @return {string}
*/
function getLicenceError( licence ) {
// If there are any errors, just return the first (there's usually only 1 anyway).
if ( licence.hasOwnProperty( "errors" ) && Object.values( licence.errors ).length > 0 ) {
return Object.values( licence.errors )[ 0 ];
}
return "";
}
$: licenceError = getLicenceError( $licence );
</script>
{#if $licence.is_set}
{#if $licence.is_valid && licenceError.length === 0}
<SupportPage {name} title={$strings.email_support_title} on:routeEvent>
<p class="licence-type" slot="header">{@html $licence.your_active_licence}</p>
<svelte:fragment slot="content">
<SupportForm/>
</svelte:fragment>
<svelte:fragment slot="footer">
<DocumentationSidebar/>
</svelte:fragment>
</SupportPage>
{:else}
<SupportPage {name} title={$strings.email_support_title} on:routeEvent>
<svelte:fragment slot="content">
<Notification warning inline>
<p>
{@html licenceError}
</p>
</Notification>
</svelte:fragment>
<svelte:fragment slot="footer">
<DocumentationSidebar/>
</svelte:fragment>
</SupportPage>
{/if}
{:else}
<SupportPage {name} title={$strings.email_support_title} on:routeEvent>
<svelte:fragment slot="content">
<Notification warning inline>
<p>
{$strings.licence_not_entered}
<a href="/license" use:link>
{$strings.please_enter_licence}
</a>
</p>
<p>{$strings.once_licence_entered}</p>
</Notification>
</svelte:fragment>
<svelte:fragment slot="footer">
<DocumentationSidebar/>
</svelte:fragment>
</SupportPage>
{/if}