feat: 在前端显示编译过程中的日志 (#67)

Reviewed-on: PostGuard/Canon#67
This commit is contained in:
2024-04-29 23:55:36 +08:00
parent 4d325569fa
commit 911c813996
15 changed files with 243 additions and 204 deletions

View File

@@ -20,6 +20,9 @@ public class CompileResponse
[Required]
public string CompileTime { get; set; }
[Required]
public string CompileInformation { get; set; }
public CompileResponse()
{
Id = string.Empty;
@@ -27,6 +30,7 @@ public class CompileResponse
CompiledCode = string.Empty;
ImageAddress = string.Empty;
CompileTime = string.Empty;
CompileInformation = string.Empty;
}
public CompileResponse(CompileResult result)
@@ -36,5 +40,6 @@ public class CompileResponse
CompiledCode = result.CompiledCode;
ImageAddress = $"/api/file/{result.SytaxTreeImageFilename}";
CompileTime = result.CompileTime.AddHours(8).ToString("yyyy-MM-dd HH:mm:ss");
CompileInformation = result.CompileInformation;
}
}