Fix admin route access and backend configuration
- Added /admin redirect to login page in nginx config - Fixed backend server.js route ordering for proper admin handling - Updated authentication middleware and routes - Added user management routes - Configured PostgreSQL integration - Updated environment configuration
This commit is contained in:
69
Sky_Art_shop/Views/AdminSettings/Index.cshtml
Normal file
69
Sky_Art_shop/Views/AdminSettings/Index.cshtml
Normal file
@@ -0,0 +1,69 @@
|
||||
@model SiteSettings
|
||||
@{
|
||||
ViewData["Title"] = "Site Settings";
|
||||
Layout = "_AdminLayout";
|
||||
}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">Edit Site Settings</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post" action="/admin/settings">
|
||||
<div asp-validation-summary="All" class="text-danger mb-3"></div>
|
||||
<input type="hidden" name="Id" value="@Model?.Id" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="SiteName" class="form-label">Site Name</label>
|
||||
<input type="text" class="form-control" id="SiteName" name="SiteName" value="@Model?.SiteName" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="SiteTagline" class="form-label">Site Tagline</label>
|
||||
<input type="text" class="form-control" id="SiteTagline" name="SiteTagline" value="@Model?.SiteTagline">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="ContactEmail" class="form-label">Contact Email</label>
|
||||
<input type="email" class="form-control" id="ContactEmail" name="ContactEmail" value="@Model?.ContactEmail">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<label for="ContactPhone" class="form-label">Contact Phone</label>
|
||||
<input type="text" class="form-control" id="ContactPhone" name="ContactPhone" value="@Model?.ContactPhone">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-4">
|
||||
|
||||
<div class="alert alert-info">
|
||||
<i class="bi bi-info-circle"></i> <strong>Note:</strong> Homepage content and hero sections are now managed in the <a href="/admin/homepage" class="alert-link">Homepage Editor</a>. Use this page for general site settings only.
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="InstagramUrl" class="form-label">Instagram URL</label>
|
||||
<input type="text" class="form-control" id="InstagramUrl" name="InstagramUrl" value="@Model?.InstagramUrl">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="FooterText" class="form-label">Footer Text</label>
|
||||
<textarea class="form-control" id="FooterText" name="FooterText" rows="2">@Model?.FooterText</textarea>
|
||||
<small class="text-muted">You can also edit the footer in the Homepage Editor</small>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
<a href="/admin/dashboard" class="btn btn-secondary">Cancel</a>
|
||||
<button type="submit" class="btn btn-primary">Save Settings</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user