新增下载目录整理、修复计划任务状态回显并优化启动检测速度
- 下载目录整理:按当天日期在下载目录内建子目录,文件按类型分类(安装包/压缩包/文档/图片/视频/音频/其他),文件夹进日期目录根;跳过下载中临时文件、日期格式旧目录和系统项;支持撤销与每月计划任务 - 修复:重开软件后目录整理页现在回填已保存配置,并以任务计划程序实际状态为准显示开关;撤销按 profile 过滤,桌面与下载互不干扰 - 性能:激活状态查询移出启动流程,仅在 KMS 页/相关操作/手动刷新时按需执行;Defender 状态后台异步刷新;新增状态缓存供下次启动首显 - 去除 D:\desktop 硬编码默认值;Verification 增加下载整理、同日合并、排除规则与撤销过滤测试
This commit is contained in:
@@ -21,6 +21,9 @@ public enum ToolboxCommandKind
|
||||
ArchiveDesktop,
|
||||
UndoDesktopArchive,
|
||||
ConfigureDesktopSchedule,
|
||||
TidyDownloads,
|
||||
UndoDownloadsTidy,
|
||||
ConfigureDownloadsSchedule,
|
||||
ActivateWindowsKms,
|
||||
RestoreKmsConfiguration
|
||||
}
|
||||
@@ -102,6 +105,14 @@ public sealed record DesktopArchiveProfile
|
||||
public TimeOnly RunAt { get; init; } = new(9, 0);
|
||||
}
|
||||
|
||||
public sealed record DownloadsTidyProfile
|
||||
{
|
||||
public string Id { get; init; } = "downloads";
|
||||
public bool RenameOnCollision { get; init; } = true;
|
||||
public int MonthlyDay { get; init; } = 1;
|
||||
public TimeOnly RunAt { get; init; } = new(9, 0);
|
||||
}
|
||||
|
||||
public sealed record ArchivedFile(string OriginalPath, string ArchivedPath, long Length, bool IsDirectory = false);
|
||||
|
||||
public sealed record ArchiveManifest
|
||||
@@ -143,6 +154,15 @@ public static class JsonDefaults
|
||||
};
|
||||
}
|
||||
|
||||
public sealed record StatusCache
|
||||
{
|
||||
public DateTimeOffset UpdatedAt { get; init; } = DateTimeOffset.Now;
|
||||
public bool? DefenderRealtimeProtectionEnabled { get; init; }
|
||||
public bool? TamperProtectionEnabled { get; init; }
|
||||
public string ActivationStatus { get; init; } = "未知";
|
||||
public string? PartialProductKey { get; init; }
|
||||
}
|
||||
|
||||
public static class ToolboxPaths
|
||||
{
|
||||
public static string UserRoot => Path.Combine(
|
||||
@@ -157,6 +177,7 @@ public static class ToolboxPaths
|
||||
public static string Profiles => Path.Combine(UserRoot, "Profiles");
|
||||
public static string Manifests => Path.Combine(UserRoot, "ArchiveManifests");
|
||||
public static string Logs => Path.Combine(UserRoot, "Logs");
|
||||
public static string Cache => Path.Combine(UserRoot, "Cache");
|
||||
public static string Snapshots => Path.Combine(MachineRoot, "Snapshots");
|
||||
public static string Assets => Path.Combine(MachineRoot, "Assets");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user