Implement versions 0.0.4-0.0.7 features

v0.0.4:
- Add WooCommerce settings tab for default license settings
- Per-product settings override global defaults

v0.0.5:
- Add bulk license operations (activate, deactivate, revoke, extend, delete)
- Add license renewal/extension and lifetime functionality
- Add quick action buttons per license row

v0.0.6:
- Add license dashboard with statistics and analytics
- Add license transfer functionality (admin)
- Add CSV export for licenses
- Add OpenAPI 3.1 specification
- Remove /deactivate API endpoint

v0.0.7:
- Move license dashboard to WooCommerce Reports section
- Add license search and filtering in admin
- Add customer-facing license transfer with AJAX modal
- Add email notifications for license expiration warnings
- Add bulk import licenses from CSV
- Update README with comprehensive documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-21 20:32:35 +01:00
parent 78e43b9aea
commit 49a0699963
21 changed files with 4132 additions and 289 deletions

View File

@@ -165,3 +165,306 @@
vertical-align: middle;
margin-left: 5px;
}
/* Licenses Table Bulk Actions */
.licenses-table {
margin-top: 0;
}
.licenses-table .check-column {
width: 2.2em;
padding: 0.5em;
}
.licenses-table .license-actions {
width: 150px;
}
.licenses-table .row-actions {
visibility: visible;
padding: 2px 0 0;
}
.licenses-table .row-actions a {
text-decoration: none;
}
.licenses-table .row-actions .submitdelete {
color: #b32d2e;
}
.licenses-table .row-actions .submitdelete:hover {
color: #dc3232;
}
/* Lifetime Badge */
.license-lifetime {
display: inline-block;
padding: 0.2em 0.5em;
font-size: 0.85em;
font-weight: 500;
background-color: #e7f3ff;
color: #2271b1;
border-radius: 3px;
}
/* Bulk Actions Styling */
.tablenav .actions select {
margin-right: 6px;
}
.tablenav .bulkactions {
padding: 0;
}
/* Transfer Modal */
.wclp-modal {
position: fixed;
z-index: 100000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
.wclp-modal-content {
background-color: #fff;
margin: 10% auto;
padding: 20px 30px;
border-radius: 4px;
width: 500px;
max-width: 90%;
position: relative;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.wclp-modal-close {
position: absolute;
right: 15px;
top: 10px;
font-size: 28px;
font-weight: bold;
cursor: pointer;
color: #666;
}
.wclp-modal-close:hover {
color: #000;
}
.wclp-modal h2 {
margin-top: 0;
padding-bottom: 10px;
border-bottom: 1px solid #ddd;
}
.wclp-modal .form-table th {
padding: 15px 10px 15px 0;
width: 120px;
}
.wclp-modal .submit {
border-top: 1px solid #ddd;
padding-top: 15px;
margin-bottom: 0;
}
/* Dashboard Styles */
.wclp-dashboard-stats {
margin-top: 20px;
}
.wclp-stat-cards {
display: flex;
flex-wrap: wrap;
gap: 15px;
margin-bottom: 20px;
}
.wclp-stat-card {
flex: 1;
min-width: 150px;
max-width: 200px;
background: #fff;
border: 1px solid #c3c4c7;
border-radius: 4px;
padding: 15px;
display: flex;
align-items: center;
gap: 12px;
}
.wclp-stat-icon {
font-size: 32px;
line-height: 1;
}
.wclp-stat-icon .dashicons {
font-size: 32px;
width: 32px;
height: 32px;
}
.wclp-stat-content {
display: flex;
flex-direction: column;
}
.wclp-stat-number {
font-size: 24px;
font-weight: 600;
line-height: 1.2;
}
.wclp-stat-label {
font-size: 12px;
color: #646970;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.wclp-stat-total .wclp-stat-icon .dashicons {
color: #2271b1;
}
.wclp-stat-active .wclp-stat-icon .dashicons {
color: #00a32a;
}
.wclp-stat-inactive .wclp-stat-icon .dashicons {
color: #dba617;
}
.wclp-stat-expired .wclp-stat-icon .dashicons {
color: #d63638;
}
.wclp-stat-revoked .wclp-stat-icon .dashicons {
color: #646970;
}
.wclp-stat-row {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-bottom: 20px;
}
.wclp-stat-box {
flex: 1;
min-width: 280px;
background: #fff;
border: 1px solid #c3c4c7;
border-radius: 4px;
padding: 15px 20px;
}
.wclp-stat-box.wclp-stat-full {
flex: 100%;
min-width: 100%;
}
.wclp-stat-box h3 {
margin-top: 0;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid #ddd;
}
.wclp-stat-box .widefat {
border: none;
}
.wclp-stat-value {
text-align: right;
font-weight: 600;
}
.wclp-stat-value.wclp-warning {
color: #d63638;
}
/* Dashboard Bar Chart */
.wclp-chart-container {
overflow-x: auto;
}
.wclp-bar-chart {
display: flex;
align-items: flex-end;
gap: 10px;
height: 200px;
padding: 20px 0;
}
.wclp-bar-wrapper {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
min-width: 50px;
}
.wclp-bar {
width: 100%;
max-width: 40px;
background: linear-gradient(180deg, #2271b1, #135e96);
border-radius: 3px 3px 0 0;
min-height: 4px;
position: relative;
transition: background 0.2s;
}
.wclp-bar:hover {
background: linear-gradient(180deg, #135e96, #0a4b78);
}
.wclp-bar-value {
position: absolute;
top: -20px;
left: 50%;
transform: translateX(-50%);
font-size: 11px;
font-weight: 600;
color: #1d2327;
}
.wclp-bar-label {
margin-top: 8px;
font-size: 10px;
color: #646970;
text-align: center;
white-space: nowrap;
}
/* Dashboard Actions */
.wclp-dashboard-actions {
background: #fff;
border: 1px solid #c3c4c7;
border-radius: 4px;
padding: 15px 20px;
margin-top: 20px;
}
.wclp-dashboard-actions h2 {
margin-top: 0;
margin-bottom: 15px;
}
.wclp-action-buttons {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.wclp-action-buttons .button .dashicons {
vertical-align: middle;
margin-right: 5px;
margin-top: -2px;
}
/* Wider actions column for transfer link */
.licenses-table .license-actions {
width: 220px;
}