Changeset 3406312
- Timestamp:
- 11/30/2025 08:57:08 PM (4 months ago)
- Location:
- talkgenai/trunk
- Files:
-
- 9 added
- 5 edited
-
admin/js/admin.js (modified) (1 diff)
-
admin/js/article-job-integration.js (modified) (2 diffs)
-
banner-1544x500.png (added)
-
banner-772x250.png (added)
-
icon-128x128.gif (added)
-
icon-256x256.gif (added)
-
includes/apps-list-page.css (added)
-
includes/class-talkgenai-admin.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
screenshot-1.png (added)
-
screenshot-2.png (added)
-
screenshot-3.png (added)
-
screenshot-4.png (added)
-
talkgenai.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
talkgenai/trunk/admin/js/admin.js
r3401250 r3406312 2964 2964 success: function(response) { 2965 2965 if (response.success) { 2966 // Check if user just depleted their bonus credits 2967 if (response.data && response.data.warning === 'bonus_depleted') { 2968 showNotification('🎁 Bonus credits ended! You\'re now using standard features. Upgrade to Starter plan for Premium AI models.', 'warning'); 2969 } 2966 2970 showAppIdeasResult(response.data); 2967 2971 } else { -
talkgenai/trunk/admin/js/article-job-integration.js
r3401250 r3406312 255 255 TalkGenAI_JobManager.hideProgress(); 256 256 257 // Check if this is an AI provider error (overloaded, rate limit, etc.) 258 if (errorData && errorData.error === 'ai_provider_error' && errorData.ai_message) { 259 // Show short, clear error message (text only, no HTML) 260 // Use text() instead of html() to prevent XSS 261 const safeMessage = String(errorData.ai_message || 'AI provider error. Please try again.'); 262 this.showNotification(safeMessage, 'error'); 263 } 257 264 // Check if this is a structured error with HTML message (e.g., insufficient credits) 258 if (errorData && errorData.ai_message) {265 else if (errorData && errorData.ai_message) { 259 266 // Show error notification 260 267 this.showNotification('Error: ' + error, 'error'); … … 587 594 */ 588 595 showNotification: function(message, type = 'info') { 589 // WordPress-style admin notice 590 const $notice = $(` 591 <div class="notice notice-${type} is-dismissible"> 592 <p>${message}</p> 593 </div> 594 `); 596 // WordPress-style admin notice with proper escaping 597 const $notice = $('<div class="notice is-dismissible"></div>') 598 .addClass('notice-' + type); 599 const $p = $('<p></p>').text(message); // Use .text() for safe escaping 600 $notice.append($p); 595 601 596 602 $('.wrap h1').after($notice); -
talkgenai/trunk/includes/class-talkgenai-admin.php
r3401250 r3406312 509 509 private function render_generate_app_page() { 510 510 $server_status = $this->api->get_server_status(); 511 $user_stats = $this->api->get_user_stats(); 512 $bonus_credits = 0; 513 if (isset($user_stats['success']) && $user_stats['success'] && isset($user_stats['data']['bonus_credits'])) { 514 $bonus_credits = intval($user_stats['data']['bonus_credits']); 515 } 511 516 ?> 512 517 <div class="wrap"> … … 526 531 </div> 527 532 <div class="talkgenai-server-status-compact"> 533 <?php if ($bonus_credits > 0): ?> 534 <span class="talkgenai-bonus-credits" style="margin-right: 10px; padding: 4px 8px; background: #f0f6fc; border-radius: 4px; font-size: 12px;"> 535 🎁 <strong><?php echo esc_html__('Bonus:', 'talkgenai'); ?></strong> <?php echo esc_html($bonus_credits); ?> <?php echo esc_html__('credits', 'talkgenai'); ?> 536 </span> 537 <?php endif; ?> 528 538 <?php echo wp_kses_post(talkgenai_get_server_status_indicator($server_status)); ?> 529 539 <span class="talkgenai-server-mode"> -
talkgenai/trunk/readme.txt
r3401250 r3406312 3 3 Tags: ai, app-generator, calculator, tools, productivity 4 4 Requires at least: 5.0 5 Tested up to: 6. 85 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2. 1.07 Stable tag: 2.3.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 12 12 13 13 == Description == 14 15 https://youtu.be/dg2vaooXrFs 14 16 15 17 **Note:** The GPL license applies to the WordPress plugin code only. The backend API service (app.talkgen.ai) is proprietary software owned by TalkGenAI and is not covered by GPL. … … 453 455 3. Live preview window - See your generated app before embedding it 454 456 4. My Apps dashboard - Manage all your generated applications in one place 455 5. Frontend display - Generated apps work seamlessly on your WordPress site456 457 457 458 == Changelog == 459 460 = 2.3.1 - 2025-11-30 = 461 * 🛡️ **Improved Error Handling**: Clear, short messages when AI provider is temporarily unavailable 462 * ⚠️ Users now see specific messages for Anthropic or OpenAI overload/rate limit errors 463 * 📢 Error messages indicate which provider (Anthropic/OpenAI) had the issue 464 * 🕒 Users are informed to try again in a few minutes when provider is overloaded 465 466 = 2.2.0 - 2025-11-30 = 467 * ✨ **New Feature**: Bonus Credits System 468 * 🎁 Added support for bonus credits that give users access to Premium AI features 469 * 🎁 Free users with bonus credits can now access Advanced AI modules (GPT-4, Claude Sonnet 4.5) 470 * 🎁 Bonus credits are prioritized over plan credits for optimal user experience 471 * 🎁 Visual display of bonus credits in WordPress admin dashboard 472 * ⚠️ Added upgrade notification when bonus credits are depleted 473 * 📊 Bonus credits default to 0 and can be awarded for referrals, promotions, or special events 458 474 459 475 = 1.0.0 - 2025-10-19 = -
talkgenai/trunk/talkgenai.php
r3401250 r3406312 4 4 * Plugin URI: https://app.talkgen.ai 5 5 * Description: Generate complete web applications using AI. Connect to TalkGenAI server for intelligent app generation with WordPress integration. 6 * Version: 2. 1.06 * Version: 2.3.1 7 7 * Author: TalkGenAI Team 8 8 * License: GPLv2 or later 9 9 * Text Domain: talkgenai 10 10 * Requires at least: 5.0 11 * Tested up to: 6. 811 * Tested up to: 6.9 12 12 * Requires PHP: 7.4 13 13 *
Note: See TracChangeset
for help on using the changeset viewer.