add vue ui at /v2 (#698)
* add vue ui
* add channels mock api
* Initial Vue framework with Vuetify UI (#688)
* fix hls direct streaming mode (#682)
* duration analysis on files with missing duration metadata (#683)
* first pass
* analyze zero-duration files
* add readme note for WIP
* add vuetify and basic sidebar layout - responsive
* add vue-router and initial home page
* setup composition-api for vue2
* install pinia ie... vuex4
* mixing for automatic page title
* add logo files
* tweak theme colors
* install store
* use store for menu toggle
* replicate old menu
* implement menu and children menus
* rename state to application state
* update vue files and add version to sidebar
* lock logo and make expandable list remove minified menu
* remove todo, will add to PR
* top bar links and attempt at snackbar with state
* fix snackbar
* add search basic component
* fix search bar placement
* remove un-used footer
* Revert "Merge branch 'jasongdove:main' into intitial-vuetify-ui"
This reverts commit 43016d502b.
Co-authored-by: Jason Dove <jason@jasondove.me>
* Add ESLint and Prettier for VueJS (#691)
* add prettier to config
* run npm run lint over project to clean up files
* replace hr tag with v-dividers
* add vue-lint github action
* fix the dodo in me
* Hu
* Fix path
* convert to multi-run step
* forgot the name
* add vue-lint github action
fix the dodo in me
Hu
Fix path
convert to multi-run step
forgot the name
* Fix new line at end of file
* WIP
* dockerfile consistency
* use npm ci and node v14
* force prettier indenting and end of line (#695)
* disable filename hashing
* don't build tests in docker
* update dependencies
* fix running both uis
Co-authored-by: James Mackay <info@notexpectedyet.com>
This commit is contained in:
co-authored by
James Mackay
parent
d5a03963c0
commit
6a9075dc11
@@ -53,6 +53,7 @@ using FluentValidation.AspNetCore;
|
||||
using Ganss.XSS;
|
||||
using MediatR;
|
||||
using MediatR.Courier.DependencyInjection;
|
||||
using Microsoft.AspNetCore.SpaServices;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
@@ -61,6 +62,7 @@ using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Refit;
|
||||
using Serilog;
|
||||
using VueCliMiddleware;
|
||||
|
||||
namespace ErsatzTV;
|
||||
|
||||
@@ -129,6 +131,10 @@ public class Startup
|
||||
options.ImplicitlyValidateChildProperties = true;
|
||||
});
|
||||
|
||||
services.AddSpaStaticFiles(options => options.RootPath = "wwwroot/v2");
|
||||
|
||||
services.AddMemoryCache();
|
||||
|
||||
services.AddRazorPages();
|
||||
services.AddServerSideBlazor();
|
||||
|
||||
@@ -253,12 +259,43 @@ public class Startup
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
if (!env.IsDevelopment())
|
||||
{
|
||||
app.Map(
|
||||
"/v2",
|
||||
app2 =>
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(env.WebRootPath))
|
||||
{
|
||||
env.WebRootPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot");
|
||||
}
|
||||
|
||||
app2.UseRouting();
|
||||
app2.UseEndpoints(e => e.MapFallbackToFile("index.html"));
|
||||
app2.UseFileServer(
|
||||
new FileServerOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(Path.Combine(env.WebRootPath, "v2"))
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
app.UseEndpoints(
|
||||
endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
endpoints.MapBlazorHub();
|
||||
endpoints.MapFallbackToPage("/_Host");
|
||||
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
endpoints.MapToVueCliProxy(
|
||||
"/v2/{*path}",
|
||||
new SpaOptions { SourcePath = "client-app" },
|
||||
"serve",
|
||||
regex: "Compiled successfully",
|
||||
forceKill: true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user