This commit is contained in:
nistootsin 2025-04-15 19:47:41 +07:00 committed by GitHub
commit e18c22e6d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 65 additions and 33 deletions

View file

@ -1413,6 +1413,16 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID())
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.answers.successfulOperation"), tu.ReplyKeyboardRemove())
}
case "add_client_submit_enable":
client_Enable = true
_, err := t.SubmitAddClient()
if err != nil {
errorMessage := fmt.Sprintf("%v", err)
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.messages.error_add_client", "error=="+errorMessage), tu.ReplyKeyboardRemove())
} else {
t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID())
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.answers.successfulOperation"), tu.ReplyKeyboardRemove())
}
}
}
@ -2216,6 +2226,9 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
),
tu.InlineKeyboardRow(
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitDisable")).WithCallbackData("add_client_submit_disable"),
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitEnable")).WithCallbackData("add_client_submit_enable"),
),
tu.InlineKeyboardRow(
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.cancel")).WithCallbackData("add_client_cancel"),
),
)
@ -2239,6 +2252,9 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
),
tu.InlineKeyboardRow(
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitDisable")).WithCallbackData("add_client_submit_disable"),
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitEnable")).WithCallbackData("add_client_submit_enable"),
),
tu.InlineKeyboardRow(
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.cancel")).WithCallbackData("add_client_cancel"),
),
)
@ -2262,6 +2278,9 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
),
tu.InlineKeyboardRow(
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitDisable")).WithCallbackData("add_client_submit_disable"),
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitEnable")).WithCallbackData("add_client_submit_enable"),
),
tu.InlineKeyboardRow(
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.cancel")).WithCallbackData("add_client_cancel"),
),
)

View file

@ -641,13 +641,14 @@
"getBanLogs" = "احصل على سجلات الحظر"
"allClients" = "كل العملاء"
"addClient" = "أضف عميل"
"submitDisable" = "اعتمد على إنه معطل ✅"
"use_default" = "🏷️ استخدم الافتراضي"
"change_id" = "⚙️🔑 تغيير الـ ID"
"change_password" = "⚙️🔑 تغيير الباسورد"
"change_email" = "⚙️📧 تغيير الإيميل"
"change_comment" = "⚙️💬 تغيير التعليق"
"addClient" = "إضافة عميل"
"submitDisable" = "إرسال كمعطّل ☑️"
"submitEnable" = "إرسال كمفعّل ✅"
"use_default" = "🏷️ استخدام الإعدادات الافتراضية"
"change_id" = "⚙️🔑 المعرّف"
"change_password" = "⚙️🔑 كلمة السر"
"change_email" = "⚙️📧 البريد الإلكتروني"
"change_comment" = "⚙️💬 تعليق"
[tgbot.answers]
"successfulOperation" = "✅ العملية نجحت!"

View file

@ -642,7 +642,8 @@
"allClients" = "All Clients"
"addClient" = "Add Client"
"submitDisable" = "Submit As Disable ✅"
"submitDisable" = "Submit As Disable ☑️"
"submitEnable" = "Submit As Enable ✅"
"use_default" = "🏷️ Use default"
"change_id" = "⚙️🔑 ID"
"change_password" = "⚙️🔑 Password"

View file

@ -644,15 +644,17 @@
"getBanLogs" = "Registros de prohibición"
"allClients" = "Todos los Clientes"
"addClient" = "Añadir Cliente"
"submitDisable" = "Enviar como Deshabilitado ✅"
"use_default" = "🏷️ Usar predeterminado"
"addClient" = "Añadir cliente"
"submitDisable" = "Enviar como deshabilitado ☑️"
"submitEnable" = "Enviar como habilitado ✅"
"use_default" = "🏷️ Usar por defecto"
"change_id" = "⚙️🔑 ID"
"change_password" = "⚙️🔑 Contraseña"
"change_email" = "⚙️📧 Correo electrónico"
"change_comment" = "⚙️💬 Comentario"
[tgbot.answers]
"successfulOperation" = "✅ ¡Exitosa!"
"errorOperation" = "❗ Error en la Operación."

View file

@ -644,15 +644,15 @@
"getBanLogs" = "گزارش های بلوک را دریافت کنید"
"allClients" = "همه مشتریان"
"addClient" = "اضافه کردن مشتری"
"submitDisable" = "ارسال به عنوان غیرفعال ✅"
"addClient" = "افزودن مشتری"
"submitDisable" = "ارسال به عنوان غیرفعال ☑️"
"submitEnable" = "ارسال به عنوان فعال ✅"
"use_default" = "🏷️ استفاده از پیش‌فرض"
"change_id" = "⚙️🔑 شناسه"
"change_password" = "⚙️🔑 رمز عبور"
"change_password" = "⚙️🔑 گذرواژه"
"change_email" = "⚙️📧 ایمیل"
"change_comment" = "⚙️💬 نظر"
[tgbot.answers]
"successfulOperation" = "✅ انجام شد!"
"errorOperation" = "❗ خطا در عملیات."

View file

@ -645,14 +645,16 @@
"allClients" = "Semua Klien"
"addClient" = "Tambah Klien"
"submitDisable" = "Kirim Sebagai Nonaktif ✅"
"use_default" = "🏷️ Gunakan default"
"submitDisable" = "Kirim Sebagai Nonaktif ☑️"
"submitEnable" = "Kirim Sebagai Aktif ✅"
"use_default" = "🏷️ Gunakan Default"
"change_id" = "⚙️🔑 ID"
"change_password" = "⚙️🔑 Kata Sandi"
"change_email" = "⚙️📧 Email"
"change_comment" = "⚙️💬 Komentar"
[tgbot.answers]
"successfulOperation" = "✅ Operasi berhasil!"
"errorOperation" = "❗ Kesalahan dalam operasi."

View file

@ -645,14 +645,14 @@
"allClients" = "すべてのクライアント"
"addClient" = "クライアントを追加"
"submitDisable" = "無効として送信 ✅"
"submitDisable" = "無効として送信 ☑️"
"submitEnable" = "有効として送信 ✅"
"use_default" = "🏷️ デフォルトを使用"
"change_id" = "⚙️🔑 ID"
"change_password" = "⚙️🔑 パスワード"
"change_email" = "⚙️📧 メール"
"change_email" = "⚙️📧 メールアドレス"
"change_comment" = "⚙️💬 コメント"
[tgbot.answers]
"successfulOperation" = "✅ 成功!"
"errorOperation" = "❗ 操作エラー。"

View file

@ -645,7 +645,8 @@
"allClients" = "Todos os clientes"
"addClient" = "Adicionar Cliente"
"submitDisable" = "Enviar como Desativado ✅"
"submitDisable" = "Enviar como Desativado ☑️"
"submitEnable" = "Enviar como Ativado ✅"
"use_default" = "🏷️ Usar padrão"
"change_id" = "⚙️🔑 ID"
"change_password" = "⚙️🔑 Senha"

View file

@ -645,7 +645,8 @@
"allClients" = "Все клиенты"
"addClient" = "Добавить клиента"
"submitDisable" = "Отправить отключенным ✅"
"submitDisable" = "Отправить как отключённый ☑️"
"submitEnable" = "Отправить как включённый ✅"
"use_default" = "🏷️ Использовать по умолчанию"
"change_id" = "⚙️🔑 ID"
"change_password" = "⚙️🔑 Пароль"

View file

@ -645,9 +645,10 @@
"allClients" = "Tüm Müşteriler"
"addClient" = "Müşteri Ekle"
"submitDisable" = "Devre Dışı Olarak Gönder ✅"
"submitDisable" = "Devre Dışı Olarak Gönder ☑️"
"submitEnable" = "Etkin Olarak Gönder ✅"
"use_default" = "🏷️ Varsayılanı Kullan"
"change_id" = "⚙️🔑 ID"
"change_id" = "⚙️🔑 Kimlik"
"change_password" = "⚙️🔑 Şifre"
"change_email" = "⚙️📧 E-posta"
"change_comment" = "⚙️💬 Yorum"

View file

@ -645,8 +645,9 @@
"allClients" = "Всі Клієнти"
"addClient" = "Додати клієнта"
"submitDisable" = "Надіслати відключеним ✅"
"use_default" = "🏷️ Використовувати за замовчуванням"
"submitDisable" = "Надіслати як вимкнено ☑️"
"submitEnable" = "Надіслати як увімкнено ✅"
"use_default" = "🏷️ Використати типове"
"change_id" = "⚙️🔑 ID"
"change_password" = "⚙️🔑 Пароль"
"change_email" = "⚙️📧 Електронна пошта"

View file

@ -645,12 +645,13 @@
"allClients" = "Tất cả Khách hàng"
"addClient" = "Thêm Khách Hàng"
"submitDisable" = "Gửi Dưới Dạng Tắt ✅"
"use_default" = "🏷️ Sử dụng mặc định"
"submitDisable" = "Gửi Dưới Dạng Vô Hiệu ☑️"
"submitEnable" = "Gửi Dưới Dạng Kích Hoạt ✅"
"use_default" = "🏷️ Sử Dụng Mặc Định"
"change_id" = "⚙️🔑 ID"
"change_password" = "⚙️🔑 Mật khẩu"
"change_password" = "⚙️🔑 Mật Khẩu"
"change_email" = "⚙️📧 Email"
"change_comment" = "⚙️💬 Bình luận"
"change_comment" = "⚙️💬 Bình Luận"
[tgbot.answers]

View file

@ -645,7 +645,8 @@
"allClients" = "所有客户"
"addClient" = "添加客户"
"submitDisable" = "提交为禁用 ✅"
"submitDisable" = "提交为禁用 ☑️"
"submitEnable" = "提交为启用 ✅"
"use_default" = "🏷️ 使用默认"
"change_id" = "⚙️🔑 ID"
"change_password" = "⚙️🔑 密码"

View file

@ -645,8 +645,9 @@
"allClients" = "所有客戶"
"addClient" = "新增客戶"
"submitDisable" = "提交為停用 ✅"
"use_default" = "🏷️ 使用預設"
"submitDisable" = "以停用方式送出 ☑️"
"submitEnable" = "以啟用方式送出 ✅"
"use_default" = "🏷️ 使用預設值"
"change_id" = "⚙️🔑 ID"
"change_password" = "⚙️🔑 密碼"
"change_email" = "⚙️📧 電子郵件"