Skip to content
Merged
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
10 changes: 5 additions & 5 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy Apollo
env:
PUBLISH_DIR: Apollo.Client/bin/Release/net9.0/publish/wwwroot
PUBLISH_DIR: Apollo.Client/bin/Release/net10.0/publish/wwwroot

on:
# Runs on pushes targeting the default branch and PRs
push:
paths:
- Apollo.*/**
- '.github/workflows/static.yml'
- ".github/workflows/static.yml"
branches:
- main
pull_request:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Get latest .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0'
dotnet-version: "9.0"

- name: Install .Net WASM workload
run: dotnet workload install wasm-tools
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Get latest .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0'
dotnet-version: "9.0"

- name: Install .Net WASM workload
run: dotnet workload install wasm-tools
Expand All @@ -83,7 +83,7 @@ jobs:
with:
html_path: ${{ env.PUBLISH_DIR }}/index.html
base_href: /Apollo/

- name: Setup Pages
uses: actions/configure-pages@v5

Expand Down
2 changes: 1 addition & 1 deletion Apollo.Analysis.Worker/Apollo.Analysis.Worker.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion Apollo.Analysis/Apollo.Analysis.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
14 changes: 8 additions & 6 deletions Apollo.Client/Apollo.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
<AssemblyVersion>0.0.1.0</AssemblyVersion>
<Company>Mythetech</Company>
<Product>Apollo Code Editor</Product>
<WasmEnableStreamingResponse>false</WasmEnableStreamingResponse>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KristofferStrube.Blazor.WebWorkers" Version="0.1.0-alpha.7" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.5" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="9.0.0" />
<PackageReference Include="System.Security.Permissions" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="10.0.0" />
<PackageReference Include="Mythetech.Components.WebAssembly" Version="0.0.8" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="10.0.0" />
<PackageReference Include="System.Security.Permissions" Version="10.0.0" />
<PackageReference Include="xunit" Version="2.9.2" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions Apollo.Client/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<base href="/" />
<link rel="stylesheet" href="css/app.css" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
<link href="_content/Mythetech.Components/mythetech.css" rel="stylesheet" />
<link rel="stylesheet" href="_content/Apollo.Components/app.css" />
<link href="https://fonts.googleapis.com/css2?family=Gotu&display=swap" rel="stylesheet">

Expand Down
2 changes: 1 addition & 1 deletion Apollo.Compilation.Worker/Apollo.Compilation.Worker.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion Apollo.Compilation/Apollo.Compilation.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Apollo.Compliation</RootNamespace>
Expand Down
9 changes: 3 additions & 6 deletions Apollo.Components/Apollo.Components.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Company>Mythetech</Company>
Expand All @@ -20,12 +20,9 @@
<PackageReference Include="CSharpier.Core" Version="0.30.6" />
<PackageReference Include="KristofferStrube.Blazor.FileSystem" Version="0.3.1" />
<PackageReference Include="KristofferStrube.Blazor.FileSystemAccess" Version="3.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Analyzers" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.1" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.4" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.13.2" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.12.0" />
<PackageReference Include="MudBlazor" Version="8.0.0" />
<PackageReference Include="Mythetech.Components" Version="0.0.8" />
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="OmniSharp.Abstractions" Version="1.39.13" />
<PackageReference Include="xunit.extensibility.execution" Version="2.9.2" />
Expand Down
5 changes: 1 addition & 4 deletions Apollo.Components/Editor/CustomThemeMenuItem.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<MudMenuItem Icon="@Icons.Material.TwoTone.Palette"
IconColor="@(IsActive ? Color.Secondary : Color.Default)"
Class="@(IsActive ? "mud-secondary-text" : "")"
OnClick="@SelectTheme">
OnClick="@(() => Settings.SetCustomTheme(Theme))">
@Theme.Name
</MudMenuItem>

Expand All @@ -14,7 +14,4 @@
[Parameter] public required CustomTheme Theme { get; set; }

private bool IsActive => Settings.CurrentCustomThemeId == Theme.Data.Id;

private void SelectTheme() => Settings.SetCustomTheme(Theme);
}

19 changes: 9 additions & 10 deletions Apollo.Components/Infrastructure/RegistrationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static IServiceCollection AddComponentsAndServices(this IServiceCollectio
cfg.SnackbarConfiguration.VisibleStateDuration = 3750;
cfg.SnackbarConfiguration.BackgroundBlurred = true;
});

services.AddFluentUIComponents();
services.AddSingleton<IHostingService, HostingService>();
services.AddSingleton<ConsoleOutputService>();
Expand All @@ -60,14 +60,13 @@ public static IServiceCollection AddComponentsAndServices(this IServiceCollectio
services.AddSingleton<CodeAnalysisConsoleService>();
services.AddSingleton<WebHostConsoleService>();
services.AddScoped<KeyboardService>();
services.AddSingleton<IFileSystemAccessServiceInProcess, FileSystemAccessServiceInProcess>();
services.AddSingleton<IFileSystemAccessService>(sp => (IFileSystemAccessService) sp.GetRequiredService<IFileSystemAccessServiceInProcess>());
services.AddSingleton<IFileSystemAccessServiceInProcess, FileSystemAccessServiceInProcess>();
services.AddSingleton<IFileSystemAccessService>(sp => (IFileSystemAccessService)sp.GetRequiredService<IFileSystemAccessServiceInProcess>());
services.AddTransient<IGitHubService, GitHubService>();
services.AddTransient<Base64Service>();
services.AddScoped<AppState>();
services.AddSingleton<CustomThemeService>();
services.AddScoped<SettingsState>();
services.AddSingleton<SettingsState>();

services.AddSingleton<TerminalState>();

services.AddTerminalCommands();
Expand All @@ -76,25 +75,25 @@ public static IServiceCollection AddComponentsAndServices(this IServiceCollectio
{
config.JsonSerializerOptions.Converters.Add(new ISolutionItemConverter());
});

services.AddTransient<ISolutionSaveService, SolutionsStorageService>();

var systemLoggingProvider = new SystemLoggerProvider();
services.AddSingleton(systemLoggingProvider);
services.AddLogging(logging =>
services.AddLogging(logging =>
{
logging.ClearProviders();
logging.AddProvider(systemLoggingProvider);
});

return services;
}

public static IServiceCollection AddTerminalCommands(this IServiceCollection services)
{
var commandTypes = Assembly.GetExecutingAssembly()
.GetTypes()
.Where(t => !t.IsAbstract && !t.IsInterface &&
.Where(t => !t.IsAbstract && !t.IsInterface &&
typeof(ITerminalCommand).IsAssignableFrom(t));

foreach (var commandType in commandTypes)
Expand Down
1 change: 1 addition & 0 deletions Apollo.Components/Settings/ColorField.razor
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@
}



1 change: 1 addition & 0 deletions Apollo.Components/Settings/CustomThemeCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@
}



1 change: 1 addition & 0 deletions Apollo.Components/Settings/PaletteEditor.razor
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@
}



40 changes: 23 additions & 17 deletions Apollo.Components/Settings/ThemeCustomizer.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@using Apollo.Components.Shared
@using MudBlazor.Utilities
@using Microsoft.JSInterop
@using Mythetech.Components.Components.SimpleTabs


<MudDialog Class="pa-4 glassmorphic" Style="width: 80vw; max-width: 1200px; height: 85vh;">
<DialogContent>
Expand Down Expand Up @@ -32,15 +34,19 @@

<MudDivider Class="my-2" />

<MudTabs Elevation="0" ApplyEffectsToContainer Border Rounded PanelClass="pa-4">
<MudTabPanel Text="Dark Palette" Icon="@Icons.Material.TwoTone.DarkMode">
<PaletteEditor Palette="_darkPalette" OnPaletteChanged="OnDarkPaletteChanged" />
</MudTabPanel>
<MudTabPanel Text="Light Palette" Icon="@Icons.Material.TwoTone.LightMode">
<PaletteEditor Palette="_lightPalette" OnPaletteChanged="OnLightPaletteChanged" />
</MudTabPanel>
<MudTabPanel Text="Typography" Icon="@Icons.Material.TwoTone.FormatSize">
<MudStack Spacing="3">
<SimpleTabs>
<Tab Name="Dark Palette" Icon="@Icons.Material.TwoTone.DarkMode">
<div class="pa-4">
<PaletteEditor Palette="_darkPalette" OnPaletteChanged="OnDarkPaletteChanged" />
</div>
</Tab>
<Tab Name="Light Palette" Icon="@Icons.Material.TwoTone.LightMode">
<div class="pa-4">
<PaletteEditor Palette="_lightPalette" OnPaletteChanged="OnLightPaletteChanged" />
</div>
</Tab>
<Tab Name="Typography" Icon="@Icons.Material.TwoTone.FormatSize">
<MudStack Spacing="3" Class="pa-4">
<MudSelect T="string" Label="Font Family" @bind-Value="_fontFamily" Variant="Variant.Outlined">
<MudSelectItem Value="@("Tahoma, Geneva, Verdana")">Tahoma</MudSelectItem>
<MudSelectItem Value="@("Segoe UI, Arial, sans-serif")">Segoe UI</MudSelectItem>
Expand All @@ -52,23 +58,23 @@
<MudTextField @bind-Value="_fontSize" Label="Base Font Size" Variant="Variant.Outlined" HelperText="e.g., 0.75, 0.875rem" />
<MudTextField @bind-Value="_buttonFontSize" Label="Button Font Size" Variant="Variant.Outlined" HelperText="e.g., 1em" />
</MudStack>
</MudTabPanel>
<MudTabPanel Text="Layout" Icon="@Icons.Material.TwoTone.Dashboard">
<MudStack Spacing="3">
</Tab>
<Tab Name="Layout" Icon="@Icons.Material.TwoTone.Dashboard">
<MudStack Spacing="3" Class="pa-4">
<MudTextField @bind-Value="_borderRadius" Label="Border Radius" Variant="Variant.Outlined" HelperText="e.g., 0.5em, 8px" />
<MudTextField @bind-Value="_appbarHeight" Label="App Bar Height" Variant="Variant.Outlined" HelperText="e.g., 3rem, 48px" />
<MudTextField @bind-Value="_drawerWidth" Label="Drawer Width" Variant="Variant.Outlined" HelperText="e.g., 3.25em" />
</MudStack>
</MudTabPanel>
<MudTabPanel Text="App Bar" Icon="@Icons.Material.TwoTone.WebAsset">
<MudStack Spacing="3">
</Tab>
<Tab Name="App Bar" Icon="@Icons.Material.TwoTone.WebAsset">
<MudStack Spacing="3" Class="pa-4">
<MudSwitch @bind-Value="_hideAppIcon" Label="Hide App Icon" Color="Color.Secondary" />
<MudTextField @bind-Value="_appIconClass" Label="App Icon CSS Class" Variant="Variant.Outlined" Disabled="@_hideAppIcon" />
<MudTextField @bind-Value="_darkAppBarStyle" Label="Dark Mode App Bar Style" Variant="Variant.Outlined" Lines="2" HelperText="Custom CSS for app bar in dark mode" />
<MudTextField @bind-Value="_lightAppBarStyle" Label="Light Mode App Bar Style" Variant="Variant.Outlined" Lines="2" HelperText="Custom CSS for app bar in light mode" />
</MudStack>
</MudTabPanel>
</MudTabs>
</Tab>
</SimpleTabs>
</MudStack>
</MudPaper>
</MudItem>
Expand Down
1 change: 1 addition & 0 deletions Apollo.Components/Settings/ThemeImportDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@
}



1 change: 1 addition & 0 deletions Apollo.Components/Theme/CustomTheme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,4 @@ private static LayoutProperties BuildLayoutProperties(CustomLayout? layout)
}



1 change: 1 addition & 0 deletions Apollo.Components/Theme/CustomThemeData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,4 @@ public static (bool IsValid, string? Error) Validate(string json)
}



1 change: 1 addition & 0 deletions Apollo.Components/Theme/CustomThemeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,4 @@ public async Task<CustomTheme> CreateFromBuiltInAsync(EditorThemeDefinition buil
}



2 changes: 1 addition & 1 deletion Apollo.Components/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
@using BlazorMonaco.Editor
@using BlazorMonaco.Languages
@using Apollo.Components.Shared
@using Apollo.Components.Infrastructure
@using Apollo.Components.Infrastructure
2 changes: 1 addition & 1 deletion Apollo.Contracts/Apollo.Contracts.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Apollo.Hosting.Worker/Apollo.Hosting.Worker.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion Apollo.Hosting/Apollo.Hosting.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Apollo.Infrastructure/Apollo.Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
16 changes: 14 additions & 2 deletions Apollo.Infrastructure/Resources/BlazorResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,29 @@

public class BlazorResources
{
[JsonPropertyName("hash")]
public string Hash { get; set; }

Check warning on line 8 in Apollo.Infrastructure/Resources/BlazorResources.cs

View workflow job for this annotation

GitHub Actions / test

Non-nullable property 'Hash' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
public Dictionary<string, string> Assembly { get; set; }

[JsonPropertyName("coreAssembly")]
public AssemblyResource[] CoreAssembly { get; set; }

Check warning on line 11 in Apollo.Infrastructure/Resources/BlazorResources.cs

View workflow job for this annotation

GitHub Actions / test

Non-nullable property 'CoreAssembly' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

[JsonPropertyName("assembly")]
public AssemblyResource[] Assembly { get; set; }

[JsonPropertyName("fingerprinting")]
public Dictionary<string, string> Fingerprinting { get; set; }
public Dictionary<string, string> WasmNative { get; set; }
public Dictionary<string, string> CoreAssembly { get; set; }
public Dictionary<string, string> Pdb { get; set; }
public Dictionary<string, Dictionary<string, string>> SatelliteResources { get; set; }
public Dictionary<string, string> JsModuleNative { get; set; }
public Dictionary<string, string> JsModuleRuntime { get; set; }
public Dictionary<string, string> LibraryInitializers { get; set; }
public Dictionary<string, string> ModulesAfterConfigLoaded { get; set; }
}

public class AssemblyResource
{
public string name { get; set; }
public string virtualPath { get; set; }
public string integrity { get; set; }
}
Loading
Loading