feat: Add ShareCard page for bot sharing with QR code
- 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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user