feat: Add ShareCard page for bot sharing with QR code
All checks were successful
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 1m2s

- Add ShareCard action to BotsController for generating bot share page
- Create ShareCard.cshtml view with gradient card design
- Generate QR code for Telegram bot link using QRCode.js
- Display bot info including type, status, description, and version
- Add copy link and print card functionality
- Add Share Bot button to bot Details page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-25 20:11:49 +00:00
parent a1af91807e
commit a6b4ec8fa6
3 changed files with 357 additions and 1 deletions

View File

@@ -350,6 +350,23 @@ public class BotsController : Controller
return RedirectToAction(nameof(Details), new { id });
}
// GET: Admin/Bots/ShareCard/5
public async Task<IActionResult> ShareCard(Guid id)
{
var bot = await _botService.GetBotByIdAsync(id);
if (bot == null)
return NotFound();
// Build the tg.me link
var telegramLink = !string.IsNullOrEmpty(bot.PlatformUsername)
? $"https://t.me/{bot.PlatformUsername}"
: null;
ViewData["TelegramLink"] = telegramLink;
return View(bot);
}
private string GenerateBotFatherCommands(BotWizardDto dto)
{
var commands = new List<string>