Skip to content

Commit 5ef8a5a

Browse files
committed
old design
1 parent c49a9e8 commit 5ef8a5a

55 files changed

Lines changed: 1007 additions & 2167 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.1
1+
1.0.9

database/model/model.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,10 @@ type Setting struct {
7373

7474
type Client struct {
7575
ID string `json:"id"`
76-
Password string `json:"password"`
77-
Flow string `json:"flow"`
7876
AlterIds uint16 `json:"alterId"`
7977
Email string `json:"email"`
8078
LimitIP int `json:"limitIp"`
79+
Security string `json:"security"`
8180
TotalGB int64 `json:"totalGB" form:"totalGB"`
8281
ExpiryTime int64 `json:"expiryTime" form:"expiryTime"`
8382
}

main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func updateTgbotEnableSts(status bool) {
136136
return
137137
}
138138

139-
func updateTgbotSetting(tgBotToken string, tgBotChatid string, tgBotRuntime string) {
139+
func updateTgbotSetting(tgBotToken string, tgBotChatid int, tgBotRuntime string) {
140140
err := database.InitDB(config.GetDBPath())
141141
if err != nil {
142142
fmt.Println(err)
@@ -165,7 +165,7 @@ func updateTgbotSetting(tgBotToken string, tgBotChatid string, tgBotRuntime stri
165165
}
166166
}
167167

168-
if tgBotChatid != "" {
168+
if tgBotChatid != 0 {
169169
err := settingService.SetTgBotChatId(tgBotChatid)
170170
if err != nil {
171171
fmt.Println(err)
@@ -224,7 +224,7 @@ func main() {
224224
var username string
225225
var password string
226226
var tgbottoken string
227-
var tgbotchatid string
227+
var tgbotchatid int
228228
var enabletgbot bool
229229
var tgbotRuntime string
230230
var reset bool
@@ -236,7 +236,7 @@ func main() {
236236
settingCmd.StringVar(&password, "password", "", "set login password")
237237
settingCmd.StringVar(&tgbottoken, "tgbottoken", "", "set telegrame bot token")
238238
settingCmd.StringVar(&tgbotRuntime, "tgbotRuntime", "", "set telegrame bot cron time")
239-
settingCmd.StringVar(&tgbotchatid, "tgbotchatid", "", "set telegrame bot chat id")
239+
settingCmd.IntVar(&tgbotchatid, "tgbotchatid", 0, "set telegrame bot chat id")
240240
settingCmd.BoolVar(&enabletgbot, "enabletgbot", false, "enable telegram bot notify")
241241

242242
oldUsage := flag.Usage
@@ -287,7 +287,7 @@ func main() {
287287
if show {
288288
showSetting(show)
289289
}
290-
if (tgbottoken != "") || (tgbotchatid != "") || (tgbotRuntime != "") {
290+
if (tgbottoken != "") || (tgbotchatid != 0) || (tgbotRuntime != "") {
291291
updateTgbotSetting(tgbottoken, tgbotchatid, tgbotRuntime)
292292
}
293293
default:

media/1.png

2.82 KB
Loading

media/2.png

23.7 KB
Loading

media/3.png

4.63 KB
Loading

media/4.png

-13.3 KB
Loading

util/sys/sys_darwin.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//go:build darwin
21
// +build darwin
32

43
package sys

util/sys/sys_linux.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//go:build linux
21
// +build linux
32

43
package sys

web/assets/ant-design-vue@1.7.2/antd.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)