fixes
This commit is contained in:
@@ -89,9 +89,9 @@ func (e *CreativeEditorFields) ShowTagPanel(b *bot.Bot) {
|
|||||||
|
|
||||||
func (e *CreativeEditorFields) GetTagLabel() string {
|
func (e *CreativeEditorFields) GetTagLabel() string {
|
||||||
if e.Tag != nil && *e.Tag == "production" {
|
if e.Tag != nil && *e.Tag == "production" {
|
||||||
return "🏷 Рабочий"
|
return "◉ Рабочий"
|
||||||
}
|
}
|
||||||
return "🏷 Тестовый"
|
return "◉ Тестовый"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *CreativeEditorFields) ShowAddButtonPanel(b *bot.Bot) {
|
func (e *CreativeEditorFields) ShowAddButtonPanel(b *bot.Bot) {
|
||||||
|
|||||||
@@ -187,35 +187,18 @@ func (s *CreativeView) Exit() {}
|
|||||||
// showActionPanel показывает панель действий с кнопками
|
// showActionPanel показывает панель действий с кнопками
|
||||||
func (s *CreativeView) showActionPanel(b *bot.Bot) {
|
func (s *CreativeView) showActionPanel(b *bot.Bot) {
|
||||||
tagLabel := s.GetTagLabel()
|
tagLabel := s.GetTagLabel()
|
||||||
purchaseLabel := "🛒 Закупить на креатив"
|
|
||||||
|
|
||||||
// Если креатив архивирован (в будущем), можно изменить кнопки
|
buttons := [][]echotron.InlineKeyboardButton{
|
||||||
var buttons [][]echotron.InlineKeyboardButton
|
Row(
|
||||||
|
Button("✎ Переименовать", "rename"),
|
||||||
// Кнопка переименования
|
Button("✎ Редактировать", "edit"),
|
||||||
buttons = append(buttons, Row(
|
),
|
||||||
Button("✏️ Переименовать", "rename"),
|
Row(Button("+ Закупить", "purchase_creative")),
|
||||||
))
|
Row(
|
||||||
|
Button("← Назад", "back"),
|
||||||
// Кнопка редактирования
|
Button(tagLabel, "toggle_tag"),
|
||||||
buttons = append(buttons, Row(
|
),
|
||||||
Button("🖊 Редактировать", "edit"),
|
}
|
||||||
))
|
|
||||||
|
|
||||||
// Кнопка тега
|
|
||||||
buttons = append(buttons, Row(
|
|
||||||
Button(tagLabel, "toggle_tag"),
|
|
||||||
))
|
|
||||||
|
|
||||||
// Кнопка закупа
|
|
||||||
buttons = append(buttons, Row(
|
|
||||||
Button(purchaseLabel, "purchase_creative"),
|
|
||||||
))
|
|
||||||
|
|
||||||
// Кнопка назад
|
|
||||||
buttons = append(buttons, Row(
|
|
||||||
Button("← Назад", "back"),
|
|
||||||
))
|
|
||||||
|
|
||||||
s.ShowControlPanel(b, msgCreativeView, buttons)
|
s.ShowControlPanel(b, msgCreativeView, buttons)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1130,10 +1130,8 @@ func (s *PurchaseOptionalDetails) renderParamChannels(b *bot.Bot, mode bot.Rende
|
|||||||
}
|
}
|
||||||
start, end := ui2.GetPageBounds(s.ParamPage, perPage, total)
|
start, end := ui2.GetPageBounds(s.ParamPage, perPage, total)
|
||||||
|
|
||||||
// Устанавливаем режим по умолчанию
|
// Всегда сбрасываем на редактирование при входе
|
||||||
if s.ChannelEditMode == "" {
|
s.ChannelEditMode = "edit"
|
||||||
s.ChannelEditMode = "edit"
|
|
||||||
}
|
|
||||||
|
|
||||||
var rows [][]echotron.InlineKeyboardButton
|
var rows [][]echotron.InlineKeyboardButton
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user