푸터: 오류 처리 개선 및 간소화
This commit is contained in:
@@ -2,30 +2,17 @@
|
|||||||
string versionText = "unknown";
|
string versionText = "unknown";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 여러 위치에서 version.txt를 찾음
|
var versionFile = System.IO.Path.Combine(AppContext.BaseDirectory, "wwwroot", "version.txt");
|
||||||
var possiblePaths = new[]
|
if (System.IO.File.Exists(versionFile))
|
||||||
{
|
{
|
||||||
System.IO.Path.Combine(AppContext.BaseDirectory, "wwwroot", "version.txt"),
|
var content = System.IO.File.ReadAllText(versionFile).Trim();
|
||||||
System.IO.Path.Combine(AppContext.BaseDirectory, "version.txt"),
|
versionText = content;
|
||||||
"/home/kjh2064/taxbaik_active/wwwroot/version.txt"
|
|
||||||
};
|
|
||||||
|
|
||||||
foreach (var path in possiblePaths)
|
|
||||||
{
|
|
||||||
if (System.IO.File.Exists(path))
|
|
||||||
{
|
|
||||||
var lines = System.IO.File.ReadAllLines(path);
|
|
||||||
var versionLine = lines.FirstOrDefault(l => l.StartsWith("Version:"));
|
|
||||||
var builtLine = lines.FirstOrDefault(l => l.StartsWith("Built:"));
|
|
||||||
if (versionLine != null && builtLine != null)
|
|
||||||
{
|
|
||||||
versionText = $"{versionLine.Replace("Version:", "").Trim()} | {builtLine.Replace("Built:", "").Trim()}";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch { }
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
versionText = $"error: {ex.GetType().Name}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<footer class="bg-light border-top mt-5 py-4">
|
<footer class="bg-light border-top mt-5 py-4">
|
||||||
|
|||||||
@@ -24,7 +24,18 @@
|
|||||||
<main role="main" class="pb-5">
|
<main role="main" class="pb-5">
|
||||||
@RenderBody()
|
@RenderBody()
|
||||||
</main>
|
</main>
|
||||||
<partial name="_Footer" />
|
@try
|
||||||
|
{
|
||||||
|
@await Html.PartialAsync("_Footer");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
<footer class="bg-light border-top mt-5 py-4">
|
||||||
|
<div class="container text-center small text-muted">
|
||||||
|
<p>© 2026 백원숙 세무회계</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
}
|
||||||
|
|
||||||
<!-- Mobile Fixed CTA -->
|
<!-- Mobile Fixed CTA -->
|
||||||
<div class="mobile-cta-bar d-lg-none">
|
<div class="mobile-cta-bar d-lg-none">
|
||||||
|
|||||||
Reference in New Issue
Block a user