2026-01-21 18:55:18 +01:00
|
|
|
{% if not has_licenses %}
|
|
|
|
|
<p>{{ __('You have no licenses yet.') }}</p>
|
|
|
|
|
{% else %}
|
2026-01-21 19:46:50 +01:00
|
|
|
<div class="woocommerce-licenses">
|
|
|
|
|
{% for item in licenses %}
|
|
|
|
|
<div class="license-card">
|
|
|
|
|
<div class="license-header">
|
|
|
|
|
<h3>
|
2026-01-21 18:55:18 +01:00
|
|
|
{% if item.product_url %}
|
|
|
|
|
<a href="{{ esc_url(item.product_url) }}">{{ esc_html(item.product_name) }}</a>
|
|
|
|
|
{% else %}
|
|
|
|
|
{{ esc_html(item.product_name) }}
|
|
|
|
|
{% endif %}
|
2026-01-21 19:46:50 +01:00
|
|
|
</h3>
|
|
|
|
|
<span class="license-status license-status-{{ item.license.status }}">
|
|
|
|
|
{{ item.license.status|capitalize }}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="license-details">
|
|
|
|
|
<div class="license-key-row">
|
|
|
|
|
<label>{{ __('License Key:') }}</label>
|
|
|
|
|
<code class="license-key" data-license-key="{{ esc_attr(item.license.licenseKey) }}">
|
|
|
|
|
{{ esc_html(item.license.licenseKey) }}
|
|
|
|
|
</code>
|
|
|
|
|
<button type="button" class="copy-license-btn" data-license-key="{{ esc_attr(item.license.licenseKey) }}" title="{{ __('Copy to clipboard') }}">
|
|
|
|
|
<span class="dashicons dashicons-clipboard"></span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="license-info-row">
|
2026-01-21 20:32:35 +01:00
|
|
|
<span class="license-domain-display" data-license-id="{{ item.license.id }}">
|
|
|
|
|
<strong>{{ __('Domain:') }}</strong>
|
|
|
|
|
<span class="domain-value">{{ esc_html(item.license.domain) }}</span>
|
|
|
|
|
{% if item.license.status == 'active' or item.license.status == 'inactive' %}
|
|
|
|
|
<button type="button" class="wclp-transfer-btn"
|
|
|
|
|
data-license-id="{{ item.license.id }}"
|
|
|
|
|
data-current-domain="{{ esc_attr(item.license.domain) }}"
|
|
|
|
|
title="{{ __('Transfer to new domain') }}">
|
|
|
|
|
<span class="dashicons dashicons-randomize"></span>
|
|
|
|
|
{{ __('Transfer') }}
|
|
|
|
|
</button>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</span>
|
2026-01-21 19:46:50 +01:00
|
|
|
<span><strong>{{ __('Expires:') }}</strong>
|
|
|
|
|
{% if item.license.expiresAt %}
|
|
|
|
|
{{ item.license.expiresAt|date('Y-m-d') }}
|
|
|
|
|
{% else %}
|
|
|
|
|
{{ __('Never') }}
|
|
|
|
|
{% endif %}
|
2026-01-21 18:55:18 +01:00
|
|
|
</span>
|
2026-01-21 19:46:50 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{% if item.downloads is defined and item.downloads is not empty %}
|
|
|
|
|
<div class="license-downloads">
|
|
|
|
|
<h4>{{ __('Available Downloads') }}</h4>
|
|
|
|
|
<ul class="download-list">
|
|
|
|
|
{% for download in item.downloads %}
|
2026-01-23 12:07:49 +01:00
|
|
|
<li class="download-item">
|
|
|
|
|
<div class="download-row-file">
|
|
|
|
|
<a href="{{ esc_url(download.download_url) }}" class="download-link">
|
|
|
|
|
<span class="dashicons dashicons-download"></span>
|
|
|
|
|
{{ esc_html(download.filename ?: 'Version ' ~ download.version) }}
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="download-row-meta">
|
|
|
|
|
<span class="download-version">v{{ esc_html(download.version) }}</span>
|
|
|
|
|
<span class="download-date">{{ esc_html(download.released_at) }}</span>
|
|
|
|
|
{% if download.file_hash %}
|
|
|
|
|
<span class="download-hash" title="{{ esc_attr(download.file_hash) }}">
|
|
|
|
|
<span class="dashicons dashicons-shield"></span>
|
|
|
|
|
<code>{{ download.file_hash[:12] }}...</code>
|
|
|
|
|
</span>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
2026-01-21 19:46:50 +01:00
|
|
|
</li>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
2026-01-21 20:32:35 +01:00
|
|
|
|
|
|
|
|
<!-- Transfer Modal -->
|
|
|
|
|
<div id="wclp-transfer-modal" class="wclp-modal" style="display:none;">
|
|
|
|
|
<div class="wclp-modal-overlay"></div>
|
|
|
|
|
<div class="wclp-modal-content">
|
|
|
|
|
<button type="button" class="wclp-modal-close" aria-label="{{ __('Close') }}">×</button>
|
|
|
|
|
<h3>{{ __('Transfer License to New Domain') }}</h3>
|
|
|
|
|
<form id="wclp-transfer-form">
|
|
|
|
|
<input type="hidden" name="license_id" id="transfer-license-id" value="">
|
|
|
|
|
|
|
|
|
|
<div class="wclp-form-row">
|
|
|
|
|
<label>{{ __('Current Domain') }}</label>
|
|
|
|
|
<p class="wclp-current-domain"><code id="transfer-current-domain"></code></p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="wclp-form-row">
|
|
|
|
|
<label for="transfer-new-domain">{{ __('New Domain') }}</label>
|
|
|
|
|
<input type="text" name="new_domain" id="transfer-new-domain"
|
|
|
|
|
placeholder="example.com" required
|
|
|
|
|
pattern="[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)+">
|
|
|
|
|
<p class="wclp-field-description">{{ __('Enter the new domain without http:// or www.') }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="wclp-form-row wclp-form-actions">
|
|
|
|
|
<button type="submit" class="button wclp-btn-primary" id="wclp-transfer-submit">
|
|
|
|
|
{{ __('Transfer License') }}
|
|
|
|
|
</button>
|
|
|
|
|
<button type="button" class="button wclp-modal-cancel">{{ __('Cancel') }}</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="wclp-transfer-message" class="wclp-message" style="display:none;"></div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-21 18:55:18 +01:00
|
|
|
{% endif %}
|