@page "/templates"
@using GmRelay.Web.Services
@using GmRelay.Shared.Domain
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@attribute [Authorize]
@inject AuthorizedSessionService SessionService
@inject AuthenticationStateProvider AuthStateProvider
@inject NavigationManager Navigation
Шаблоны кампаний — GM-Relay
@if (!string.IsNullOrEmpty(errorMessage))
{
⚠️ @errorMessage
}
@if (!string.IsNullOrEmpty(successMessage))
{
✅ @successMessage
}
@if (groups is null)
{
}
else if (groups.Count == 0)
{
🤖
Нет доступных групп
Добавьте бота GM-Relay в группу Telegram, чтобы создать первый шаблон кампании.
}
else
{
@if (SelectedGroup is not null)
{
Открыть группу →
}
@if (campaignTemplates is null)
{
}
else if (campaignTemplateModels.Count == 0)
{
Шаблонов пока нет
Создайте первый шаблон для выбранной группы.
}
else
{
@foreach (var template in campaignTemplateModels)
{
@template.Name
@FormatTemplateSummary(template)
@FormatLocalMoscow(template.UpdatedAt.ToMoscow())
}
}
}
@code {
private List