You've already forked wc-licensed-product
Implement version 0.0.3 features
- Add file attachment support for product versions (Media Library) - Add version auto-detection from uploaded filenames - Implement secure customer downloads with hash verification - Add license key copy-to-clipboard functionality - Redesign customer licenses page with card-based UI - Fix product versions meta box visibility for non-licensed types - Add DownloadController for secure file delivery - Update CLAUDE.md roadmap and session history Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -145,3 +145,23 @@
|
||||
font-style: italic;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* File Upload UI */
|
||||
.selected-file-name {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
padding: 5px 10px;
|
||||
background: #e7f3ff;
|
||||
border-radius: 3px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.selected-file-name:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#versions-table .dashicons-media-archive {
|
||||
color: #2271b1;
|
||||
vertical-align: middle;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,206 @@
|
||||
color: #383d41;
|
||||
}
|
||||
|
||||
/* License Table */
|
||||
/* License Cards */
|
||||
.woocommerce-licenses {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5em;
|
||||
}
|
||||
|
||||
.license-card {
|
||||
border: 1px solid #e5e5e5;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.license-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1em 1.5em;
|
||||
background: #f8f9fa;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.license-header h3 {
|
||||
margin: 0;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.license-header h3 a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.license-header h3 a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.license-details {
|
||||
padding: 1.5em;
|
||||
}
|
||||
|
||||
.license-key-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75em;
|
||||
margin-bottom: 1em;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.license-key-row label {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.license-key-row code {
|
||||
font-family: 'SF Mono', Monaco, Consolas, monospace;
|
||||
background-color: #f5f5f5;
|
||||
padding: 0.4em 0.8em;
|
||||
border-radius: 4px;
|
||||
font-size: 1em;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.copy-license-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 0;
|
||||
background: #f0f0f0;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.copy-license-btn:hover {
|
||||
background: #e5e5e5;
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
.copy-license-btn .dashicons {
|
||||
font-size: 18px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.copy-feedback {
|
||||
display: inline-block;
|
||||
margin-left: 0.5em;
|
||||
padding: 0.25em 0.5em;
|
||||
font-size: 0.85em;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.copy-feedback.success {
|
||||
background: #d4edda;
|
||||
color: #155724;
|
||||
}
|
||||
|
||||
.copy-feedback.error {
|
||||
background: #f8d7da;
|
||||
color: #721c24;
|
||||
}
|
||||
|
||||
.license-info-row {
|
||||
display: flex;
|
||||
gap: 2em;
|
||||
color: #666;
|
||||
font-size: 0.95em;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* Download Section */
|
||||
.license-downloads {
|
||||
padding: 1em 1.5em;
|
||||
background: #f8f9fa;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.license-downloads h4 {
|
||||
margin: 0 0 0.75em 0;
|
||||
font-size: 0.95em;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.download-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.download-list li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1em;
|
||||
padding: 0.5em 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.download-list li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.download-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5em;
|
||||
color: #2271b1;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.download-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.download-link .dashicons {
|
||||
font-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.download-version {
|
||||
background: #e7f3ff;
|
||||
padding: 0.2em 0.5em;
|
||||
border-radius: 3px;
|
||||
font-size: 0.85em;
|
||||
color: #2271b1;
|
||||
}
|
||||
|
||||
.download-date {
|
||||
color: #999;
|
||||
font-size: 0.85em;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
/* Domain Field */
|
||||
#licensed-product-domain-field {
|
||||
margin-top: 2em;
|
||||
padding: 1.5em;
|
||||
background-color: #f8f9fa;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#licensed-product-domain-field h3 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1em;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#licensed-product-domain-field .description {
|
||||
display: block;
|
||||
margin-top: 0.5em;
|
||||
font-size: 0.9em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* Legacy License Table (kept for backwards compatibility) */
|
||||
.woocommerce-licenses-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
@@ -64,30 +263,33 @@
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* Domain Field */
|
||||
#licensed-product-domain-field {
|
||||
margin-top: 2em;
|
||||
padding: 1.5em;
|
||||
background-color: #f8f9fa;
|
||||
border: 1px solid #e5e5e5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#licensed-product-domain-field h3 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1em;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#licensed-product-domain-field .description {
|
||||
display: block;
|
||||
margin-top: 0.5em;
|
||||
font-size: 0.9em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media screen and (max-width: 768px) {
|
||||
.license-header {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.5em;
|
||||
}
|
||||
|
||||
.license-key-row {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.license-info-row {
|
||||
flex-direction: column;
|
||||
gap: 0.5em;
|
||||
}
|
||||
|
||||
.download-list li {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.download-date {
|
||||
margin-left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.woocommerce-licenses-table,
|
||||
.woocommerce-licenses-table thead,
|
||||
.woocommerce-licenses-table tbody,
|
||||
|
||||
Reference in New Issue
Block a user