Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Laravel Mix to Vite #1399

Merged
merged 4 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,7 @@ FodyWeavers.xsd

# Rider
.idea/

db/
docker-compose.yml
wwwroot
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[submodule "VocaDbWeb/wwwroot/Content/ExtIcons"]
path = VocaDbWeb/wwwroot/Content/ExtIcons
path = VocaDbWeb/public/Content/ExtIcons
url = https://github.com/VocaDB/ExtIcons.git
[submodule "vocadb-loc"]
path = vocadb-loc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public sealed record SanitizedUserWithPermissionsContract
[DataMember]
public int UnreadMessagesCount { get; init; }

[DataMember]
public string Stylesheet { get; init; } = string.Empty;

[DataMember]
public bool VerifiedArtist { get; init; }

Expand Down Expand Up @@ -58,5 +61,6 @@ public SanitizedUserWithPermissionsContract(ServerOnlyUserWithPermissionsContrac
PreferredVideoService = user.PreferredVideoService;
AlbumFormatString = user.AlbumFormatString;
GroupId = user.GroupId;
Stylesheet = user.Stylesheet;
}
}
2 changes: 1 addition & 1 deletion VocaDbWeb/Controllers/ActivityEntryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public ActionResult Index(DateTime? before)

PageProperties.Title = Resources.Views.ActivityEntry.IndexStrings.RecentActivity;

return View("React/Index");
return File("index.html", "text/html");
}
}

Expand Down
12 changes: 6 additions & 6 deletions VocaDbWeb/Controllers/AdminController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public ActionResult Index()

PageProperties.Title = "Site management";

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult GeneratePictureThumbs()
Expand All @@ -155,23 +155,23 @@ public ActionResult ManageIPRules()

PageProperties.Title = "Manage blocked IPs";

return View("React/Index");
return File("index.html", "text/html") ;
}

[Authorize]
public ActionResult ManageEntryTagMappings()
{
PageProperties.Title = "Manage entry type to tag mappings";

return View("React/Index");
return File("index.html", "text/html") ;
}

[Authorize]
public ActionResult ManageTagMappings()
{
PageProperties.Title = "Manage NicoNicoDouga tag mappings";

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult PVAuthorNames(string term)
Expand Down Expand Up @@ -284,7 +284,7 @@ public ActionResult ViewAuditLog()

PageProperties.Title = "View audit log";

return View("React/Index");
return File("index.html", "text/html") ;
}

[Authorize]
Expand Down Expand Up @@ -321,6 +321,6 @@ public IActionResult ManageWebhooks()

PageProperties.Title = "Manage webhooks";

return View("React/Index");
return File("index.html", "text/html") ;
}
}
14 changes: 7 additions & 7 deletions VocaDbWeb/Controllers/AlbumController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public ActionResult Details(int id = InvalidId)

prop.Robots = model.Deleted ? PagePropertiesData.Robots_Noindex_Follow : string.Empty;

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult DownloadTags(int id = InvalidId, string formatString = "", int? discNumber = null, bool setFormatString = false, bool includeHeader = false)
Expand Down Expand Up @@ -231,15 +231,15 @@ public ActionResult CoverPictureThumb(int id = InvalidId)
[Authorize]
public ActionResult Create()
{
return View("React/Index");
return File("index.html", "text/html") ;
}

//
// GET: /Album/Edit/5
[Authorize]
public ActionResult Edit(int id)
{
return View("React/Index");
return File("index.html", "text/html") ;
}
#nullable disable

Expand Down Expand Up @@ -273,7 +273,7 @@ public ActionResult Deleted()
{
PageProperties.Title = "Deleted albums";

return View("React/Index");
return File("index.html", "text/html") ;
}

[Authorize]
Expand All @@ -288,7 +288,7 @@ public ActionResult ManageTagUsages(int id)

public ActionResult Merge()
{
return View("React/Index");
return File("index.html", "text/html") ;
}

[Authorize]
Expand Down Expand Up @@ -320,7 +320,7 @@ public ActionResult Versions(int id = InvalidId)
PageProperties.Title = ViewRes.EntryDetailsStrings.Revisions + " - " + contract.Name;
PageProperties.Robots = PagePropertiesData.Robots_Noindex_Nofollow;

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult ViewVersion(int id = InvalidId, int? ComparedVersionId = 0)
Expand All @@ -333,7 +333,7 @@ public ActionResult ViewVersion(int id = InvalidId, int? ComparedVersionId = 0)
PageProperties.Title = "Revision " + contract.ArchivedVersion.Version + " for " + contract.Name;
PageProperties.Robots = PagePropertiesData.Robots_Noindex_Nofollow;

return View("React/Index");
return File("index.html", "text/html") ;
}
}

Expand Down
12 changes: 6 additions & 6 deletions VocaDbWeb/Controllers/ArtistController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public ActionResult Details(int id = InvalidId)
prop.OpenGraph.ShowTwitterCard = true;
prop.Robots = model.Deleted ? PagePropertiesData.Robots_Noindex_Follow : string.Empty;

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult Picture(int id = InvalidId)
Expand Down Expand Up @@ -174,7 +174,7 @@ public ActionResult PictureThumb(int id = InvalidId)
[Authorize]
public ActionResult Create()
{
return View("React/Index");
return File("index.html", "text/html") ;
}

#nullable enable
Expand All @@ -186,7 +186,7 @@ public ActionResult Edit(int id = InvalidId)
if (id == InvalidId)
return NoId();

return View("React/Index");
return File("index.html", "text/html") ;
}
#nullable disable

Expand All @@ -202,7 +202,7 @@ public ActionResult ManageTagUsages(int id)

public ActionResult Merge()
{
return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult Name(int id)
Expand All @@ -218,7 +218,7 @@ public ActionResult Versions(int id)
PageProperties.Title = ViewRes.EntryDetailsStrings.Revisions + " - " + contract.Name;
PageProperties.Robots = PagePropertiesData.Robots_Noindex_Nofollow;

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult ViewVersion(int id = InvalidId, int? ComparedVersionId = null)
Expand All @@ -231,6 +231,6 @@ public ActionResult ViewVersion(int id = InvalidId, int? ComparedVersionId = nul
PageProperties.Title = "Revision " + contract.ArchivedVersion.Version + " for " + contract.Name;
PageProperties.Robots = PagePropertiesData.Robots_Noindex_Nofollow;

return View("React/Index");
return File("index.html", "text/html") ;
}
}
4 changes: 2 additions & 2 deletions VocaDbWeb/Controllers/CommentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public ActionResult Index(int? userId = null)
PageProperties.Title = "Comments - " + user.Name;
PageProperties.Robots = PagePropertiesData.Robots_Noindex_Nofollow;

return View("React/Index");
return File("index.html", "text/html") ;
}
else
{
PageProperties.Title = ViewRes.Comment.IndexStrings.RecentComments;

return View("React/Index");
return File("index.html", "text/html") ;
}
}
}
2 changes: 1 addition & 1 deletion VocaDbWeb/Controllers/DiscussionController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public ActionResult Index()
{
PageProperties.Title = "Discussions";

return View("React/Index");
return File("index.html", "text/html") ;
}
}
24 changes: 12 additions & 12 deletions VocaDbWeb/Controllers/EventController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,41 +103,41 @@ public ActionResult Details(int id = InvalidId, string? slug = null)
PageProperties.Description = descriptionStripped;
PageProperties.Robots = ev.Deleted ? PagePropertiesData.Robots_Noindex_Follow : string.Empty;

return View("React/Index");
return File("index.html", "text/html") ;
}

[Authorize]
public ActionResult Edit(int? id)
{
return View("React/Index");
return File("index.html", "text/html") ;
}

[Authorize]
public ActionResult EditSeries(int? id)
{
return View("React/Index");
return File("index.html", "text/html") ;
}
#nullable disable

public ActionResult EventsByDate()
{
PageProperties.Title = ViewRes.SharedStrings.ReleaseEvents;

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult EventsBySeries()
{
PageProperties.Title = ViewRes.SharedStrings.ReleaseEvents;

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult EventsByVenue()
{
PageProperties.Title = ViewRes.SharedStrings.ReleaseEvents;

return View("React/Index");
return File("index.html", "text/html") ;
}

//
Expand All @@ -147,7 +147,7 @@ public ActionResult Index()
{
PageProperties.Title = ViewRes.SharedStrings.ReleaseEvents;

return View("React/Index");
return File("index.html", "text/html") ;
}

[Authorize]
Expand Down Expand Up @@ -222,7 +222,7 @@ public ActionResult SeriesDetails(int id = InvalidId, string slug = null)
PageProperties.Description = descriptionStripped;
PageProperties.Robots = series.Deleted ? PagePropertiesData.Robots_Noindex_Follow : string.Empty;

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult SeriesVersions(int id = InvalidId)
Expand All @@ -235,7 +235,7 @@ public ActionResult SeriesVersions(int id = InvalidId)
PageProperties.Title = ViewRes.EntryDetailsStrings.Revisions + " - " + contract.Entry.Name;
PageProperties.Robots = PagePropertiesData.Robots_Noindex_Nofollow;

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult ViewSeriesVersion(int id, int? ComparedVersionId)
Expand All @@ -245,7 +245,7 @@ public ActionResult ViewSeriesVersion(int id, int? ComparedVersionId)
PageProperties.Title = "Revision " + contract.ArchivedVersion.Version + " for " + contract.Name;
PageProperties.Robots = PagePropertiesData.Robots_Noindex_Nofollow;

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult Versions(int id = InvalidId)
Expand All @@ -258,7 +258,7 @@ public ActionResult Versions(int id = InvalidId)
PageProperties.Title = ViewRes.EntryDetailsStrings.Revisions + " - " + contract.Name;
PageProperties.Robots = PagePropertiesData.Robots_Noindex_Nofollow;

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult ViewVersion(int id, int? ComparedVersionId)
Expand All @@ -268,6 +268,6 @@ public ActionResult ViewVersion(int id, int? ComparedVersionId)
PageProperties.Title = "Revision " + contract.ArchivedVersion.Version + " for " + contract.Name;
PageProperties.Robots = PagePropertiesData.Robots_Noindex_Nofollow;

return View("React/Index");
return File("index.html", "text/html") ;
}
}
8 changes: 4 additions & 4 deletions VocaDbWeb/Controllers/HelpController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public HelpController(VdbConfigManager config, TagQueries tagQueries)
public ActionResult Index()
{
if (!string.IsNullOrEmpty(AppConfig.ExternalHelpPath))
return View("React/Index");
return File("index.html", "text/html") ;

ViewBag.FreeTagId = _config.SpecialTags.Free;
ViewBag.InstrumentalTagId = _tagQueries.InstrumentalTagId;
Expand All @@ -35,17 +35,17 @@ public ActionResult Index()
case "ja":
PageProperties.Title = "サポート / DBについて";

return View("React/Index");
return File("index.html", "text/html") ;

case "zh":
PageProperties.Title = "Help / About";

return View("React/Index");
return File("index.html", "text/html") ;

default:
PageProperties.Title = "Help / About";

return View("React/Index");
return File("index.html", "text/html") ;
}
}
}
2 changes: 1 addition & 1 deletion VocaDbWeb/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public ActionResult Index()
PageProperties.AddMainScripts = false;
PageProperties.CanonicalUrl = UrlMapper.HostAddress;

return View("React/Index");
return File("index.html", "text/html") ;
}

[HttpPost]
Expand Down
2 changes: 1 addition & 1 deletion VocaDbWeb/Controllers/PlaylistController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ public class PlaylistController : Controller
{
public IActionResult Index()
{
return View("React/Index");
return File("index.html", "text/html") ;
}
}
2 changes: 1 addition & 1 deletion VocaDbWeb/Controllers/SearchController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public ActionResult Index(SearchIndexViewModel viewModel)

SetSearchEntryType(viewModel.searchType);

return View("React/Index");
return File("index.html", "text/html") ;
}

public ActionResult Radio()
Expand Down
Loading