diff --git a/src/Web/AdminPanel/Pages/LogFiles.razor b/src/Web/AdminPanel/Pages/LogFiles.razor index 49ecc4a..3fc58d4 100644 --- a/src/Web/AdminPanel/Pages/LogFiles.razor +++ b/src/Web/AdminPanel/Pages/LogFiles.razor @@ -143,6 +143,11 @@ private const int LiveUpdateIntervalMs = 2000; private const string TerminalElementId = "log-terminal"; + // The admin panel publishes its static web assets under _content/, so a path relative + // to the page url ("./Pages/...") does not resolve. Mirrors ThemeSelector and MapEditor. + private static readonly string JsModulePath = + $"./_content/{typeof(LogFiles).Assembly.GetName().Name}/Pages/{nameof(LogFiles)}.razor.js"; + private readonly List _files = new(); private FileInfo? _selectedFile; private long _lastFileLength; @@ -187,7 +192,7 @@ { try { - this._jsModule = await this.JSRuntime.InvokeAsync("import", "./Pages/LogFiles.razor.js"); + this._jsModule = await this.JSRuntime.InvokeAsync("import", JsModulePath); } catch (JSException ex) {