fix: 修复目录配置回显问题,系统设置页面卡片宽度调整为100%
This commit is contained in:
@@ -414,13 +414,25 @@ func (s *ScanService) Status() ScanStatus {
|
||||
}
|
||||
}
|
||||
|
||||
// 从数据库读取最新的目录配置(支持运行时修改后立即生效)
|
||||
rootDir := s.rootDir
|
||||
destDir := s.destDir
|
||||
if s.store != nil {
|
||||
if v := s.store.GetConfig(ConfigKeyScanDir); v != "" {
|
||||
rootDir = v
|
||||
}
|
||||
if v := s.store.GetConfig(ConfigKeyDestDir); v != "" {
|
||||
destDir = v
|
||||
}
|
||||
}
|
||||
|
||||
return ScanStatus{
|
||||
State: s.state,
|
||||
Message: s.msg,
|
||||
Started: s.started.Format("2006-01-02 15:04:05"),
|
||||
Elapsed: elapsed,
|
||||
RootDir: s.rootDir,
|
||||
DestDir: s.destDir,
|
||||
RootDir: rootDir,
|
||||
DestDir: destDir,
|
||||
// 复制一份日志再返回,避免前端拿到后修改到我们内部的数据
|
||||
Lines: append([]string{}, s.lines...),
|
||||
Stage: s.stage,
|
||||
|
||||
Reference in New Issue
Block a user