mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-18 05:04:40 +03:00
go package correction
This commit is contained in:
@@ -8,11 +8,11 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"x-ui/database"
|
||||
"x-ui/database/model"
|
||||
"x-ui/logger"
|
||||
"x-ui/util/common"
|
||||
"x-ui/xray"
|
||||
"github.com/mhsanaei/3x-ui/database"
|
||||
"github.com/mhsanaei/3x-ui/database/model"
|
||||
"github.com/mhsanaei/3x-ui/logger"
|
||||
"github.com/mhsanaei/3x-ui/util/common"
|
||||
"github.com/mhsanaei/3x-ui/xray"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"x-ui/database"
|
||||
"x-ui/database/model"
|
||||
"x-ui/logger"
|
||||
"x-ui/xray"
|
||||
"github.com/mhsanaei/3x-ui/database"
|
||||
"github.com/mhsanaei/3x-ui/database/model"
|
||||
"github.com/mhsanaei/3x-ui/logger"
|
||||
"github.com/mhsanaei/3x-ui/xray"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"x-ui/logger"
|
||||
"github.com/mhsanaei/3x-ui/logger"
|
||||
)
|
||||
|
||||
type PanelService struct{}
|
||||
|
||||
@@ -19,12 +19,12 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"x-ui/config"
|
||||
"x-ui/database"
|
||||
"x-ui/logger"
|
||||
"x-ui/util/common"
|
||||
"x-ui/util/sys"
|
||||
"x-ui/xray"
|
||||
"github.com/mhsanaei/3x-ui/config"
|
||||
"github.com/mhsanaei/3x-ui/database"
|
||||
"github.com/mhsanaei/3x-ui/logger"
|
||||
"github.com/mhsanaei/3x-ui/util/common"
|
||||
"github.com/mhsanaei/3x-ui/util/sys"
|
||||
"github.com/mhsanaei/3x-ui/xray"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/shirou/gopsutil/v4/cpu"
|
||||
|
||||
@@ -10,14 +10,14 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"x-ui/database"
|
||||
"x-ui/database/model"
|
||||
"x-ui/logger"
|
||||
"x-ui/util/common"
|
||||
"x-ui/util/random"
|
||||
"x-ui/util/reflect_util"
|
||||
"x-ui/web/entity"
|
||||
"x-ui/xray"
|
||||
"github.com/mhsanaei/3x-ui/database"
|
||||
"github.com/mhsanaei/3x-ui/database/model"
|
||||
"github.com/mhsanaei/3x-ui/logger"
|
||||
"github.com/mhsanaei/3x-ui/util/common"
|
||||
"github.com/mhsanaei/3x-ui/util/random"
|
||||
"github.com/mhsanaei/3x-ui/util/reflect_util"
|
||||
"github.com/mhsanaei/3x-ui/web/entity"
|
||||
"github.com/mhsanaei/3x-ui/xray"
|
||||
)
|
||||
|
||||
//go:embed config.json
|
||||
|
||||
@@ -18,14 +18,14 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"x-ui/config"
|
||||
"x-ui/database"
|
||||
"x-ui/database/model"
|
||||
"x-ui/logger"
|
||||
"x-ui/util/common"
|
||||
"x-ui/web/global"
|
||||
"x-ui/web/locale"
|
||||
"x-ui/xray"
|
||||
"github.com/mhsanaei/3x-ui/config"
|
||||
"github.com/mhsanaei/3x-ui/database"
|
||||
"github.com/mhsanaei/3x-ui/database/model"
|
||||
"github.com/mhsanaei/3x-ui/logger"
|
||||
"github.com/mhsanaei/3x-ui/util/common"
|
||||
"github.com/mhsanaei/3x-ui/web/global"
|
||||
"github.com/mhsanaei/3x-ui/web/locale"
|
||||
"github.com/mhsanaei/3x-ui/xray"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/mymmrac/telego"
|
||||
@@ -1581,23 +1581,6 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
|
||||
)
|
||||
prompt_message := t.I18nBot("tgbot.messages.comment_prompt", "ClientComment=="+client_Comment)
|
||||
t.SendMsgToTgbot(chatId, prompt_message, cancel_btn_markup)
|
||||
default:
|
||||
// dynamic callbacks
|
||||
if strings.HasPrefix(callbackQuery.Data, "client_sub_links ") {
|
||||
email := strings.TrimPrefix(callbackQuery.Data, "client_sub_links ")
|
||||
t.sendClientSubLinks(chatId, email)
|
||||
return
|
||||
}
|
||||
if strings.HasPrefix(callbackQuery.Data, "client_individual_links ") {
|
||||
email := strings.TrimPrefix(callbackQuery.Data, "client_individual_links ")
|
||||
t.sendClientIndividualLinks(chatId, email)
|
||||
return
|
||||
}
|
||||
if strings.HasPrefix(callbackQuery.Data, "client_qr_links ") {
|
||||
email := strings.TrimPrefix(callbackQuery.Data, "client_qr_links ")
|
||||
t.sendClientQRLinks(chatId, email)
|
||||
return
|
||||
}
|
||||
case "add_client_ch_default_traffic":
|
||||
inlineKeyboard := tu.InlineKeyboard(
|
||||
tu.InlineKeyboardRow(
|
||||
@@ -1813,6 +1796,22 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
|
||||
t.SendMsgToTgbot(chatId, msg, tu.ReplyKeyboardRemove())
|
||||
|
||||
}
|
||||
default:
|
||||
if after, ok := strings.CutPrefix(callbackQuery.Data, "client_sub_links "); ok {
|
||||
email := after
|
||||
t.sendClientSubLinks(chatId, email)
|
||||
return
|
||||
}
|
||||
if after, ok := strings.CutPrefix(callbackQuery.Data, "client_individual_links "); ok {
|
||||
email := after
|
||||
t.sendClientIndividualLinks(chatId, email)
|
||||
return
|
||||
}
|
||||
if after, ok := strings.CutPrefix(callbackQuery.Data, "client_qr_links "); ok {
|
||||
email := after
|
||||
t.sendClientQRLinks(chatId, email)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ package service
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"x-ui/database"
|
||||
"x-ui/database/model"
|
||||
"x-ui/logger"
|
||||
"x-ui/util/crypto"
|
||||
"github.com/mhsanaei/3x-ui/database"
|
||||
"github.com/mhsanaei/3x-ui/database/model"
|
||||
"github.com/mhsanaei/3x-ui/logger"
|
||||
"github.com/mhsanaei/3x-ui/util/crypto"
|
||||
|
||||
"github.com/xlzd/gotp"
|
||||
"gorm.io/gorm"
|
||||
|
||||
@@ -7,8 +7,9 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
"x-ui/logger"
|
||||
"x-ui/util/common"
|
||||
|
||||
"github.com/mhsanaei/3x-ui/logger"
|
||||
"github.com/mhsanaei/3x-ui/util/common"
|
||||
)
|
||||
|
||||
type WarpService struct {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"runtime"
|
||||
"sync"
|
||||
|
||||
"x-ui/logger"
|
||||
"x-ui/xray"
|
||||
"github.com/mhsanaei/3x-ui/logger"
|
||||
"github.com/mhsanaei/3x-ui/xray"
|
||||
|
||||
"go.uber.org/atomic"
|
||||
)
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
_ "embed"
|
||||
"encoding/json"
|
||||
|
||||
"x-ui/util/common"
|
||||
"x-ui/xray"
|
||||
"github.com/mhsanaei/3x-ui/util/common"
|
||||
"github.com/mhsanaei/3x-ui/xray"
|
||||
)
|
||||
|
||||
type XraySettingService struct {
|
||||
|
||||
Reference in New Issue
Block a user