Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ nCrunchTemp_*
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

Expand Down
3 changes: 0 additions & 3 deletions docs-website/docs/getting-started/from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ Windows; it runs under Linux and macOS as well.
* [PostgreSQL](https://www.postgresql.org/download/) installed
* Visual Studio 2026, with the workloads for *ASP.NET Web development* and
*.NET Desktop development*. Please keep it up-to-date to prevent issues.
* The Visual Studio extension
[Web Compiler 2022+](https://marketplace.visualstudio.com/items?itemName=Failwyn.WebCompiler64),
if you plan to edit SCSS files of the admin panel
* [.NET SDK 10](https://dotnet.microsoft.com/download/dotnet/10.0) — it should
already be included in Visual Studio 2026
```powershell
Expand Down
1 change: 0 additions & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<PackageVersion Include="BCrypt.Net-Next" Version="4.0.3" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
<PackageVersion Include="BlazorInputFile" Version="0.2.0" />
<PackageVersion Include="BuildWebCompiler2022" Version="1.14.15" />
<PackageVersion Include="DG.AdvancedDataGridView" Version="1.2.30115.18" />
<PackageVersion Include="Dapr.AspNetCore" Version="1.16.1" />
<PackageVersion Include="Dapr.Client" Version="1.16.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ else
<div>
<span id="major-addon">@Resources.MajorVersion</span>
</div>
<InputNumber id="patchVersionMajorInput" @bind-Value=@this.Configuration.CurrentVersionMajor aria-describedby="major-addon"/>
<InputNumber id="patchVersionMajorInput" class="form-control" @bind-Value=@this.Configuration.CurrentVersionMajor aria-describedby="major-addon"/>
<ValidationMessage For="@(() => this.Configuration.CurrentVersionMajor)"/>
</div>
<div>
<div>
<span id="minor-addon">@Resources.MinorVersion</span>
</div>
<InputNumber id="patchVersionMinorInput" @bind-Value=@this.Configuration.CurrentVersionMinor aria-describedby="minor-addon"/>
<InputNumber id="patchVersionMinorInput" class="form-control" @bind-Value=@this.Configuration.CurrentVersionMinor aria-describedby="minor-addon"/>
<ValidationMessage For="@(() => this.Configuration.CurrentVersionMinor)"/>
</div>
<div>
<div>
<span id="patch-addon">@Resources.Patch</span>
</div>
<InputNumber id="patchVersionPatchInput" @bind-Value=@this.Configuration.CurrentVersionPatch aria-describedby="patch-addon"/>
<InputNumber id="patchVersionPatchInput" class="form-control" @bind-Value=@this.Configuration.CurrentVersionPatch aria-describedby="patch-addon"/>
<ValidationMessage For="@(() => this.Configuration.CurrentVersionPatch)"/>
</div>
</div>
Expand All @@ -43,7 +43,7 @@ else
<div>
<span id="ftp-addon">ftp://</span>
</div>
<InputText @bind-Value=@this.Configuration.PatchAddress aria-describedby="ftp-addon"/>
<InputText class="form-control" @bind-Value=@this.Configuration.PatchAddress aria-describedby="ftp-addon"/>
</div>
</div>
<BooleanField Id="disconnectOnUnknownPacketInput" Label=@typeof(ConnectServerDefinition).GetPropertyCaption(nameof(ConnectServerDefinition.DisconnectOnUnknownPacket)) @bind-Value="@Configuration.DisconnectOnUnknownPacket"/>
Expand All @@ -56,7 +56,7 @@ else
<InputCheckbox class="form-check-input" id="checkMaxConnectionsPerAddressInput" @bind-Value=@this.Configuration.CheckMaxConnectionsPerAddress/>
</span>
</div>
<InputNumber min="1" @bind-Value=@this.Configuration.MaxConnectionsPerAddress aria-describedby="connections-addon"/>
<InputNumber min="1" class="form-control" @bind-Value=@this.Configuration.MaxConnectionsPerAddress aria-describedby="connections-addon"/>
<ValidationMessage For="@(() => this.Configuration.MaxConnectionsPerAddress)"/>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/Web/AdminPanel/MUnique.OpenMU.Web.AdminPanel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,9 @@
<StaticWebAsset Include="@(_StaticWebAsset-&gt;Distinct())" />
</ItemGroup>
</Target>

<!-- Rewrites the SDK's root-relative scoped-css bundle @imports so they resolve
from this project's StaticWebAssetBasePath (and under UsePathBase).
See the shared targets file for the full explanation. -->
<Import Project="..\ScopedCssBundleImports.targets" />
</Project>
7 changes: 4 additions & 3 deletions src/Web/AdminPanel/Pages/LogFiles.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<!-- Left Column: File List -->
<div class="@(this._selectedFile != null ? "col-lg-3 col-md-4" : "col-12") transition-all">
<div class="card shadow-sm border-0 mb-4">
<div class="card-header bg-light py-2 px-3">
<div class="card-header py-2 px-3">
<div class="d-flex justify-content-between align-items-center">
<strong class="m-0">@Resources.LogFiles</strong>
<button type="button" class="btn btn-sm btn-outline-secondary py-0 px-2" @onclick="this.RefreshFileList" title="@Resources.ReloadFileList">
Expand All @@ -25,7 +25,7 @@
</div>
<div class="card-body p-0" style="max-height: 620px; overflow-y: auto;">
<table class="table table-striped table-hover mb-0">
<thead class="table-light">
<thead>
<tr>
<th>@Resources.FileName</th>
@if (this._selectedFile == null)
Expand Down Expand Up @@ -143,6 +143,7 @@
private const long LogReadBufferSizeBytes = 102400; // 100 KB
private const int LiveUpdateIntervalMs = 2000;
private const string TerminalElementId = "log-terminal";
private const string JsModulePath = "./_content/MUnique.OpenMU.Web.AdminPanel/Pages/LogFiles.razor.js";

private readonly List<FileInfo> _files = new();
private FileInfo? _selectedFile;
Expand Down Expand Up @@ -188,7 +189,7 @@
{
try
{
this._jsModule = await this.JSRuntime.InvokeAsync<IJSObjectReference>("import", "./Pages/LogFiles.razor.js");
this._jsModule = await this.JSRuntime.InvokeAsync<IJSObjectReference>("import", JsModulePath);
}
catch (JSException ex)
{
Expand Down
4 changes: 0 additions & 4 deletions src/Web/ItemEditor/MUnique.OpenMU.Web.ItemEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<Content Remove="compilerconfig.json" />
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions src/Web/Map/MUnique.OpenMU.Web.Map.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@
<ProjectReference Include="..\Shared\MUnique.OpenMU.Web.Shared.csproj" />
</ItemGroup>

<!-- Rewrites the SDK's root-relative scoped-css bundle @imports so they resolve
from this project's StaticWebAssetBasePath (and under UsePathBase).
See the shared targets file for the full explanation. -->
<Import Project="..\ScopedCssBundleImports.targets" />

</Project>
43 changes: 43 additions & 0 deletions src/Web/ScopedCssBundleImports.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<Project>
<!--
The SDK emits root-relative @import rules (e.g. @import '_content/...') in a project's
scoped css bundle, assuming the bundle is served from the web root. Projects served from
a StaticWebAssetBasePath instead (like the importers of this file) break that assumption:
browsers resolve the imports against the bundle URL and request a doubled path
(/_content/<Project>/_content/...), which returns 404.

The imports are rewritten as base-relative (../../_content/...) after bundling. The bundle
is always served exactly two segments deep (<base>/<Project>/x.styles.css), so this works
both at the site root and under UsePathBase (e.g. PATH_BASE=/map in the Dapr hosts).
The replace is idempotent: rewritten lines no longer match the _content/ pattern.

Matching covers single- and double-quoted forms; a future url() form would silently
no-op - check here first if these 404s ever come back.

Note: the bundle path below is reconstructed from SDK internals
($(IntermediateOutputPath)scopedcss/bundle/$(PackageId).styles.css). If the SDK moves it,
or if PackageId ever differs from the bundle file name, the Exists condition silently
skips this target - look here first if these 404s ever come back.
-->
<UsingTask TaskName="AbsolutizeScopedCssBundleImports" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<BundleFile ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System.IO" />
<Using Namespace="System.Text.RegularExpressions" />
<Code Type="Fragment" Language="cs"><![CDATA[
var text = File.ReadAllText(BundleFile);
var fixedText = Regex.Replace(text, @"@import(\s*)(['""])_content/", "@import$1$2../../_content/");
if (fixedText != text)
{
File.WriteAllText(BundleFile, fixedText);
}
]]></Code>
</Task>
</UsingTask>

<Target Name="_AbsolutizeScopedCssBundleImports" AfterTargets="BundleScopedCssFiles" Condition="Exists('$(IntermediateOutputPath)scopedcss/bundle/$(PackageId).styles.css')">
<AbsolutizeScopedCssBundleImports BundleFile="$(IntermediateOutputPath)scopedcss/bundle/$(PackageId).styles.css" />
</Target>
</Project>
12 changes: 11 additions & 1 deletion src/Web/Shared/Exports.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,17 @@ private static IEnumerable<string> SharedStylesheets
{
get
{
yield return $"{GetPrefix()}/css/shared.css";
var prefix = GetPrefix();
yield return $"{prefix}/css/bootstrap.min.css";
yield return $"{prefix}/css/open-iconic/font/css/open-iconic-bootstrap.min.css";
yield return $"{prefix}/css/theme.css";
yield return $"{prefix}/css/navigation.css";
yield return $"{prefix}/css/main.css";
yield return $"{prefix}/css/forms.css";
yield return $"{prefix}/css/tables.css";
yield return $"{prefix}/css/common.css";
yield return $"{prefix}/css/log.css";
yield return $"{prefix}/css/map-editor.css";
}
}

Expand Down
18 changes: 0 additions & 18 deletions src/Web/Shared/MUnique.OpenMU.Web.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
<None Remove="wwwroot\js\**" />
</ItemGroup>

<ItemGroup>
<Content Remove="compilerconfig.json" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\..\..\bin\Debug\</OutputPath>
<DocumentationFile>..\..\..\bin\Debug\MUnique.OpenMU.Web.Shared.xml</DocumentationFile>
Expand All @@ -38,7 +34,6 @@
</ItemGroup>

<ItemGroup>
<None Include="compilerconfig.json" />
<None Include="wwwroot\css\open-iconic\FONT-LICENSE" />
<None Include="wwwroot\css\open-iconic\font\css\open-iconic-bootstrap.min.css" />
<None Include="wwwroot\css\open-iconic\font\fonts\open-iconic.eot" />
Expand Down Expand Up @@ -76,23 +71,10 @@
</Compile>
</ItemGroup>

<ItemGroup Condition="'$(ci)'!='true' and '$(OS)'=='Windows_NT'">
<PackageReference Include="BuildWebCompiler2022" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\GameLogic\MUnique.OpenMU.GameLogic.csproj" />
<ProjectReference Include="..\..\Persistence\MUnique.OpenMU.Persistence.csproj" />
<ProjectReference Include="..\ItemEditor\MUnique.OpenMU.Web.ItemEditor.csproj" />
</ItemGroup>

<Target Name="CompileSass" BeforeTargets="Build" Condition="'$(ci)'!='true' and '$(OS)'!='Windows_NT'">
<Exec Command="sass --version" IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="SassExists"/>
</Exec>
<Error Condition="'$(SassExists)'!='0'" Text="Dart Sass not installed. Install with: npm install -g sass."/>
<Exec Command="sass --quiet --style=expanded --no-source-map Styles/Site.scss wwwroot/css/shared.css" />
<Exec Command="sass --quiet --style=compressed --no-source-map Styles/Site.scss wwwroot/css/shared.min.css" />
</Target>

</Project>
28 changes: 0 additions & 28 deletions src/Web/Shared/Styles/Common.scss

This file was deleted.

88 changes: 0 additions & 88 deletions src/Web/Shared/Styles/Forms.scss

This file was deleted.

Loading
Loading