mirror of
https://github.com/yibaiba/hideck.git
synced 2026-12-06 16:01:13 +00:00
fix: harden MBN reconciliation and align configuration UI
This commit is contained in:
1 parent
07cceabf49
commit
517e449e93
14 files changed
+499
-85
No files matched your search
@@ -0,0 +1,100 @@
|
||||
package device
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/yibaiba/hideck/internal/backend"
|
||||
"github.com/yibaiba/hideck/internal/cardpolicy"
|
||||
"github.com/yibaiba/hideck/internal/config"
|
||||
"github.com/yibaiba/hideck/internal/mbn"
|
||||
)
|
||||
|
||||
type fixedMBNPolicyStore struct{ mbn.Store }
|
||||
|
||||
func (fixedMBNPolicyStore) Policies(context.Context) ([]mbn.Policy, error) {
|
||||
return []mbn.Policy{{Key: "sim:card", Mode: "fixed", Profile: "B", Model: "EC20F", Firmware: "expected"}}, nil
|
||||
}
|
||||
|
||||
type unavailableMBNGateway struct{ onOpen func() }
|
||||
|
||||
func (unavailableMBNGateway) Identity(context.Context, string) (mbn.Owner, error) {
|
||||
return mbn.Owner{}, nil
|
||||
}
|
||||
func (g unavailableMBNGateway) Open(context.Context, string, bool) (mbn.Session, error) {
|
||||
if g.onOpen != nil {
|
||||
g.onOpen()
|
||||
}
|
||||
return nil, errors.New("MBN query unsupported on replacement modem")
|
||||
}
|
||||
|
||||
func mbnPolicyTestDevice() (*Pool, *Worker, *workerStatusBackendStub) {
|
||||
p := &Pool{ctx: context.Background()}
|
||||
p.SetPolicyResolver(&stubPolicyResolver{pol: cardpolicy.Policy{ICCID: "card", PhoneMode: PhoneModeWiFi, AirplaneEnabled: true}})
|
||||
stub := &workerStatusBackendStub{opMode: backend.ModeOnline}
|
||||
w := &Worker{ID: "d", Pool: p, Backend: stub, Config: config.DeviceConfig{PhoneMode: PhoneModeVoLTE}, stop: make(chan struct{})}
|
||||
w.state.Identity.ICCID = "card"
|
||||
w.state.Identity.IMEI = "imei"
|
||||
w.state.Identity.IMSI = "234150000000001"
|
||||
w.state.Identity.Ready = true
|
||||
p.workers = map[string]*Worker{"d": w}
|
||||
p.SetMBNService(mbn.New(mbn.Options{Context: p.ctx, Store: fixedMBNPolicyStore{}, Gateway: unavailableMBNGateway{}}))
|
||||
return p, w, stub
|
||||
}
|
||||
|
||||
func TestMBNFailureMustNotKeepPreviousSIMRadioPolicy(t *testing.T) {
|
||||
p, w, stub := mbnPolicyTestDevice()
|
||||
p.SetMBNService(mbn.New(mbn.Options{Context: p.ctx, Store: fixedMBNPolicyStore{}, Gateway: unavailableMBNGateway{onOpen: func() {
|
||||
if !w.Config.AirplaneEnabled || stub.opMode != backend.ModeRFOff {
|
||||
t.Error("MBN queried before applying the new SIM's RF restriction")
|
||||
}
|
||||
}}}))
|
||||
result := p.resolveAndApplyPolicy(w, "identity_ready")
|
||||
if !w.Config.AirplaneEnabled || !w.cellularRadioIsSuppressed() || stub.opMode != backend.ModeRFOff {
|
||||
t.Fatalf("new SIM RF-off policy skipped; previous mode=%s airplane=%v result=%+v", w.Config.PhoneMode, w.Config.AirplaneEnabled, result)
|
||||
}
|
||||
if result.Err == nil || result.Applied || result.Reason != "mbn_policy" {
|
||||
t.Fatalf("MBN failure was hidden: %+v", result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMBNFailureDoesNotStartDependentCellularServices(t *testing.T) {
|
||||
p, w, stub := mbnPolicyTestDevice()
|
||||
w.Config = config.DeviceConfig{PhoneMode: PhoneModeWiFi, AirplaneEnabled: true}
|
||||
stub.opMode = backend.ModeRFOff
|
||||
p.SetPolicyResolver(&stubPolicyResolver{pol: cardpolicy.Policy{ICCID: "card", PhoneMode: PhoneModeVoLTE, VoWiFiEnabled: true, NetworkEnabled: true}})
|
||||
result := p.resolveAndApplyPolicy(w, "identity_ready")
|
||||
if result.Err == nil || result.Applied || w.Config.PhoneMode != PhoneModeVoLTE {
|
||||
t.Fatalf("policy or error lost: %+v config=%+v", result, w.Config)
|
||||
}
|
||||
assertNoRadioOnline(t, stub, "MBN failure")
|
||||
}
|
||||
|
||||
func TestMBNInspectionRechecksPolicyAndSIM(t *testing.T) {
|
||||
for _, change := range []string{"policy", "sim"} {
|
||||
t.Run(change, func(t *testing.T) {
|
||||
p, w, stub := mbnPolicyTestDevice()
|
||||
p.SetMBNService(mbn.New(mbn.Options{Context: p.ctx, Store: fixedMBNPolicyStore{}, Gateway: unavailableMBNGateway{onOpen: func() {
|
||||
transition := p.policyTransitionFor(w.ID)
|
||||
if !transition.TryLock() {
|
||||
t.Error("inspection held transition lock; real gateway would deadlock")
|
||||
return
|
||||
}
|
||||
defer transition.Unlock()
|
||||
if change == "policy" {
|
||||
w.Config.PhoneMode = PhoneModeModemVoice
|
||||
} else {
|
||||
w.cacheMu.Lock()
|
||||
w.state.Identity.Generation++
|
||||
w.cacheMu.Unlock()
|
||||
}
|
||||
}}}))
|
||||
result := p.resolveAndApplyPolicy(w, "identity_ready")
|
||||
if result.Err == nil || result.Applied || result.Reason == "mbn_policy" {
|
||||
t.Fatalf("stale policy resumed: %+v", result)
|
||||
}
|
||||
assertNoRadioOnline(t, stub, "stale policy")
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package device
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/yibaiba/hideck/pkg/logger"
|
||||
@@ -35,11 +36,6 @@ func (p *Pool) resolveAndApplyPolicy(worker *Worker, reason string) policyApplyR
|
||||
if ownerErr != nil {
|
||||
return policyApplyResult{ICCID: iccid, Reason: "owner_changed", Err: ownerErr}
|
||||
}
|
||||
if reason != "mbn_operation_finished" {
|
||||
if pending, err := p.reconcileMBN(worker); err != nil || pending {
|
||||
return policyApplyResult{ICCID: iccid, Reason: "mbn_policy", Err: err}
|
||||
}
|
||||
}
|
||||
releaseOperation, err := p.AcquireDeviceOperation(worker.ID)
|
||||
if err != nil {
|
||||
return policyApplyResult{ICCID: iccid, Reason: "mbn_operation_active", Err: err}
|
||||
@@ -101,13 +97,39 @@ func (p *Pool) resolveAndApplyPolicy(worker *Worker, reason string) policyApplyR
|
||||
logger.Info("已投影卡策略", "device", worker.ID, "iccid", iccid,
|
||||
"network", effective.NetworkEnabled, "vowifi", effective.VoWiFiEnabled,
|
||||
"airplane", effective.AirplaneEnabled, "reason", reason)
|
||||
// Apply the current SIM's RF restrictions before inspecting or queuing MBN.
|
||||
// Keep the shared operation lease while temporarily releasing the transition
|
||||
// lock: inspection needs that lock, and a queued writer must wait for us.
|
||||
radioSuppressed := shouldSuppressCellularRadio(effective)
|
||||
if radioSuppressed {
|
||||
p.enterAirplaneModeFromPolicy(worker, reason)
|
||||
}
|
||||
nativeEnabled := IsNativeVoLTEMode(effective.PhoneMode) && PhoneServiceEnabled(effective) && !effective.AirplaneEnabled
|
||||
if !nativeEnabled && !modemVoiceHandoff {
|
||||
p.stopNativeVoLTE(worker.ID, reason)
|
||||
}
|
||||
var mbnPending bool
|
||||
var mbnErr error
|
||||
if reason != "mbn_operation_finished" && p.mbnService != nil {
|
||||
transition.Unlock()
|
||||
mbnPending, mbnErr = p.reconcileMBN(worker)
|
||||
transition.Lock()
|
||||
if err := validate(); err != nil {
|
||||
return policyApplyResult{ICCID: iccid, Reason: "owner_changed", Err: err}
|
||||
}
|
||||
if worker.Config != effective {
|
||||
return policyApplyResult{ICCID: iccid, Reason: "policy_changed", Err: errors.New("MBN 检查期间设备策略已改变,请按当前策略重试")}
|
||||
}
|
||||
if (mbnPending || mbnErr != nil) && !radioSuppressed {
|
||||
return policyApplyResult{ICCID: iccid, Reason: "mbn_policy", Err: mbnErr}
|
||||
}
|
||||
}
|
||||
|
||||
// 三态分支:VoWiFi / 纯飞行 / 在线(含连网)。射频模式按策略真正切换,
|
||||
// 补齐此前“airplane 字段被投影但从不执行”的缺口。
|
||||
switch {
|
||||
case effective.AirplaneEnabled:
|
||||
// 飞行优先:蜂窝软件电话可以保持开启,只关射频和流量。
|
||||
p.enterAirplaneModeFromPolicy(worker, reason)
|
||||
case PhoneServiceEnabled(effective) && PhoneModeCampsOnCell(effective.PhoneMode):
|
||||
// 蜂窝软件电话 / 原生 VoLTE:射频保持在线以驻网。网络开着才连上网数据。
|
||||
p.exitAirplaneModeIfNeeded(worker, reason)
|
||||
@@ -130,7 +152,7 @@ func (p *Pool) resolveAndApplyPolicy(worker *Worker, reason string) policyApplyR
|
||||
if err := validate(); err != nil {
|
||||
return policyApplyResult{ICCID: iccid, Reason: "owner_changed", Err: err}
|
||||
}
|
||||
if IsNativeVoLTEMode(effective.PhoneMode) && PhoneServiceEnabled(effective) && !effective.AirplaneEnabled {
|
||||
if nativeEnabled {
|
||||
// Carrier policy can project a software IMS mode into native VoLTE.
|
||||
if finishNativeTransition != nil {
|
||||
finishNativeTransition()
|
||||
@@ -139,9 +161,6 @@ func (p *Pool) resolveAndApplyPolicy(worker *Worker, reason string) policyApplyR
|
||||
p.clearDesiredVoWiFiRecoverState(worker.ID)
|
||||
p.scheduleNativeVoLTE(worker.ID, reason)
|
||||
} else {
|
||||
if !modemVoiceHandoff {
|
||||
p.stopNativeVoLTE(worker.ID, reason)
|
||||
}
|
||||
if PhoneServiceEnabled(effective) && !UsesModemPhoneControl(effective.PhoneMode) && !cellularSoftwarePhoneHeld(worker, pol) {
|
||||
p.scheduleDesiredVoWiFiRecover(worker.ID, reason, time.Now())
|
||||
} else {
|
||||
@@ -154,5 +173,8 @@ func (p *Pool) resolveAndApplyPolicy(worker *Worker, reason string) policyApplyR
|
||||
if err := p.reconcileModemVoice(worker); err != nil {
|
||||
return policyApplyResult{ICCID: iccid, Reason: "modem_voice_failed", Err: err}
|
||||
}
|
||||
if mbnPending || mbnErr != nil {
|
||||
return policyApplyResult{ICCID: iccid, Reason: "mbn_policy", Err: mbnErr}
|
||||
}
|
||||
return policyApplyResult{Applied: true, ICCID: iccid, Reason: reason}
|
||||
}
|
||||
@@ -129,7 +129,12 @@ func (s *Service) Reconcile(ctx context.Context, owner Owner) (bool, error) {
|
||||
} else if current.AutoSel {
|
||||
return false, nil
|
||||
}
|
||||
request := Request{ExpectedOwner: ¤t.Owner, RequestID: fmt.Sprintf("policy-%s-%s-%d", owner.IMEI, owner.ICCID, policy.UpdatedAt.UnixNano()), Kind: "apply", Profile: policy.Profile, Version: policy.Version, AutoSel: policy.Mode == "autosel"}
|
||||
request := Request{
|
||||
ExpectedOwner: ¤t.Owner,
|
||||
RequestID: fmt.Sprintf("policy-%s-%s-%s-%d-%d-%d", s.policySessionID, owner.IMEI, owner.ICCID,
|
||||
owner.Generation, owner.IdentityGeneration, policy.UpdatedAt.UnixNano()),
|
||||
Kind: "apply", Profile: policy.Profile, Version: policy.Version, AutoSel: policy.Mode == "autosel",
|
||||
}
|
||||
if policy.Mode == "fixed" && !hasProfile(current, policy.Profile) {
|
||||
if !policy.AllowImport {
|
||||
return false, errors.New("策略指定的 MBN 不在模组中,且未授权自动导入")
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
package mbn
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestPolicyReappliesAfterReturningToSIM(t *testing.T) {
|
||||
s, f := testService(t)
|
||||
ctx := context.Background()
|
||||
policy := Policy{Key: "sim:" + f.owner.ICCID, Mode: "fixed", Model: f.owner.Model, Firmware: f.owner.Firmware, Profile: "B"}
|
||||
if err := s.SavePolicy(ctx, policy); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if pending, err := s.Reconcile(ctx, f.owner); !pending || err != nil {
|
||||
t.Fatalf("first pending=%v err=%v", pending, err)
|
||||
}
|
||||
s.Wait()
|
||||
if f.active != "B" {
|
||||
t.Fatalf("first did not apply: %s", f.active)
|
||||
}
|
||||
// Another SIM used A, then the original SIM returns with a new identity generation.
|
||||
f.owner.IdentityGeneration += 2
|
||||
f.active, f.selected = "A", "A"
|
||||
pending, err := s.Reconcile(ctx, f.owner)
|
||||
if err != nil || !pending {
|
||||
t.Fatalf("returning SIM cannot reapply: pending=%v err=%v", pending, err)
|
||||
}
|
||||
s.Wait()
|
||||
if f.active != "B" {
|
||||
t.Fatalf("returned SIM retained wrong profile %s", f.active)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPolicyFailureDoesNotRepeatInSameSession(t *testing.T) {
|
||||
s, f := testService(t)
|
||||
ctx := context.Background()
|
||||
f.rebootErr = errors.New("reboot not confirmed")
|
||||
if err := s.SavePolicy(ctx, Policy{Key: "sim:" + f.owner.ICCID, Mode: "fixed", Model: f.owner.Model, Firmware: f.owner.Firmware, Profile: "B"}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if pending, err := s.Reconcile(ctx, f.owner); err != nil || !pending {
|
||||
t.Fatalf("pending=%v err=%v", pending, err)
|
||||
}
|
||||
s.Wait()
|
||||
for i := 0; i < 3; i++ {
|
||||
if pending, err := s.Reconcile(ctx, f.owner); pending || err == nil {
|
||||
t.Fatalf("failed attempt not reported: pending=%v err=%v", pending, err)
|
||||
}
|
||||
}
|
||||
jobs, err := s.Operations(ctx, "d")
|
||||
if err != nil || len(jobs) != 1 || f.reboots != 1 {
|
||||
t.Fatalf("unexpected retries: jobs=%d reboots=%d err=%v", len(jobs), f.reboots, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPolicyReappliesAfterServiceRestart(t *testing.T) {
|
||||
s, f := testService(t)
|
||||
ctx := context.Background()
|
||||
if err := s.SavePolicy(ctx, Policy{Key: "sim:" + f.owner.ICCID, Mode: "fixed", Model: f.owner.Model, Firmware: f.owner.Firmware, Profile: "B"}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if pending, err := s.Reconcile(ctx, f.owner); !pending || err != nil {
|
||||
t.Fatalf("pending=%v err=%v", pending, err)
|
||||
}
|
||||
s.Wait()
|
||||
f.active, f.selected = "A", "A" // Another card was used while HiDeck was stopped.
|
||||
restarted := New(Options{Context: s.ctx, Store: s.store, Files: s.files, Gateway: s.gateway})
|
||||
t.Cleanup(restarted.Wait)
|
||||
if pending, err := restarted.Reconcile(ctx, f.owner); !pending || err != nil {
|
||||
t.Fatalf("old process request reused: pending=%v err=%v", pending, err)
|
||||
}
|
||||
restarted.Wait()
|
||||
if f.active != "B" || f.reboots != 2 {
|
||||
t.Fatalf("profile=%s reboots=%d", f.active, f.reboots)
|
||||
}
|
||||
}
|
||||
|
||||
type deadlineRegistrationSession struct {
|
||||
*testSession
|
||||
polls int
|
||||
lastCandidateReady bool
|
||||
}
|
||||
|
||||
func (f *deadlineRegistrationSession) Registration(ctx context.Context) (Registration, error) {
|
||||
if f.lastCandidateReady && f.active == "A" {
|
||||
return Registration{Registered: true}, nil
|
||||
}
|
||||
f.polls++
|
||||
if f.polls >= 2 {
|
||||
<-ctx.Done()
|
||||
return Registration{}, ctx.Err()
|
||||
}
|
||||
return Registration{}, nil
|
||||
}
|
||||
|
||||
func TestObservationTimeoutCanReachHealthyCandidate(t *testing.T) {
|
||||
s, f := testService(t)
|
||||
s.gateway = registrationTestGateway{&deadlineRegistrationSession{testSession: f, lastCandidateReady: true}}
|
||||
op, err := s.Start(context.Background(), "d", Request{RequestID: "trial", Kind: "trial", Candidates: []string{"B", "A"}, RegistrationSeconds: 1, StabilitySeconds: 1})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
result := waitOperation(t, s, op.ID)
|
||||
if result.Status != "succeeded" || len(result.Results) != 2 || result.Results[0].Passed || !result.Results[1].Passed || f.active != "A" {
|
||||
t.Fatalf("healthy candidate not reached after observation timeout: %+v", result)
|
||||
}
|
||||
}
|
||||
|
||||
type registrationTestGateway struct{ session Session }
|
||||
|
||||
func (g registrationTestGateway) Open(context.Context, string, bool) (Session, error) {
|
||||
return g.session, nil
|
||||
}
|
||||
func (g registrationTestGateway) Identity(context.Context, string) (Owner, error) {
|
||||
return g.session.Owner(), nil
|
||||
}
|
||||
|
||||
func TestObservationTimeoutStillTriesNextCandidate(t *testing.T) {
|
||||
s, f := testService(t)
|
||||
s.gateway = registrationTestGateway{&deadlineRegistrationSession{testSession: f}}
|
||||
op, err := s.Start(context.Background(), "d", Request{RequestID: "trial", Kind: "trial", Candidates: []string{"B", "A"}, RegistrationSeconds: 1, StabilitySeconds: 1})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
result := waitOperation(t, s, op.ID)
|
||||
if len(result.Results) != 2 {
|
||||
t.Fatalf("observation deadline prematurely aborted remaining candidates: %+v", result)
|
||||
}
|
||||
if result.Status != "failed" || result.Stage != "restored" || f.active != "A" {
|
||||
t.Fatalf("exhausted candidates were not restored: %+v", result)
|
||||
}
|
||||
}
|
||||
|
||||
type failedRegistrationSession struct {
|
||||
*testSession
|
||||
err error
|
||||
}
|
||||
|
||||
func (f failedRegistrationSession) Registration(context.Context) (Registration, error) {
|
||||
return Registration{}, f.err
|
||||
}
|
||||
|
||||
func TestTrialDoesNotAdvanceAfterRegistrationFailure(t *testing.T) {
|
||||
for _, failure := range []error{ErrOwnerChanged, context.Canceled, context.DeadlineExceeded, errors.New("transport disconnected")} {
|
||||
t.Run(failure.Error(), func(t *testing.T) {
|
||||
s, f := testService(t)
|
||||
s.gateway = registrationTestGateway{failedRegistrationSession{testSession: f, err: failure}}
|
||||
op, err := s.Start(context.Background(), "d", Request{RequestID: "failure", Kind: "trial", Candidates: []string{"B", "A"}})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
result := waitOperation(t, s, op.ID)
|
||||
if len(result.Results) != 1 || result.Status == "succeeded" {
|
||||
t.Fatalf("fatal failure advanced the trial: %+v", result)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
+10
-9
@@ -13,14 +13,15 @@ import (
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
store Store
|
||||
files Files
|
||||
gateway Gateway
|
||||
ctx context.Context
|
||||
mu sync.Mutex
|
||||
active map[string]string
|
||||
overrides map[string]Policy
|
||||
wg sync.WaitGroup
|
||||
store Store
|
||||
files Files
|
||||
gateway Gateway
|
||||
ctx context.Context
|
||||
mu sync.Mutex
|
||||
active map[string]string
|
||||
overrides map[string]Policy
|
||||
policySessionID string // Generations are process-local; do not reuse a previous process's requests.
|
||||
wg sync.WaitGroup
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
@@ -31,7 +32,7 @@ type Options struct {
|
||||
}
|
||||
|
||||
func New(opts Options) *Service {
|
||||
return &Service{store: opts.Store, files: opts.Files, gateway: opts.Gateway, ctx: opts.Context, active: map[string]string{}, overrides: map[string]Policy{}}
|
||||
return &Service{store: opts.Store, files: opts.Files, gateway: opts.Gateway, ctx: opts.Context, active: map[string]string{}, overrides: map[string]Policy{}, policySessionID: newID()}
|
||||
}
|
||||
|
||||
// Recover never replays a mutation whose terminal response was lost.
|
||||
|
||||
@@ -66,6 +66,11 @@ func (s *Service) observe(session Session, op *Operation, result *TrialResult) e
|
||||
}
|
||||
registration, err := session.Registration(ctx)
|
||||
if err != nil {
|
||||
// Only this candidate's observation deadline permits trying another
|
||||
// profile. Cancellation, lost ownership and transport errors stay fatal.
|
||||
if errors.Is(ctx.Err(), context.DeadlineExceeded) && errors.Is(err, context.DeadlineExceeded) && s.ctx.Err() == nil {
|
||||
return errors.Join(errRegistrationGoal, err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
match := registration.Registered && (op.Request.TargetPLMN == "" || registration.PLMN == op.Request.TargetPLMN)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import {
|
||||
ArrowSync24Regular,
|
||||
Router24Regular,
|
||||
@@ -34,6 +34,7 @@ const isManagedBackend = computed(
|
||||
() => normalizeManagedDeviceBackend(configuredBackend.value) !== null
|
||||
)
|
||||
const isPCSCBackend = computed(() => configuredBackend.value === 'pcsc')
|
||||
const expandedSettings = ref<string[]>([])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -45,7 +46,7 @@ const isPCSCBackend = computed(() => configuredBackend.value === 'pcsc')
|
||||
<div>
|
||||
<span>DEVICE CONFIGURATION</span>
|
||||
<h2>设备配置</h2>
|
||||
<p>编辑数据库中的设备绑定;自动探测字段保持只读</p>
|
||||
<p>修改设备名称和连接协议,端口由系统自动识别。</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -58,7 +59,7 @@ const isPCSCBackend = computed(() => configuredBackend.value === 'pcsc')
|
||||
<el-input v-model="editConfig.name" placeholder="显示名称" />
|
||||
</div>
|
||||
<div class="config-field">
|
||||
<label>ID</label>
|
||||
<label>设备 ID</label>
|
||||
<el-input v-model="editConfig.id" disabled />
|
||||
</div>
|
||||
<div class="config-field">
|
||||
@@ -82,7 +83,7 @@ const isPCSCBackend = computed(() => configuredBackend.value === 'pcsc')
|
||||
<div class="config-protocol-field">
|
||||
<div>
|
||||
<strong>设备运行模式</strong>
|
||||
<small>协议切换保存后将触发设备重新绑定</small>
|
||||
<small>切换协议后,设备会重新连接。</small>
|
||||
</div>
|
||||
<el-radio-group
|
||||
v-if="isManagedBackend"
|
||||
@@ -115,14 +116,9 @@ const isPCSCBackend = computed(() => configuredBackend.value === 'pcsc')
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<p class="config-notice">协议或绑定配置变更可能导致设备短暂离线;保存仍使用现有设备配置接口。</p>
|
||||
<el-collapse v-if="!isPCSCBackend" class="mbn-settings">
|
||||
<el-collapse-item title="运营商配置(MBN)" name="mbn">
|
||||
<MBNPanel :device-id="editConfig.id" />
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
<p class="config-notice">更改连接协议后,设备会短暂离线。</p>
|
||||
<footer class="config-actions">
|
||||
<el-button type="danger" :loading="deleting" @click="emit('delete')" class="!border-0">
|
||||
<el-button type="danger" plain :loading="deleting" @click="emit('delete')">
|
||||
<el-icon><Delete24Regular /></el-icon>
|
||||
删除设备
|
||||
</el-button>
|
||||
@@ -138,6 +134,20 @@ const isPCSCBackend = computed(() => configuredBackend.value === 'pcsc')
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<el-collapse v-if="editConfig && !isPCSCBackend" v-model="expandedSettings" class="mbn-settings">
|
||||
<el-collapse-item name="mbn">
|
||||
<template #title>
|
||||
<span class="mbn-entry">
|
||||
<span class="mbn-entry-copy">
|
||||
<strong>运营商配置(MBN)</strong>
|
||||
<small>切换模组配置、上传文件或绑定 SIM。</small>
|
||||
</span>
|
||||
<span class="mbn-entry-action">{{ expandedSettings.includes('mbn') ? '收起' : '展开' }}</span>
|
||||
</span>
|
||||
</template>
|
||||
<MBNPanel :device-id="editConfig.id" />
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -160,13 +170,28 @@ const isPCSCBackend = computed(() => configuredBackend.value === 'pcsc')
|
||||
.config-protocol-field strong { display: block; color: var(--ui-text); font-size: var(--ui-font-body-sm); }
|
||||
.config-protocol-field small { display: block; margin-top: 2px; color: var(--ui-text-muted); font-size: var(--ui-font-caption); }
|
||||
.config-notice { margin: 0; padding: 11px 22px; border-top: 1px solid var(--ui-border); border-bottom: 1px solid var(--ui-border); background: color-mix(in srgb, var(--ui-warning) 6%, var(--ui-surface)); color: var(--ui-text-muted); font-size: var(--ui-font-body-sm); }
|
||||
.config-actions { min-height: 70px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
|
||||
.mbn-settings { margin-top: 18px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-xl); overflow: hidden; background: var(--ui-surface-strong); }
|
||||
.mbn-settings :deep(.el-collapse-item__header) { height: auto; min-height: 76px; padding: 18px 22px; line-height: 1.5; border: 0; background: var(--ui-surface-strong); color: var(--ui-text); }
|
||||
.mbn-settings :deep(.el-collapse-item__header:hover) { background: var(--ui-surface-muted); }
|
||||
.mbn-settings :deep(.el-collapse-item__header:focus-visible) { outline: 2px solid var(--ui-accent); outline-offset: -3px; }
|
||||
.mbn-settings :deep(.el-collapse-item__title) { min-width: 0; flex: 1; }
|
||||
.mbn-settings :deep(.el-collapse-item__wrap) { border: 0; background: var(--ui-surface-strong); }
|
||||
.mbn-settings :deep(.el-collapse-item__content) { padding: 22px; border-top: 1px solid var(--ui-border); }
|
||||
.mbn-entry { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; text-align: left; }
|
||||
.mbn-entry-copy { display: grid; flex: 1; gap: 4px; min-width: 0; }
|
||||
.mbn-entry-copy strong { color: var(--ui-text); font-size: var(--ui-font-body); font-weight: 650; }
|
||||
.mbn-entry-copy small { color: var(--ui-text-muted); font-size: var(--ui-font-body-sm); font-weight: 400; }
|
||||
.mbn-entry-action { margin: 0 12px; color: var(--ui-text-muted); font-size: var(--ui-font-body-sm); font-weight: 400; }
|
||||
.config-actions { min-height: 76px; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--ui-border); }
|
||||
.config-actions :deep(.el-button) { min-height: 44px; }
|
||||
.config-actions :deep(.el-icon) { margin-right: 6px; }
|
||||
.config-primary-actions { display: flex; align-items: center; gap: 10px; }
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.config-columns { grid-template-columns: minmax(0, 1fr); }
|
||||
.config-columns > section { padding: 18px 16px; }
|
||||
.config-columns > section + section { border-top: 1px solid var(--ui-border); border-left: 0; }
|
||||
.mbn-settings :deep(.el-collapse-item__header), .mbn-settings :deep(.el-collapse-item__content) { padding: 18px 16px; }
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
@@ -175,5 +200,6 @@ const isPCSCBackend = computed(() => configuredBackend.value === 'pcsc')
|
||||
.config-actions { align-items: stretch; flex-direction: column-reverse; }
|
||||
.config-actions :deep(.el-button) { width: 100%; min-height: 44px; margin-left: 0; }
|
||||
.config-primary-actions { width: 100%; flex-direction: column-reverse; }
|
||||
.mbn-entry-action { display: none; }
|
||||
}
|
||||
</style>
|
||||
@@ -1,15 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { ArrowUpload24Regular, Document24Regular } from '@vicons/fluent'
|
||||
import { mbnService, type MBNAsset } from '../services/mbn'
|
||||
const props = defineProps<{ assets: MBNAsset[]; blocked: boolean; canImport: boolean }>()
|
||||
const emit = defineEmits<{ refresh: []; error: [unknown]; import: [string] }>()
|
||||
const uploading = ref(false), model = ref(''), firmware = ref(''), source = ref('')
|
||||
const fileInput = ref<HTMLInputElement | null>(null)
|
||||
const fileName = ref(''), fileSaved = ref(false)
|
||||
async function upload(event: Event) {
|
||||
const input = event.target as HTMLInputElement, file = input.files?.[0]
|
||||
if (!file || props.blocked || uploading.value) return
|
||||
fileName.value = file.name
|
||||
fileSaved.value = false
|
||||
uploading.value = true
|
||||
try { await mbnService.upload(file, { model: model.value, firmware: firmware.value, source: source.value }); emit('refresh') }
|
||||
try { await mbnService.upload(file, { model: model.value, firmware: firmware.value, source: source.value }); fileSaved.value = true; emit('refresh') }
|
||||
catch (err) { emit('error', err) }
|
||||
finally { uploading.value = false; input.value = '' }
|
||||
}
|
||||
@@ -22,25 +27,60 @@ async function download(asset: MBNAsset) {
|
||||
}
|
||||
async function remove(asset: MBNAsset) {
|
||||
try {
|
||||
await ElMessageBox.confirm(`删除文件库中的 ${asset.name}?不会删除模组内配置。已被策略或操作记录引用的文件不能删除。`, '删除文件', { type: 'warning' })
|
||||
await ElMessageBox.confirm(`删除 ${asset.name}?只删除 HiDeck 保存的文件,不影响模组内的配置。正在使用的文件无法删除。`, '删除文件', { type: 'warning' })
|
||||
await mbnService.deleteFile(asset.id); emit('refresh')
|
||||
} catch (err) { if (err !== 'cancel' && err !== 'close') emit('error', err) }
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div class="mbn-files">
|
||||
<p>上传只保存原始文件,不导入、不激活。型号和固件是来源声明,不是兼容性验证。模组内置 MBN 不保证支持导出。</p>
|
||||
<el-form label-position="top" :disabled="blocked || uploading">
|
||||
<el-form-item label="适用型号(可选)"><el-input v-model="model" /></el-form-item>
|
||||
<el-form-item label="适用固件(可选)"><el-input v-model="firmware" /></el-form-item>
|
||||
<el-form-item label="文件来源"><el-input v-model="source" /></el-form-item>
|
||||
<label class="mbn-upload">{{ uploading ? '正在保存文件' : '选择原始 .mbn 文件保存到 HiDeck' }}<input type="file" accept=".mbn" :disabled="blocked || uploading" @change="upload" /></label>
|
||||
<p class="mbn-file-note">上传只保存文件。要写入模组,请在上传后点击“导入模组”。</p>
|
||||
<el-form label-position="top" class="mbn-file-form" :disabled="blocked || uploading">
|
||||
<el-form-item label="适用型号(可选)"><el-input v-model="model" placeholder="例如 EC20F" /></el-form-item>
|
||||
<el-form-item label="适用固件(可选)"><el-input v-model="firmware" placeholder="文件适用的固件版本" /></el-form-item>
|
||||
<el-form-item label="文件来源" class="mbn-source-field"><el-input v-model="source" placeholder="下载地址或提供方" /></el-form-item>
|
||||
<div class="mbn-upload">
|
||||
<el-icon class="mbn-upload-icon" aria-hidden="true"><ArrowUpload24Regular /></el-icon>
|
||||
<div class="mbn-upload-copy">
|
||||
<strong>上传 MBN 文件</strong>
|
||||
<p>选择 .mbn 文件,保留原始内容。</p>
|
||||
<span v-if="fileName" class="mbn-selected-file" aria-live="polite">{{ uploading ? '正在上传:' : fileSaved ? '已保存:' : '上次选择:' }}{{ fileName }}</span>
|
||||
</div>
|
||||
<el-button :loading="uploading" :disabled="blocked || uploading" @click="fileInput?.click()">{{ uploading ? '正在上传' : '选择文件' }}</el-button>
|
||||
<input ref="fileInput" class="mbn-file-input" type="file" accept=".mbn" :disabled="blocked || uploading" @change="upload" />
|
||||
</div>
|
||||
</el-form>
|
||||
<p v-if="!assets.length">文件库为空</p>
|
||||
<article v-for="asset in assets" :key="asset.id"><strong>{{ asset.name }}</strong><span>{{ asset.size.toLocaleString() }} 字节 · {{ asset.model || '型号未声明' }} · {{ asset.firmware || '固件未声明' }}</span><small>SHA-256:{{ asset.sha256 }}</small><span>来源:{{ asset.source || '未提供' }}</span><div><el-button @click="download(asset)">下载原文件</el-button><el-button :disabled="blocked || !canImport" @click="emit('import', asset.id)">导入模组</el-button><el-button type="danger" plain :disabled="blocked" @click="remove(asset)">删除文件</el-button></div></article>
|
||||
<p class="mbn-file-hint">请自行确认型号和固件是否匹配。这里不能导出模组内置的 MBN。</p>
|
||||
<div v-if="!assets.length" class="mbn-files-empty"><el-icon aria-hidden="true"><Document24Regular /></el-icon><strong>暂无文件</strong><p>点击“选择文件”上传 MBN。</p></div>
|
||||
<article v-for="asset in assets" :key="asset.id"><strong>{{ asset.name }}</strong><span>{{ asset.size.toLocaleString() }} 字节 · {{ asset.model || '型号未声明' }} · {{ asset.firmware || '固件未声明' }}</span><small>SHA-256:{{ asset.sha256 }}</small><span>来源:{{ asset.source || '未提供' }}</span><div class="mbn-file-actions"><el-button @click="download(asset)">下载原文件</el-button><el-button :disabled="blocked || !canImport" @click="emit('import', asset.id)">导入模组</el-button><el-button type="danger" plain :disabled="blocked" @click="remove(asset)">删除文件</el-button></div></article>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
.mbn-files, article { display: grid; gap: 12px; } p { line-height: 1.6; } article { padding: 16px; border: 1px solid var(--el-border-color-lighter); border-radius: 12px; overflow-wrap: anywhere; } article div { display: flex; gap: 8px; flex-wrap: wrap; } small { font-size: 13px; color: var(--el-text-color-secondary); }
|
||||
.mbn-upload { display: grid; gap: 8px; padding: 16px; border: 1px dashed var(--el-border-color); border-radius: 12px; } input { min-height: 44px; max-width: 100%; } :deep(.el-button) { min-height: 44px; margin-left: 0; }
|
||||
.mbn-files, article { display: grid; gap: 16px; min-width: 0; }
|
||||
p { margin: 0; line-height: 1.6; color: var(--ui-text-muted); }
|
||||
.mbn-file-note { font-size: 13px; max-width: 70ch; }
|
||||
.mbn-file-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
|
||||
.mbn-source-field, .mbn-upload { grid-column: 1 / -1; }
|
||||
.mbn-upload { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: var(--ui-surface-muted); }
|
||||
.mbn-upload-icon { width: 24px; height: 24px; flex-shrink: 0; color: var(--ui-text-muted); font-size: 24px; }
|
||||
.mbn-upload-copy { flex: 1; min-width: 0; }
|
||||
.mbn-upload-copy strong { font-size: var(--ui-font-body-sm); font-weight: 650; }
|
||||
.mbn-upload-copy p { margin-top: 4px; font-size: var(--ui-font-body-sm); }
|
||||
.mbn-selected-file { display: block; margin-top: 8px; font-size: 12px; overflow-wrap: anywhere; color: var(--ui-text); }
|
||||
.mbn-file-input { display: none; }
|
||||
.mbn-file-hint { font-size: 12px; }
|
||||
.mbn-files-empty { display: grid; justify-items: center; gap: 8px; padding: 24px 16px; border-radius: var(--ui-radius-md); background: var(--ui-surface-muted); text-align: center; }
|
||||
.mbn-files-empty .el-icon { color: var(--ui-text-muted); font-size: 24px; }
|
||||
.mbn-files-empty strong { font-size: var(--ui-font-body-sm); font-weight: 650; }
|
||||
.mbn-files-empty p { max-width: 42ch; font-size: 13px; }
|
||||
article { padding: 16px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); overflow-wrap: anywhere; }
|
||||
.mbn-file-actions { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
small { font-size: 13px; color: var(--ui-text-muted); }
|
||||
:deep(.el-button) { min-height: 44px; margin-left: 0; }
|
||||
@media (max-width: 600px) {
|
||||
.mbn-file-form { grid-template-columns: minmax(0, 1fr); }
|
||||
.mbn-upload { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; }
|
||||
.mbn-upload > .el-button { grid-column: 1 / -1; }
|
||||
.mbn-file-actions .el-button { flex: 1 1 120px; }
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, toRef, watch } from 'vue'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { ArrowSync24Regular, Document24Regular } from '@vicons/fluent'
|
||||
import { useMBN } from '../composables/useMBN'
|
||||
import { mbnStatusLabel, mbnStageLabel, mbnKindLabel, type MBNProfile } from '../services/mbn'
|
||||
import MBNFileLibrary from './MBNFileLibrary.vue'
|
||||
@@ -19,9 +20,9 @@ async function remove(profile: MBNProfile) {
|
||||
if (blocked.value) return
|
||||
const original = snapshot.value, id = props.deviceId, replacement = selected.value
|
||||
try {
|
||||
const result = await ElMessageBox.prompt(`此操作删除模组中的 ${profile.name},不是删除文件库。内置配置也可能无法恢复。请输入完整名称确认;使用中的配置将先切换到上方选择的替代配置。`, '永久删除 MBN', { inputValidator: value => value === profile.name || '名称必须完全一致', confirmButtonText: '确认无备份删除', cancelButtonText: '取消', type: 'warning' })
|
||||
const result = await ElMessageBox.prompt(`将从模组中删除 ${profile.name},删除后可能无法恢复。若正在使用,会先切换到你选的替代配置。请输入完整配置名确认。`, '删除模组配置', { inputValidator: value => value === profile.name || '请输入完整配置名', confirmButtonText: '确认删除', cancelButtonText: '取消', type: 'warning' })
|
||||
if (props.deviceId !== id || snapshot.value !== original) return
|
||||
await start({ kind: 'delete', profile: profile.name, confirm_name: result.value, accept_no_backup: true, replacement }, '确认已了解:配置快照不是二进制备份,删除后不保证能够恢复。')
|
||||
await start({ kind: 'delete', profile: profile.name, confirm_name: result.value, accept_no_backup: true, replacement }, '操作记录只保存配置选择,不是 MBN 文件备份。确认删除?删除后可能无法恢复。')
|
||||
} catch (err) { if (err !== 'cancel' && err !== 'close') report(err) }
|
||||
}
|
||||
function move(index: number, delta: number) {
|
||||
@@ -33,34 +34,39 @@ function move(index: number, delta: number) {
|
||||
|
||||
<template>
|
||||
<section class="mbn-panel" aria-label="运营商配置 MBN">
|
||||
<header><div><h3>运营商配置(MBN)</h3><p>影响模组驻网和漫游能力,不等同于 PLMN 选网,也不用于修复软件 WiFi calling。</p></div><el-button :loading="loading" :disabled="!!active" @click="inspect()">读取模组</el-button></header>
|
||||
<header class="mbn-panel-header"><p>MBN 用于模组驻网和原生 VoLTE,不是 WiFi calling 配置。</p><el-button :loading="loading" :disabled="!!active" @click="inspect()"><el-icon><ArrowSync24Regular /></el-icon>{{ snapshot ? '刷新配置' : '读取配置' }}</el-button></header>
|
||||
<el-alert v-if="error" :title="error" type="error" show-icon :closable="false" />
|
||||
<el-alert v-if="active" :title="`${mbnStatusLabel[active.status]} · ${mbnStageLabel[active.stage] || active.stage}`" type="info" :closable="false"><p>关闭页面不会取消任务。已发送的命令会等待终态,取消将在安全边界执行。</p><el-button :disabled="active.cancel_requested" @click="cancel">{{ active.cancel_requested ? '已请求取消' : '取消任务' }}</el-button></el-alert>
|
||||
<p v-if="!snapshot">尚未查询。点击“读取模组”只读取实际能力和配置,不修改设备。</p>
|
||||
<el-alert v-if="active" :title="`${mbnStatusLabel[active.status]} · ${mbnStageLabel[active.stage] || active.stage}`" type="info" :closable="false"><p>关闭页面后任务仍会继续。取消时,会先等待当前命令结束。</p><el-button :disabled="active.cancel_requested" @click="cancel">{{ active.cancel_requested ? '正在取消' : '取消任务' }}</el-button></el-alert>
|
||||
<div v-if="!snapshot" class="mbn-empty"><el-icon aria-hidden="true"><Document24Regular /></el-icon><div><strong>尚未读取配置</strong><p>点击“读取配置”查看模组内的 MBN,不会修改设备。</p></div></div>
|
||||
<template v-if="snapshot">
|
||||
<div class="mbn-summary"><strong>{{ current }}</strong><span>{{ snapshot.owner.model }} · {{ snapshot.owner.firmware }}</span><span>实际 AutoSel:{{ snapshot.autosel ? '开启' : '关闭' }}</span></div>
|
||||
<div class="mbn-summary">
|
||||
<div class="mbn-summary-current"><span>当前生效配置</span><strong>{{ current }}</strong></div>
|
||||
<div><span>模组与固件</span><strong>{{ snapshot.owner.model }}</strong><small>{{ snapshot.owner.firmware }}</small></div>
|
||||
<div><span>模组自动选择</span><strong>{{ snapshot.autosel ? '已开启' : '已关闭' }}</strong><small>AutoSel</small></div>
|
||||
</div>
|
||||
<el-tabs>
|
||||
<el-tab-pane label="模组配置">
|
||||
<el-form label-position="top" class="mbn-controls" :disabled="blocked">
|
||||
<el-form-item label="目标配置(删除时也用作替代配置)"><el-select v-model="selected" filterable placeholder="选择模组实际返回的配置"><el-option v-for="p in snapshot.profiles" :key="p.name" :label="p.name" :value="p.name" /></el-select></el-form-item>
|
||||
<el-form-item label="模组自动选择 AutoSel"><el-switch v-model="auto" /><span>开启后由模组决定配置,不是自动 PLMN 选网</span></el-form-item>
|
||||
<el-button type="primary" :disabled="!snapshot.capabilities.autosel || (!auto && (!selected || !snapshot.capabilities.select))" :loading="submitting" @click="start({ kind: 'apply', profile: selected, autosel: auto }, '应用后将重启模组,电话、短信和数据会暂时中断。不会修改飞行或运营商射频锁。继续?')">应用并重启模组</el-button>
|
||||
<el-form-item label="使用配置"><el-select v-model="selected" filterable placeholder="选择 MBN 配置"><el-option v-for="p in snapshot.profiles" :key="p.name" :label="p.name" :value="p.name" /></el-select><p class="mbn-field-hint">删除正在使用的配置前,请在这里选择替代配置。</p></el-form-item>
|
||||
<el-form-item label="自动选择(AutoSel)"><el-switch v-model="auto" /><span>由模组按 SIM 选择 MBN,不会切换运营商网络。</span></el-form-item>
|
||||
<el-button type="primary" :disabled="!snapshot.capabilities.autosel || (!auto && (!selected || !snapshot.capabilities.select))" :loading="submitting" @click="start({ kind: 'apply', profile: selected, autosel: auto }, '应用配置会重启模组,通话、短信和数据将暂时中断。不会解除飞行模式或射频限制。继续?')">应用并重启</el-button>
|
||||
</el-form>
|
||||
<ul class="mbn-profiles"><li v-for="p in snapshot.profiles" :key="p.name"><div><strong>{{ p.name }}</strong><small>{{ p.version || '版本未知' }} · {{ p.date || '日期未知' }} · 来源未知</small><span>selected:{{ p.selected ? '是' : '否' }} / activated:{{ p.activated ? '是' : '否' }}</span></div><el-button type="danger" plain :disabled="blocked || !snapshot.capabilities.delete" @click="remove(p)">删除</el-button></li></ul>
|
||||
<div class="mbn-list-heading"><h4>模组内配置</h4><span>{{ snapshot.profiles.length }} 项</span></div>
|
||||
<ul class="mbn-profiles"><li v-for="p in snapshot.profiles" :key="p.name"><div><strong>{{ p.name }}</strong><small>版本 {{ p.version || '未知' }} · 日期 {{ p.date || '未知' }}</small><div class="mbn-profile-status"><span v-if="p.activated" class="is-current">正在使用</span><span v-if="p.selected">已选择</span><span v-if="!p.selected && !p.activated">未启用</span></div></div><el-button type="danger" plain :disabled="blocked || !snapshot.capabilities.delete" @click="remove(p)">删除</el-button></li></ul>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文件库"><MBNFileLibrary :assets="assets" :blocked="blocked" :can-import="snapshot.capabilities.add" @refresh="refreshFiles" @error="report" @import="id => start({ kind: 'import', asset_id: id, accept_unknown_compatibility: true }, '外部 MBN 可能不兼容此固件。导入不会自动激活;请确认文件来源及型号。继续导入?')" /></el-tab-pane>
|
||||
<el-tab-pane label="SIM 策略"><MBNPolicyEditor :device-id="deviceId" :snapshot="snapshot" :assets="assets" :blocked="blocked" @error="report" /><el-button :disabled="blocked" @click="bindCurrent">将当前已生效配置绑定本 SIM</el-button></el-tab-pane>
|
||||
<el-tab-pane label="文件库"><MBNFileLibrary :assets="assets" :blocked="blocked" :can-import="snapshot.capabilities.add" @refresh="refreshFiles" @error="report" @import="id => start({ kind: 'import', asset_id: id, accept_unknown_compatibility: true }, '请确认文件适用于此模组和固件。不兼容的 MBN 可能导致无法驻网。导入后不会自动启用,继续?')" /></el-tab-pane>
|
||||
<el-tab-pane label="SIM 绑定"><MBNPolicyEditor :device-id="deviceId" :snapshot="snapshot" :assets="assets" :blocked="blocked" @error="report" /><el-button :disabled="blocked" @click="bindCurrent">绑定当前配置到此卡</el-button></el-tab-pane>
|
||||
<el-tab-pane label="自动试配">
|
||||
<p>仅手动开始,每个候选最多尝试一次;首次达到目标即停止。成功保留当前配置,是否绑定 SIM 由你决定。失败或取消会尝试恢复原配置。</p>
|
||||
<p>按顺序尝试所选配置,找到符合条件的就停止并保留。不自动绑定 SIM;失败或取消会尝试恢复原配置。</p>
|
||||
<el-form label-position="top" :disabled="blocked">
|
||||
<el-form-item label="候选(勾选顺序为执行顺序)"><el-checkbox-group v-model="candidates"><el-checkbox v-for="p in snapshot.profiles" :key="p.name" :value="p.name">{{ p.name }}</el-checkbox></el-checkbox-group></el-form-item>
|
||||
<el-form-item label="待测试配置(按勾选顺序尝试)"><el-checkbox-group v-model="candidates"><el-checkbox v-for="p in snapshot.profiles" :key="p.name" :value="p.name">{{ p.name }}</el-checkbox></el-checkbox-group></el-form-item>
|
||||
<ol class="mbn-order"><li v-for="(name, index) in candidates" :key="name"><span>{{ name }}</span><el-button :disabled="index === 0" @click="move(index, -1)">上移</el-button><el-button :disabled="index === candidates.length - 1" @click="move(index, 1)">下移</el-button></li></ol>
|
||||
<el-form-item label="验证目标"><el-select v-model="goal"><el-option label="稳定驻网(默认)" value="registration" /><el-option label="蜂窝数据连接与 HTTP 探测" value="data" /><el-option label="原生 IMS 注册(需已有 VoLTE 模式)" value="ims" /></el-select></el-form-item>
|
||||
<template v-if="goal === 'data'"><el-form-item label="探测 URL(经此模组的数据接口访问)"><el-input v-model="probeURL" placeholder="https://…" /></el-form-item><el-checkbox v-model="allowData">允许建立蜂窝数据连接并产生探测流量</el-checkbox></template>
|
||||
<el-checkbox v-if="goal === 'ims'" v-model="allowNativeIMS">允许启用原生 IMS 验证;不发送短信、不拨号</el-checkbox>
|
||||
<el-form-item label="测试目标"><el-select v-model="goal"><el-option label="稳定驻网" value="registration" /><el-option label="数据连接与网页访问" value="data" /><el-option label="原生 IMS 注册(需处于 VoLTE 模式)" value="ims" /></el-select></el-form-item>
|
||||
<template v-if="goal === 'data'"><el-form-item label="测试网址(使用此卡的蜂窝数据访问)"><el-input v-model="probeURL" placeholder="https://…" /></el-form-item><el-checkbox v-model="allowData">允许使用蜂窝数据测试,会产生流量。</el-checkbox></template>
|
||||
<el-checkbox v-if="goal === 'ims'" v-model="allowNativeIMS">允许测试原生 IMS 注册,不发短信、不拨号。</el-checkbox>
|
||||
<el-form-item label="限定 PLMN(可选,如 46001)"><el-input v-model="target" /></el-form-item>
|
||||
<div class="mbn-times"><el-form-item label="模组恢复(秒)"><el-input-number v-model="recovery" :min="1" /></el-form-item><el-form-item label="驻网等待(秒)"><el-input-number v-model="registration" :min="1" /></el-form-item><el-form-item label="连续稳定(秒)"><el-input-number v-model="stability" :min="1" /></el-form-item></div>
|
||||
<el-button type="primary" :disabled="!candidates.length || (goal === 'data' && (!allowData || !probeURL)) || (goal === 'ims' && !allowNativeIMS)" @click="start({ kind: 'trial', candidates, goal, target_plmn: target, recovery_seconds: recovery, registration_seconds: registration, stability_seconds: stability, probe_url: probeURL, allow_data: allowData, allow_native_ims: allowNativeIMS }, '此任务会逐个切换 MBN 并重启模组。不会发送测试短信或拨打电话;注册成功不代表通话和短信已验证。确认开始?')">开始试配</el-button>
|
||||
<el-button type="primary" :disabled="!candidates.length || (goal === 'data' && (!allowData || !probeURL)) || (goal === 'ims' && !allowNativeIMS)" @click="start({ kind: 'trial', candidates, goal, target_plmn: target, recovery_seconds: recovery, registration_seconds: registration, stability_seconds: stability, probe_url: probeURL, allow_data: allowData, allow_native_ims: allowNativeIMS }, '测试会逐个切换配置并重启模组,期间设备会离线。只验证所选目标,不测试通话和短信。确认开始?')">开始试配</el-button>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -70,15 +76,58 @@ function move(index: number, delta: number) {
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.mbn-panel { display: grid; gap: 20px; color: var(--el-text-color-primary); min-width: 0; }
|
||||
.mbn-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; color: var(--ui-text); min-width: 0; }
|
||||
header { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
|
||||
h3, h4, p { margin: 0; } p { line-height: 1.6; color: var(--el-text-color-regular); }
|
||||
.mbn-summary { display: grid; gap: 8px; padding: 16px; border-radius: 12px; background: var(--el-fill-color-light); overflow-wrap: anywhere; }
|
||||
.mbn-controls { margin: 16px 0; } .mbn-controls span { margin-left: 12px; }
|
||||
.mbn-profiles, .mbn-order { padding: 0; list-style: none; } .mbn-profiles li, .mbn-order li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--el-border-color-lighter); }
|
||||
.mbn-profiles li > div { display: grid; gap: 6px; flex: 1; overflow-wrap: anywhere; min-width: 0; } small { font-size: 13px; color: var(--el-text-color-secondary); }
|
||||
h4, p { margin: 0; } h4 { font-size: var(--ui-font-body); font-weight: 650; } p { line-height: 1.6; color: var(--ui-text-muted); }
|
||||
.mbn-panel-header > p { flex: 1; min-width: 200px; max-width: 60ch; font-size: var(--ui-font-body-sm); }
|
||||
.mbn-panel-header :deep(.el-icon) { margin-right: 6px; }
|
||||
.mbn-empty { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: var(--ui-surface-muted); }
|
||||
.mbn-empty > .el-icon { font-size: 24px; color: var(--ui-text-muted); }
|
||||
.mbn-empty strong { font-size: var(--ui-font-body-sm); }
|
||||
.mbn-empty p { margin-top: 4px; font-size: var(--ui-font-body-sm); }
|
||||
.mbn-summary { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .6fr); border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); background: var(--ui-surface-muted); overflow-wrap: anywhere; }
|
||||
.mbn-summary > div { display: grid; align-content: start; gap: 6px; padding: 16px; min-width: 0; }
|
||||
.mbn-summary > div + div { border-left: 1px solid var(--ui-border); }
|
||||
.mbn-summary span { font-size: var(--ui-font-caption); color: var(--ui-text-muted); }
|
||||
.mbn-summary strong { font-size: var(--ui-font-body-sm); font-weight: 650; }
|
||||
.mbn-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; margin: 0 0 26px; }
|
||||
.mbn-controls > .el-button { grid-column: 1 / -1; justify-self: start; }
|
||||
.mbn-controls span { margin-left: 12px; color: var(--ui-text-muted); font-size: var(--ui-font-body-sm); }
|
||||
.mbn-field-hint { margin-top: 6px; font-size: 12px; }
|
||||
.mbn-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
||||
.mbn-list-heading span { font-size: var(--ui-font-caption); color: var(--ui-text-muted); }
|
||||
.mbn-profiles, .mbn-order { padding: 0; list-style: none; } .mbn-profiles li, .mbn-order li { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--ui-border-muted); }
|
||||
.mbn-profiles { margin: 12px 0 0; }
|
||||
.mbn-profiles li:last-child { border-bottom: 0; }
|
||||
.mbn-profiles li > div { display: grid; gap: 6px; flex: 1; overflow-wrap: anywhere; min-width: 0; } small { font-size: var(--ui-font-caption); color: var(--ui-text-muted); }
|
||||
.mbn-profiles strong { font-size: var(--ui-font-body-sm); font-weight: 650; }
|
||||
.mbn-profile-status { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.mbn-profile-status span { font-size: var(--ui-font-caption); color: var(--ui-text-muted); }
|
||||
.mbn-profile-status span + span::before { content: '·'; margin-right: 6px; color: var(--ui-text-muted); }
|
||||
.mbn-profile-status .is-current { color: var(--ui-success); }
|
||||
.mbn-order li span { flex: 1; overflow-wrap: anywhere; } .mbn-times { display: flex; gap: 16px; flex-wrap: wrap; }
|
||||
.mbn-history { display: grid; gap: 12px; } article { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--el-border-color-lighter); border-radius: 12px; overflow-wrap: anywhere; }
|
||||
.mbn-error { color: var(--el-color-danger); } time { font-size: 13px; color: var(--el-text-color-secondary); }
|
||||
.mbn-history { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 22px; border-top: 1px solid var(--ui-border); } article { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-md); overflow-wrap: anywhere; }
|
||||
.mbn-error { color: var(--ui-danger); } time { font-size: var(--ui-font-caption); color: var(--ui-text-muted); }
|
||||
:deep(.el-form-item__label) { height: auto; margin-bottom: 6px; padding: 0; color: var(--ui-text-muted); font: 700 var(--ui-font-caption) "v-mono", ui-monospace, monospace; line-height: 1.5; letter-spacing: .08em; }
|
||||
:deep(.el-form-item__content) { min-width: 0; }
|
||||
:deep(.el-button) { min-height: 44px; margin-left: 0; } :deep(.el-checkbox) { height: auto; min-height: 44px; max-width: 100%; } :deep(.el-checkbox__label) { white-space: normal; overflow-wrap: anywhere; }
|
||||
:deep(.el-tabs__item.is-active) { color: var(--ui-text); font-weight: 650; }
|
||||
:deep(.el-tabs) { min-width: 0; }
|
||||
:deep(.el-tabs__active-bar) { background-color: var(--ui-accent); }
|
||||
:deep(.el-tab-pane > .el-form) { margin-top: 16px; }
|
||||
@media (max-width: 600px) {
|
||||
.mbn-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
|
||||
.mbn-summary-current { grid-column: 1 / -1; }
|
||||
.mbn-summary > div:nth-child(2) { border-left: 0; }
|
||||
.mbn-summary > div:not(:first-child) { border-top: 1px solid var(--ui-border); }
|
||||
.mbn-empty { padding: 16px; align-items: flex-start; }
|
||||
.mbn-panel-header { flex-direction: column; align-items: stretch; }
|
||||
.mbn-panel-header > p { min-width: 0; }
|
||||
.mbn-controls { grid-template-columns: minmax(0, 1fr); }
|
||||
.mbn-times { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
|
||||
.mbn-times :deep(.el-input-number) { width: 100%; }
|
||||
:deep(.el-tabs__nav) { display: flex; width: 100%; }
|
||||
:deep(.el-tabs__item) { flex: 1; min-width: 0; height: 44px; padding: 0 6px; font-size: 13px; }
|
||||
:deep(.el-form-item__content > .el-button) { width: 100%; }
|
||||
}
|
||||
</style>
|
||||
@@ -27,12 +27,12 @@ async function save() {
|
||||
const policy = { key: key.value, mode: mode.value, model: owner.model, firmware: owner.firmware, profile: profile.value, version: selected?.version || '', asset_id: asset.value, allow_import: allowImport.value }
|
||||
saving.value = true
|
||||
try {
|
||||
await ElMessageBox.confirm('保存后会在身份就绪时应用;固定配置不匹配型号/固件会明确报错,不会自动猜其他配置。', '保存 MBN 策略', { type: 'warning' })
|
||||
await ElMessageBox.confirm('下次识别到这张卡或模组时会应用此设置,可能重启模组。固定配置不适用于当前型号或固件时会报错,不会切换到其他配置。', '保存绑定设置', { type: 'warning' })
|
||||
if (current !== epoch) return
|
||||
await mbnService.savePolicy(id, policy)
|
||||
if (current !== epoch) return
|
||||
policies.value = [...policies.value.filter(item => item.key !== policy.key), policy]
|
||||
ElMessage.success('策略已保存')
|
||||
ElMessage.success('绑定设置已保存')
|
||||
} catch (err) { if (err !== 'cancel' && err !== 'close' && current === epoch) emit('error', err) }
|
||||
finally { if (current === epoch) saving.value = false }
|
||||
}
|
||||
@@ -40,11 +40,11 @@ onUnmounted(() => { epoch++ })
|
||||
</script>
|
||||
<template>
|
||||
<el-form label-position="top" :disabled="blocked || saving">
|
||||
<p>当前 SIM 尾号 {{ simTail }}。策略按这张卡保存,不按运营商品牌共享。</p>
|
||||
<el-form-item label="策略范围"><el-radio-group v-model="scope"><el-radio-button value="sim">本 SIM</el-radio-button><el-radio-button value="device">模组默认</el-radio-button></el-radio-group></el-form-item>
|
||||
<el-form-item label="配置方式"><el-select v-model="mode"><el-option :label="scope === 'sim' ? '继承模组默认' : '不托管,保持现有行为'" value="inherit" /><el-option label="模组 AutoSel" value="autosel" /><el-option label="固定 MBN" value="fixed" /></el-select></el-form-item>
|
||||
<template v-if="mode === 'fixed'"><el-form-item label="固定配置"><el-select v-model="profile" filterable><el-option v-for="item in snapshot.profiles" :key="item.name" :label="item.name" :value="item.name" /></el-select></el-form-item><el-form-item label="可恢复的原始文件(可选)"><el-select v-model="asset" clearable><el-option v-for="item in assets" :key="item.id" :label="item.name" :value="item.id" /></el-select></el-form-item><el-checkbox v-model="allowImport" :disabled="!asset">配置缺失时允许导入此文件;我确认来源和适配固件</el-checkbox></template>
|
||||
<el-button type="primary" :loading="saving" :disabled="mode === 'fixed' && !profile" @click="save">保存 MBN 策略</el-button>
|
||||
<p>{{ scope === 'sim' ? `仅对当前 SIM 生效(尾号 ${simTail}),其他卡不受影响。` : '没有单独绑定的 SIM 使用此设置。' }}</p>
|
||||
<el-form-item label="应用范围"><el-radio-group v-model="scope"><el-radio-button value="sim">当前 SIM</el-radio-button><el-radio-button value="device">模组默认</el-radio-button></el-radio-group></el-form-item>
|
||||
<el-form-item label="配置方式"><el-select v-model="mode"><el-option :label="scope === 'sim' ? '使用模组默认设置' : '保持模组现有设置'" value="inherit" /><el-option label="由模组自动选择(AutoSel)" value="autosel" /><el-option label="固定使用一个 MBN" value="fixed" /></el-select></el-form-item>
|
||||
<template v-if="mode === 'fixed'"><el-form-item label="固定配置"><el-select v-model="profile" filterable placeholder="选择 MBN 配置"><el-option v-for="item in snapshot.profiles" :key="item.name" :label="item.name" :value="item.name" /></el-select></el-form-item><el-form-item label="备用 MBN 文件(可选)"><el-select v-model="asset" clearable placeholder="从文件库选择"><el-option v-for="item in assets" :key="item.id" :label="item.name" :value="item.id" /></el-select></el-form-item><el-checkbox v-model="allowImport" :disabled="!asset">模组缺少此配置时允许导入备用文件;我已确认文件兼容。</el-checkbox></template>
|
||||
<el-button type="primary" :loading="saving" :disabled="mode === 'fixed' && !profile" @click="save">保存绑定设置</el-button>
|
||||
</el-form>
|
||||
</template>
|
||||
<style scoped>
|
||||
|
||||
@@ -77,13 +77,13 @@ export function useMBN(deviceID: Ref<string>) {
|
||||
if (!current) return
|
||||
const epoch = generation, id = deviceID.value
|
||||
const profile = current.profiles.find(item => item.selected && item.activated)
|
||||
if (!current.autosel && !profile) { error.value = '没有经过读回确认的当前配置'; return }
|
||||
if (!current.autosel && !profile) { error.value = '尚未确认生效配置,请刷新配置后再绑定。'; return }
|
||||
try {
|
||||
await ElMessageBox.confirm('将当前 MBN 绑定到本 SIM,换到此卡时会按型号和固件匹配后应用。不会绑定其他同运营商的卡。', '绑定当前 SIM', { type: 'warning' })
|
||||
await ElMessageBox.confirm('记住当前配置,下次使用这张卡时自动应用。仅绑定此卡;型号或固件不匹配时不会应用。', '绑定当前配置', { type: 'warning' })
|
||||
if (epoch !== generation) return
|
||||
await mbnService.savePolicy(id, { key: `sim:${current.owner.iccid}`, mode: current.autosel ? 'autosel' : 'fixed', model: current.owner.model, firmware: current.owner.firmware, profile: profile?.name || '', version: profile?.version || '', asset_id: '', allow_import: false })
|
||||
if (epoch !== generation) return
|
||||
ElMessage.success('SIM 策略已保存')
|
||||
ElMessage.success('当前配置已绑定到此卡')
|
||||
} catch (err) { if (err !== 'cancel' && err !== 'close' && epoch === generation) report(err) }
|
||||
}
|
||||
watch(deviceID, () => {
|
||||
|
||||
@@ -37,11 +37,11 @@ export const mbnService = {
|
||||
|
||||
export const mbnRunning = (op: MBNOperation) => ['queued', 'running', 'cancelling'].includes(op.status)
|
||||
export const mbnStatusLabel: Record<string, string> = {
|
||||
queued: '排队中', running: '执行中', cancelling: '等待安全取消', succeeded: '已完成', failed: '失败', cancelled: '已取消', needs_attention: '需要处理'
|
||||
queued: '排队中', running: '执行中', cancelling: '正在取消', succeeded: '已完成', failed: '失败', cancelled: '已取消', needs_attention: '需要处理'
|
||||
}
|
||||
export const mbnKindLabel: Record<string, string> = { apply: '应用配置', import: '导入模组', delete: '删除配置', trial: '自动试配', restore: '恢复配置' }
|
||||
export const mbnStageLabel: Record<string, string> = {
|
||||
queued: '排队', reading_original: '读取原配置', original_saved: '原配置已保存', preparing: '准备并暂停现有业务', applying: '写入配置', waiting_reboot: '等待模组重启',
|
||||
verifying: '读回校验', uploading_to_modem: '传输文件', importing: '导入配置', deleting: '删除配置', restoring: '恢复原配置',
|
||||
observing_registration: '观察驻网稳定性', candidate_complete: '候选验证结束', restored: '原配置已恢复', resuming: '恢复业务状态'
|
||||
queued: '等待执行', reading_original: '读取原配置', original_saved: '已记录原配置', preparing: '暂停通话和数据服务', applying: '写入配置', waiting_reboot: '等待模组重启',
|
||||
verifying: '确认配置已生效', uploading_to_modem: '传输文件', importing: '导入配置', deleting: '删除配置', restoring: '恢复原配置',
|
||||
observing_registration: '等待稳定驻网', candidate_complete: '当前配置测试结束', restored: '原配置已恢复', resuming: '恢复通话和数据服务'
|
||||
}
|
||||
Vendored
+4
-1
@@ -6,6 +6,8 @@ import 'element-plus/theme-chalk/dark/css-vars.css'
|
||||
import '../../src/style.css'
|
||||
import { api } from '../../src/stores/auth'
|
||||
import MBNPanel from '../../src/components/MBNPanel.vue'
|
||||
import DeviceConfigTab from '../../src/components/DeviceConfigTab.vue'
|
||||
import type { DeviceConfigDTO } from '../../src/types/api'
|
||||
|
||||
const query = new URLSearchParams(location.search)
|
||||
if (query.has('dark')) document.documentElement.classList.add('dark')
|
||||
@@ -16,4 +18,5 @@ api.defaults.adapter = async config => {
|
||||
const data = config.url?.endsWith('/mbn') ? { owner, profiles, autosel: true, capabilities: { list: true, select: true, autosel: true, add: true, delete: true, export: false } } : { items: [] }
|
||||
return { config, data, status: 200, statusText: 'fixture', headers: {} }
|
||||
}
|
||||
createApp({ render: () => h('main', { style: { maxWidth: query.has('mobile') ? '375px' : '960px', margin: '24px auto', padding: '16px', background: 'var(--el-bg-color)' } }, [h('p', { style: 'margin-bottom:16px' }, '只读 UI 测试数据 · 未连接真实模组'), h(MBNPanel, { deviceId: 'fixture' })]) }).use(ElementPlus).mount('#app')
|
||||
const editConfig: DeviceConfigDTO = { id: 'fixture', name: '测试模组', modem_imei: 'fixture-imei', device_backend: 'qmi', interface: 'wwan0', at_port: '/dev/ttyUSB2', control_device: '/dev/cdc-wdm0', usb_path: '3-2.2' }
|
||||
createApp({ render: () => h('main', { style: { maxWidth: query.has('mobile') ? '375px' : '960px', margin: '24px auto', padding: '16px', background: 'var(--el-bg-color)' } }, [h('p', { style: 'margin-bottom:16px' }, '只读 UI 测试数据 · 未连接真实模组'), query.has('config') ? h(DeviceConfigTab, { editConfig, saving: false, deleting: false, retryingPin: false }) : h(MBNPanel, { deviceId: 'fixture' })]) }).use(ElementPlus).mount('#app')
|
||||
@@ -23,6 +23,9 @@ const deviceTypographyFiles = [
|
||||
'../src/components/DeviceAtTab.vue',
|
||||
'../src/components/DeviceUssdTab.vue',
|
||||
'../src/components/DeviceConfigTab.vue',
|
||||
'../src/components/MBNPanel.vue',
|
||||
'../src/components/MBNFileLibrary.vue',
|
||||
'../src/components/MBNPolicyEditor.vue',
|
||||
'../src/components/CardPolicyPanel.vue'
|
||||
] as const
|
||||
const proxyTypographyFiles = [
|
||||
|
||||
Reference in new issue
Block a user