docs: add open-source license and attribution statements to internal/sdk and internal/tunnel source files
This commit is contained in:
@@ -18,6 +18,18 @@ import (
|
||||
"golang.org/x/net/proxy"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type barkResponse struct {
|
||||
Code int `json:"code"`
|
||||
Message string `json:"message"`
|
||||
|
||||
@@ -7,6 +7,18 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type CustomWebhook struct {
|
||||
Webhook string
|
||||
Body string
|
||||
|
||||
@@ -12,6 +12,18 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type response struct {
|
||||
Code int `json:"errcode"`
|
||||
Msg string `json:"errmsg"`
|
||||
|
||||
@@ -6,6 +6,18 @@ import (
|
||||
"gopkg.in/gomail.v2"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type EmailMessage struct {
|
||||
Server string
|
||||
Port int
|
||||
|
||||
@@ -13,6 +13,18 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type feishuResponse struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
|
||||
@@ -9,6 +9,18 @@ import (
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type gotifyResponse struct {
|
||||
Id int `json:"id"`
|
||||
Message string `json:"message"`
|
||||
|
||||
@@ -8,6 +8,18 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type Ntfy struct {
|
||||
Url string
|
||||
Topic string
|
||||
|
||||
@@ -8,6 +8,18 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type PushMe struct {
|
||||
PushKey string
|
||||
URL string
|
||||
|
||||
@@ -8,6 +8,18 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type PushPlus struct {
|
||||
Token string `json:"token"`
|
||||
Topic string `json:"topic,omitempty"`
|
||||
|
||||
@@ -8,6 +8,18 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type qywxResponse struct {
|
||||
Code int `json:"errcode"`
|
||||
Msg string `json:"errmsg"`
|
||||
|
||||
@@ -15,6 +15,18 @@ import (
|
||||
"golang.org/x/net/proxy"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type telegramResponse struct {
|
||||
Ok bool `json:"ok"`
|
||||
Description string `json:"description"`
|
||||
|
||||
@@ -8,6 +8,18 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type VoceChat struct {
|
||||
Server string
|
||||
APIKey string
|
||||
|
||||
@@ -8,6 +8,18 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type WeChatOFAccount struct {
|
||||
AppID string
|
||||
AppSecret string
|
||||
|
||||
@@ -8,6 +8,18 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type WxPusher struct {
|
||||
AppToken string `json:"appToken"`
|
||||
Content string `json:"content"`
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
package channels
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type AliyunSMSChannel struct{ *BaseChannel }
|
||||
|
||||
func NewAliyunSMSChannel() Channel {
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type BarkChannel struct{ *BaseChannel }
|
||||
|
||||
func NewBarkChannel() Channel {
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "fmt"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
// Channel 渠道接口 - SDK 版本,零业务依赖
|
||||
type Channel interface {
|
||||
// GetType 返回渠道类型标识
|
||||
|
||||
@@ -6,6 +6,18 @@ import (
|
||||
"github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type CustomChannel struct{ *BaseChannel }
|
||||
|
||||
func NewCustomChannel() Channel {
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type DtalkChannel struct{ *BaseChannel }
|
||||
|
||||
func NewDtalkChannel() Channel {
|
||||
|
||||
@@ -6,6 +6,18 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type EmailChannel struct{ *BaseChannel }
|
||||
|
||||
func NewEmailChannel() Channel {
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type FeishuChannel struct{ *BaseChannel }
|
||||
|
||||
func NewFeishuChannel() Channel {
|
||||
|
||||
@@ -5,6 +5,18 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type GotifyChannel struct{ *BaseChannel }
|
||||
|
||||
func NewGotifyChannel() Channel {
|
||||
|
||||
@@ -10,6 +10,18 @@ import (
|
||||
"github.com/alibabacloud-go/tea/tea"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
// replaceBodyPlaceholder 替换自定义 webhook body 中的 TEXT 占位符
|
||||
func replaceBodyPlaceholder(body string, content string) string {
|
||||
data, _ := json.Marshal(content)
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type NtfyChannel struct{ *BaseChannel }
|
||||
|
||||
func NewNtfyChannel() Channel {
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type PushMeChannel struct{ *BaseChannel }
|
||||
|
||||
func NewPushMeChannel() Channel {
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type PushPlusChannel struct{ *BaseChannel }
|
||||
|
||||
func NewPushPlusChannel() Channel {
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type QyWeiXinChannel struct{ *BaseChannel }
|
||||
|
||||
func NewQyWeiXinChannel() Channel {
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type TelegramChannel struct{ *BaseChannel }
|
||||
|
||||
func NewTelegramChannel() Channel {
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
package channels
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
// Message 统一消息内容
|
||||
type Message struct {
|
||||
Title string `json:"title"`
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type VoceChatChannel struct{ *BaseChannel }
|
||||
|
||||
func NewVoceChatChannel() Channel {
|
||||
|
||||
@@ -2,6 +2,18 @@ package channels
|
||||
|
||||
import "github.com/engigu/baihu-panel/internal/sdk/message"
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type WeChatOFAccountChannel struct{ *BaseChannel }
|
||||
|
||||
func NewWeChatOFAccountChannel() Channel {
|
||||
|
||||
@@ -7,6 +7,18 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
type WxPusherChannel struct{ *BaseChannel }
|
||||
|
||||
func NewWxPusherChannel() Channel {
|
||||
|
||||
@@ -20,6 +20,18 @@ import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
|
||||
// 重导出 channels 包的类型,方便外部使用
|
||||
type (
|
||||
Channel = channels.Channel
|
||||
|
||||
@@ -16,6 +16,17 @@ import (
|
||||
"github.com/hashicorp/yamux"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
var (
|
||||
tunnelActive bool
|
||||
clientConn *yamux.Session
|
||||
|
||||
@@ -8,6 +8,17 @@ import (
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
// wsConn 包装 gorilla websocket 以实现 net.Conn 接口
|
||||
type wsConn struct {
|
||||
conn *websocket.Conn
|
||||
|
||||
@@ -13,6 +13,17 @@ import (
|
||||
"github.com/hashicorp/yamux"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
// ProxyHTTP 以完全透明的流式转发将 HTTP 请求代理到远程节点 (主节点调用)
|
||||
func ProxyHTTP(nodeID string, c *gin.Context, targetPath string) error {
|
||||
sess := GetSession(nodeID)
|
||||
|
||||
@@ -14,6 +14,17 @@ import (
|
||||
"github.com/robfig/cron/v3"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
var (
|
||||
reporterCronID cron.EntryID
|
||||
isReporting bool
|
||||
|
||||
@@ -15,6 +15,17 @@ import (
|
||||
"github.com/hashicorp/yamux"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
var upgrader = websocket.Upgrader{
|
||||
CheckOrigin: func(r *http.Request) bool {
|
||||
return true
|
||||
|
||||
@@ -11,6 +11,17 @@ import (
|
||||
"github.com/hashicorp/yamux"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
// TunnelSession 表示一个基于 WebSocket 的 Yamux 活跃会话
|
||||
type TunnelSession struct {
|
||||
NodeID string
|
||||
|
||||
@@ -5,6 +5,17 @@ import (
|
||||
"sync/atomic"
|
||||
)
|
||||
|
||||
// Copyright (c) 2026 engigu (Baihu Panel). All rights reserved.
|
||||
// Use of this source code is governed by the Apache License 2.0.
|
||||
//
|
||||
// 【重要声明 / IMPORTANT NOTICE】
|
||||
// 本代码(包括其架构设计与核心实现)属于白虎面板(Baihu Panel)开源项目的一部分。
|
||||
// 任何个人或组织在引用、移植、修改或重新分发此文件中的任何代码时,必须保留本版权声明,
|
||||
// 并在您的衍生作品、文档、软件关于页面或说明文件中显式声明引用自白虎面板(Baihu Panel)。
|
||||
//
|
||||
// Anyone referencing, porting, modifying, or redistributing this code must retain this
|
||||
// copyright notice and explicitly state the source: Baihu Panel (github.com/engigu/baihu-panel).
|
||||
|
||||
var (
|
||||
txBytes uint64
|
||||
rxBytes uint64
|
||||
|
||||
@@ -38,7 +38,7 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<div class="space-y-4">
|
||||
<div class="flex flex-col md:flex-row md:items-center justify-between gap-4">
|
||||
<div class="flex flex-col md:flex-row md:flex-wrap md:items-center justify-between gap-4">
|
||||
<div class="flex flex-col shrink-0">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2 class="text-xl sm:text-2xl font-bold tracking-tight">互联管理</h2>
|
||||
@@ -47,43 +47,44 @@ onMounted(() => {
|
||||
<p class="text-muted-foreground text-xs mt-0.5 ml-0.5">集中监控其他面板的状态,并可无缝穿越到子节点进行管理</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col sm:flex-row items-center gap-2 w-full md:w-auto md:ml-auto md:justify-end">
|
||||
<div class="flex flex-row items-center flex-wrap gap-2 w-full md:w-auto md:ml-auto md:justify-end">
|
||||
<!-- 搜索框 (仅节点管理时显示) -->
|
||||
<div class="relative w-full sm:w-[200px] md:w-[240px] group shrink-0" v-if="activeTab === 'nodes'">
|
||||
<div class="relative w-full sm:flex-1 md:flex-none md:w-[180px] xl:w-[240px] group shrink-0" v-if="activeTab === 'nodes'">
|
||||
<Search class="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground group-focus-within:text-primary transition-colors" />
|
||||
<Input v-model="searchQuery" placeholder="搜索节点..." class="h-9 pl-9 w-full bg-muted/20 border-muted-foreground/10 focus:bg-background text-sm" />
|
||||
</div>
|
||||
|
||||
<!-- 按钮控制组 -->
|
||||
<div class="flex items-center gap-2 w-full sm:w-auto sm:justify-end overflow-x-auto scrollbar-none pb-1 -mb-1 sm:pb-0 sm:mb-0">
|
||||
<!-- 刷新按钮 -->
|
||||
<Button variant="outline" size="icon" class="h-9 w-9 shrink-0" @click="fetchNodes" :disabled="loading" title="刷新">
|
||||
<RefreshCw class="h-4 w-4" :class="{ 'animate-spin': loading }" />
|
||||
</Button>
|
||||
|
||||
<!-- 取消主控角色按钮 -->
|
||||
<Button variant="outline" class="flex-1 sm:flex-none shrink-0 px-2 md:px-3 h-9 shadow-sm text-destructive border-destructive/20 hover:bg-destructive/10" @click="emit('cancel')">
|
||||
取消主控
|
||||
</Button>
|
||||
<div class="flex items-center gap-2 flex-1 sm:flex-none sm:ml-0">
|
||||
<!-- 取消主控角色按钮 -->
|
||||
<Button variant="outline" class="flex-1 sm:flex-none shrink-0 px-3 h-9 shadow-sm text-destructive border-destructive/20 hover:bg-destructive/10" @click="emit('cancel')">
|
||||
取消主控
|
||||
</Button>
|
||||
|
||||
<!-- 添加子节点按钮 -->
|
||||
<Button v-if="activeTab === 'nodes'" @click="masterListRef?.openAddDialog()" class="flex-1 sm:flex-none shrink-0 px-2 md:px-3 h-9 shadow-sm font-medium" title="添加子节点">
|
||||
<Plus class="h-4 w-4 md:mr-1.5" /> <span class="hidden md:inline">添加子节点</span>
|
||||
</Button>
|
||||
|
||||
<!-- Tabs 切换 -->
|
||||
<Tabs :model-value="activeTab" @update:model-value="(v: string | number) => activeTab = String(v)" class="shrink-0 flex-1 sm:flex-none min-w-[120px]">
|
||||
<TabsList class="h-9 p-0.5 bg-muted/20 border border-border/40 rounded-lg w-full flex">
|
||||
<TabsTrigger value="nodes" class="flex-1 sm:flex-none px-3 h-8 text-xs gap-1.5 font-medium transition-all">
|
||||
<Server class="w-3.5 h-3.5 opacity-70" />
|
||||
<span>节点</span>
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="sync" class="flex-1 sm:flex-none px-3 h-8 text-xs gap-1.5 font-medium transition-all">
|
||||
<ArrowRightLeft class="w-3.5 h-3.5 opacity-70" />
|
||||
<span>同步</span>
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
</Tabs>
|
||||
<!-- 添加子节点按钮 -->
|
||||
<Button v-if="activeTab === 'nodes'" @click="masterListRef?.openAddDialog()" class="flex-1 sm:flex-none shrink-0 px-3 h-9 shadow-sm font-medium gap-1" title="添加子节点">
|
||||
<Plus class="h-4 w-4" /><span>添加</span>
|
||||
</Button>
|
||||
|
||||
<!-- Tabs 切换 -->
|
||||
<Tabs :model-value="activeTab" @update:model-value="(v: string | number) => activeTab = String(v)" class="flex-1 sm:flex-none shrink-0 min-w-[120px]">
|
||||
<TabsList class="h-9 p-0.5 bg-muted/20 border border-border/40 rounded-lg w-full flex">
|
||||
<TabsTrigger value="nodes" class="flex-1 px-3 h-8 text-xs gap-1.5 font-medium transition-all">
|
||||
<Server class="w-3.5 h-3.5 opacity-70" />
|
||||
<span>节点</span>
|
||||
</TabsTrigger>
|
||||
<TabsTrigger value="sync" class="flex-1 px-3 h-8 text-xs gap-1.5 font-medium transition-all">
|
||||
<ArrowRightLeft class="w-3.5 h-3.5 opacity-70" />
|
||||
<span>同步</span>
|
||||
</TabsTrigger>
|
||||
</TabsList>
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user