Updated web ui to razor

This commit is contained in:
2025-04-22 23:40:00 +03:00
parent c548c6191d
commit 2d319f3d34
108 changed files with 983 additions and 168 deletions

View File

@@ -0,0 +1,34 @@
@model List<InstalledPluginViewModel>
@{
ViewData["Title"] = "Installed Plugins";
}
<h2>@ViewData["Title"]</h2>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Version</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
@foreach (var plugin in Model)
{
<tr>
<td>@plugin.Name</td>
<td>@plugin.Version</td>
<td>
<form method="post" asp-action="DeletePlugin" asp-route-pluginName="@plugin.Name">
<button type="submit" class="btn btn-danger btn-sm">Delete</button>
</form>
<form method="post" asp-action="GetPluginDetails" asp-route-pluginName="@plugin.Name">
<button type="submit" class="btn btn-info btn-sm" data-toggle="modal">Details</button>
</form>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,35 @@
@model List<OnlinePluginViewModel>
@{
ViewData["Title"] = "Online Plugins";
}
<h2>@ViewData["Title"]</h2>
<table class="table table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Author</th>
<th>Version</th>
<th>Download</th>
</tr>
</thead>
<tbody>
@foreach (var plugin in Model)
{
<tr>
<td>@plugin.Name</td>
<td>@plugin.Description</td>
<td>@plugin.Author</td>
<td>@plugin.Version</td>
<td>
<form method="post" asp-action="InstallPlugin" asp-route-pluginId="@plugin.Id">
<button type="submit" class="btn btn-primary">Download</button>
</form>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,101 @@
@model PluginDetailsViewModel
@{
ViewData["Title"] = "Plugin Details";
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewData["Title"]</title>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #f4f7fc;
margin: 0;
padding: 0;
}
.container {
max-width: 800px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
h1 {
font-size: 2.5rem;
color: #333;
text-align: center;
margin-bottom: 15px;
}
h2 {
font-size: 2rem;
color: #444;
margin-bottom: 5px;
}
.plugin-info {
margin-top: 20px;
}
.plugin-info p {
font-size: 1.1rem;
color: #666;
margin-bottom: 10px;
}
.plugin-info strong {
color: #333;
}
.footer {
text-align: center;
margin-top: 30px;
font-size: 0.9rem;
color: #888;
}
.card-header {
background-color: #007BFF;
color: white;
padding: 15px;
border-radius: 8px 8px 0 0;
}
.card-footer {
background-color: #f8f9fa;
padding: 10px;
border-radius: 0 0 8px 8px;
color: #888;
}
</style>
</head>
<body>
<div class="container">
<div class="card">
<div class="card-header">
<h1>@Model.PluginName</h1>
<h2>Version: @Model.Version</h2>
</div>
<div class="plugin-info">
<h3>Description</h3>
<p>@Model.Description</p>
<p><strong>Author:</strong> @Model.Author</p>
</div>
<div class="card-footer footer">
<small>Plugin Details</small>
</div>
</div>
</div>
</body>
</html>