улучшение ui
This commit is contained in:
@@ -23,7 +23,7 @@ func (s *PurchaseDetails) Enter(b *bot.Bot, mode bot.RenderMode) {
|
||||
jwt := b.Session.JWT
|
||||
if jwt == "" {
|
||||
log.Error().Msg("JWT is empty in session")
|
||||
b.SendNew("❌ Ошибка авторизации. Попробуйте /start", bot.Keyboard())
|
||||
b.SendNew("❌ Ошибка авторизации. Попробуйте /start", Keyboard())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ func (s *PurchaseDetails) renderDetails(b *bot.Bot, mode bot.RenderMode, jwt str
|
||||
)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("Failed to get purchase")
|
||||
b.SendNew("❌ Не удалось загрузить закуп", bot.Keyboard())
|
||||
b.SendNew("❌ Не удалось загрузить закуп", Keyboard())
|
||||
return
|
||||
}
|
||||
|
||||
@@ -153,11 +153,11 @@ func (s *PurchaseDetails) renderDetails(b *bot.Bot, mode bot.RenderMode, jwt str
|
||||
var buttons [][]echotron.InlineKeyboardButton
|
||||
|
||||
// Кнопка назад
|
||||
buttons = append(buttons, bot.Row(
|
||||
bot.Button("← Назад", "back"),
|
||||
buttons = append(buttons, Row(
|
||||
Button("← Назад", "back"),
|
||||
))
|
||||
|
||||
keyboard := bot.Keyboard(buttons...)
|
||||
keyboard := Keyboard(buttons...)
|
||||
b.Render(text, keyboard, mode)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user