Plugin Directory

Changeset 3474845


Ignore:
Timestamp:
03/04/2026 06:26:38 PM (4 weeks ago)
Author:
samukbg
Message:

Update to version 1.1.5: Critical fix for generation button functionality

Location:
rss-to-post-generator/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • rss-to-post-generator/trunk/assets/js/admin.js

    r3474771 r3474845  
    242242    }
    243243
     244    function updateGenerateButton() {
     245        const selectedCount = $('.article-checkbox:checked').length;
     246        const $button = $('#generate-posts');
     247        if (selectedCount > 0) {
     248            let buttonText = `Generate ${selectedCount} Post${selectedCount > 1 ? 's' : ''}`;
     249            if (userTier === 'free') {
     250                const articlesAllowedByCredits = Math.min(selectedCount, userCredits);
     251                const articlesAllowedByBatchLimit = Math.min(articlesAllowedByCredits, freeLimit);
     252                buttonText += ` (${articlesAllowedByBatchLimit}/${userCredits} credits)`;
     253                $button.prop('disabled', selectedCount > userCredits || selectedCount === 0);
     254            } else {
     255                buttonText += ` (unlimited)`;
     256                $button.prop('disabled', false);
     257            }
     258            $button.text(buttonText);
     259        } else {
     260            $button.prop('disabled', true).text('Generate Posts');
     261        }
     262        const $tierWarning = $('.tier-warning');
     263        if (userTier === 'free') {
     264            $('#rss2post-user-credits-selection').text(userCredits);
     265            if (selectedCount > userCredits) {
     266                const msg = `<p><strong>Not enough credits:</strong> You have ${userCredits} credits remaining but selected ${selectedCount} articles. <a href="#" class="pro-upgrade-link">Upgrade to Pro</a>.</p>`;
     267                if (!$tierWarning.length) $('#articles-section').prepend(`<div class="tier-warning">${msg}</div>`);
     268                else $tierWarning.html(msg).show();
     269            } else if (selectedCount > freeLimit) {
     270                 const msg = `<p><strong>Free Tier Batch Limit:</strong> You can process a maximum of ${freeLimit} articles at a time (selected ${selectedCount}). You have ${userCredits} credits. <a href="#" class="pro-upgrade-link">Upgrade to Pro</a>.</p>`;
     271                if (!$tierWarning.length) $('#articles-section').prepend(`<div class="tier-warning">${msg}</div>`);
     272                else $tierWarning.html(msg).show();
     273            } else { $tierWarning.remove(); }
     274        } else { $tierWarning.remove(); }
     275    }
     276
    244277    function generatePosts() {
    245278        const selectedArticles = getSelectedArticles();
  • rss-to-post-generator/trunk/readme.txt

    r3474771 r3474845  
    44Requires at least: 5.6
    55Tested up to: 6.8
    6 Stable tag: 1.1.4
     6Stable tag: 1.1.5
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8181== Changelog ==
    8282
     83= 1.1.5 =
     84* **Fix**: Restored missing JavaScript function for updating the generation button.
     85* **Improvement**: Enhanced frontend UI stability.
     86
    8387= 1.1.4 =
    8488* **Improvement**: Implemented asynchronous job system with polling for more reliable content generation.
     
    158162== Upgrade Notice ==
    159163
     164= 1.1.5 =
     165Critical fix for generation button functionality.
     166
    160167= 1.1.4 =
    161168This update introduces a more reliable asynchronous generation system with better backend routing and improved performance.
  • rss-to-post-generator/trunk/rss2post.php

    r3474771 r3474845  
    33 * Plugin Name: RSS to Post Generator
    44 * Description: Generate blog posts from RSS feeds using AI content generation
    5  * Version: 1.1.4
     5 * Version: 1.1.5
    66 * Author: Samuel Bezerra Gomes
    77 * License: GPL v2 or later
     
    1515
    1616// Define plugin constants
    17 define('RSS2POST_VERSION', '1.1.4');
     17define('RSS2POST_VERSION', '1.1.5');
    1818define('RSS2POST_PLUGIN_DIR', plugin_dir_path(__FILE__));
    1919define('RSS2POST_PLUGIN_URL', plugin_dir_url(__FILE__));
Note: See TracChangeset for help on using the changeset viewer.