diff --git a/backend/igny8_core/plugins/admin.py b/backend/igny8_core/plugins/admin.py index 30670d97..21b5531e 100644 --- a/backend/igny8_core/plugins/admin.py +++ b/backend/igny8_core/plugins/admin.py @@ -178,17 +178,12 @@ class PluginVersionAdmin(ModelAdmin): def release_versions(self, request, queryset): from django.utils import timezone count = 0 - for version in queryset.filter(status__in=['draft', 'testing', 'staged']): + for version in queryset.filter(status='draft'): version.status = 'released' version.save() # Triggers signal to build ZIP count += 1 self.message_user(request, f"Released {count} version(s). ZIP files are being built automatically.") - @admin.action(description="📢 Mark as update ready (notify WordPress sites)") - def mark_as_update_ready(self, request, queryset): - count = queryset.filter(status='released').update(status='update_ready') - self.message_user(request, f"Marked {count} version(s) as update ready. WordPress sites will be notified.") - @admin.action(description="🗑️ Mark as deprecated") def mark_as_deprecated(self, request, queryset): count = queryset.update(status='deprecated') diff --git a/backend/igny8_core/plugins/migrations/0003_simplify_status_choices.py b/backend/igny8_core/plugins/migrations/0003_simplify_status_choices.py new file mode 100644 index 00000000..89c182b9 --- /dev/null +++ b/backend/igny8_core/plugins/migrations/0003_simplify_status_choices.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.10 on 2026-01-09 23:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('plugins', '0002_allow_blank_autogenerated_fields'), + ] + + operations = [ + migrations.AlterField( + model_name='pluginversion', + name='status', + field=models.CharField(choices=[('draft', 'Draft'), ('released', 'Released'), ('deprecated', 'Deprecated')], db_index=True, default='draft', help_text='Release status of this version', max_length=20), + ), + ] diff --git a/backend/igny8_core/plugins/models.py b/backend/igny8_core/plugins/models.py index 271cd7f2..17ba7c10 100644 --- a/backend/igny8_core/plugins/models.py +++ b/backend/igny8_core/plugins/models.py @@ -64,7 +64,7 @@ class Plugin(models.Model): def get_latest_version(self): """Get the latest released version of this plugin.""" return self.versions.filter( - status__in=['released', 'update_ready'] + status='released' ).first() def get_download_count(self): @@ -80,11 +80,8 @@ class PluginVersion(models.Model): """ STATUS_CHOICES = [ - ('draft', 'Draft'), # In development - ('testing', 'Testing'), # Internal testing - ('staged', 'Staged'), # Ready, not yet pushed - ('released', 'Released'), # Available for download - ('update_ready', 'Update Ready'), # Push to installed sites + ('draft', 'Draft'), # In development - NOT available for download + ('released', 'Released'), # Available for download and updates ('deprecated', 'Deprecated'), # Old version, not recommended ] diff --git a/backend/igny8_core/plugins/signals.py b/backend/igny8_core/plugins/signals.py index 83a25b68..db5e7de4 100644 --- a/backend/igny8_core/plugins/signals.py +++ b/backend/igny8_core/plugins/signals.py @@ -17,7 +17,7 @@ logger = logging.getLogger(__name__) @receiver(pre_save, sender=PluginVersion) def auto_build_plugin_on_release(sender, instance, **kwargs): """ - Automatically build ZIP package when a version is marked as released or update_ready. + Automatically build ZIP package when a version is marked as released. This ensures: 1. ZIP file is always up-to-date with source code @@ -25,36 +25,32 @@ def auto_build_plugin_on_release(sender, instance, **kwargs): 3. No manual intervention needed for releases Triggers on: - - New version created with status 'released' or 'update_ready' - - Existing version status changed to 'released' or 'update_ready' - """ - release_statuses = ['released', 'update_ready'] + - New version created with status 'released' + - Existing version status changed to 'released' - # Check if this version should have a ZIP built + Note: Only 'released' status makes the version available for download. + """ + # Only build ZIP when status is 'released' should_build = False if not instance.pk: - # New instance - build if status is a release status - if instance.status in release_statuses: + # New instance - build if status is released + if instance.status == 'released': should_build = True - logger.info(f"New plugin version {instance.plugin.slug} v{instance.version} created with status '{instance.status}' - building ZIP") + logger.info(f"New plugin version {instance.plugin.slug} v{instance.version} created with status 'released' - building ZIP") else: - # Existing instance - check if status changed to a release status + # Existing instance - check if status changed to released try: old_instance = PluginVersion.objects.get(pk=instance.pk) old_status = old_instance.status new_status = instance.status - # Build if moving to a release status from a non-release status - if new_status in release_statuses and old_status not in release_statuses: + # Build if moving to released from any other status + if new_status == 'released' and old_status != 'released': should_build = True - logger.info(f"Building plugin ZIP for {instance.plugin.slug} v{instance.version} (status: {old_status} -> {new_status})") - elif old_status == new_status and new_status in release_statuses: - # No status change, but already released - no rebuild - return - elif old_status in release_statuses and new_status in release_statuses: - # Moving between release statuses - no rebuild - logger.info(f"Plugin {instance.plugin.slug} v{instance.version}: Status changing from {old_status} to {new_status}, no rebuild needed") + logger.info(f"Building plugin ZIP for {instance.plugin.slug} v{instance.version} (status: {old_status} -> released)") + elif old_status == 'released' and new_status == 'released': + # No status change, already released - no rebuild return except PluginVersion.DoesNotExist: return diff --git a/backend/igny8_core/plugins/utils.py b/backend/igny8_core/plugins/utils.py index b285ac2c..d6a083b9 100644 --- a/backend/igny8_core/plugins/utils.py +++ b/backend/igny8_core/plugins/utils.py @@ -190,6 +190,9 @@ def create_plugin_zip( '**/tests', '**/tester', '**/.DS_Store', + '**/*.bak', + '**/*.tmp', + '**/*.log', ] for pattern in patterns_to_remove: diff --git a/frontend/public/images/logo/auth-logo.svg b/frontend/public/images/logo/auth-logo.svg deleted file mode 100644 index eb11cc7c..00000000 --- a/frontend/public/images/logo/auth-logo.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/wordpress/UI-REDESIGN-v1.2.0.md b/plugins/wordpress/UI-REDESIGN-v1.2.0.md new file mode 100644 index 00000000..9369b39a --- /dev/null +++ b/plugins/wordpress/UI-REDESIGN-v1.2.0.md @@ -0,0 +1,168 @@ +# WordPress Plugin UI Redesign - Version 1.2.0 + +## Overview +Complete redesign of the WordPress plugin admin interface to match the main IGNY8 app design system. The plugin now features a modern, professional interface with sidebar navigation and separate pages for each function. + +## What Changed + +### 1. Menu Structure +**Before:** +- Plugin menu was in Settings → IGNY8 API (submenu) +- Single settings page with all options + +**After:** +- Plugin menu in main WordPress sidebar (position 58, after Comments) +- Custom Igny8 logo icon in sidebar +- Separate submenu items for each section + +### 2. Design System +Created `admin/assets/css/igny8-modern.css` with: +- CSS design tokens matching main app +- Color variables: `--igny8-primary`, `--igny8-success`, `--igny8-warning`, etc. +- Modern card-based layout +- Responsive grid system +- Consistent shadows, borders, and radius + +### 3. Navigation Structure +New sidebar navigation with 6 main pages: +1. **Dashboard** - Overview and quick actions +2. **Connection** - API key management +3. **Controls** - Post types, taxonomies, modules +4. **Sync** - Sync status and history +5. **Data** - Link queue and statistics +6. **Logs** - Webhook activity logs + +### 4. Layout Components +Created reusable layout files: +- `admin/layout-header.php` - Sidebar navigation + main content wrapper +- `admin/layout-footer.php` - Closing tags + +### 5. New Page Templates +Created in `admin/pages/`: +- `dashboard.php` - Connection status, sync info, quick actions +- `connection.php` - API key form and connection details +- `controls.php` - Content type controls and settings +- `sync.php` - Sync enable/disable and history +- `data.php` - Link queue and data statistics +- `logs.php` - Webhook logs table + +## Technical Implementation + +### Modified Files + +#### `admin/class-admin.php` +- Changed `add_menu_pages()` to use `add_menu_page()` instead of `add_options_page()` +- Added custom menu icon: `plugins_url('admin/assets/images/logo-icon.png')` +- Updated `enqueue_scripts()` to load modern CSS +- Added `render_page()` method for page routing + +#### `igny8-bridge.php` +- Updated version from 1.1.4 to 1.2.0 + +### New Files Created +1. `admin/assets/css/igny8-modern.css` (480 lines) - Complete design system +2. `admin/assets/images/` - 5 logo files copied from frontend +3. `admin/layout-header.php` - Shared layout wrapper +4. `admin/layout-footer.php` - Closing wrapper +5. `admin/pages/dashboard.php` - Dashboard page +6. `admin/pages/connection.php` - Connection management +7. `admin/pages/controls.php` - Content controls +8. `admin/pages/sync.php` - Sync settings +9. `admin/pages/data.php` - Data overview +10. `admin/pages/logs.php` - Activity logs + +## Design Tokens Applied + +### Colors +```css +--igny8-primary: #3B82F6 (Blue) +--igny8-success: #10B981 (Green) +--igny8-warning: #F59E0B (Orange) +--igny8-danger: #DC2626 (Red) +--igny8-purple: #F63B82 (Purple accent) +--igny8-gray-base: #031D48 (Navy base) +``` + +### Components +- Cards with subtle shadows +- Modern form inputs with focus states +- Status indicators (connected/disconnected) +- Responsive grid system (2 and 3 columns) +- Modern buttons with icons +- Alert boxes (success, warning, danger) + +## Visual Changes + +### Header +- Removed "IGNY8 API Settings" page title +- Minimal page headers with icon and description +- Connection status in sidebar footer + +### Sidebar +- Igny8 logo at top +- Icon-based navigation +- Active state highlighting +- Connection status indicator at bottom + +### Content Area +- Clean white background +- Card-based layout +- Generous spacing and padding +- SVG icons throughout +- Modern typography + +## User Experience Improvements + +1. **Better Navigation**: Clear menu structure with dedicated pages +2. **Visual Hierarchy**: Cards and sections clearly separated +3. **Status Indicators**: Quick visual feedback on connection and sync status +4. **Responsive Design**: Works on all screen sizes +5. **Consistent Design**: Matches main IGNY8 app perfectly +6. **Quick Actions**: Dashboard provides shortcuts to common tasks + +## File Size +- Version 1.1.5: 155KB +- Version 1.2.0: 567KB (includes CSS, images, and new page templates) + +## Distribution +- Built: `/data/app/igny8/plugins/wordpress/dist/igny8-wp-bridge-v1.2.0.zip` +- SHA256: Generated and saved alongside ZIP +- Ready for deployment + +## Backwards Compatibility +- All existing functionality preserved +- Old `render_settings_page()` method redirects to new `render_page()` +- Form handlers remain unchanged +- Database options unchanged + +## Testing Checklist +- [ ] Plugin appears in main WordPress sidebar +- [ ] Logo icon displays correctly +- [ ] All 6 pages load without errors +- [ ] Sidebar navigation works +- [ ] Active page highlighting works +- [ ] Connection form functions +- [ ] Settings save correctly +- [ ] Responsive on mobile +- [ ] Colors match main app +- [ ] Status indicators work + +## Deployment Notes +1. Users will see new sidebar menu location +2. All settings preserved during update +3. No database migrations needed +4. Assets load from new paths +5. Old `igny8-settings` page slug redirects to `igny8-dashboard` + +## Version Info +- **Version**: 1.2.0 +- **Release Date**: January 10, 2024 +- **Type**: Major UI Update +- **Breaking Changes**: None (backwards compatible) +- **Min WordPress**: 5.0 +- **Min PHP**: 7.4 + +## Credits +- Design tokens from: `frontend/src/styles/design-system.css` +- Logo assets from: `frontend/public/images/logo/` +- Icons: Heroicons (via SVG) diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/assets/css/admin.css b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/css/admin.css index 54ae534b..d26fdeeb 100644 --- a/plugins/wordpress/source/igny8-wp-bridge/admin/assets/css/admin.css +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/css/admin.css @@ -845,3 +845,9 @@ flex-direction: column; } } +/* ============================================ + Hide 3rd party clutter (Sellvia banner) + ============================================ */ +.sellvia-banner.notice.notice-info { + display: none; +} \ No newline at end of file diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/assets/css/igny8-modern.css b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/css/igny8-modern.css new file mode 100644 index 00000000..2b0e7298 --- /dev/null +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/css/igny8-modern.css @@ -0,0 +1,454 @@ +/** + * IGNY8 WordPress Bridge - Modern Design System + * Based on main app design tokens + */ + +/* =================================================================== + DESIGN TOKENS - Matching Main App + =================================================================== */ +:root { + /* Primary Colors */ + --igny8-primary: #3B82F6; + --igny8-success: #10B981; + --igny8-warning: #F59E0B; + --igny8-danger: #DC2626; + --igny8-purple: #F63B82; + --igny8-gray-base: #031D48; + + /* Derived Colors */ + --igny8-primary-dark: #2563EB; + --igny8-primary-light: #60A5FA; + --igny8-primary-subtle: #DBEAFE; + + /* Background Colors */ + --igny8-navy: #020617; + --igny8-navy-light: #0F172A; + --igny8-surface: #F8FAFC; + --igny8-panel: #FFFFFF; + --igny8-panel-alt: #F1F5F9; + + /* Text Colors */ + --igny8-text: #1E293B; + --igny8-text-dim: #475569; + --igny8-text-light: #94A3B8; + --igny8-stroke: #E2E8F0; + + /* Border Radius */ + --igny8-radius-sm: 4px; + --igny8-radius-base: 6px; + --igny8-radius-md: 8px; + --igny8-radius-lg: 12px; + + /* Shadows */ + --igny8-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + --igny8-shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + --igny8-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); + --igny8-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + + /* Gradients */ + --igny8-gradient-primary: linear-gradient(135deg, var(--igny8-primary) 0%, var(--igny8-primary-dark) 100%); +} + +/* =================================================================== + LAYOUT - New Sidebar Structure + =================================================================== */ +.igny8-admin-wrapper { + display: flex; + min-height: 100vh; + background: var(--igny8-surface); + margin-left: -20px; + margin-top: -10px; +} + +.igny8-sidebar { + width: 260px; + background: var(--igny8-panel); + border-right: 1px solid var(--igny8-stroke); + padding: 24px 0; + position: fixed; + height: 100vh; + overflow-y: auto; +} + +.igny8-sidebar-logo { + padding: 0 24px 24px; + border-bottom: 1px solid var(--igny8-stroke); + margin-bottom: 24px; +} + +.igny8-sidebar-logo img { + height: 32px; + width: auto; +} + +.igny8-sidebar-nav { + list-style: none; + margin: 0; + padding: 0 12px; +} + +.igny8-sidebar-nav li { + margin-bottom: 4px; +} + +.igny8-sidebar-nav a { + display: flex; + align-items: center; + padding: 10px 12px; + color: var(--igny8-text-dim); + text-decoration: none; + border-radius: var(--igny8-radius-base); + font-size: 14px; + font-weight: 500; + transition: all 0.2s ease; +} + +.igny8-sidebar-nav a:hover { + background: var(--igny8-surface); + color: var(--igny8-text); +} + +.igny8-sidebar-nav a.active { + background: var(--igny8-primary-subtle); + color: var(--igny8-primary); +} + +.igny8-sidebar-nav svg { + width: 18px; + height: 18px; + margin-right: 12px; + flex-shrink: 0; +} + +.igny8-main-content { + margin-left: 260px; + flex: 1; + padding: 32px 40px; + max-width: 1400px; +} + +/* =================================================================== + HEADER - Minimal Design + =================================================================== */ +.igny8-page-header { + margin-bottom: 32px; +} + +.igny8-page-header h1 { + font-size: 28px; + font-weight: 600; + color: var(--igny8-text); + margin: 0 0 8px 0; +} + +.igny8-page-header p { + color: var(--igny8-text-dim); + font-size: 14px; + margin: 0; +} + +/* =================================================================== + CARDS - Modern Panel Design + =================================================================== */ +.igny8-card { + background: var(--igny8-panel); + border-radius: var(--igny8-radius-md); + padding: 24px; + box-shadow: var(--igny8-shadow-base); + margin-bottom: 24px; + border: 1px solid var(--igny8-stroke); +} + +.igny8-card-header { + display: flex; + align-items: center; + margin-bottom: 20px; + padding-bottom: 16px; + border-bottom: 1px solid var(--igny8-stroke); +} + +.igny8-card-header h2 { + font-size: 18px; + font-weight: 600; + color: var(--igny8-text); + margin: 0; + display: flex; + align-items: center; +} + +.igny8-card-header svg { + width: 20px; + height: 20px; + margin-right: 10px; + color: var(--igny8-primary); +} + +/* =================================================================== + FORM ELEMENTS - Modern Inputs + =================================================================== */ +.igny8-form-group { + margin-bottom: 20px; +} + +.igny8-form-group label { + display: block; + font-size: 14px; + font-weight: 500; + color: var(--igny8-text); + margin-bottom: 8px; +} + +.igny8-form-group input[type="text"], +.igny8-form-group input[type="password"], +.igny8-form-group input[type="number"], +.igny8-form-group textarea, +.igny8-form-group select { + width: 100%; + padding: 10px 12px; + font-size: 14px; + border: 1px solid var(--igny8-stroke); + border-radius: var(--igny8-radius-base); + background: var(--igny8-panel); + color: var(--igny8-text); + transition: all 0.2s ease; +} + +.igny8-form-group input:focus, +.igny8-form-group textarea:focus, +.igny8-form-group select:focus { + outline: none; + border-color: var(--igny8-primary); + box-shadow: 0 0 0 3px var(--igny8-primary-subtle); +} + +.igny8-form-help { + font-size: 13px; + color: var(--igny8-text-light); + margin-top: 6px; +} + +/* =================================================================== + BUTTONS - Modern Button System + =================================================================== */ +.igny8-btn { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 10px 16px; + font-size: 14px; + font-weight: 500; + border-radius: var(--igny8-radius-base); + border: none; + cursor: pointer; + transition: all 0.2s ease; + text-decoration: none; +} + +.igny8-btn-primary { + background: var(--igny8-primary); + color: white; +} + +.igny8-btn-primary:hover { + background: var(--igny8-primary-dark); + transform: translateY(-1px); + box-shadow: var(--igny8-shadow-md); +} + +.igny8-btn-secondary { + background: var(--igny8-surface); + color: var(--igny8-text); + border: 1px solid var(--igny8-stroke); +} + +.igny8-btn-secondary:hover { + background: var(--igny8-panel-alt); +} + +.igny8-btn-danger { + background: var(--igny8-danger); + color: white; +} + +.igny8-btn-danger:hover { + background: #B91C1C; +} + +.igny8-btn svg { + width: 16px; + height: 16px; + margin-right: 8px; +} + +/* =================================================================== + STATUS INDICATORS + =================================================================== */ +.igny8-status { + display: inline-flex; + align-items: center; + padding: 4px 12px; + border-radius: 12px; + font-size: 13px; + font-weight: 500; +} + +.igny8-status-connected { + background: rgba(16, 185, 129, 0.1); + color: var(--igny8-success); +} + +.igny8-status-disconnected { + background: rgba(220, 38, 38, 0.1); + color: var(--igny8-danger); +} + +.igny8-status-indicator { + width: 8px; + height: 8px; + border-radius: 50%; + margin-right: 8px; +} + +.igny8-status-connected .igny8-status-indicator { + background: var(--igny8-success); + box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); +} + +.igny8-status-disconnected .igny8-status-indicator { + background: var(--igny8-danger); + box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2); +} + +/* =================================================================== + GRID SYSTEM + =================================================================== */ +.igny8-grid { + display: grid; + gap: 24px; +} + +.igny8-grid-2 { + grid-template-columns: repeat(2, 1fr); +} + +.igny8-grid-3 { + grid-template-columns: repeat(3, 1fr); +} + +@media (max-width: 1024px) { + .igny8-grid-2, + .igny8-grid-3 { + grid-template-columns: 1fr; + } + + .igny8-sidebar { + width: 220px; + } + + .igny8-main-content { + margin-left: 220px; + } +} + +/* =================================================================== + TABLES + =================================================================== */ +.igny8-table { + width: 100%; + border-collapse: collapse; +} + +.igny8-table th { + text-align: left; + padding: 12px; + font-size: 13px; + font-weight: 600; + color: var(--igny8-text-dim); + text-transform: uppercase; + letter-spacing: 0.5px; + border-bottom: 2px solid var(--igny8-stroke); +} + +.igny8-table td { + padding: 12px; + border-bottom: 1px solid var(--igny8-stroke); + color: var(--igny8-text); +} + +.igny8-table tr:last-child td { + border-bottom: none; +} + +/* =================================================================== + ALERTS & MESSAGES + =================================================================== */ +.igny8-alert { + padding: 16px; + border-radius: var(--igny8-radius-base); + margin-bottom: 20px; + display: flex; + align-items: flex-start; +} + +.igny8-alert svg { + width: 20px; + height: 20px; + margin-right: 12px; + flex-shrink: 0; + margin-top: 2px; +} + +.igny8-alert-success { + background: rgba(16, 185, 129, 0.1); + border: 1px solid rgba(16, 185, 129, 0.3); + color: #065F46; +} + +.igny8-alert-warning { + background: rgba(245, 158, 11, 0.1); + border: 1px solid rgba(245, 158, 11, 0.3); + color: #92400E; +} + +.igny8-alert-danger { + background: rgba(220, 38, 38, 0.1); + border: 1px solid rgba(220, 38, 38, 0.3); + color: #991B1B; +} + +/* =================================================================== + LOADING & SPINNERS + =================================================================== */ +.igny8-spinner { + display: inline-block; + width: 20px; + height: 20px; + border: 2px solid var(--igny8-stroke); + border-top-color: var(--igny8-primary); + border-radius: 50%; + animation: igny8-spin 0.6s linear infinite; +} + +@keyframes igny8-spin { + to { transform: rotate(360deg); } +} + +/* =================================================================== + OVERRIDE WORDPRESS ADMIN STYLES + =================================================================== */ +.igny8-admin-page .wrap { + margin: 0; + padding: 0; +} + +.igny8-admin-page .wrap > h1 { + display: none; +} + +/* Hide WordPress notices on our pages */ +.igny8-admin-page .notice, +.igny8-admin-page .updated, +.igny8-admin-page .error { + margin-left: 260px; + margin-top: 20px; +} diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/IGNY8_DARK_LOGO.png b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/IGNY8_DARK_LOGO.png new file mode 100644 index 00000000..989c14bc Binary files /dev/null and b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/IGNY8_DARK_LOGO.png differ diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/IGNY8_LIGHT_LOGO.png b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/IGNY8_LIGHT_LOGO.png new file mode 100644 index 00000000..efc32b9e Binary files /dev/null and b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/IGNY8_LIGHT_LOGO.png differ diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/Igny8_Favicon.png b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/Igny8_Favicon.png new file mode 100644 index 00000000..92ad02b9 Binary files /dev/null and b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/Igny8_Favicon.png differ diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/Igny8_Favicon_colored_bg.png b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/Igny8_Favicon_colored_bg.png new file mode 100644 index 00000000..14cbf920 Binary files /dev/null and b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/Igny8_Favicon_colored_bg.png differ diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/logo-icon.png b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/logo-icon.png new file mode 100644 index 00000000..fa16968b Binary files /dev/null and b/plugins/wordpress/source/igny8-wp-bridge/admin/assets/images/logo-icon.png differ diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/class-admin.php b/plugins/wordpress/source/igny8-wp-bridge/admin/class-admin.php index 8fcd766f..8a9d3a93 100644 --- a/plugins/wordpress/source/igny8-wp-bridge/admin/class-admin.php +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/class-admin.php @@ -49,12 +49,70 @@ class Igny8Admin { * Add admin menu pages */ public function add_menu_pages() { - add_options_page( - __('IGNY8 API Settings', 'igny8-bridge'), - __('IGNY8 API', 'igny8-bridge'), + // Add main menu page + add_menu_page( + __('IGNY8', 'igny8-bridge'), + __('IGNY8', 'igny8-bridge'), 'manage_options', - 'igny8-settings', - array($this, 'render_settings_page') + 'igny8-dashboard', + array($this, 'render_page'), + plugins_url('admin/assets/images/logo-icon.png', IGNY8_BRIDGE_PLUGIN_FILE), + 58 + ); + + // Add submenu pages + add_submenu_page( + 'igny8-dashboard', + __('Dashboard', 'igny8-bridge'), + __('Dashboard', 'igny8-bridge'), + 'manage_options', + 'igny8-dashboard', + array($this, 'render_page') + ); + + add_submenu_page( + 'igny8-dashboard', + __('Connection', 'igny8-bridge'), + __('Connection', 'igny8-bridge'), + 'manage_options', + 'igny8-connection', + array($this, 'render_page') + ); + + add_submenu_page( + 'igny8-dashboard', + __('Controls', 'igny8-bridge'), + __('Controls', 'igny8-bridge'), + 'manage_options', + 'igny8-controls', + array($this, 'render_page') + ); + + add_submenu_page( + 'igny8-dashboard', + __('Sync', 'igny8-bridge'), + __('Sync', 'igny8-bridge'), + 'manage_options', + 'igny8-sync', + array($this, 'render_page') + ); + + add_submenu_page( + 'igny8-dashboard', + __('Data', 'igny8-bridge'), + __('Data', 'igny8-bridge'), + 'manage_options', + 'igny8-data', + array($this, 'render_page') + ); + + add_submenu_page( + 'igny8-dashboard', + __('Logs', 'igny8-bridge'), + __('Logs', 'igny8-bridge'), + 'manage_options', + 'igny8-logs', + array($this, 'render_page') ); } @@ -120,8 +178,17 @@ class Igny8Admin { * @param string $hook Current admin page hook */ public function enqueue_scripts($hook) { - // Enqueue on settings page - if ($hook === 'settings_page_igny8-settings') { + // Enqueue on IGNY8 pages + if (strpos($hook, 'igny8-') !== false || strpos($hook, 'toplevel_page_igny8') !== false) { + // Load modern design system CSS + wp_enqueue_style( + 'igny8-modern-style', + IGNY8_BRIDGE_PLUGIN_URL . 'admin/assets/css/igny8-modern.css', + array(), + IGNY8_BRIDGE_VERSION + ); + + // Load legacy admin CSS for backwards compatibility wp_enqueue_style( 'igny8-admin-style', IGNY8_BRIDGE_PLUGIN_URL . 'admin/assets/css/admin.css', @@ -171,10 +238,10 @@ class Igny8Admin { } /** - * Render settings page + * Render page based on current menu slug */ - public function render_settings_page() { - // Handle form submission (use wp_verify_nonce to avoid wp_die on failure) + public function render_page() { + // Handle form submissions for connection page if (isset($_POST['igny8_connect'])) { if (empty($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'igny8_settings_nonce')) { add_settings_error( @@ -188,7 +255,7 @@ class Igny8Admin { } } - // Handle revoke API key (use wp_verify_nonce) + // Handle revoke API key if (isset($_POST['igny8_revoke_api_key'])) { if (empty($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'igny8_revoke_api_key')) { add_settings_error( @@ -207,11 +274,55 @@ class Igny8Admin { ); } } - - // Webhook secret regeneration removed - using API key only - // Include settings template - include IGNY8_BRIDGE_PLUGIN_DIR . 'admin/settings.php'; + // Determine which page to render + $page = isset($_GET['page']) ? sanitize_text_field($_GET['page']) : 'igny8-dashboard'; + + // Add wrapper class for modern design + echo '
'; + + // Include the appropriate page template + $template_file = ''; + switch ($page) { + case 'igny8-dashboard': + $template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/dashboard.php'; + break; + case 'igny8-connection': + $template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/connection.php'; + break; + case 'igny8-controls': + $template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/controls.php'; + break; + case 'igny8-sync': + $template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/sync.php'; + break; + case 'igny8-data': + $template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/data.php'; + break; + case 'igny8-logs': + $template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/logs.php'; + break; + default: + $template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/dashboard.php'; + } + + // If the template file doesn't exist, fall back to the old settings page + if (file_exists($template_file)) { + include $template_file; + } else { + // Fallback to old settings page during transition + include IGNY8_BRIDGE_PLUGIN_DIR . 'admin/settings.php'; + } + + echo '
'; + } + + /** + * Render settings page - DEPRECATED, keeping for backwards compatibility + */ + public function render_settings_page() { + // Redirect to new render_page method + $this->render_page(); } /** diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/layout-footer.php b/plugins/wordpress/source/igny8-wp-bridge/admin/layout-footer.php new file mode 100644 index 00000000..e0557060 --- /dev/null +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/layout-footer.php @@ -0,0 +1,2 @@ + + diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/layout-header.php b/plugins/wordpress/source/igny8-wp-bridge/admin/layout-header.php new file mode 100644 index 00000000..8cb383ed --- /dev/null +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/layout-header.php @@ -0,0 +1,111 @@ + + +
+ + + + +
+ diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/pages/connection.php b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/connection.php new file mode 100644 index 00000000..d00cf2bb --- /dev/null +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/connection.php @@ -0,0 +1,227 @@ + + +
+

+

+
+ + + +
+
+

+ + + + +

+
+ +
+ + +
+ +
+ + +
+ + +

+ IGNY8 app integrations page. The API key format includes your site ID.', 'igny8-bridge'), + 'https://app.igny8.com' + ); ?> +

+
+ + +
+
+ + +
+
+

+ + + + +

+
+ +
    +
  1. +
  2. +
  3. +
  4. +
  5. +
  6. +
+
+ + + +
+ + + +
+ +

+
+
+ +
+ +
+
+

+ + + + +

+
+ +
+ + +
+ +
+ + + + +
+ +
+ + + + +
+
+ + +
+
+

+ + + + +

+
+ +
+ +
+ + ✓ Verified +
+
+ + +
+ +

+ + + + +

+
+ + + +
+ +

+ +

+
+ +
+
+ + +
+
+

+ + + + +

+
+ +

+ +

+ +
+ + +
+
+ + + + diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/pages/controls.php b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/controls.php new file mode 100644 index 00000000..1f63ca28 --- /dev/null +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/controls.php @@ -0,0 +1,276 @@ + + +
+

+

+
+ +
+ + +
+ +
+
+

+ + + + +

+
+ + $label) : ?> +
+ +
+ + +

+ +

+
+ + +
+
+

+ + + + +

+
+ + $label) : ?> +
+ +
+ + +

+ +

+
+
+ + +
+
+

+ + + + +

+
+ +
+ + + +
+
+ +
+ +
+
+

+ + + + +

+
+ + $module_label) : ?> +
+ +
+ + +

+ +

+
+ + +
+
+

+ + + + +

+
+ +
+ + + +
+ +

+ +

+ + +
+ +
+ +
+ + + + +
+ +
+
+ + +
+ + + + diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/pages/dashboard.php b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/dashboard.php new file mode 100644 index 00000000..11b9edfe --- /dev/null +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/dashboard.php @@ -0,0 +1,182 @@ + + +
+

+

+
+ + +
+ + + +
+ +

+ +

+
+
+ + +
+ +
+
+

+ + + + +

+
+
+ +
+ + +
+ +

+ +

+ + +
+ + +
+

+ + + +

+ +
+
+ + +
+
+

+ + + + +

+
+
+ +

+ +

+

+ +

+ +

+ +

+ +
+
+ + +
+
+

+ + + + +

+
+
+

+ +

+

+ +

+
+
+
+ + +
+
+

+ + + + +

+
+ +
+
+

+

+ +

+ + + +
+ +
+

+

+ +

+ + + +
+ +
+

+

+ +

+ + + +
+ +
+

+

+ +

+ + + +
+
+
+ + diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/pages/data.php b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/data.php new file mode 100644 index 00000000..8ff4109c --- /dev/null +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/data.php @@ -0,0 +1,148 @@ + + +
+

+

+
+ + +
+
+
+

+ + + + +

+
+
+

+ +

+
+
+ +
+
+

+ + + + +

+
+
+

+ +

+
+
+ +
+
+

+ + + + +

+
+
+

+ +

+
+
+
+ + + +
+
+

+ + + + +

+
+ + + + + + + + + + + + + + + + + + + + +
+ post_title) : __('Unknown Post', 'igny8-bridge'); + ?> + + + + + + + + + + +
+ + 10): ?> +

+ +

+ +
+ +
+ + + + +
+ + + diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/pages/logs.php b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/logs.php new file mode 100644 index 00000000..75598962 --- /dev/null +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/logs.php @@ -0,0 +1,100 @@ + 20)); +?> + +
+

+

+
+ + +
+
+

+ + + + +

+
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+
+ +
+ + + + + + wp-content/debug.log + +
+ +
+ + + +
+ +

+
+
+ + + diff --git a/plugins/wordpress/source/igny8-wp-bridge/admin/pages/sync.php b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/sync.php new file mode 100644 index 00000000..6543336a --- /dev/null +++ b/plugins/wordpress/source/igny8-wp-bridge/admin/pages/sync.php @@ -0,0 +1,169 @@ + + +
+

+

+
+ +
+ + + +
+
+

+ + + + +

+
+ + +
+ + +
+ + +
+
+

+ + + + +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+ + + + + +
+
+ + +
+
+

+ + + + +

+
+ +
+ +

+ +

+
+
+ + diff --git a/plugins/wordpress/source/igny8-wp-bridge/igny8-bridge.php b/plugins/wordpress/source/igny8-wp-bridge/igny8-bridge.php index 624d0164..9736ffe9 100644 --- a/plugins/wordpress/source/igny8-wp-bridge/igny8-bridge.php +++ b/plugins/wordpress/source/igny8-wp-bridge/igny8-bridge.php @@ -3,7 +3,7 @@ * Plugin Name: IGNY8 WordPress Bridge * Plugin URI: https://igny8.com/igny8-wp-bridge * Description: Lightweight bridge plugin that connects WordPress to IGNY8 API for one-way content publishing. - * Version: 1.1.2 + * Version: 1.2.0 * Author: IGNY8 * Author URI: https://igny8.com/ * License: GPL v2 or later @@ -22,7 +22,7 @@ if (!defined('ABSPATH')) { } // Define plugin constants -define('IGNY8_BRIDGE_VERSION', '1.1.0'); +define('IGNY8_BRIDGE_VERSION', '1.2.0'); define('IGNY8_BRIDGE_PLUGIN_DIR', plugin_dir_path(__FILE__)); define('IGNY8_BRIDGE_PLUGIN_URL', plugin_dir_url(__FILE__)); define('IGNY8_BRIDGE_PLUGIN_FILE', __FILE__);