Removed old architecture. Added new base project structure
This commit is contained in:
30
.gitignore
vendored
30
.gitignore
vendored
@@ -397,8 +397,30 @@ FodyWeavers.xsd
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Moonlight
|
||||
storage/
|
||||
.idea/.idea.Moonlight/.idea/dataSources.xml
|
||||
Moonlight/Assets/Core/css/theme.css
|
||||
Moonlight/Assets/Core/css/theme.css.map
|
||||
.idea/.idea.Moonlight/.idea/discord.xml
|
||||
Moonlight/Moonlight.Client/wwwroot/css/style.min.css
|
||||
/.idea/.idea.Moonlight/.idea
|
||||
17
Moonlight.ApiServer/Configuration/AppConfiguration.cs
Normal file
17
Moonlight.ApiServer/Configuration/AppConfiguration.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace Moonlight.ApiServer.Configuration;
|
||||
|
||||
public class AppConfiguration
|
||||
{
|
||||
public DatabaseConfig Database { get; set; } = new();
|
||||
|
||||
public class DatabaseConfig
|
||||
{
|
||||
public string Host { get; set; } = "your-database-host.name";
|
||||
public int Port { get; set; } = 3306;
|
||||
|
||||
public string Username { get; set; } = "db_user";
|
||||
public string Password { get; set; } = "db_password";
|
||||
|
||||
public string Database { get; set; } = "db_name";
|
||||
}
|
||||
}
|
||||
8
Moonlight.ApiServer/Database/CoreDataContext.cs
Normal file
8
Moonlight.ApiServer/Database/CoreDataContext.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Moonlight.ApiServer.Helpers;
|
||||
|
||||
namespace Moonlight.ApiServer.Database;
|
||||
|
||||
public class CoreDataContext : DatabaseContext
|
||||
{
|
||||
public override string Prefix { get; } = "Core";
|
||||
}
|
||||
11
Moonlight.ApiServer/Helpers/ApplicationStateHelper.cs
Normal file
11
Moonlight.ApiServer/Helpers/ApplicationStateHelper.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using MoonCore.Services;
|
||||
using Moonlight.ApiServer.Configuration;
|
||||
|
||||
namespace Moonlight.ApiServer.Helpers;
|
||||
|
||||
public class ApplicationStateHelper
|
||||
{
|
||||
public static ConfigService<AppConfiguration>? Configuration { get; private set; }
|
||||
|
||||
public static void SetConfiguration(ConfigService<AppConfiguration>? configuration) => Configuration = configuration;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace Moonlight.ApiServer.Helpers.Authentication;
|
||||
|
||||
public class SyncedClaimsPrinciple : ClaimsPrincipal
|
||||
{
|
||||
|
||||
}
|
||||
59
Moonlight.ApiServer/Helpers/DatabaseContext.cs
Normal file
59
Moonlight.ApiServer/Helpers/DatabaseContext.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using MoonCore.Helpers;
|
||||
using MoonCore.Services;
|
||||
using Moonlight.ApiServer.Configuration;
|
||||
using Pomelo.EntityFrameworkCore.MySql.Infrastructure;
|
||||
|
||||
namespace Moonlight.ApiServer.Helpers;
|
||||
|
||||
public abstract class DatabaseContext : DbContext
|
||||
{
|
||||
private ConfigService<AppConfiguration>? ConfigService;
|
||||
public abstract string Prefix { get; }
|
||||
|
||||
public DatabaseContext()
|
||||
{
|
||||
ConfigService = ApplicationStateHelper.Configuration;
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (optionsBuilder.IsConfigured)
|
||||
return;
|
||||
|
||||
// If no config service has been configured, we are probably
|
||||
// in a EF Core migration, so we need to construct the config manually
|
||||
if (ConfigService == null)
|
||||
{
|
||||
ConfigService = new ConfigService<AppConfiguration>(
|
||||
PathBuilder.File("storage", "config.json")
|
||||
);
|
||||
}
|
||||
|
||||
var config = ConfigService.Get().Database;
|
||||
|
||||
var connectionString = $"host={config.Host};" +
|
||||
$"port={config.Port};" +
|
||||
$"database={config.Database};" +
|
||||
$"uid={config.Username};" +
|
||||
$"pwd={config.Password}";
|
||||
|
||||
optionsBuilder.UseMySql(
|
||||
connectionString,
|
||||
ServerVersion.AutoDetect(connectionString),
|
||||
builder =>
|
||||
{
|
||||
builder.EnableRetryOnFailure(5);
|
||||
builder.SchemaBehavior(MySqlSchemaBehavior.Translate, (name, objectName) => $"{name}_{objectName}");
|
||||
builder.MigrationsHistoryTable($"{Prefix}_MigrationHistory");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Model.SetDefaultSchema(Prefix);
|
||||
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Moonlight.ApiServer.Http.Middleware;
|
||||
|
||||
public class AuthenticationMiddleware
|
||||
{
|
||||
private readonly RequestDelegate Next;
|
||||
|
||||
public AuthenticationMiddleware(RequestDelegate next)
|
||||
{
|
||||
Next = next;
|
||||
}
|
||||
|
||||
public async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
36
Moonlight.ApiServer/Moonlight.ApiServer.csproj
Normal file
36
Moonlight.ApiServer/Moonlight.ApiServer.csproj
Normal file
@@ -0,0 +1,36 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.7"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MoonCore" Version="1.5.7" />
|
||||
<PackageReference Include="MoonCore.Extended" Version="1.0.2" />
|
||||
<PackageReference Include="MoonCore.PluginFramework" Version="1.0.0" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Moonlight.Client\Moonlight.Client.csproj"/>
|
||||
<ProjectReference Include="..\Moonlight.Shared\Moonlight.Shared.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Database\Entities\" />
|
||||
<Folder Include="Database\Migrations\" />
|
||||
<Folder Include="Http\Controllers\" />
|
||||
<Folder Include="Models\" />
|
||||
<Folder Include="Services\" />
|
||||
<Folder Include="storage\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
110
Moonlight.ApiServer/Program.cs
Normal file
110
Moonlight.ApiServer/Program.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
using MoonCore.Extended.Helpers;
|
||||
using MoonCore.Extensions;
|
||||
using MoonCore.Helpers;
|
||||
using MoonCore.Services;
|
||||
using Moonlight.ApiServer.Configuration;
|
||||
using Moonlight.ApiServer.Database;
|
||||
using Moonlight.ApiServer.Helpers;
|
||||
|
||||
// Prepare file system
|
||||
Directory.CreateDirectory(PathBuilder.Dir("storage"));
|
||||
Directory.CreateDirectory(PathBuilder.Dir("storage", "plugins"));
|
||||
Directory.CreateDirectory(PathBuilder.Dir("storage", "clientPlugins"));
|
||||
Directory.CreateDirectory(PathBuilder.Dir("storage", "logs"));
|
||||
|
||||
// Configuration
|
||||
var configService = new ConfigService<AppConfiguration>(
|
||||
PathBuilder.File("storage", "config.json")
|
||||
);
|
||||
|
||||
ApplicationStateHelper.SetConfiguration(configService);
|
||||
|
||||
// Build pre run logger
|
||||
var providers = LoggerBuildHelper.BuildFromConfiguration(configuration =>
|
||||
{
|
||||
configuration.Console.Enable = true;
|
||||
configuration.Console.EnableAnsiMode = true;
|
||||
|
||||
configuration.FileLogging.Enable = true;
|
||||
configuration.FileLogging.Path = PathBuilder.File("storage", "logs", "moonlight.log");
|
||||
configuration.FileLogging.EnableLogRotation = true;
|
||||
configuration.FileLogging.RotateLogNameTemplate = PathBuilder.File("storage", "logs", "moonlight.log.{0}");
|
||||
});
|
||||
|
||||
using var loggerFactory = new LoggerFactory(providers);
|
||||
var logger = loggerFactory.CreateLogger("Startup");
|
||||
|
||||
// Fancy start console output... yes very fancy :>
|
||||
var rainbow = new Crayon.Rainbow(0.5);
|
||||
foreach (var c in "Moonlight")
|
||||
{
|
||||
Console.Write(
|
||||
rainbow
|
||||
.Next()
|
||||
.Bold()
|
||||
.Text(c.ToString())
|
||||
);
|
||||
}
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Configure application logging
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Logging.AddProviders(providers);
|
||||
|
||||
// Logging levels
|
||||
var logConfigPath = PathBuilder.File("storage", "logConfig.json");
|
||||
|
||||
// Ensure logging config, add a default one is missing
|
||||
if (!File.Exists(logConfigPath))
|
||||
{
|
||||
await File.WriteAllTextAsync(logConfigPath,
|
||||
"{\"LogLevel\":{\"Default\":\"Information\",\"Microsoft.AspNetCore\":\"Warning\"}}");
|
||||
}
|
||||
|
||||
builder.Logging.AddConfiguration(await File.ReadAllTextAsync(logConfigPath));
|
||||
|
||||
builder.Services.AddControllers();
|
||||
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
builder.Services.AddSingleton(configService);
|
||||
|
||||
// Database
|
||||
var databaseHelper = new DatabaseHelper(
|
||||
loggerFactory.CreateLogger<DatabaseHelper>()
|
||||
);
|
||||
|
||||
builder.Services.AddSingleton(databaseHelper);
|
||||
|
||||
builder.Services.AddDbContext<CoreDataContext>();
|
||||
databaseHelper.AddDbContext<CoreDataContext>();
|
||||
|
||||
databaseHelper.GenerateMappings();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
await databaseHelper.EnsureMigrated(scope.ServiceProvider);
|
||||
}
|
||||
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
app.UseWebAssemblyDebugging();
|
||||
}
|
||||
|
||||
app.UseBlazorFrameworkFiles();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseRouting();
|
||||
app.MapControllers();
|
||||
|
||||
app.MapFallbackToFile("index.html");
|
||||
|
||||
app.Run();
|
||||
14
Moonlight.ApiServer/Properties/launchSettings.json
Normal file
14
Moonlight.ApiServer/Properties/launchSettings.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "http://localhost:5165",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using Moonlight.Client.Interfaces;
|
||||
using Moonlight.Client.Models;
|
||||
|
||||
namespace Moonlight.Client.Implementations;
|
||||
|
||||
public class DefaultSidebarItemProvider : ISidebarItemProvider
|
||||
{
|
||||
public SidebarItem[] Get()
|
||||
{
|
||||
return
|
||||
[
|
||||
// User
|
||||
new SidebarItem()
|
||||
{
|
||||
Icon = "bi bi-columns",
|
||||
Name = "Overview",
|
||||
Path = "/",
|
||||
Priority = 0,
|
||||
RequiresExactMatch = true
|
||||
},
|
||||
|
||||
// Admin
|
||||
new SidebarItem()
|
||||
{
|
||||
Icon = "bi bi-columns",
|
||||
Name = "Overview",
|
||||
Group = "Admin",
|
||||
Path = "/admin",
|
||||
Priority = 0,
|
||||
RequiresExactMatch = true
|
||||
},
|
||||
new SidebarItem()
|
||||
{
|
||||
Icon = "bi bi-people",
|
||||
Name = "Users",
|
||||
Group = "Admin",
|
||||
Path = "/admin/users",
|
||||
Priority = 1,
|
||||
RequiresExactMatch = false
|
||||
},
|
||||
new SidebarItem()
|
||||
{
|
||||
Icon = "bi bi-key",
|
||||
Name = "API",
|
||||
Group = "Admin",
|
||||
Path = "/admin/api",
|
||||
Priority = 2,
|
||||
RequiresExactMatch = false
|
||||
},
|
||||
new SidebarItem()
|
||||
{
|
||||
Icon = "bi bi-gear",
|
||||
Name = "System",
|
||||
Group = "Admin",
|
||||
Path = "/admin/system",
|
||||
Priority = 3,
|
||||
RequiresExactMatch = false
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
8
Moonlight.Client/Interfaces/ISidebarItemProvider.cs
Normal file
8
Moonlight.Client/Interfaces/ISidebarItemProvider.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Moonlight.Client.Models;
|
||||
|
||||
namespace Moonlight.Client.Interfaces;
|
||||
|
||||
public interface ISidebarItemProvider
|
||||
{
|
||||
public SidebarItem[] Get();
|
||||
}
|
||||
11
Moonlight.Client/Models/SidebarItem.cs
Normal file
11
Moonlight.Client/Models/SidebarItem.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Moonlight.Client.Models;
|
||||
|
||||
public class SidebarItem
|
||||
{
|
||||
public string Icon { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string? Group { get; set; }
|
||||
public string Path { get; set; }
|
||||
public int Priority { get; set; }
|
||||
public bool RequiresExactMatch { get; set; } = false;
|
||||
}
|
||||
33
Moonlight.Client/Moonlight.Client.csproj
Normal file
33
Moonlight.Client/Moonlight.Client.csproj
Normal file
@@ -0,0 +1,33 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.6"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.6" PrivateAssets="all"/>
|
||||
<PackageReference Include="MoonCore" Version="1.5.7" />
|
||||
<PackageReference Include="MoonCore.Blazor.Tailwind" Version="1.0.1" />
|
||||
<PackageReference Include="MoonCore.PluginFramework" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Moonlight.Shared\Moonlight.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Helpers\" />
|
||||
<Folder Include="Services\" />
|
||||
<Folder Include="UI\Components\" />
|
||||
<Folder Include="wwwroot\css\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
60
Moonlight.Client/Program.cs
Normal file
60
Moonlight.Client/Program.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using MoonCore.Blazor.Tailwind.Extensions;
|
||||
using MoonCore.Extensions;
|
||||
using MoonCore.Helpers;
|
||||
using MoonCore.PluginFramework.Services;
|
||||
using Moonlight.Client.Implementations;
|
||||
using Moonlight.Client.Interfaces;
|
||||
using Moonlight.Client.UI;
|
||||
|
||||
// Build pre run logger
|
||||
var providers = LoggerBuildHelper.BuildFromConfiguration(configuration =>
|
||||
{
|
||||
configuration.Console.Enable = true;
|
||||
configuration.Console.EnableAnsiMode = true;
|
||||
configuration.FileLogging.Enable = false;
|
||||
});
|
||||
|
||||
using var loggerFactory = new LoggerFactory(providers);
|
||||
var logger = loggerFactory.CreateLogger("Startup");
|
||||
|
||||
// Fancy start console output... yes very fancy :>
|
||||
Console.Write("Running ");
|
||||
|
||||
var rainbow = new Crayon.Rainbow(0.5);
|
||||
foreach (var c in "Moonlight")
|
||||
{
|
||||
Console.Write(
|
||||
rainbow
|
||||
.Next()
|
||||
.Bold()
|
||||
.Text(c.ToString())
|
||||
);
|
||||
}
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
// Building app
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
|
||||
// Configure application logging
|
||||
builder.Logging.ClearProviders();
|
||||
builder.Logging.AddProviders(providers);
|
||||
|
||||
builder.RootComponents.Add<App>("#app");
|
||||
builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
||||
builder.Services.AddScoped(sp => new HttpApiClient(sp.GetRequiredService<HttpClient>()));
|
||||
|
||||
builder.Services.AddMoonCoreBlazorTailwind();
|
||||
|
||||
// Implementation service
|
||||
var implementationService = new ImplementationService();
|
||||
|
||||
implementationService.Register<ISidebarItemProvider, DefaultSidebarItemProvider>();
|
||||
|
||||
builder.Services.AddSingleton(implementationService);
|
||||
|
||||
await builder.Build().RunAsync();
|
||||
@@ -4,10 +4,11 @@
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"applicationUrl": "http://0.0.0.0:5230",
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "http://localhost:5165",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Moonlight.Client/Styles/additions/buttons.css
Normal file
80
Moonlight.Client/Styles/additions/buttons.css
Normal file
@@ -0,0 +1,80 @@
|
||||
/* Buttons */
|
||||
|
||||
.btn,
|
||||
.btn-lg,
|
||||
.btn-sm,
|
||||
.btn-xs {
|
||||
@apply font-medium text-sm inline-flex items-center justify-center border border-transparent rounded-lg leading-5 shadow-sm transition;
|
||||
}
|
||||
|
||||
.btn {
|
||||
@apply px-3 py-2;
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
@apply px-4 py-3;
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
@apply px-2 py-1;
|
||||
}
|
||||
|
||||
.btn-xs {
|
||||
@apply px-2 py-0.5;
|
||||
}
|
||||
|
||||
/* Colors */
|
||||
|
||||
.btn-primary {
|
||||
@apply bg-primary-600 hover:bg-primary-500 focus-visible:outline-primary-600;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
@apply bg-secondary-800 hover:bg-secondary-700 focus-visible:outline-secondary-800;
|
||||
}
|
||||
|
||||
.btn-tertiary {
|
||||
@apply bg-tertiary-600 hover:bg-tertiary-500 focus-visible:outline-tertiary-600;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
@apply bg-danger-600 hover:bg-danger-500 focus-visible:outline-danger-600;
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
@apply bg-warning-500 hover:bg-warning-400 focus-visible:outline-warning-500;
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
@apply bg-info-600 hover:bg-info-500 focus-visible:outline-info-600;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
@apply bg-success-600 hover:bg-success-500 focus-visible:outline-success-600;
|
||||
}
|
||||
|
||||
/* Outline */
|
||||
|
||||
.btn-outline-primary {
|
||||
@apply bg-gray-800 hover:border-gray-600 text-primary-500;
|
||||
}
|
||||
|
||||
.btn-outline-tertiary {
|
||||
@apply bg-gray-800 hover:border-gray-600 text-tertiary-500;
|
||||
}
|
||||
|
||||
.btn-outline-danger {
|
||||
@apply bg-gray-800 hover:border-gray-600 text-danger-500;
|
||||
}
|
||||
|
||||
.btn-outline-warning {
|
||||
@apply bg-gray-800 hover:border-gray-600 text-warning-400;
|
||||
}
|
||||
|
||||
.btn-outline-info {
|
||||
@apply bg-gray-800 hover:border-gray-600 text-info-500;
|
||||
}
|
||||
|
||||
.btn-outline-success {
|
||||
@apply bg-gray-800 hover:border-gray-600 text-success-500;
|
||||
}
|
||||
19
Moonlight.Client/Styles/additions/cards.css
Normal file
19
Moonlight.Client/Styles/additions/cards.css
Normal file
@@ -0,0 +1,19 @@
|
||||
.card {
|
||||
@apply flex flex-col bg-gray-800 shadow-sm rounded-xl;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
@apply px-5 py-4 border-b border-gray-700/60 flex items-center;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
@apply font-semibold text-gray-100;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
@apply px-5 py-5;
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
@apply pt-3 pb-3 border-t border-gray-700/60 mt-auto;
|
||||
}
|
||||
3
Moonlight.Client/Styles/additions/fonts.css
Normal file
3
Moonlight.Client/Styles/additions/fonts.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=fallback');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap');
|
||||
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");
|
||||
77
Moonlight.Client/Styles/additions/forms.css
Normal file
77
Moonlight.Client/Styles/additions/forms.css
Normal file
@@ -0,0 +1,77 @@
|
||||
/* Forms */
|
||||
input[type="search"]::-webkit-search-decoration,
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-results-button,
|
||||
input[type="search"]::-webkit-search-results-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.form-input,
|
||||
.form-textarea,
|
||||
.form-multiselect,
|
||||
.form-select,
|
||||
.form-checkbox,
|
||||
.form-radio {
|
||||
@apply bg-gray-700/60 border-2 focus:ring-0 focus:ring-offset-0 disabled:bg-gray-700/30 disabled:border-gray-700 disabled:hover:border-gray-700;
|
||||
}
|
||||
|
||||
.form-checkbox {
|
||||
@apply rounded;
|
||||
}
|
||||
|
||||
.form-input,
|
||||
.form-textarea,
|
||||
.form-multiselect,
|
||||
.form-select {
|
||||
@apply text-sm text-gray-100 leading-5 py-2 px-3 border-gray-700 focus:border-primary-500 shadow-sm rounded-lg;
|
||||
}
|
||||
|
||||
.form-input,
|
||||
.form-textarea {
|
||||
@apply placeholder-gray-700;
|
||||
}
|
||||
|
||||
.form-select {
|
||||
@apply pr-10;
|
||||
}
|
||||
|
||||
.form-checkbox,
|
||||
.form-radio {
|
||||
@apply text-primary-500 checked:bg-primary-500 checked:border-transparent border border-gray-700/60 focus:border-primary-500/50;
|
||||
}
|
||||
|
||||
/* Switch element */
|
||||
.form-switch {
|
||||
@apply relative select-none;
|
||||
width: 44px;
|
||||
}
|
||||
|
||||
.form-switch label {
|
||||
@apply block overflow-hidden cursor-pointer h-6 rounded-full;
|
||||
}
|
||||
|
||||
.form-switch label > span:first-child {
|
||||
@apply absolute block rounded-full;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
top: 2px;
|
||||
left: 2px;
|
||||
right: 50%;
|
||||
transition: all .15s ease-out;
|
||||
}
|
||||
|
||||
.form-switch input[type="checkbox"]:checked + label {
|
||||
@apply bg-primary-600;
|
||||
}
|
||||
|
||||
.form-switch input[type="checkbox"]:checked + label > span:first-child {
|
||||
left: 22px;
|
||||
}
|
||||
|
||||
.form-switch input[type="checkbox"]:disabled + label {
|
||||
@apply cursor-not-allowed bg-gray-700/20 border border-gray-700/60;
|
||||
}
|
||||
|
||||
.form-switch input[type="checkbox"]:disabled + label > span:first-child {
|
||||
@apply bg-gray-600;
|
||||
}
|
||||
25
Moonlight.Client/Styles/additions/progress.css
Normal file
25
Moonlight.Client/Styles/additions/progress.css
Normal file
@@ -0,0 +1,25 @@
|
||||
.progress {
|
||||
@apply bg-gray-800 rounded-full overflow-hidden;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
@apply bg-primary-500 rounded-full h-3;
|
||||
transition: width 0.6s ease;
|
||||
}
|
||||
|
||||
.progress-bar.progress-intermediate {
|
||||
animation: progress-animation 1s infinite linear;
|
||||
transform-origin: 0 50%
|
||||
}
|
||||
|
||||
@keyframes progress-animation {
|
||||
0% {
|
||||
transform: translateX(0) scaleX(0);
|
||||
}
|
||||
40% {
|
||||
transform: translateX(0) scaleX(0.4);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(100%) scaleX(0.5);
|
||||
}
|
||||
}
|
||||
9
Moonlight.Client/Styles/additions/scrollbar.css
Normal file
9
Moonlight.Client/Styles/additions/scrollbar.css
Normal file
@@ -0,0 +1,9 @@
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #64748b transparent;
|
||||
}
|
||||
|
||||
.no-scrollbar {
|
||||
scrollbar-width: none;
|
||||
scrollbar-color: transparent transparent;
|
||||
}
|
||||
1
Moonlight.Client/Styles/build.bat
Normal file
1
Moonlight.Client/Styles/build.bat
Normal file
@@ -0,0 +1 @@
|
||||
npx tailwindcss -i style.css -o ../wwwroot/css/style.min.css --watch
|
||||
2
Moonlight.Client/Styles/build.sh
Normal file
2
Moonlight.Client/Styles/build.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#! /bin/bash
|
||||
npx tailwindcss -i style.css -o ../wwwroot/css/style.min.css --watch
|
||||
403
Moonlight.Client/Styles/mappings/mooncore.json
Normal file
403
Moonlight.Client/Styles/mappings/mooncore.json
Normal file
@@ -0,0 +1,403 @@
|
||||
[
|
||||
"-m-1",
|
||||
"-m-1.5",
|
||||
"-m-2.5",
|
||||
"-m-3",
|
||||
"-mx-2",
|
||||
"-mx-4",
|
||||
"-translate-x-1/2",
|
||||
"-translate-x-full",
|
||||
"absolute",
|
||||
"animate-spin",
|
||||
"backdrop-blur",
|
||||
"bg-danger-200",
|
||||
"bg-danger-600",
|
||||
"bg-gradient-to-t",
|
||||
"bg-gray-100",
|
||||
"bg-gray-200",
|
||||
"bg-gray-400",
|
||||
"bg-gray-50",
|
||||
"bg-gray-700",
|
||||
"bg-gray-750",
|
||||
"bg-gray-800",
|
||||
"bg-gray-800/60",
|
||||
"bg-gray-800/80",
|
||||
"bg-gray-900",
|
||||
"bg-gray-950",
|
||||
"bg-info-100",
|
||||
"bg-opacity-50",
|
||||
"bg-opacity-75",
|
||||
"bg-red-50",
|
||||
"bg-slate-900",
|
||||
"bg-success-100",
|
||||
"bg-tertiary-500",
|
||||
"bg-transparent",
|
||||
"bg-warning-100",
|
||||
"bg-warning-400",
|
||||
"bg-white",
|
||||
"block",
|
||||
"border",
|
||||
"border-0",
|
||||
"border-b-2",
|
||||
"border-gray-100/10",
|
||||
"border-gray-700",
|
||||
"border-gray-700/60",
|
||||
"border-primary-500",
|
||||
"border-red-600",
|
||||
"border-slate-700",
|
||||
"border-t",
|
||||
"border-transparent",
|
||||
"bottom-0",
|
||||
"bottom-full",
|
||||
"col-span-1",
|
||||
"col-span-3",
|
||||
"cursor-default",
|
||||
"cursor-not-allowed",
|
||||
"dark:bg-gray-700",
|
||||
"dark:bg-gray-700/60",
|
||||
"dark:disabled:bg-gray-800",
|
||||
"dark:disabled:border-gray-700",
|
||||
"dark:disabled:placeholder:text-gray-600",
|
||||
"dark:disabled:text-gray-600",
|
||||
"dark:group-hover:text-gray-400",
|
||||
"dark:text-gray-100",
|
||||
"dark:text-gray-500",
|
||||
"disabled:bg-gray-100",
|
||||
"disabled:bg-gray-800",
|
||||
"disabled:border-gray-200",
|
||||
"disabled:border-gray-700",
|
||||
"disabled:cursor-not-allowed",
|
||||
"disabled:text-gray-400",
|
||||
"disabled:text-gray-600",
|
||||
"divide-gray-700/60",
|
||||
"divide-y",
|
||||
"duration-100",
|
||||
"duration-200",
|
||||
"duration-300",
|
||||
"duration-75",
|
||||
"ease-in",
|
||||
"ease-in-out",
|
||||
"ease-linear",
|
||||
"ease-out",
|
||||
"fill-current",
|
||||
"fill-primary-600",
|
||||
"filter",
|
||||
"first:pl-4",
|
||||
"fixed",
|
||||
"flex",
|
||||
"flex-1",
|
||||
"flex-col",
|
||||
"flex-nowrap",
|
||||
"flex-row",
|
||||
"flex-shrink-0",
|
||||
"flex-wrap",
|
||||
"focus:outline-none",
|
||||
"focus:ring-0",
|
||||
"focus:ring-2",
|
||||
"focus:ring-indigo-500",
|
||||
"focus:ring-indigo-600",
|
||||
"focus:ring-offset-0",
|
||||
"focus:ring-offset-2",
|
||||
"font-bold",
|
||||
"font-inter",
|
||||
"font-medium",
|
||||
"font-normal",
|
||||
"font-scp",
|
||||
"font-semibold",
|
||||
"form-checkbox",
|
||||
"form-input",
|
||||
"form-radio",
|
||||
"form-select",
|
||||
"from-gray-700",
|
||||
"from-primary-700",
|
||||
"gap-2",
|
||||
"gap-5",
|
||||
"gap-x-3",
|
||||
"gap-x-4",
|
||||
"gap-x-6",
|
||||
"gap-y-5",
|
||||
"gap-y-7",
|
||||
"gap-y-8",
|
||||
"grid",
|
||||
"grid-cols-1",
|
||||
"grid-cols-3",
|
||||
"grid-flow-col",
|
||||
"group-hover:text-gray-500",
|
||||
"group-hover:text-white",
|
||||
"grow",
|
||||
"h-10",
|
||||
"h-12",
|
||||
"h-16",
|
||||
"h-20",
|
||||
"h-4",
|
||||
"h-5",
|
||||
"h-6",
|
||||
"h-8",
|
||||
"h-px",
|
||||
"hidden",
|
||||
"hover:bg-gray-700",
|
||||
"hover:bg-gray-800",
|
||||
"hover:bg-primary-600",
|
||||
"hover:border-b-2",
|
||||
"hover:border-gray-600",
|
||||
"hover:border-primary-500",
|
||||
"hover:text-gray-100",
|
||||
"hover:text-gray-500",
|
||||
"hover:text-info-400",
|
||||
"hover:text-white",
|
||||
"inline",
|
||||
"inline-flex",
|
||||
"inset-0",
|
||||
"italic",
|
||||
"items-center",
|
||||
"items-end",
|
||||
"items-start",
|
||||
"justify-between",
|
||||
"justify-center",
|
||||
"justify-end",
|
||||
"justify-start",
|
||||
"justify-stretch",
|
||||
"last:mr-0",
|
||||
"last:pr-4",
|
||||
"leading-5",
|
||||
"leading-6",
|
||||
"leading-7",
|
||||
"left-1/2",
|
||||
"left-auto",
|
||||
"left-full",
|
||||
"lg:-mx-8",
|
||||
"lg:bg-gray-900/10",
|
||||
"lg:block",
|
||||
"lg:first:pl-8",
|
||||
"lg:fixed",
|
||||
"lg:flex",
|
||||
"lg:flex-col",
|
||||
"lg:gap-x-6",
|
||||
"lg:h-6",
|
||||
"lg:hidden",
|
||||
"lg:inset-y-0",
|
||||
"lg:items-center",
|
||||
"lg:last:pr-8",
|
||||
"lg:max-w-5xl",
|
||||
"lg:pl-72",
|
||||
"lg:px-8",
|
||||
"lg:w-72",
|
||||
"lg:w-px",
|
||||
"lg:z-50",
|
||||
"list-disc",
|
||||
"m-1",
|
||||
"m-3",
|
||||
"max-h-56",
|
||||
"max-w-sm",
|
||||
"max-w-xs",
|
||||
"mb-1",
|
||||
"mb-2",
|
||||
"mb-3",
|
||||
"mb-4",
|
||||
"mb-5",
|
||||
"mb-6",
|
||||
"mb-8",
|
||||
"md:flex-row",
|
||||
"md:grid-cols-3",
|
||||
"md:items-center",
|
||||
"md:space-y-0",
|
||||
"md:text-3xl",
|
||||
"me-1",
|
||||
"me-2",
|
||||
"min-h-full",
|
||||
"min-w-60",
|
||||
"ml-2",
|
||||
"ml-3",
|
||||
"ml-4",
|
||||
"ml-auto",
|
||||
"mr-16",
|
||||
"mr-2",
|
||||
"mr-3",
|
||||
"mr-6",
|
||||
"ms-0.5",
|
||||
"ms-1",
|
||||
"ms-3",
|
||||
"mt-1",
|
||||
"mt-10",
|
||||
"mt-2",
|
||||
"mt-2.5",
|
||||
"mt-3",
|
||||
"mt-5",
|
||||
"mt-8",
|
||||
"mt-auto",
|
||||
"mx-5",
|
||||
"mx-auto",
|
||||
"my-1",
|
||||
"my-3",
|
||||
"my-4",
|
||||
"my-8",
|
||||
"opacity-0",
|
||||
"opacity-100",
|
||||
"origin-top-right",
|
||||
"overflow-auto",
|
||||
"overflow-hidden",
|
||||
"overflow-x-auto",
|
||||
"overflow-x-scroll",
|
||||
"overflow-y-auto",
|
||||
"p-0",
|
||||
"p-1.5",
|
||||
"p-2",
|
||||
"p-2.5",
|
||||
"p-4",
|
||||
"p-5",
|
||||
"pb-1",
|
||||
"pb-3",
|
||||
"pb-4",
|
||||
"pl-12",
|
||||
"pl-2",
|
||||
"pl-3",
|
||||
"pl-5",
|
||||
"pl-9",
|
||||
"pointer-events-auto",
|
||||
"pointer-events-none",
|
||||
"pr-3",
|
||||
"pr-8",
|
||||
"pt-0.5",
|
||||
"pt-4",
|
||||
"pt-5",
|
||||
"pt-6",
|
||||
"px-2",
|
||||
"px-3",
|
||||
"px-4",
|
||||
"px-5",
|
||||
"px-6",
|
||||
"py-1",
|
||||
"py-10",
|
||||
"py-2",
|
||||
"py-3",
|
||||
"py-6",
|
||||
"py-8",
|
||||
"relative",
|
||||
"right-0",
|
||||
"right-auto",
|
||||
"ring-1",
|
||||
"ring-black",
|
||||
"ring-gray-900/5",
|
||||
"ring-opacity-5",
|
||||
"ring-white/10",
|
||||
"rounded",
|
||||
"rounded-b-lg",
|
||||
"rounded-full",
|
||||
"rounded-lg",
|
||||
"rounded-md",
|
||||
"rounded-t-lg",
|
||||
"scale-100",
|
||||
"scale-95",
|
||||
"select-none",
|
||||
"shadow-lg",
|
||||
"shadow-none",
|
||||
"shadow-sm",
|
||||
"shadow-xl",
|
||||
"shrink-0",
|
||||
"sm:-mx-6",
|
||||
"sm:auto-cols-max",
|
||||
"sm:col-span-1",
|
||||
"sm:col-span-2",
|
||||
"sm:col-span-3",
|
||||
"sm:col-span-4",
|
||||
"sm:col-span-5",
|
||||
"sm:col-span-6",
|
||||
"sm:first:pl-6",
|
||||
"sm:flex",
|
||||
"sm:gap-x-6",
|
||||
"sm:grid-cols-6",
|
||||
"sm:items-center",
|
||||
"sm:items-end",
|
||||
"sm:justify-between",
|
||||
"sm:justify-end",
|
||||
"sm:last:pr-6",
|
||||
"sm:max-w-lg",
|
||||
"sm:mb-0",
|
||||
"sm:mt-5",
|
||||
"sm:mt-6",
|
||||
"sm:my-8",
|
||||
"sm:p-0",
|
||||
"sm:p-6",
|
||||
"sm:pb-4",
|
||||
"sm:px-6",
|
||||
"sm:text-sm",
|
||||
"sm:w-full",
|
||||
"space-x-1",
|
||||
"space-x-2",
|
||||
"space-x-5",
|
||||
"space-y-1",
|
||||
"space-y-2",
|
||||
"space-y-3",
|
||||
"space-y-4",
|
||||
"space-y-8",
|
||||
"sr-only",
|
||||
"static",
|
||||
"sticky",
|
||||
"table",
|
||||
"table-auto",
|
||||
"text-2xl",
|
||||
"text-4xl",
|
||||
"text-[0.625rem]",
|
||||
"text-base",
|
||||
"text-center",
|
||||
"text-danger-500",
|
||||
"text-gray-100",
|
||||
"text-gray-200",
|
||||
"text-gray-300",
|
||||
"text-gray-400",
|
||||
"text-gray-500",
|
||||
"text-gray-600",
|
||||
"text-gray-700",
|
||||
"text-gray-800",
|
||||
"text-gray-900",
|
||||
"text-green-500",
|
||||
"text-indigo-600",
|
||||
"text-info-400",
|
||||
"text-info-500",
|
||||
"text-left",
|
||||
"text-lg",
|
||||
"text-primary-500",
|
||||
"text-red-400",
|
||||
"text-red-500",
|
||||
"text-red-700",
|
||||
"text-red-800",
|
||||
"text-slate-400",
|
||||
"text-slate-600",
|
||||
"text-sm",
|
||||
"text-success-400",
|
||||
"text-success-500",
|
||||
"text-warning-400",
|
||||
"text-white",
|
||||
"text-xs",
|
||||
"to-gray-800",
|
||||
"to-primary-600",
|
||||
"top-0",
|
||||
"transform",
|
||||
"transition",
|
||||
"transition-all",
|
||||
"transition-opacity",
|
||||
"translate-x-0",
|
||||
"translate-y-0",
|
||||
"translate-y-2",
|
||||
"truncate",
|
||||
"uppercase",
|
||||
"w-0",
|
||||
"w-10",
|
||||
"w-12",
|
||||
"w-16",
|
||||
"w-20",
|
||||
"w-24",
|
||||
"w-32",
|
||||
"w-4",
|
||||
"w-5",
|
||||
"w-6",
|
||||
"w-8",
|
||||
"w-auto",
|
||||
"w-full",
|
||||
"w-px",
|
||||
"w-screen",
|
||||
"whitespace-nowrap",
|
||||
"z-10",
|
||||
"z-40",
|
||||
"z-50"
|
||||
]
|
||||
1294
Moonlight.Client/Styles/package-lock.json
generated
Normal file
1294
Moonlight.Client/Styles/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
8
Moonlight.Client/Styles/package.json
Normal file
8
Moonlight.Client/Styles/package.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"tailwindcss": "^3.4.11"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/forms": "^0.5.9"
|
||||
}
|
||||
}
|
||||
15
Moonlight.Client/Styles/style.css
Normal file
15
Moonlight.Client/Styles/style.css
Normal file
@@ -0,0 +1,15 @@
|
||||
@import "tailwindcss/base";
|
||||
@import "tailwindcss/components";
|
||||
|
||||
@import "additions/fonts.css";
|
||||
@import "additions/buttons.css";
|
||||
@import "additions/cards.css";
|
||||
@import "additions/forms.css";
|
||||
@import "additions/progress.css";
|
||||
@import "additions/scrollbar.css";
|
||||
|
||||
@import "tailwindcss/utilities";
|
||||
|
||||
#blazor-error-ui {
|
||||
display: none;
|
||||
}
|
||||
124
Moonlight.Client/Styles/tailwind.config.js
Normal file
124
Moonlight.Client/Styles/tailwind.config.js
Normal file
@@ -0,0 +1,124 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
'../**/*.razor',
|
||||
'mappings/*.json'
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
inter: ['Inter', 'sans-serif'],
|
||||
scp: ['Source Code Pro', 'mono'],
|
||||
},
|
||||
colors: {
|
||||
primary: {
|
||||
50: '#eef2ff',
|
||||
100: '#e0e7ff',
|
||||
200: '#c7d2fe',
|
||||
300: '#a5b4fc',
|
||||
400: '#818cf8',
|
||||
500: '#6366f1',
|
||||
600: '#4f46e5',
|
||||
700: '#4338ca',
|
||||
800: '#3730a3',
|
||||
900: '#312e81',
|
||||
950: '#1e1b4b'
|
||||
},
|
||||
secondary: {
|
||||
100: '#F9F9F9',
|
||||
200: '#F1F1F2',
|
||||
300: '#DBDFE9',
|
||||
400: '#B5B5C3',
|
||||
500: '#99A1B7',
|
||||
600: '#78829D',
|
||||
700: '#4B5675',
|
||||
800: '#252F4A',
|
||||
900: '#071437',
|
||||
950: '#030712',
|
||||
},
|
||||
tertiary: {
|
||||
50: '#f5f3ff',
|
||||
100: '#ede9fe',
|
||||
200: '#ddd6fe',
|
||||
300: '#c4b5fd',
|
||||
400: '#a78bfa',
|
||||
500: '#8b5cf6',
|
||||
600: '#7c3aed',
|
||||
700: '#6d28d9',
|
||||
800: '#5b21b6',
|
||||
900: '#4c1d95',
|
||||
950: '#2e1065'
|
||||
},
|
||||
warning: {
|
||||
50: '#fefce8',
|
||||
100: '#fef9c3',
|
||||
200: '#fef08a',
|
||||
300: '#fde047',
|
||||
400: '#facc15',
|
||||
500: '#eab308',
|
||||
600: '#ca8a04',
|
||||
700: '#a16207',
|
||||
800: '#854d0e',
|
||||
900: '#713f12',
|
||||
950: '#422006'
|
||||
},
|
||||
danger: {
|
||||
50: '#fef2f2',
|
||||
100: '#fee2e2',
|
||||
200: '#fecaca',
|
||||
300: '#fca5a5',
|
||||
400: '#f87171',
|
||||
500: '#ef4444',
|
||||
600: '#dc2626',
|
||||
700: '#b91c1c',
|
||||
800: '#991b1b',
|
||||
900: '#7f1d1d',
|
||||
950: '#450a0a'
|
||||
},
|
||||
success: {
|
||||
50: '#f0fdf4',
|
||||
100: '#dcfce7',
|
||||
200: '#bbf7d0',
|
||||
300: '#86efac',
|
||||
400: '#4ade80',
|
||||
500: '#22c55e',
|
||||
600: '#16a34a',
|
||||
700: '#15803d',
|
||||
800: '#166534',
|
||||
900: '#14532d',
|
||||
950: '#052e16'
|
||||
},
|
||||
info: {
|
||||
50: '#eff6ff',
|
||||
100: '#dbeafe',
|
||||
200: '#bfdbfe',
|
||||
300: '#93c5fd',
|
||||
400: '#60a5fa',
|
||||
500: '#3b82f6',
|
||||
600: '#2563eb',
|
||||
700: '#1d4ed8',
|
||||
800: '#1e40af',
|
||||
900: '#1e3a8a',
|
||||
950: '#172554'
|
||||
},
|
||||
gray: {
|
||||
100: '#F9F9F9',
|
||||
200: '#F1F1F2',
|
||||
300: '#DBDFE9',
|
||||
400: '#B5B5C3',
|
||||
500: '#99A1B7',
|
||||
600: '#78829D',
|
||||
700: '#4B5675',
|
||||
750: '#323c59',
|
||||
800: '#252F4A',
|
||||
900: '#071437',
|
||||
950: '#030b1f',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/forms')
|
||||
],
|
||||
}
|
||||
|
||||
13
Moonlight.Client/UI/App.razor
Normal file
13
Moonlight.Client/UI/App.razor
Normal file
@@ -0,0 +1,13 @@
|
||||
@using Moonlight.Client.UI.Layouts
|
||||
|
||||
<Router AppAssembly="@typeof(App).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>Not found</PageTitle>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<p role="alert">Sorry, there's nothing at this address.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
||||
35
Moonlight.Client/UI/Layouts/MainLayout.razor
Normal file
35
Moonlight.Client/UI/Layouts/MainLayout.razor
Normal file
@@ -0,0 +1,35 @@
|
||||
@using MoonCore.Helpers
|
||||
@using Moonlight.Client.UI.Partials
|
||||
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
<div>
|
||||
<AppSidebar Layout="this" />
|
||||
|
||||
<div class="lg:pl-72">
|
||||
<AppHeader Layout="this"/>
|
||||
|
||||
<ErrorHandler>
|
||||
<main class="py-10">
|
||||
<div class="px-4 sm:px-6 lg:px-8">
|
||||
@Body
|
||||
</div>
|
||||
</main>
|
||||
</ErrorHandler>
|
||||
|
||||
<ToastLauncher />
|
||||
<ModalLauncher />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code
|
||||
{
|
||||
public event Func<Task> OnStateChanged;
|
||||
public bool ShowMobileNavigation { get; private set; } = false;
|
||||
|
||||
public async Task ToggleMobileNavigation()
|
||||
{
|
||||
ShowMobileNavigation = !ShowMobileNavigation;
|
||||
await OnStateChanged();
|
||||
}
|
||||
}
|
||||
82
Moonlight.Client/UI/Partials/AppHeader.razor
Normal file
82
Moonlight.Client/UI/Partials/AppHeader.razor
Normal file
@@ -0,0 +1,82 @@
|
||||
@using Moonlight.Client.UI.Layouts
|
||||
|
||||
<div class="sticky top-0 z-40 flex h-16 shrink-0 items-center gap-x-4 bg-gray-800/60 backdrop-blur px-4 shadow-sm sm:gap-x-6 sm:px-6 lg:px-8">
|
||||
@if (Layout.ShowMobileNavigation)
|
||||
{
|
||||
<button @onclick="Layout.ToggleMobileNavigation" type="button" class="-m-2.5 p-2.5 text-gray-700 lg:hidden">
|
||||
<span class="sr-only">Close sidebar</span>
|
||||
<i class="bi bi-x-lg text-xl"></i>
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button @onclick="Layout.ToggleMobileNavigation" type="button" class="-m-2.5 p-2.5 text-gray-700 lg:hidden">
|
||||
<span class="sr-only">Open sidebar</span>
|
||||
<i class="bi bi-list text-xl"></i>
|
||||
</button>
|
||||
}
|
||||
|
||||
<div class="h-6 w-px bg-gray-800 lg:hidden" aria-hidden="true"></div>
|
||||
|
||||
<div class="flex justify-between gap-x-4 lg:gap-x-6 w-full">
|
||||
<div></div>
|
||||
<div class="flex items-center gap-x-4 lg:gap-x-6">
|
||||
@*
|
||||
<button type="button" class="-m-2.5 p-2.5 text-gray-200 hover:text-gray-100">
|
||||
<span class="sr-only">View notifications</span>
|
||||
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"/>
|
||||
</svg>
|
||||
</button>
|
||||
*@
|
||||
|
||||
<!-- Separator -->
|
||||
<div class="hidden lg:block lg:h-6 lg:w-px lg:bg-gray-900/10" aria-hidden="true"></div>
|
||||
|
||||
<!-- Profile dropdown -->
|
||||
<div class="relative">
|
||||
<button type="button" class="-m-1.5 flex items-center p-1.5" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
|
||||
<span class="sr-only">Open user menu</span>
|
||||
<img class="h-8 w-8 rounded-full" src="https://masuowo.xyz/assets/images/avatar.png" alt="">
|
||||
<span class="hidden lg:flex lg:items-center">
|
||||
<span class="ml-4 text-sm font-semibold leading-6 text-gray-100" aria-hidden="true">
|
||||
@@masuowo
|
||||
</span>
|
||||
<svg class="ml-2 h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||
<path fill-rule="evenodd" d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z" clip-rule="evenodd"/>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<!--
|
||||
Dropdown menu, show/hide based on menu state.
|
||||
|
||||
Entering: "transition ease-out duration-100"
|
||||
From: "transform opacity-0 scale-95"
|
||||
To: "transform opacity-100 scale-100"
|
||||
Leaving: "transition ease-in duration-75"
|
||||
From: "transform opacity-100 scale-100"
|
||||
To: "transform opacity-0 scale-95"
|
||||
-->
|
||||
<div class="hidden absolute right-0 z-10 mt-2.5 w-32 origin-top-right rounded-md bg-white py-2 shadow-lg ring-1 ring-gray-900/5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1">
|
||||
<!-- Active: "bg-gray-50", Not Active: "" -->
|
||||
<a href="#" class="block px-3 py-1 text-sm leading-6 text-gray-900" role="menuitem" tabindex="-1" id="user-menu-item-0">Your profile</a>
|
||||
<a href="#" class="block px-3 py-1 text-sm leading-6 text-gray-900" role="menuitem" tabindex="-1" id="user-menu-item-1">Sign out</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code
|
||||
{
|
||||
[Parameter] public MainLayout Layout { get; set; }
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if(!firstRender)
|
||||
return;
|
||||
|
||||
Layout.OnStateChanged += () => InvokeAsync(StateHasChanged);
|
||||
}
|
||||
}
|
||||
194
Moonlight.Client/UI/Partials/AppSidebar.razor
Normal file
194
Moonlight.Client/UI/Partials/AppSidebar.razor
Normal file
@@ -0,0 +1,194 @@
|
||||
@using MoonCore.PluginFramework.Services
|
||||
@using Moonlight.Client.Interfaces
|
||||
@using Moonlight.Client.Models
|
||||
@using Moonlight.Client.UI.Layouts
|
||||
|
||||
@inject NavigationManager Navigation
|
||||
@inject ImplementationService ImplementationService
|
||||
|
||||
@{
|
||||
var url = new Uri(Navigation.Uri);
|
||||
}
|
||||
|
||||
<div class="relative z-40 lg:hidden transition-opacity @(Layout.ShowMobileNavigation ? "opacity-100" : "opacity-0")" role="dialog" aria-modal="true">
|
||||
<div class="fixed inset-0 bg-gray-800/80"></div>
|
||||
|
||||
<div class="fixed inset-0 flex justify-center bg-gray-900">
|
||||
<!--
|
||||
Off-canvas menu, show/hide based on off-canvas menu state.
|
||||
|
||||
Entering: "transition ease-in-out duration-300 transform"
|
||||
From: "-translate-x-full"
|
||||
To: "translate-x-0"
|
||||
Leaving: "transition ease-in-out duration-300 transform"
|
||||
From: "translate-x-0"
|
||||
To: "-translate-x-full"
|
||||
-->
|
||||
<div class="relative flex w-full max-w-xs flex-1">
|
||||
<!--
|
||||
Close button, show/hide based on off-canvas menu state.
|
||||
|
||||
Entering: "ease-in-out duration-300"
|
||||
From: "opacity-0"
|
||||
To: "opacity-100"
|
||||
Leaving: "ease-in-out duration-300"
|
||||
From: "opacity-100"
|
||||
To: "opacity-0"
|
||||
-->
|
||||
|
||||
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
||||
<div class="flex grow flex-col gap-y-5 overflow-y-auto bg-gray-900 px-6 pb-4">
|
||||
<div class="flex h-16 shrink-0 items-center">
|
||||
<img class="h-8 w-auto" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=500" alt="Your Company">
|
||||
</div>
|
||||
<nav class="flex flex-1 flex-col">
|
||||
<ul role="list" class="flex flex-1 flex-col gap-y-7">
|
||||
@foreach (var group in Items)
|
||||
{
|
||||
<li>
|
||||
@if (!string.IsNullOrEmpty(group.Key))
|
||||
{
|
||||
<div class="text-xs font-semibold leading-6 text-gray-400">
|
||||
@group.Key
|
||||
</div>
|
||||
}
|
||||
|
||||
<ul role="list" class="-mx-2 space-y-1">
|
||||
@foreach (var item in group.Value)
|
||||
{
|
||||
var isMatch = item.RequiresExactMatch
|
||||
? url.LocalPath == item.Path
|
||||
: url.LocalPath.StartsWith(item.Path);
|
||||
|
||||
<li>
|
||||
@if (isMatch)
|
||||
{
|
||||
<a href="@item.Path" class="bg-gray-800 text-white group flex gap-x-3 rounded-md p-2 text-sm leading-6 items-center">
|
||||
<i class="ms-1 text-lg shrink-0 @item.Icon"></i>
|
||||
@item.Name
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@item.Path" class="text-gray-300 hover:text-white hover:bg-gray-800 group flex gap-x-3 rounded-md p-2 text-sm leading-6 items-center">
|
||||
<i class="ms-1 text-lg shrink-0 @item.Icon"></i>
|
||||
@item.Name
|
||||
</a>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
|
||||
<li class="mt-auto">
|
||||
<a href="#" class="group -mx-2 flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6 text-gray-400 hover:bg-gray-800 hover:text-white">
|
||||
<svg class="h-6 w-6 shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"/>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
|
||||
</svg>
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Static sidebar for desktop -->
|
||||
<div class="hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col">
|
||||
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
||||
<div class="flex grow flex-col gap-y-5 overflow-y-auto bg-gray-800/60 px-6 pb-4">
|
||||
<div class="flex h-16 shrink-0 items-center">
|
||||
<img class="h-8 w-auto" src="https://gamecp.masuowo.xyz/api/core/asset/Core/svg/logo.svg" alt="Your Company">
|
||||
</div>
|
||||
<nav class="flex flex-1 flex-col">
|
||||
<ul role="list" class="flex flex-1 flex-col gap-y-7">
|
||||
@foreach (var group in Items)
|
||||
{
|
||||
<li>
|
||||
@if (!string.IsNullOrEmpty(group.Key))
|
||||
{
|
||||
<div class="text-xs font-semibold leading-6 text-gray-400">
|
||||
@group.Key
|
||||
</div>
|
||||
}
|
||||
|
||||
<ul role="list" class="-mx-2 space-y-1">
|
||||
@foreach (var item in group.Value)
|
||||
{
|
||||
var isMatch = item.RequiresExactMatch
|
||||
? url.LocalPath == item.Path
|
||||
: url.LocalPath.StartsWith(item.Path);
|
||||
|
||||
<li>
|
||||
@if (isMatch)
|
||||
{
|
||||
<a href="@item.Path" class="bg-gray-800 text-white group flex gap-x-3 rounded-md p-2 text-sm leading-6 items-center">
|
||||
<i class="ms-1 text-lg shrink-0 @item.Icon"></i>
|
||||
@item.Name
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@item.Path" class="text-gray-300 hover:text-white hover:bg-gray-800 group flex gap-x-3 rounded-md p-2 text-sm leading-6 items-center">
|
||||
<i class="ms-1 text-lg shrink-0 @item.Icon"></i>
|
||||
@item.Name
|
||||
</a>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
}
|
||||
|
||||
<li class="mt-auto">
|
||||
<a href="#" class="group -mx-2 flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6 text-gray-400 hover:bg-gray-800 hover:text-white">
|
||||
<svg class="h-6 w-6 shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"/>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
|
||||
</svg>
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code
|
||||
{
|
||||
[Parameter] public MainLayout Layout { get; set; }
|
||||
|
||||
private Dictionary<string, SidebarItem[]> Items = new();
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
Items = ImplementationService.Get<ISidebarItemProvider>()
|
||||
.SelectMany(x => x.Get())
|
||||
//.Where(x => x.Permission == null || (x.Permission != null && IdentityService.HasPermission(x.Permission)))
|
||||
.GroupBy(x => x.Group ?? "")
|
||||
.OrderByDescending(x => string.IsNullOrEmpty(x.Key))
|
||||
.ToDictionary(x => x.Key, x => x.OrderBy(y => y.Priority).ToArray());
|
||||
}
|
||||
|
||||
protected override Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (!firstRender)
|
||||
return Task.CompletedTask;
|
||||
|
||||
Layout.OnStateChanged += () => InvokeAsync(StateHasChanged);
|
||||
|
||||
Navigation.LocationChanged += async (_, _) =>
|
||||
{
|
||||
if (!Layout.ShowMobileNavigation)
|
||||
return;
|
||||
|
||||
await Layout.ToggleMobileNavigation();
|
||||
};
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
3
Moonlight.Client/UI/Views/Admin/Index.razor
Normal file
3
Moonlight.Client/UI/Views/Admin/Index.razor
Normal file
@@ -0,0 +1,3 @@
|
||||
@page "/admin"
|
||||
|
||||
<h1>Elo testy</h1>
|
||||
5
Moonlight.Client/UI/Views/Index.razor
Normal file
5
Moonlight.Client/UI/Views/Index.razor
Normal file
@@ -0,0 +1,5 @@
|
||||
@page "/"
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
18
Moonlight.Client/_Imports.razor
Normal file
18
Moonlight.Client/_Imports.razor
Normal file
@@ -0,0 +1,18 @@
|
||||
@using System.Net.Http
|
||||
@using System.Net.Http.Json
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.AspNetCore.Components.WebAssembly.Http
|
||||
@using Microsoft.JSInterop
|
||||
@using Moonlight.Client
|
||||
|
||||
@using MoonCore.Blazor.Tailwind.Components
|
||||
@using MoonCore.Blazor.Tailwind.Alerts
|
||||
@using MoonCore.Blazor.Tailwind.Crud
|
||||
@using MoonCore.Blazor.Tailwind.Forms
|
||||
@using MoonCore.Blazor.Tailwind.Helpers
|
||||
@using MoonCore.Blazor.Tailwind.Modals
|
||||
@using MoonCore.Blazor.Tailwind.Services
|
||||
@using MoonCore.Blazor.Tailwind.Toasts
|
||||
3222
Moonlight.Client/wwwroot/css/style.min.css
vendored
Normal file
3222
Moonlight.Client/wwwroot/css/style.min.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Moonlight.Client/wwwroot/icon-192.png
Normal file
BIN
Moonlight.Client/wwwroot/icon-192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
Moonlight.Client/wwwroot/icon-512.png
Normal file
BIN
Moonlight.Client/wwwroot/icon-512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
32
Moonlight.Client/wwwroot/index.html
Normal file
32
Moonlight.Client/wwwroot/index.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Moonlight.Client</title>
|
||||
<base href="/" />
|
||||
<link rel="stylesheet" href="/css/style.min.css" />
|
||||
<link href="manifest.webmanifest" rel="manifest" />
|
||||
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png" />
|
||||
<link rel="apple-touch-icon" sizes="192x192" href="icon-192.png" />
|
||||
</head>
|
||||
|
||||
<body class="bg-gray-950 text-white font-inter">
|
||||
<div id="app">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
An unhandled error has occurred.
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
|
||||
<script src="/_framework/blazor.webassembly.js"></script>
|
||||
<script>navigator.serviceWorker.register('service-worker.js');</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
22
Moonlight.Client/wwwroot/manifest.webmanifest
Normal file
22
Moonlight.Client/wwwroot/manifest.webmanifest
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "Moonlight.Client",
|
||||
"short_name": "Moonlight.Client",
|
||||
"id": "./",
|
||||
"start_url": "./",
|
||||
"display": "standalone",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#03173d",
|
||||
"prefer_related_applications": false,
|
||||
"icons": [
|
||||
{
|
||||
"src": "icon-512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
},
|
||||
{
|
||||
"src": "icon-192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Moonlight.Client/wwwroot/service-worker.js
Normal file
4
Moonlight.Client/wwwroot/service-worker.js
Normal file
@@ -0,0 +1,4 @@
|
||||
// In development, always fetch from the network and do not enable offline support.
|
||||
// This is because caching would make development more difficult (changes would not
|
||||
// be reflected on the first load after each change).
|
||||
self.addEventListener('fetch', () => { });
|
||||
55
Moonlight.Client/wwwroot/service-worker.published.js
Normal file
55
Moonlight.Client/wwwroot/service-worker.published.js
Normal file
@@ -0,0 +1,55 @@
|
||||
// Caution! Be sure you understand the caveats before publishing an application with
|
||||
// offline support. See https://aka.ms/blazor-offline-considerations
|
||||
|
||||
self.importScripts('./service-worker-assets.js');
|
||||
self.addEventListener('install', event => event.waitUntil(onInstall(event)));
|
||||
self.addEventListener('activate', event => event.waitUntil(onActivate(event)));
|
||||
self.addEventListener('fetch', event => event.respondWith(onFetch(event)));
|
||||
|
||||
const cacheNamePrefix = 'offline-cache-';
|
||||
const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`;
|
||||
const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ];
|
||||
const offlineAssetsExclude = [ /^service-worker\.js$/ ];
|
||||
|
||||
// Replace with your base path if you are hosting on a subfolder. Ensure there is a trailing '/'.
|
||||
const base = "/";
|
||||
const baseUrl = new URL(base, self.origin);
|
||||
const manifestUrlList = self.assetsManifest.assets.map(asset => new URL(asset.url, baseUrl).href);
|
||||
|
||||
async function onInstall(event) {
|
||||
console.info('Service worker: Install');
|
||||
|
||||
// Fetch and cache all matching items from the assets manifest
|
||||
const assetsRequests = self.assetsManifest.assets
|
||||
.filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url)))
|
||||
.filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url)))
|
||||
.map(asset => new Request(asset.url, { integrity: asset.hash, cache: 'no-cache' }));
|
||||
await caches.open(cacheName).then(cache => cache.addAll(assetsRequests));
|
||||
}
|
||||
|
||||
async function onActivate(event) {
|
||||
console.info('Service worker: Activate');
|
||||
|
||||
// Delete unused caches
|
||||
const cacheKeys = await caches.keys();
|
||||
await Promise.all(cacheKeys
|
||||
.filter(key => key.startsWith(cacheNamePrefix) && key !== cacheName)
|
||||
.map(key => caches.delete(key)));
|
||||
}
|
||||
|
||||
async function onFetch(event) {
|
||||
let cachedResponse = null;
|
||||
if (event.request.method === 'GET') {
|
||||
// For all navigation requests, try to serve index.html from cache,
|
||||
// unless that request is for an offline resource.
|
||||
// If you need some URLs to be server-rendered, edit the following check to exclude those URLs
|
||||
const shouldServeIndexHtml = event.request.mode === 'navigate'
|
||||
&& !manifestUrlList.some(url => url === event.request.url);
|
||||
|
||||
const request = shouldServeIndexHtml ? 'index.html' : event.request;
|
||||
const cache = await caches.open(cacheName);
|
||||
cachedResponse = await cache.match(request);
|
||||
}
|
||||
|
||||
return cachedResponse || fetch(event.request);
|
||||
}
|
||||
14
Moonlight.Shared/Moonlight.Shared.csproj
Normal file
14
Moonlight.Shared/Moonlight.Shared.csproj
Normal file
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Http\Requests\" />
|
||||
<Folder Include="Http\Responses\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,6 +1,10 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Moonlight", "Moonlight\Moonlight.csproj", "{B9AD26D2-AAA7-4C57-884D-5AACAA54D5B6}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Moonlight.ApiServer", "Moonlight.ApiServer\Moonlight.ApiServer.csproj", "{B1286CB5-0A6E-4E06-A937-9F5FE1662C5F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Moonlight.Client", "Moonlight.Client\Moonlight.Client.csproj", "{8E3F3B36-544D-4FB4-94E9-4572FF099B19}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Moonlight.Shared", "Moonlight.Shared\Moonlight.Shared.csproj", "{C82E4F2A-91D2-4BC7-9AA7-241FDAAFC823}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -8,10 +12,18 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B9AD26D2-AAA7-4C57-884D-5AACAA54D5B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B9AD26D2-AAA7-4C57-884D-5AACAA54D5B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B9AD26D2-AAA7-4C57-884D-5AACAA54D5B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B9AD26D2-AAA7-4C57-884D-5AACAA54D5B6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B1286CB5-0A6E-4E06-A937-9F5FE1662C5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B1286CB5-0A6E-4E06-A937-9F5FE1662C5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B1286CB5-0A6E-4E06-A937-9F5FE1662C5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B1286CB5-0A6E-4E06-A937-9F5FE1662C5F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8E3F3B36-544D-4FB4-94E9-4572FF099B19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8E3F3B36-544D-4FB4-94E9-4572FF099B19}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8E3F3B36-544D-4FB4-94E9-4572FF099B19}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8E3F3B36-544D-4FB4-94E9-4572FF099B19}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C82E4F2A-91D2-4BC7-9AA7-241FDAAFC823}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C82E4F2A-91D2-4BC7-9AA7-241FDAAFC823}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C82E4F2A-91D2-4BC7-9AA7-241FDAAFC823}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C82E4F2A-91D2-4BC7-9AA7-241FDAAFC823}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
EndGlobalSection
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
@using Moonlight.Core.UI.Layouts
|
||||
@using Moonlight.Core.Services
|
||||
|
||||
@inject FeatureService FeatureService
|
||||
|
||||
@{
|
||||
var assemblies = FeatureService.UiContext.RouteAssemblies;
|
||||
var firstAssembly = assemblies.First();
|
||||
var additionalAssemblies = assemblies.Skip(1).ToArray();
|
||||
}
|
||||
|
||||
<Router AppAssembly="@firstAssembly" AdditionalAssemblies="@additionalAssemblies">
|
||||
<Found Context="routeData">
|
||||
<CascadingValue TValue="Type" Name="TargetPageType" Value="@routeData.PageType">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
|
||||
</CascadingValue>
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>Not found</PageTitle>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<IconAlert Title="Unknown page" Icon="bx-search">
|
||||
The address you are trying to access is not associated with any page. To resume please go back or to the <a href="/">homepage</a>
|
||||
</IconAlert>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
||||
@@ -1,51 +0,0 @@
|
||||
.my-reconnect-modal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.components-reconnect-hide > div {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.components-reconnect-show > div {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.components-reconnect-failed > div {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.components-reconnect-rejected > div {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.components-reconnect-show > .show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.components-reconnect-failed > .failed {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.components-reconnect-rejected > .rejected {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.components-reconnect-hide > .default {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.components-reconnect-hide {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.components-reconnect-show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.components-reconnect-failed {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.components-reconnect-rejected {
|
||||
display: block;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,66 +0,0 @@
|
||||
.light-mode {
|
||||
--scalar-background-1: #fff;
|
||||
--scalar-background-2: #f8fafc;
|
||||
--scalar-background-3: #e7e7e7;
|
||||
--scalar-background-accent: #8ab4f81f;
|
||||
--scalar-color-1: #000;
|
||||
--scalar-color-2: #6b7280;
|
||||
--scalar-color-3: #9ca3af;
|
||||
--scalar-color-accent: #00c16a;
|
||||
--scalar-border-color: #e5e7eb;
|
||||
--scalar-color-green: #069061;
|
||||
--scalar-color-red: #ef4444;
|
||||
--scalar-color-yellow: #f59e0b;
|
||||
--scalar-color-blue: #1d4ed8;
|
||||
--scalar-color-orange: #fb892c;
|
||||
--scalar-color-purple: #6d28d9;
|
||||
--scalar-button-1: #000;
|
||||
--scalar-button-1-hover: rgba(0, 0, 0, 0.9);
|
||||
--scalar-button-1-color: #fff;
|
||||
}
|
||||
.dark-mode {
|
||||
--scalar-background-1: #020420;
|
||||
--scalar-background-2: #121a31;
|
||||
--scalar-background-3: #1e293b;
|
||||
--scalar-background-accent: #8ab4f81f;
|
||||
--scalar-color-1: #fff;
|
||||
--scalar-color-2: #cbd5e1;
|
||||
--scalar-color-3: #94a3b8;
|
||||
--scalar-color-accent: #00dc82;
|
||||
--scalar-border-color: #1e293b;
|
||||
--scalar-color-green: #069061;
|
||||
--scalar-color-red: #f87171;
|
||||
--scalar-color-yellow: #fde68a;
|
||||
--scalar-color-blue: #60a5fa;
|
||||
--scalar-color-orange: #fb892c;
|
||||
--scalar-color-purple: #ddd6fe;
|
||||
--scalar-button-1: hsla(0, 0%, 100%, 0.9);
|
||||
--scalar-button-1-hover: hsla(0, 0%, 100%, 0.8);
|
||||
--scalar-button-1-color: #000;
|
||||
}
|
||||
.dark-mode .t-doc__sidebar,
|
||||
.light-mode .t-doc__sidebar {
|
||||
--scalar-sidebar-background-1: var(--scalar-background-1);
|
||||
--scalar-sidebar-color-1: var(--scalar-color-1);
|
||||
--scalar-sidebar-color-2: var(--scalar-color-3);
|
||||
--scalar-sidebar-border-color: var(--scalar-border-color);
|
||||
--scalar-sidebar-item-hover-background: transparent;
|
||||
--scalar-sidebar-item-hover-color: var(--scalar-color-1);
|
||||
--scalar-sidebar-item-active-background: transparent;
|
||||
--scalar-sidebar-color-active: var(--scalar-color-accent);
|
||||
--scalar-sidebar-search-background: transparent;
|
||||
--scalar-sidebar-search-color: var(--scalar-color-3);
|
||||
--scalar-sidebar-search-border-color: var(--scalar-border-color);
|
||||
--scalar-sidebar-indent-border: var(--scalar-border-color);
|
||||
--scalar-sidebar-indent-border-hover: var(--scalar-color-1);
|
||||
--scalar-sidebar-indent-border-active: var(--scalar-color-accent);
|
||||
}
|
||||
.scalar-card .request-card-footer {
|
||||
--scalar-background-3: var(--scalar-background-2);
|
||||
--scalar-button-1: #0f172a;
|
||||
--scalar-button-1-hover: rgba(30, 41, 59, 0.5);
|
||||
--scalar-button-1-color: #fff;
|
||||
}
|
||||
.scalar-card .show-api-client-button {
|
||||
border: 1px solid #334155 !important;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,29 +0,0 @@
|
||||
.table-row-hover-content {
|
||||
visibility: hidden;
|
||||
}
|
||||
tr:hover .table-row-hover-content {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* Hide scrollbar for Chrome, Safari and Opera */
|
||||
.hide-scrollbar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hide scrollbar for IE, Edge and Firefox */
|
||||
.hide-scrollbar {
|
||||
-ms-overflow-style: none; /* IE and Edge */
|
||||
scrollbar-width: none; /* Firefox */
|
||||
}
|
||||
|
||||
.blur-unless-hover {
|
||||
filter: blur(5px);
|
||||
}
|
||||
|
||||
.blur-unless-hover:hover {
|
||||
filter: none;
|
||||
}
|
||||
|
||||
.blur {
|
||||
filter: blur(5px);
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
@@ -1,168 +0,0 @@
|
||||
class AlertHelper {
|
||||
constructor(description, color, type, icon = "") {
|
||||
|
||||
this.htmlHandle = buildAlert(description, color, type, icon, this)
|
||||
|
||||
this.modal = new bootstrap.Modal(this.htmlHandle, {
|
||||
focus: true
|
||||
});
|
||||
|
||||
this.ask = async function () {
|
||||
// This should wait until the modal has been submitted or cancled and the return the input value
|
||||
|
||||
// Create a new promise that will be resolved when the modal is submitted or cancelled
|
||||
return new Promise((resolve, reject) => {
|
||||
this.resolvePromise = resolve;
|
||||
this.modal.show();
|
||||
|
||||
// Handle modal close events
|
||||
this.modal._element.addEventListener('hidden.bs.modal', () => {
|
||||
|
||||
if(type === "confirm")
|
||||
this.resolvePromise(false);
|
||||
else
|
||||
this.resolvePromise("");
|
||||
|
||||
setTimeout(() => {
|
||||
this.htmlHandle.remove();
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function buildAlert(description, color, type, icon, handle) {
|
||||
var modal = document.createElement("div");
|
||||
modal.classList.add("modal", "fade");
|
||||
modal.tabIndex = -1;
|
||||
|
||||
var modalDialog = document.createElement("div");
|
||||
modalDialog.classList.add("modal-dialog", "modal-dialog-centered");
|
||||
|
||||
var modalContent = document.createElement("div");
|
||||
modalContent.classList.add("modal-content");
|
||||
|
||||
modalContent.appendChild(buildAlertBody(description, color, type, icon));
|
||||
modalContent.appendChild(buildAlertFooter(type, handle));
|
||||
|
||||
modalDialog.appendChild(modalContent);
|
||||
|
||||
modal.appendChild(modalDialog);
|
||||
|
||||
return modal;
|
||||
}
|
||||
|
||||
function buildAlertBody(description, color, type, icon) {
|
||||
var modalBody = document.createElement("modal-body");
|
||||
modalBody.classList.add("modal-body");
|
||||
|
||||
if (type !== "text") {
|
||||
var flexBox = document.createElement("div");
|
||||
flexBox.classList.add("d-flex", "justify-content-center");
|
||||
|
||||
var symbol = document.createElement("div");
|
||||
symbol.classList.add("symbol", "symbol-circle", "h-90px", "w-90px", "bg-" + color, "text-center", "d-flex", "justify-content-center", "align-items-center");
|
||||
|
||||
var iconE = document.createElement("i");
|
||||
iconE.classList.add("bx", "bx-lg", icon, "text-white", "align-middle", "p-10");
|
||||
|
||||
symbol.appendChild(iconE);
|
||||
flexBox.appendChild(symbol);
|
||||
|
||||
modalBody.appendChild(flexBox);
|
||||
}
|
||||
|
||||
var descE = document.createElement("p");
|
||||
descE.classList.add("mt-5", "text-gray-800", "fs-4", "fw-semibold", "text-center");
|
||||
descE.innerText = description;
|
||||
|
||||
modalBody.appendChild(descE);
|
||||
|
||||
if (type === "text") {
|
||||
var txtInput = document.createElement("input");
|
||||
|
||||
txtInput.classList.add("form-control", "w-100", "text-center", "mt-2");
|
||||
txtInput.type = "text";
|
||||
txtInput.value = icon;
|
||||
|
||||
modalBody.appendChild(txtInput);
|
||||
}
|
||||
|
||||
return modalBody;
|
||||
}
|
||||
|
||||
function buildAlertFooter(type, handle) {
|
||||
var modalFooter = document.createElement("modal-footer");
|
||||
modalFooter.classList.add("modal-footer");
|
||||
|
||||
var buttonGroup = document.createElement("div");
|
||||
buttonGroup.classList.add("btn-group", "w-100");
|
||||
|
||||
if (type === "confirm" || type === "text") {
|
||||
var submitButton = document.createElement("button");
|
||||
|
||||
submitButton.onclick = function () {
|
||||
if(type === "confirm")
|
||||
handle.resolvePromise(true);
|
||||
else
|
||||
handle.resolvePromise(handle.htmlHandle.getElementsByTagName("input")[0].value);
|
||||
|
||||
handle.modal.hide();
|
||||
|
||||
setTimeout(() => {
|
||||
handle.htmlHandle.remove();
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
if(type === "confirm")
|
||||
{
|
||||
submitButton.innerText = "Yes";
|
||||
submitButton.classList.add("btn", "btn-primary", "w-50");
|
||||
}
|
||||
else
|
||||
{
|
||||
submitButton.innerText = "Submit";
|
||||
submitButton.classList.add("btn", "btn-primary", "w-50");
|
||||
}
|
||||
|
||||
var cancelButton = document.createElement("button");
|
||||
cancelButton.onclick = function () {
|
||||
if(type === "confirm")
|
||||
handle.resolvePromise(false);
|
||||
else
|
||||
handle.resolvePromise("");
|
||||
|
||||
handle.modal.hide();
|
||||
|
||||
setTimeout(() => {
|
||||
handle.htmlHandle.remove();
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
if(type === "confirm")
|
||||
{
|
||||
cancelButton.innerText = "No";
|
||||
cancelButton.classList.add("btn", "btn-danger", "w-50");
|
||||
}
|
||||
else
|
||||
{
|
||||
cancelButton.innerText = "Cancel";
|
||||
cancelButton.classList.add("btn", "btn-secondary", "w-50");
|
||||
}
|
||||
|
||||
buttonGroup.appendChild(submitButton);
|
||||
buttonGroup.appendChild(cancelButton);
|
||||
} else {
|
||||
var okButton = document.createElement("button");
|
||||
okButton.classList.add("btn", "btn-primary");
|
||||
okButton.innerText = "Cancel";
|
||||
okButton.setAttribute("data-bs-dismiss", "modal");
|
||||
|
||||
buttonGroup.appendChild(okButton);
|
||||
}
|
||||
|
||||
modalFooter.appendChild(buttonGroup);
|
||||
|
||||
return modalFooter;
|
||||
}
|
||||
7
Moonlight/Assets/Core/js/bootstrap.js
vendored
7
Moonlight/Assets/Core/js/bootstrap.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,293 +0,0 @@
|
||||
window.moonlight = {
|
||||
toasts: {
|
||||
success: function(title, message, timeout)
|
||||
{
|
||||
this.show(title, message, timeout, "success");
|
||||
},
|
||||
danger: function(title, message, timeout)
|
||||
{
|
||||
this.show(title, message, timeout, "danger");
|
||||
},
|
||||
warning: function(title, message, timeout)
|
||||
{
|
||||
this.show(title, message, timeout, "warning");
|
||||
},
|
||||
info: function(title, message, timeout)
|
||||
{
|
||||
this.show(title, message, timeout, "info");
|
||||
},
|
||||
show: function(title, message, timeout, color)
|
||||
{
|
||||
var toast = new ToastHelper(title, message, color, timeout);
|
||||
toast.show();
|
||||
},
|
||||
create: function (id, text) {
|
||||
var toast = new ToastHelper("Progress", text, "secondary", 0);
|
||||
toast.showAlways();
|
||||
|
||||
toast.domElement.setAttribute('data-ml-toast-id', id);
|
||||
},
|
||||
modify: function (id, text) {
|
||||
var toast = document.querySelector('[data-ml-toast-id="' + id + '"]');
|
||||
|
||||
toast.getElementsByClassName("toast-body")[0].getElementsByTagName("span")[0].innerText = text;
|
||||
},
|
||||
remove: function (id) {
|
||||
var toast = document.querySelector('[data-ml-toast-id="' + id + '"]');
|
||||
bootstrap.Toast.getInstance(toast).hide();
|
||||
|
||||
setTimeout(() => {
|
||||
toast.remove();
|
||||
}, 2);
|
||||
}
|
||||
},
|
||||
modals: {
|
||||
show: function (id, focus)
|
||||
{
|
||||
let modal = new bootstrap.Modal(document.getElementById(id), {
|
||||
focus: focus
|
||||
});
|
||||
|
||||
modal.show();
|
||||
},
|
||||
hide: function (id)
|
||||
{
|
||||
let element = document.getElementById(id)
|
||||
let modal = bootstrap.Modal.getInstance(element)
|
||||
modal.hide()
|
||||
}
|
||||
},
|
||||
alerts: {
|
||||
getHelper: function (description, color, type, icon = "") {
|
||||
return new AlertHelper(description, color, type, icon);
|
||||
},
|
||||
info: function (title, description) {
|
||||
this.getHelper(title, "info", "", "bx-info-circle").ask(); // Ignore, as it should not be a blocking call
|
||||
},
|
||||
success: function (title, description) {
|
||||
this.getHelper(title, "success", "", "bx-check").ask(); // Ignore, as it should not be a blocking call
|
||||
},
|
||||
warning: function (title, description) {
|
||||
this.getHelper(title, "warning", "", "bx-error-circle").ask(); // Ignore, as it should not be a blocking call
|
||||
},
|
||||
error: function (title, description) {
|
||||
this.getHelper(title, "danger", "", "bx-error").ask(); // Ignore, as it should not be a blocking call
|
||||
},
|
||||
yesno: async function (title, yesText, noText) {
|
||||
return await this.getHelper(title, "secondary", "confirm", "bx-question-mark").ask();
|
||||
},
|
||||
text: async function (title, description, initialValue) {
|
||||
return await this.getHelper(title, "primary", "text", initialValue).ask();
|
||||
}
|
||||
},
|
||||
utils: {
|
||||
download: async function (fileName, contentStreamReference) {
|
||||
const arrayBuffer = await contentStreamReference.arrayBuffer();
|
||||
const blob = new Blob([arrayBuffer]);
|
||||
const url = URL.createObjectURL(blob);
|
||||
const anchorElement = document.createElement('a');
|
||||
anchorElement.href = url;
|
||||
anchorElement.download = fileName ?? '';
|
||||
anchorElement.click();
|
||||
anchorElement.remove();
|
||||
URL.revokeObjectURL(url);
|
||||
},
|
||||
vendo: function ()
|
||||
{
|
||||
try
|
||||
{
|
||||
var request = new XMLHttpRequest();
|
||||
|
||||
request.open("GET", "https://pagead2.googlesyndication.com/pagead/js/aidsbygoogle.js?client=ca-pub-1234567890123456", false);
|
||||
request.send();
|
||||
|
||||
if(request.status === 404)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
},
|
||||
registerUnload: function (dotNetObjRef)
|
||||
{
|
||||
window.addEventListener("beforeunload", function()
|
||||
{
|
||||
dotNetObjRef.invokeMethodAsync('Unload');
|
||||
}, false);
|
||||
}
|
||||
},
|
||||
textEditor: {
|
||||
create: function(id)
|
||||
{
|
||||
BalloonEditor
|
||||
.create(document.getElementById(id), {
|
||||
toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote' ],
|
||||
heading: {
|
||||
options: [
|
||||
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
|
||||
{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
|
||||
{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' }
|
||||
]
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
get: function (id)
|
||||
{
|
||||
let editor = document.getElementById(id).ckeditorInstance;
|
||||
return editor.getData();
|
||||
},
|
||||
set: function (id, data)
|
||||
{
|
||||
let editor = document.getElementById(id).ckeditorInstance;
|
||||
editor.setData(data);
|
||||
}
|
||||
},
|
||||
clipboard: {
|
||||
copy: function (text) {
|
||||
if (!navigator.clipboard) {
|
||||
var textArea = document.createElement("textarea");
|
||||
textArea.value = text;
|
||||
|
||||
// Avoid scrolling to bottom
|
||||
textArea.style.top = "0";
|
||||
textArea.style.left = "0";
|
||||
textArea.style.position = "fixed";
|
||||
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
|
||||
try {
|
||||
var successful = document.execCommand('copy');
|
||||
var msg = successful ? 'successful' : 'unsuccessful';
|
||||
} catch (err) {
|
||||
console.error('Fallback: Oops, unable to copy', err);
|
||||
}
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
return;
|
||||
}
|
||||
navigator.clipboard.writeText(text).then(function () {
|
||||
},
|
||||
function (err) {
|
||||
console.error('Async: Could not copy text: ', err);
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
dropzone: {
|
||||
create: function (elementId, url) {
|
||||
var id = "#" + elementId;
|
||||
var dropzone = document.querySelector(id);
|
||||
|
||||
// set the preview element template
|
||||
var previewNode = dropzone.querySelector(".dropzone-item");
|
||||
previewNode.id = "";
|
||||
var previewTemplate = previewNode.parentNode.innerHTML;
|
||||
previewNode.parentNode.removeChild(previewNode);
|
||||
|
||||
var fileDropzone = new Dropzone(id, {
|
||||
url: url,
|
||||
maxFilesize: 100,
|
||||
previewTemplate: previewTemplate,
|
||||
previewsContainer: id + " .dropzone-items",
|
||||
clickable: ".dropzone-panel",
|
||||
createImageThumbnails: false,
|
||||
ignoreHiddenFiles: false,
|
||||
disablePreviews: false
|
||||
});
|
||||
|
||||
fileDropzone.on("addedfile", function (file) {
|
||||
const dropzoneItems = dropzone.querySelectorAll('.dropzone-item');
|
||||
dropzoneItems.forEach(dropzoneItem => {
|
||||
dropzoneItem.style.display = '';
|
||||
});
|
||||
|
||||
// Create a progress bar for the current file
|
||||
var progressBar = dropzone.querySelector('.dropzone-item .progress-bar');
|
||||
progressBar.style.width = "0%";
|
||||
});
|
||||
|
||||
// Update the progress bar for each file
|
||||
fileDropzone.on("uploadprogress", function (file, progress, bytesSent) {
|
||||
var dropzoneItem = file.previewElement;
|
||||
var progressBar = dropzoneItem.querySelector('.progress-bar');
|
||||
progressBar.style.width = progress + "%";
|
||||
});
|
||||
|
||||
// Hide the progress bar for each file when the upload is complete
|
||||
fileDropzone.on("complete", function (file) {
|
||||
var dropzoneItem = file.previewElement;
|
||||
var progressBar = dropzoneItem.querySelector('.progress-bar');
|
||||
|
||||
setTimeout(function () {
|
||||
progressBar.style.opacity = "1";
|
||||
progressBar.classList.remove("bg-primary");
|
||||
progressBar.classList.add("bg-success");
|
||||
}, 300);
|
||||
});
|
||||
},
|
||||
updateUrl: function (elementId, url) {
|
||||
Dropzone.forElement("#" + elementId).options.url = url;
|
||||
}
|
||||
},
|
||||
editor: {
|
||||
instance: {},
|
||||
|
||||
create: function (mount, theme, mode, initialContent, lines, fontSize) {
|
||||
this.instance = ace.edit(mount);
|
||||
|
||||
this.instance.setTheme("ace/theme/" + theme);
|
||||
this.instance.session.setMode("ace/mode/" + mode);
|
||||
this.instance.setShowPrintMargin(false);
|
||||
this.instance.setOptions({
|
||||
minLines: lines,
|
||||
maxLines: lines
|
||||
});
|
||||
|
||||
this.instance.setValue(initialContent);
|
||||
this.instance.setFontSize(fontSize);
|
||||
},
|
||||
|
||||
setValue: function (content) {
|
||||
this.instance.setValue(content);
|
||||
this.instance.moveCursorTo(0);
|
||||
},
|
||||
|
||||
getValue: function () {
|
||||
return this.instance.getValue();
|
||||
},
|
||||
|
||||
setMode: function (mode) {
|
||||
this.instance.session.setMode("ace/mode/" + mode);
|
||||
}
|
||||
},
|
||||
hotkeys: {
|
||||
storage: {},
|
||||
|
||||
registerHotkey: function (key, modifier, action, dotNetObjRef) {
|
||||
const hotkeyListener = (event) => {
|
||||
if (event.code === key && event[modifier + 'Key']) {
|
||||
event.preventDefault();
|
||||
dotNetObjRef.invokeMethodAsync('OnHotkeyPressed', action);
|
||||
}
|
||||
};
|
||||
this.storage[key + modifier] = hotkeyListener;
|
||||
window.addEventListener('keydown', hotkeyListener);
|
||||
},
|
||||
|
||||
unregisterHotkey: function (key, modifier) {
|
||||
const listenerKey = key + modifier;
|
||||
if (this.storage[listenerKey]) {
|
||||
window.removeEventListener('keydown', this.hotkeys[listenerKey]);
|
||||
delete this.storage[listenerKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
function showSidebarDrawer() {
|
||||
let sidebar = document.getElementsByClassName("app-sidebar")[0];
|
||||
|
||||
sidebar.classList.add("drawer");
|
||||
sidebar.classList.add("drawer-start");
|
||||
sidebar.setAttribute("data-kt-drawer-overlay", "true");
|
||||
|
||||
setTimeout(() => {
|
||||
sidebar.classList.add("drawer-on");
|
||||
|
||||
let disableOverlay = document.createElement("div");
|
||||
|
||||
disableOverlay.classList.add("drawer-overlay");
|
||||
disableOverlay.style.zIndex = "105";
|
||||
|
||||
disableOverlay.onclick = () => hideSidebarDrawer();
|
||||
|
||||
document.body.appendChild(disableOverlay);
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function hideSidebarDrawer()
|
||||
{
|
||||
let sidebar = document.getElementsByClassName("app-sidebar")[0];
|
||||
|
||||
sidebar.classList.remove("drawer-on");
|
||||
|
||||
setTimeout(() => {
|
||||
sidebar.classList.remove("drawer");
|
||||
sidebar.classList.remove("drawer-start");
|
||||
|
||||
|
||||
sidebar.setAttribute("data-kt-drawer-overlay", "false");
|
||||
|
||||
let disableOverlay = document.getElementsByClassName("drawer-overlay")[0];
|
||||
disableOverlay.remove();
|
||||
}, 350);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,166 +0,0 @@
|
||||
class ToastHelper {
|
||||
constructor(title, description, color, timeout) {
|
||||
var toastElement = buildToast(title, description, color);
|
||||
var toastWrapper = getOrCreateToastWrapper();
|
||||
toastWrapper.append(toastElement);
|
||||
this.bootstrapToast = new bootstrap.Toast(toastElement, {
|
||||
autohide: false
|
||||
});
|
||||
this.domElement = toastElement;
|
||||
|
||||
this.show = function () {
|
||||
this.bootstrapToast.show();
|
||||
|
||||
if (timeout && typeof timeout === 'number') {
|
||||
setTimeout(() => {
|
||||
this.hide();
|
||||
toastElement.remove();
|
||||
}, timeout);
|
||||
}
|
||||
}
|
||||
|
||||
this.showAlways = function () {
|
||||
this.bootstrapToast.show();
|
||||
}
|
||||
|
||||
this.hide = function () {
|
||||
this.bootstrapToast.hide();
|
||||
}
|
||||
|
||||
this.dispose = function () {
|
||||
this.bootstrapToast.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getOrCreateToastWrapper() {
|
||||
var toastWrapper = document.querySelector('body > [data-toast-wrapper]');
|
||||
|
||||
if (!toastWrapper) {
|
||||
toastWrapper = document.createElement('div');
|
||||
toastWrapper.style.zIndex = 11;
|
||||
toastWrapper.style.position = 'fixed';
|
||||
toastWrapper.style.bottom = 0;
|
||||
toastWrapper.style.right = 0;
|
||||
toastWrapper.style.padding = '1rem';
|
||||
toastWrapper.setAttribute('data-toast-wrapper', '');
|
||||
document.body.append(toastWrapper);
|
||||
}
|
||||
|
||||
return toastWrapper;
|
||||
}
|
||||
|
||||
function buildToastHeader(title, color) {
|
||||
var toastHeader = document.createElement('div');
|
||||
|
||||
if(title !== "")
|
||||
{
|
||||
toastHeader.setAttribute('class', 'toast-header');
|
||||
|
||||
var titleE = document.createElement('div');
|
||||
titleE.setAttribute('class', 'me-auto');
|
||||
|
||||
var iconE = document.createElement("i");
|
||||
|
||||
var iconTag = "bx-info-circle";
|
||||
|
||||
switch (color)
|
||||
{
|
||||
case "info":
|
||||
iconTag = "bx-info-circle";
|
||||
break
|
||||
|
||||
case "success":
|
||||
iconTag = "bx-check-circle";
|
||||
break
|
||||
|
||||
case "warning":
|
||||
iconTag = "bx-error-circle";
|
||||
break
|
||||
|
||||
case "danger":
|
||||
iconTag = "bx-error";
|
||||
break
|
||||
}
|
||||
|
||||
iconE.setAttribute("class", "align-middle me-2 bx bx-sm " + iconTag + " text-" + (color === "secondary" ? "primary" : color));
|
||||
|
||||
var titleText = document.createElement("span");
|
||||
titleText.setAttribute("class", "text-white fs-6 fw-bold align-middle");
|
||||
titleText.innerText = title;
|
||||
|
||||
titleE.appendChild(iconE);
|
||||
titleE.appendChild(titleText);
|
||||
|
||||
var closeButton = document.createElement('button');
|
||||
closeButton.setAttribute('type', 'button');
|
||||
closeButton.setAttribute('class', 'btn-close');
|
||||
closeButton.setAttribute('data-bs-dismiss', 'toast');
|
||||
closeButton.setAttribute('data-label', 'Close');
|
||||
|
||||
toastHeader.append(titleE);
|
||||
toastHeader.append(closeButton);
|
||||
}
|
||||
|
||||
return toastHeader;
|
||||
}
|
||||
|
||||
function buildToastBody(title, description, color) {
|
||||
var toastBody = document.createElement('div');
|
||||
toastBody.setAttribute("class", "toast-body")
|
||||
|
||||
if(title === "")
|
||||
{
|
||||
|
||||
var iconE = document.createElement("i");
|
||||
|
||||
var iconTag = "bx-info-circle";
|
||||
|
||||
switch (color)
|
||||
{
|
||||
case "info":
|
||||
iconTag = "bx-info-circle";
|
||||
break
|
||||
|
||||
case "success":
|
||||
iconTag = "bx-check-circle";
|
||||
break
|
||||
|
||||
case "warning":
|
||||
iconTag = "bx-error-circle";
|
||||
break
|
||||
|
||||
case "danger":
|
||||
iconTag = "bx-error";
|
||||
break
|
||||
}
|
||||
|
||||
iconE.setAttribute("class", "align-middle me-2 bx bx-sm " + iconTag + " text-" + (color === "secondary" ? "primary" : color));
|
||||
|
||||
toastBody.appendChild(iconE);
|
||||
}
|
||||
|
||||
var contentSpan = document.createElement("span");
|
||||
contentSpan.setAttribute("class", "fs-5 align-middle text-white")
|
||||
contentSpan.innerText = description;
|
||||
|
||||
toastBody.appendChild(contentSpan);
|
||||
|
||||
return toastBody;
|
||||
}
|
||||
|
||||
function buildToast(title, description, color) {
|
||||
var toast = document.createElement('div');
|
||||
toast.setAttribute('class', 'toast my-2');
|
||||
toast.setAttribute('role', 'alert');
|
||||
toast.setAttribute('aria-live', 'assertive');
|
||||
toast.setAttribute('aria-atomic', 'true');
|
||||
|
||||
var toastHeader = buildToastHeader(title, color);
|
||||
var toastBody = buildToastBody(title, description, color);
|
||||
|
||||
toast.append(toastHeader);
|
||||
toast.append(toastBody);
|
||||
|
||||
return toast;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="256px" height="301px" viewBox="0 0 256 301" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
|
||||
<defs>
|
||||
<linearGradient x1="2.17771739%" y1="34.7938955%" x2="92.7221942%" y2="91.3419405%" id="linearGradient-1">
|
||||
<stop stop-color="#41A7EF" offset="0%"></stop>
|
||||
<stop stop-color="#813DDE" offset="54.2186236%"></stop>
|
||||
<stop stop-color="#8F2EE2" offset="74.4988788%"></stop>
|
||||
<stop stop-color="#A11CE6" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g>
|
||||
<path d="M124.183681,101.699 C124.183681,66.515 136.256681,34.152 156.486681,8.525 C159.197681,5.092 156.787681,0.069 152.412681,0.012 C151.775681,0.004 151.136681,0 150.497681,0 C67.6206813,0 0.390681343,66.99 0.00168134279,149.775 C-0.386318657,232.369 66.4286813,300.195 149.019681,300.988 C189.884681,301.381 227.036681,285.484 254.376681,259.395 C257.519681,256.396 255.841681,251.082 251.548681,250.42 C179.413681,239.291 124.183681,176.949 124.183681,101.699" fill="url(#linearGradient-1)"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,198 +0,0 @@
|
||||
.blazor-context-menu--default {
|
||||
position: fixed;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
|
||||
.blazor-context-menu__list {
|
||||
list-style-type: none;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.blazor-context-menu__seperator {
|
||||
min-width: 120px;
|
||||
color: #333;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.blazor-context-menu__seperator__hr {
|
||||
display: block;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border-style: inset;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.blazor-context-menu__item--default {
|
||||
min-width: 120px;
|
||||
padding: 6px;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blazor-context-menu__item--default:hover {
|
||||
background-color: rgba(0,0,0,.05);
|
||||
}
|
||||
|
||||
|
||||
.blazor-context-menu__item--with-submenu:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -8px;
|
||||
top: 50%;
|
||||
-webkit-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
border: 6px solid transparent;
|
||||
border-left-color: #615c5c;
|
||||
}
|
||||
|
||||
.blazor-context-menu__item--default-disabled {
|
||||
min-width: 120px;
|
||||
padding: 6px;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.blazor-context-menu--hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*============== ANIMATIONS ==============*/
|
||||
/*-------------- FadeIn ------------------*/
|
||||
.blazor-context-menu__animations--fadeIn {
|
||||
animation-name: fadeIn;
|
||||
animation-direction: reverse;
|
||||
animation-duration: 0.2s;
|
||||
}
|
||||
|
||||
.blazor-context-menu__animations--fadeIn-shown {
|
||||
animation-name: fadeIn;
|
||||
animation-duration: 0.2s;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------- Grow ------------------*/
|
||||
|
||||
.blazor-context-menu__animations--grow {
|
||||
animation-name: grow;
|
||||
animation-direction: reverse;
|
||||
animation-duration: 0.2s;
|
||||
}
|
||||
|
||||
.blazor-context-menu__animations--grow-shown {
|
||||
animation-name: grow;
|
||||
animation-duration: 0.2s;
|
||||
}
|
||||
|
||||
@keyframes grow {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
transform-origin: top left;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
transform-origin: top left;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------- Slide ------------------*/
|
||||
|
||||
.blazor-context-menu.blazor-context-menu__animations--slide {
|
||||
animation-name: slide;
|
||||
animation-direction: reverse;
|
||||
animation-duration: 0.2s;
|
||||
}
|
||||
|
||||
.blazor-context-menu.blazor-context-menu__animations--slide-shown {
|
||||
animation-name: slide;
|
||||
animation-duration: 0.2s;
|
||||
}
|
||||
|
||||
@keyframes slide {
|
||||
0% {
|
||||
transform: translateX(-5px);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(0px);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.blazor-context-submenu.blazor-context-menu__animations--slide {
|
||||
animation-name: slide-submenu;
|
||||
animation-direction: reverse;
|
||||
animation-duration: 0.2s;
|
||||
}
|
||||
|
||||
.blazor-context-submenu.blazor-context-menu__animations--slide-shown {
|
||||
animation-name: slide-submenu;
|
||||
animation-duration: 0.2s;
|
||||
}
|
||||
|
||||
@keyframes slide-submenu {
|
||||
0% {
|
||||
transform: translateX(-25px);
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
}
|
||||
90% {
|
||||
z-index: -1;
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0px);
|
||||
z-index: unset;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------- Zoom ------------------*/
|
||||
|
||||
.blazor-context-menu__animations--zoom {
|
||||
animation-name: zoom;
|
||||
animation-direction: reverse;
|
||||
animation-duration: 0.2s;
|
||||
}
|
||||
|
||||
.blazor-context-menu__animations--zoom-shown {
|
||||
animation-name: zoom;
|
||||
animation-duration: 0.2s;
|
||||
}
|
||||
|
||||
@keyframes zoom {
|
||||
0% {
|
||||
transform: scale(0.5);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
ace.define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["zupfnoter.information.comment.line.percentage","information.keyword","in formation.keyword.embedded"],regex:"(%%%%)(hn\\.[a-z]*)(.*)",comment:"Instruction Comment"},{token:["information.comment.line.percentage","information.keyword.embedded"],regex:"(%%)(.*)",comment:"Instruction Comment"},{token:"comment.line.percentage",regex:"%.*",comment:"Comments"},{token:"barline.keyword.operator",regex:"[\\[:]*[|:][|\\]:]*(?:\\[?[0-9]+)?|\\[[0-9]+",comment:"Bar lines"},{token:["information.keyword.embedded","information.argument.string.unquoted"],regex:"(\\[[A-Za-z]:)([^\\]]*\\])",comment:"embedded Header lines"},{token:["information.keyword","information.argument.string.unquoted"],regex:"^([A-Za-z]:)([^%\\\\]*)",comment:"Header lines"},{token:["text","entity.name.function","string.unquoted","text"],regex:"(\\[)([A-Z]:)(.*?)(\\])",comment:"Inline fields"},{token:["accent.constant.language","pitch.constant.numeric","duration.constant.numeric"],regex:"([\\^=_]*)([A-Ga-gz][,']*)([0-9]*/*[><0-9]*)",comment:"Notes"},{token:"zupfnoter.jumptarget.string.quoted",regex:'[\\"!]\\^\\:.*?[\\"!]',comment:"Zupfnoter jumptarget"},{token:"zupfnoter.goto.string.quoted",regex:'[\\"!]\\^\\@.*?[\\"!]',comment:"Zupfnoter goto"},{token:"zupfnoter.annotation.string.quoted",regex:'[\\"!]\\^\\!.*?[\\"!]',comment:"Zupfnoter annoation"},{token:"zupfnoter.annotationref.string.quoted",regex:'[\\"!]\\^\\#.*?[\\"!]',comment:"Zupfnoter annotation reference"},{token:"chordname.string.quoted",regex:'[\\"!]\\^.*?[\\"!]',comment:"abc chord"},{token:"string.quoted",regex:'[\\"!].*?[\\"!]',comment:"abc annotation"}]},this.normalizeRules()};s.metaData={fileTypes:["abc"],name:"ABC",scopeName:"text.abcnotation"},r.inherits(s,i),t.ABCHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./abc_highlight_rules").ABCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="%",this.$id="ace/mode/abc",this.snippetFileId="ace/snippets/abc"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
ace.require(["ace/mode/abc"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
ace.define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*(begin|loop|then|is|do)\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){var r=t+n;return r.match(/^\s*(begin|end)$/)?!0:!1},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=t.getLine(n-1),s=this.$getIndent(i).length,u=this.$getIndent(r).length;if(u<=s)return;t.outdentRows(new o(n,0,n+2,0))},this.$id="ace/mode/ada"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
ace.require(["ace/mode/ada"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
ace.define("ace/mode/aql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="for|search|outbound|inbound|any|graph|prune|options|shortest_path|to|in|return|filter|sort|limit|let|collect|remove|update|replace|insers|upsert|with",t="true|false",n="append|contains_array|count|count_distinct|count_unique|first|flatten|intersection|last|length|minus|nth|outersection|pop|position|push|remove_nth|remove_value|remove_values|reverse|shift|slice|sorted|sorted_unique|union|union_distinct|unique|unshift|date_now|date_iso8601|date_timestamp|is_datestring|date_dayofweek|date_year|date_month|date_day|date_hour|date_minute|date_second|date_millisecond|date_dayofyear|date_isoweek|date_leapyear|date_quarter|date_days_in_month|date_trunc|date_format|date_add|date_subtract|date_diff|date_compare|attributes|count|has|is_same_collection|keep|length|matches|merge|merge_recursive|parse_identifier|translate|unset|unset_recursive|values|zip|fulltext|distance|geo_contains|geo_distance|geo_equals|geo_intersects|is_in_polygon|not_null|first_list|first_document|check_document|collection_count|collections|count|current_user|document|length|hash|apply|assert|/ warn|call|fail|noopt|passthru|sleep|v8|version|abs|acos|asin|atan|atan2|average|avg|ceil|cos|degrees|exp|exp2|floor|log|log2|log10|max|median|min|percentile|pi|pow|radians|rand|range|round|sin|sqrt|stddev_population|stddev_sample|stddev|sum|tan|variance_population|variance_sample|variance|char_length|concat|concat_separator|contains|count|encode_uri_component|find_first|find_last|json_parse|json_stringify|left|length|levenshtein_distance|like|lower|ltrim|md5|random_token|regex_matches|regex_split|regex_test|regex_replace|reverse|right|rtrim|sha1|sha512|split|soundex|substitute|substring|tokens|to_base64|to_hex|trim|upper|uuid|to_bool|to_number|to_string|to_array|to_list|is_null|is_bool|is_number|is_string|is_array|is_list|is_object|is_document|is_datestring|is_key|typename|",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"//.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.AqlHighlightRules=s}),ace.define("ace/mode/aql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/aql_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./aql_highlight_rules").AqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="//",this.$id="ace/mode/aql"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
ace.require(["ace/mode/aql"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
ace.define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.command.dosbatch",regex:"\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b",caseInsensitive:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{token:"comment.line.colons.dosbatch",regex:"::.*$"},{include:"variable"},{token:"punctuation.definition.string.begin.shell",regex:'"',push:[{token:"punctuation.definition.string.end.shell",regex:'"',next:"pop"},{include:"variable"},{defaultToken:"string.quoted.double.dosbatch"}]},{token:"keyword.operator.pipe.dosbatch",regex:"[|]"},{token:"keyword.operator.redirect.shell",regex:"&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>"}],variable:[{token:"constant.numeric",regex:"%%\\w+|%[*\\d]|%\\w+%"},{token:"constant.numeric",regex:"%~\\d+"},{token:["markup.list","constant.other","markup.list"],regex:"(%)(\\w+)(%?)"}]},this.normalizeRules()};s.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},r.inherits(s,i),t.BatchFileHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./batchfile_highlight_rules").BatchFileHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
ace.require(["ace/mode/batchfile"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
ace.define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function o(e,t){try{return new RegExp(e,t)}catch(n){}}var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,u=function(){this.$rules={start:[{tokenNames:["c9searchresults.constant.numeric","c9searchresults.text","c9searchresults.text","c9searchresults.keyword"],regex:/(^\s+[0-9]+)(:)(\d*\s?)([^\r\n]+)/,onMatch:function(e,t,n){var r=this.splitRegex.exec(e),i=this.tokenNames,s=[{type:i[0],value:r[1]},{type:i[1],value:r[2]}];r[3]&&(r[3]==" "?s[1]={type:i[1],value:r[2]+" "}:s.push({type:i[1],value:r[3]}));var o=n[1],u=r[4],a,f=0;if(o&&o.exec){o.lastIndex=0;while(a=o.exec(u)){var l=u.substring(f,a.index);f=o.lastIndex,l&&s.push({type:i[2],value:l});if(a[0])s.push({type:i[3],value:a[0]});else if(!l)break}}return f<u.length&&s.push({type:i[2],value:u.substr(f)}),s}},{regex:"^Searching for [^\\r\\n]*$",onMatch:function(e,t,n){var r=e.split("\x01");if(r.length<3)return"text";var s,u,a=0,f=[{value:r[a++]+"'",type:"text"},{value:u=r[a++],type:"text"},{value:"'"+r[a++],type:"text"}];r[2]!==" in"&&f.push({value:"'"+r[a++]+"'",type:"text"},{value:r[a++],type:"text"}),f.push({value:" "+r[a++]+" ",type:"text"}),r[a+1]?(s=r[a+1],f.push({value:"("+r[a+1]+")",type:"text"}),a+=1):a-=1;while(a++<r.length)r[a]&&f.push({value:r[a],type:"text"});u&&(/regex/.test(s)||(u=i.escapeRegExp(u)),/whole/.test(s)&&(u="\\b"+u+"\\b"));var l=u&&o("("+u+")",/ sensitive/.test(s)?"g":"ig");return l&&(n[0]=t,n[1]=l),f}},{regex:"^(?=Found \\d+ matches)",token:"text",next:"numbers"},{token:"string",regex:"^\\S:?[^:]+",next:"numbers"}],numbers:[{regex:"\\d+",token:"constant.numeric"},{regex:"$",token:"text",next:"start"}]},this.normalizeRules()};r.inherits(u,s),t.C9SearchHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^(\S.*:|Searching for.*)$/,this.foldingStopMarker=/^(\s+|Found.*)$/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getAllLines(n),s=r[n],o=/^(Found.*|Searching for.*)$/,u=/^(\S.*:|\s*)$/,a=o.test(s)?o:u,f=n,l=n;if(this.foldingStartMarker.test(s)){for(var c=n+1,h=e.getLength();c<h;c++)if(a.test(r[c]))break;l=c}else if(this.foldingStopMarker.test(s)){for(var c=n-1;c>=0;c--){s=r[c];if(a.test(s))break}f=c}if(f!=l){var p=s.length;return a===o&&(p=s.search(/\(Found[^)]+\)$|$/)),new i(f,p,l,0)}}}.call(o.prototype)}),ace.define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c9search_highlight_rules").C9SearchHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/c9search").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c9search"}.call(a.prototype),t.Mode=a}); (function() {
|
||||
ace.require(["ace/mode/c9search"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
ace.define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"comment.line.double-dash",regex:/--/,next:"comment"},{token:"storage.modifier",regex:/\(/},{token:"storage.modifier",regex:/,/,next:"line"},{token:"support.function",regex:/[^\(\)"\s{}\[\]]+/,next:"line"},{token:"string.quoted.double",regex:/"/,next:"string"},{token:"storage.modifier",regex:/\)/}],comment:[{token:"comment.line.double-dash",regex:/ +[^\n]+/,next:"start"}],string:[{token:"string.quoted.double",regex:/"/,next:"line"},{token:"constant.character.escape",regex:/\\/,next:"escape"},{token:"string.quoted.double",regex:/[^\\"]+/}],escape:[{token:"constant.character.escape",regex:/./,next:"string"}],line:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"markup.raw",regex:/^\s*/,next:"start"},{token:"storage.modifier",regex:/\$/,next:"start"},{token:"variable.parameter",regex:/[^\(\)"\s{}\[\]]+/},{token:"storage.modifier",regex:/\(/,next:"start"},{token:"storage.modifier",regex:/\)/},{token:"markup.raw",regex:/^ */,next:"start"},{token:"string.quoted.double",regex:/"/,next:"string"}]}};r.inherits(s,i),t.CirruHighlightRules=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)}),ace.define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cirru_highlight_rules").CirruHighlightRules,o=e("./folding/coffee").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/cirru"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
ace.require(["ace/mode/cirru"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
ace.define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\*.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.CobolHighlightRules=s}),ace.define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cobol_highlight_rules").CobolHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="*",this.$id="ace/mode/cobol"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
ace.require(["ace/mode/cobol"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
ace.define("ace/mode/csp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"constant.language":"child-src|connect-src|default-src|font-src|frame-src|img-src|manifest-src|media-src|object-src|script-src|style-src|worker-src|base-uri|plugin-types|sandbox|disown-opener|form-action|frame-ancestors|report-uri|report-to|upgrade-insecure-requests|block-all-mixed-content|require-sri-for|reflected-xss|referrer|policy-uri",variable:"'none'|'self'|'unsafe-inline'|'unsafe-eval'|'strict-dynamic'|'unsafe-hashed-attributes'"},"identifier",!0);this.$rules={start:[{token:"string.link",regex:/https?:[^;\s]*/},{token:"operator.punctuation",regex:/;/},{token:e,regex:/[^\s;]+/}]}};r.inherits(s,i),t.CspHighlightRules=s}),ace.define("ace/mode/csp",["require","exports","module","ace/mode/text","ace/mode/csp_highlight_rules","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./text").Mode,i=e("./csp_highlight_rules").CspHighlightRules,s=e("../lib/oop"),o=function(){this.HighlightRules=i};s.inherits(o,r),function(){this.$id="ace/mode/csp"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
ace.require(["ace/mode/csp"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
||||
ace.define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(\\-{3}|\\+{3}|\\*{3})( .+)$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"^\\s+$",token:"text"},{regex:"\\s*$",token:"invalid"},{defaultToken:"invisible",caseInsensitive:!0}]}};r.inherits(s,i),t.DiffHighlightRules=s}),ace.define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp("^("+o.slice(0,u).join("|")+")",this.flag);if(a.test(r))break}for(var f=e.getLength();++n<f;){r=e.getLine(n);if(a.test(r))break}if(n==i.row+1)return;return new s(i.row,i.column,n-1,r.length)}}.call(o.prototype)}),ace.define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./diff_highlight_rules").DiffHighlightRules,o=e("./folding/diff").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o(["diff","@@|\\*{5}"],"i")};r.inherits(u,i),function(){this.$id="ace/mode/diff",this.snippetFileId="ace/snippets/diff"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
ace.require(["ace/mode/diff"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user