jwt v1.0
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/projectSettingsUpdater.xml
|
||||
/modules.xml
|
||||
/contentModel.xml
|
||||
/.idea.HealthcareManagerUI.iml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
@@ -0,0 +1 @@
|
||||
HealthcareManagerUI
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34616.47
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthcareManagerUI", "HealthcareManagerUI\HealthcareManagerUI.csproj", "{641DCB44-0CC9-43D0-AE58-5A722261F1E1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{641DCB44-0CC9-43D0-AE58-5A722261F1E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{641DCB44-0CC9-43D0-AE58-5A722261F1E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{641DCB44-0CC9-43D0-AE58-5A722261F1E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{641DCB44-0CC9-43D0-AE58-5A722261F1E1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {55598450-70ED-4D22-913B-0C99AB8F3F7D}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,16 @@
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/AuthLayout.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="background"></div>
|
||||
<div class="container">
|
||||
@Body
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
@if (!string.IsNullOrEmpty(ErrorMessage))
|
||||
{
|
||||
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||||
<strong>Error:</strong> @ErrorMessage
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string ErrorMessage { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
@page "/"
|
||||
@using HealthcareManagerUI.Components.Layout
|
||||
@layout AuthLayout
|
||||
<head>
|
||||
<title>Choose Role</title>
|
||||
</head>
|
||||
<link rel="stylesheet" href="bootstrap/dist/css/bootstrap.min.css"/>
|
||||
<div class="text-center mt-5 centered-menu">
|
||||
<h1 class="landingTitle">Welcome to Healthcare Manager</h1>
|
||||
<p class="landingSubtitle">Please select your role:</p>
|
||||
<div class="button-container">
|
||||
<NavLink class="btn btn-primary m-2" href="/login/doctor">I'm a Doctor</NavLink>
|
||||
<NavLink class="btn btn-secondary m-2" href="/login/patient">I'm a Patient</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,9 @@
|
||||
@page "/dashboard"
|
||||
<head>
|
||||
<title>Dashboard</title>
|
||||
</head>
|
||||
<h3>Dashboard</h3>
|
||||
<h1>login success</h1>
|
||||
@code {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
@page "/login/{role}"
|
||||
@using HealthcareManagerUI.Models
|
||||
@using HealthcareManagerUI.Services.Authentication
|
||||
@using HealthcareManagerUI.Components.Layout
|
||||
|
||||
@layout AuthLayout
|
||||
|
||||
@inject IAuthenticationService AuthenticationService
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<head>
|
||||
<title>Login</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</head>
|
||||
<link rel="stylesheet" href="/LoginPage.css" />
|
||||
<link rel="stylesheet" href="/bootstrap/dist/css/bootstrap.min.css" />
|
||||
|
||||
<EditForm Model="userLoginModel" OnValidSubmit="@HandleLogin" FormName="LoginForm" class="login-form container mt-5">
|
||||
<DataAnnotationsValidator/>
|
||||
<ValidationSummary/>
|
||||
|
||||
<div class="card shadow-lg">
|
||||
<div class="card-body">
|
||||
<h3 class="card-title text-center mb-3">Login</h3>
|
||||
<div class="form-group mb-3">
|
||||
<InputText id="email" class="form-control" placeholder="Email" @bind-Value="userLoginModel!.Email"></InputText>
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<InputText id="password" class="form-control" type="password" placeholder="Password" @bind-Value="userLoginModel!.Password"></InputText>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100 mb-3">Log In</button>
|
||||
<div class="button-container">
|
||||
<NavLink class="btn btn-secondary m-2" href="@($"/register/{Role}")">Register</NavLink>
|
||||
<NavLink class="btn btn-secondary m-2" href="@($"/reset-password/{Role}")">Reset Password</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
|
||||
<AlertMessage ErrorMessage="@errorMessage" />
|
||||
|
||||
@code {
|
||||
[SupplyParameterFromForm]
|
||||
public UserLoginModel? userLoginModel { get; set; }
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
userLoginModel ??= new();
|
||||
}
|
||||
|
||||
[Parameter] public string Role { get; set; }
|
||||
private string errorMessage { get; set; }
|
||||
|
||||
private void ClearErrorMessage()
|
||||
{
|
||||
errorMessage = string.Empty;
|
||||
}
|
||||
|
||||
private async Task HandleLogin()
|
||||
{
|
||||
var response = Role switch
|
||||
{
|
||||
"doctor" => await AuthenticationService.LoginDoctor(userLoginModel),
|
||||
"patient" => await AuthenticationService.LoginPatient(userLoginModel),
|
||||
_ => null
|
||||
};
|
||||
|
||||
if (response.StatusCode >= 200 && response.StatusCode <= 399)
|
||||
{
|
||||
NavigationManager.NavigateTo("/dashboard");
|
||||
}
|
||||
else
|
||||
{
|
||||
errorMessage = response.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
@page "/register/{role}"
|
||||
@using HealthcareManagerUI.Models
|
||||
@using HealthcareManagerUI.Services.Authentication
|
||||
@using HealthcareManagerUI.Components.Layout
|
||||
|
||||
@layout AuthLayout
|
||||
|
||||
@inject IAuthenticationService AuthenticationService
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<head>
|
||||
<title>Register</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</head>
|
||||
<link rel="stylesheet" href="/LoginPage.css" />
|
||||
<link rel="stylesheet" href="/bootstrap/dist/css/bootstrap.min.css" />
|
||||
|
||||
<EditForm Model="userRegisterModel" OnValidSubmit="@HandleRegister" FormName="RegisterForm" class="login-form container mt-5">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
|
||||
<div class="card shadow-lg">
|
||||
<div class="card-body">
|
||||
<h3 class="card-title text-center mb-3">Register</h3>
|
||||
<div class="form-group mb-3">
|
||||
<InputText id="name" class="form-control" placeholder="Name" @bind-Value="userRegisterModel!.Name"></InputText>
|
||||
</div>
|
||||
@if (Role.Equals("doctor", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
<div class="form-group mb-3">
|
||||
<InputText id="description" class="form-control" placeholder="Description" @bind-Value="userRegisterModel!.Description"></InputText>
|
||||
</div>
|
||||
}
|
||||
<div class="form-group mb-3">
|
||||
<InputText id="email" class="form-control" placeholder="Email" @bind-Value="userRegisterModel!.Email"></InputText>
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<InputText id="password" class="form-control" type="password" placeholder="Password" @bind-Value="userRegisterModel!.Password"></InputText>
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<button type="submit" class="btn btn-primary w-100 mb-3">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
|
||||
<AlertMessage ErrorMessage="@errorMessage" />
|
||||
|
||||
@code {
|
||||
[SupplyParameterFromForm]
|
||||
public UserRegisterModel? userRegisterModel { get; set; }
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
userRegisterModel ??= new();
|
||||
}
|
||||
|
||||
[Parameter] public string Role { get; set; }
|
||||
private string errorMessage { get; set; }
|
||||
|
||||
private void ClearErrorMessage()
|
||||
{
|
||||
errorMessage = string.Empty;
|
||||
}
|
||||
|
||||
private async Task HandleRegister()
|
||||
{
|
||||
var response = Role switch
|
||||
{
|
||||
"doctor" => await AuthenticationService.RegisterDoctor(userRegisterModel),
|
||||
"patient" => await AuthenticationService.RegisterPatient(userRegisterModel),
|
||||
_ => null
|
||||
};
|
||||
|
||||
if (response.StatusCode >=200 && response.StatusCode <= 399)
|
||||
{
|
||||
NavigationManager.NavigateTo($"/login/{Role}");
|
||||
}
|
||||
else
|
||||
{
|
||||
errorMessage = response.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
@page "/reset-password/{role}"
|
||||
@using HealthcareManagerUI.Models
|
||||
@using HealthcareManagerUI.Services.Authentication
|
||||
@using HealthcareManagerUI.Components.Layout
|
||||
|
||||
@layout AuthLayout
|
||||
|
||||
@inject IAuthenticationService AuthenticationService
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<head>
|
||||
<title>Reset your password</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</head>
|
||||
<link rel="stylesheet" href="/LoginPage.css" />
|
||||
<link rel="stylesheet" href="/bootstrap/dist/css/bootstrap.min.css" />
|
||||
|
||||
<EditForm Model="userResetPasswordModel" OnValidSubmit="@HandleResetPassword" FormName="ResetPasswordForm" class="login-form container mt-5">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
|
||||
<div class="card shadow-lg">
|
||||
<div class="card-body">
|
||||
<h3 class="card-title text-center mb-3">Register</h3>
|
||||
<div class="form-group mb-3">
|
||||
<InputText id="email" class="form-control" placeholder="Email" @bind-Value="userResetPasswordModel!.Email"></InputText>
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<InputText id="password" class="form-control" type="password" placeholder="New Password" @bind-Value="userResetPasswordModel!.Password"></InputText>
|
||||
</div>
|
||||
<div class="button-container">
|
||||
<button type="submit" class="btn btn-primary w-100 mb-3">Reset Password</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
|
||||
<AlertMessage ErrorMessage="@errorMessage" />
|
||||
|
||||
@code {
|
||||
[SupplyParameterFromForm]
|
||||
public UserRegisterModel? userResetPasswordModel { get; set; }
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
userResetPasswordModel ??= new();
|
||||
}
|
||||
|
||||
[Parameter] public string Role { get; set; }
|
||||
private string errorMessage { get; set; }
|
||||
|
||||
private void ClearErrorMessage()
|
||||
{
|
||||
errorMessage = string.Empty;
|
||||
}
|
||||
|
||||
private async Task HandleResetPassword()
|
||||
{
|
||||
var response = Role switch
|
||||
{
|
||||
"doctor" => await AuthenticationService.ResetDoctorPassword(userResetPasswordModel),
|
||||
"patient" => await AuthenticationService.ResetPatientPassword(userResetPasswordModel),
|
||||
_ => null
|
||||
};
|
||||
|
||||
if (response.StatusCode >= 200 && response.StatusCode <= 399)
|
||||
{
|
||||
NavigationManager.NavigateTo($"/login/{Role}");
|
||||
}
|
||||
else
|
||||
{
|
||||
errorMessage = response.Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_ContentIncludedByDefault Remove="wwwroot\bootstrap\bootstrap.min.css" />
|
||||
<_ContentIncludedByDefault Remove="wwwroot\bootstrap\bootstrap.min.css.map" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HealthcareManagerUI.Models
|
||||
{
|
||||
public class BaseResponse
|
||||
{
|
||||
public int StatusCode { get; set; }
|
||||
public string? Message { get; set; }
|
||||
public object? Data { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace HealthcareManagerUI.Models;
|
||||
|
||||
public class PatientRegisterModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace HealthcareManagerUI.Models;
|
||||
|
||||
public class UserRegisterModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string Description { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using HealthcareManagerUI.Components;
|
||||
using HealthcareManagerUI.Services.Authentication;
|
||||
using HealthcareManagerUI.Services.Http;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddRazorComponents()
|
||||
.AddInteractiveServerComponents();
|
||||
|
||||
builder.Services.AddScoped<IHttpService>(provider =>
|
||||
{
|
||||
var configuration = provider.GetRequiredService<IConfiguration>();
|
||||
return new HttpService(configuration);
|
||||
});
|
||||
builder.Services.AddScoped<IAuthenticationService, AuthenticationService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseExceptionHandler("/Error", true);
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseStaticFiles();
|
||||
app.UseAntiforgery();
|
||||
app.MapRazorComponents<App>()
|
||||
.AddInteractiveServerRenderMode();
|
||||
|
||||
app.Run();
|
||||
@@ -0,0 +1,129 @@
|
||||
using HealthcareManagerUI.Models;
|
||||
using HealthcareManagerUI.Services.Http;
|
||||
namespace HealthcareManagerUI.Services.Authentication;
|
||||
|
||||
// In AuthenticationService.cs
|
||||
public class AuthenticationService : IAuthenticationService
|
||||
{
|
||||
private readonly IHttpService _httpService;
|
||||
private readonly string _apiUrl = "http://localhost:5151/api";
|
||||
|
||||
public AuthenticationService(IHttpService httpService)
|
||||
{
|
||||
_httpService = httpService;
|
||||
}
|
||||
|
||||
public async Task<BaseResponse> LoginDoctor(UserLoginModel userLoginModel)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Doctors/login", userLoginModel);
|
||||
return response;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new BaseResponse
|
||||
{
|
||||
StatusCode = 400,
|
||||
Data = null,
|
||||
Message = ex.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<BaseResponse> LoginPatient(UserLoginModel userLoginModel)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Patients/login", userLoginModel);
|
||||
return response;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new BaseResponse {
|
||||
StatusCode = 400,
|
||||
Data = null,
|
||||
Message = ex.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<BaseResponse> RegisterDoctor(UserRegisterModel userRegistrationModel)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Doctors/register", userRegistrationModel);
|
||||
return response;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new BaseResponse
|
||||
{
|
||||
StatusCode = 400,
|
||||
Data = null,
|
||||
Message = ex.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<BaseResponse> RegisterPatient(UserRegisterModel userRegisterModel)
|
||||
{
|
||||
var patientRegisterDto = new PatientRegisterModel
|
||||
{
|
||||
Name = userRegisterModel.Name,
|
||||
Email = userRegisterModel.Email,
|
||||
Password = userRegisterModel.Password
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Patients/register", userRegisterModel);
|
||||
return response;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new BaseResponse
|
||||
{
|
||||
StatusCode = 400,
|
||||
Data = null,
|
||||
Message = ex.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<BaseResponse> ResetDoctorPassword(UserRegisterModel userResetPasswordModel)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Doctors/reset_password", userResetPasswordModel);
|
||||
return response;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new BaseResponse
|
||||
{
|
||||
StatusCode = 400,
|
||||
Data = null,
|
||||
Message = ex.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<BaseResponse> ResetPatientPassword(UserRegisterModel userResetPasswordModel)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = await _httpService.PostAsync<BaseResponse>($"{_apiUrl}/Patients/reset_password", userResetPasswordModel);
|
||||
return response;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new BaseResponse
|
||||
{
|
||||
StatusCode = 400,
|
||||
Data = null,
|
||||
Message = ex.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using HealthcareManagerUI.Models;
|
||||
|
||||
namespace HealthcareManagerUI.Services.Authentication;
|
||||
|
||||
public interface IAuthenticationService
|
||||
{
|
||||
Task<BaseResponse> LoginDoctor(UserLoginModel userLoginModel);
|
||||
|
||||
Task<BaseResponse> LoginPatient(UserLoginModel userLoginModel);
|
||||
|
||||
Task<BaseResponse> RegisterDoctor(UserRegisterModel userRegistrationModel);
|
||||
|
||||
Task<BaseResponse> RegisterPatient(UserRegisterModel userRegistrationModel);
|
||||
|
||||
Task<BaseResponse> ResetDoctorPassword(UserRegisterModel userResetPasswordModel);
|
||||
|
||||
Task<BaseResponse> ResetPatientPassword(UserRegisterModel userResetPasswordModel);
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace HealthcareManagerUI.Services.Http;
|
||||
|
||||
public class HttpService : IHttpService
|
||||
{
|
||||
private readonly string _apiKey;
|
||||
|
||||
public HttpService(IConfiguration configuration)
|
||||
{
|
||||
_apiKey = configuration.GetValue<string>("ApiKey") ?? "NoKey";
|
||||
}
|
||||
|
||||
public async Task<T> GetAsync<T>(string uri, IDictionary<string, string> headers = null)
|
||||
{
|
||||
using var httpClient = new HttpClient();
|
||||
var request = new HttpRequestMessage(HttpMethod.Get, uri);
|
||||
AddHeaders(request, headers);
|
||||
|
||||
var response = await httpClient.SendAsync(request);
|
||||
|
||||
var responseContent = await response.Content.ReadAsStringAsync();
|
||||
return JsonSerializer.Deserialize<T>(
|
||||
responseContent, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
}
|
||||
|
||||
public async Task<T> GetByIdAsync<T>(string uri, int id, IDictionary<string, string> headers = null)
|
||||
{
|
||||
return await GetAsync<T>($"{uri}/{id}", headers);
|
||||
}
|
||||
|
||||
public async Task<T> PostAsync<T>(string uri, object data, IDictionary<string, string> headers = null)
|
||||
{
|
||||
using var httpClient = new HttpClient();
|
||||
var request = new HttpRequestMessage(HttpMethod.Post, uri);
|
||||
AddHeaders(request, headers);
|
||||
request.Content = new StringContent(JsonSerializer.Serialize(data), Encoding.UTF8, "application/json");
|
||||
|
||||
var response = await httpClient.SendAsync(request);
|
||||
|
||||
var responseContent = await response.Content.ReadAsStringAsync();
|
||||
return JsonSerializer.Deserialize<T>(
|
||||
responseContent, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
}
|
||||
|
||||
public async Task<T> PutAsync<T>(string uri, int id, object data, IDictionary<string, string> headers = null)
|
||||
{
|
||||
using var httpClient = new HttpClient();
|
||||
var request = new HttpRequestMessage(HttpMethod.Put, $"{uri}/{id}");
|
||||
AddHeaders(request, headers);
|
||||
request.Content = new StringContent(JsonSerializer.Serialize(data), Encoding.UTF8, "application/json");
|
||||
|
||||
var response = await httpClient.SendAsync(request);
|
||||
|
||||
var responseContent = await response.Content.ReadAsStringAsync();
|
||||
return JsonSerializer.Deserialize<T>(
|
||||
responseContent, new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
}
|
||||
|
||||
public async Task DeleteAsync(string uri, int id, IDictionary<string, string> headers = null)
|
||||
{
|
||||
using var httpClient = new HttpClient();
|
||||
var request = new HttpRequestMessage(HttpMethod.Delete, $"{uri}/{id}");
|
||||
AddHeaders(request, headers);
|
||||
|
||||
var response = await httpClient.SendAsync(request);
|
||||
}
|
||||
|
||||
private void AddHeaders(HttpRequestMessage request, IDictionary<string, string> headers)
|
||||
{
|
||||
// Add the API key header to every request
|
||||
request.Headers.Add("ApiKey", _apiKey);
|
||||
|
||||
if (headers != null)
|
||||
{
|
||||
foreach (var header in headers)
|
||||
{
|
||||
request.Headers.Add(header.Key, header.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ApiKey": "testapikey"
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("HealthcareManagerUI")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+90604e48ae9f78fa417a446c05f7759001447de5")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("HealthcareManagerUI")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("HealthcareManagerUI")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
ab066e9096346068223b71b3fe69040bd32f1c1da8d97eddb6a2399e719e2e24
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net8.0
|
||||
build_property.TargetPlatformMinVersion =
|
||||
build_property.UsingMicrosoftNETSdkWeb = true
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = HealthcareManagerUI
|
||||
build_property.RootNamespace = HealthcareManagerUI
|
||||
build_property.ProjectDir = C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\frontend\HealthcareManagerUI\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.RazorLangVersion = 8.0
|
||||
build_property.SupportLocalizedComponentNames =
|
||||
build_property.GenerateRazorMetadataSourceChecksumAttributes =
|
||||
build_property.MSBuildProjectDirectory = C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\frontend\HealthcareManagerUI
|
||||
build_property._RazorSourceGeneratorDebug =
|
||||
|
||||
[C:/Users/Andrei Cerbu/Documents/FACULTATE/CC-FinalProj/frontend/HealthcareManagerUI/Components/Layout/AuthLayout.razor]
|
||||
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xMYXlvdXRcQXV0aExheW91dC5yYXpvcg==
|
||||
build_metadata.AdditionalFiles.CssScope =
|
||||
|
||||
[C:/Users/Andrei Cerbu/Documents/FACULTATE/CC-FinalProj/frontend/HealthcareManagerUI/Components/Pages/AlertMessage.razor]
|
||||
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xQYWdlc1xBbGVydE1lc3NhZ2UucmF6b3I=
|
||||
build_metadata.AdditionalFiles.CssScope =
|
||||
|
||||
[C:/Users/Andrei Cerbu/Documents/FACULTATE/CC-FinalProj/frontend/HealthcareManagerUI/Components/Pages/ChooseRolePage.razor]
|
||||
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xQYWdlc1xDaG9vc2VSb2xlUGFnZS5yYXpvcg==
|
||||
build_metadata.AdditionalFiles.CssScope =
|
||||
|
||||
[C:/Users/Andrei Cerbu/Documents/FACULTATE/CC-FinalProj/frontend/HealthcareManagerUI/Components/Pages/DashboardPage.razor]
|
||||
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xQYWdlc1xEYXNoYm9hcmRQYWdlLnJhem9y
|
||||
build_metadata.AdditionalFiles.CssScope =
|
||||
|
||||
[C:/Users/Andrei Cerbu/Documents/FACULTATE/CC-FinalProj/frontend/HealthcareManagerUI/Components/Pages/LoginPage.razor]
|
||||
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xQYWdlc1xMb2dpblBhZ2UucmF6b3I=
|
||||
build_metadata.AdditionalFiles.CssScope =
|
||||
|
||||
[C:/Users/Andrei Cerbu/Documents/FACULTATE/CC-FinalProj/frontend/HealthcareManagerUI/Components/Pages/RegisterPage.razor]
|
||||
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xQYWdlc1xSZWdpc3RlclBhZ2UucmF6b3I=
|
||||
build_metadata.AdditionalFiles.CssScope =
|
||||
|
||||
[C:/Users/Andrei Cerbu/Documents/FACULTATE/CC-FinalProj/frontend/HealthcareManagerUI/Components/Pages/ResetPasswordPage.razor]
|
||||
build_metadata.AdditionalFiles.TargetPath = Q29tcG9uZW50c1xQYWdlc1xSZXNldFBhc3N3b3JkUGFnZS5yYXpvcg==
|
||||
build_metadata.AdditionalFiles.CssScope =
|
||||
@@ -0,0 +1,17 @@
|
||||
// <auto-generated/>
|
||||
global using global::Microsoft.AspNetCore.Builder;
|
||||
global using global::Microsoft.AspNetCore.Hosting;
|
||||
global using global::Microsoft.AspNetCore.Http;
|
||||
global using global::Microsoft.AspNetCore.Routing;
|
||||
global using global::Microsoft.Extensions.Configuration;
|
||||
global using global::Microsoft.Extensions.DependencyInjection;
|
||||
global using global::Microsoft.Extensions.Hosting;
|
||||
global using global::Microsoft.Extensions.Logging;
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Net.Http.Json;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
Binary file not shown.
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\HealthcareManagerUI.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\HealthcareManagerUI.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\HealthcareManagerUI.csproj",
|
||||
"projectName": "HealthcareManagerUI",
|
||||
"projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\HealthcareManagerUI.csproj",
|
||||
"packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
],
|
||||
"sources": {
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.AspNetCore.App": {
|
||||
"privateAssets": "none"
|
||||
},
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Andrei Cerbu\.nuget\packages\</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.9.1</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\Andrei Cerbu\.nuget\packages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"version": 3,
|
||||
"targets": {
|
||||
"net8.0": {}
|
||||
},
|
||||
"libraries": {},
|
||||
"projectFileDependencyGroups": {
|
||||
"net8.0": []
|
||||
},
|
||||
"packageFolders": {
|
||||
"C:\\Users\\Andrei Cerbu\\.nuget\\packages\\": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\HealthcareManagerUI.csproj",
|
||||
"projectName": "HealthcareManagerUI",
|
||||
"projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\HealthcareManagerUI.csproj",
|
||||
"packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\",
|
||||
"outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"net8.0"
|
||||
],
|
||||
"sources": {
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
||||
"net8.0": {
|
||||
"targetAlias": "net8.0",
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"frameworkReferences": {
|
||||
"Microsoft.AspNetCore.App": {
|
||||
"privateAssets": "none"
|
||||
},
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "yH4Q+LkO2CE3MznIcrlPS+taSI2XBcgBj6avLnffpxmFkD9ND0vvFtGynswKrmhXXjk04hrPG4LlIo3zuh86UA==",
|
||||
"success": true,
|
||||
"projectFilePath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\HealthcareManagerUI.csproj",
|
||||
"expectedPackageFiles": [],
|
||||
"logs": []
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
"restore":{"projectUniqueName":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\HealthcareManagerUI.csproj","projectName":"HealthcareManagerUI","projectPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\HealthcareManagerUI.csproj","outputPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\frontend\\HealthcareManagerUI\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.AspNetCore.App":{"privateAssets":"none"},"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"}}
|
||||
@@ -0,0 +1 @@
|
||||
17125382441830168
|
||||
@@ -0,0 +1 @@
|
||||
17125721198365815
|
||||
@@ -0,0 +1,71 @@
|
||||
body, html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden; /* Prevents scrolling caused by the absolute positioning */
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Roboto", sans-serif;
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
position: relative;
|
||||
z-index: 0; /* Ensures the background is under the content */
|
||||
|
||||
}
|
||||
|
||||
.background {
|
||||
position: absolute;
|
||||
top: -5%;
|
||||
left: -5%;
|
||||
width: 110%;
|
||||
height: 110%;
|
||||
background-image: url(background_image.jpg);
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
filter: brightness(50%) blur(5px);
|
||||
z-index: -1; /* Keeps it below the content */
|
||||
}
|
||||
|
||||
.container {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* New styles for title and subtitle */
|
||||
.landingTitle {
|
||||
color: #ffffff;
|
||||
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
|
||||
font-size: 3.5rem;
|
||||
font-weight: bold;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
padding: 0.5rem;
|
||||
border-radius: 0.5rem;
|
||||
display: inline-block; /* Wrap the background to the text */
|
||||
margin-top: 2rem; /* Give some space from the top */
|
||||
}
|
||||
|
||||
.landingSubtitle {
|
||||
color: #dcdcdc;
|
||||
text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
|
||||
font-size: 2rem;
|
||||
padding: 0.25rem;
|
||||
border-radius: 0.5rem;
|
||||
display: block; /* Wrap the background to the text */
|
||||
margin-bottom: 2rem; /* Give some space before the buttons */
|
||||
}
|
||||
|
||||
.centered-menu {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
display: flex;
|
||||
flex-direction: row; /* This will align the buttons side by side */
|
||||
justify-content: center; /* Center the buttons within the container */
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
.form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
width: 20%;
|
||||
height: auto;
|
||||
|
||||
color: white;
|
||||
background: #095d7e;
|
||||
border-radius: 10px;
|
||||
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.header hr {
|
||||
width: 15vw;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
|
||||
font-size: 1.5rem;
|
||||
|
||||
text-align: center;
|
||||
margin: 0 0 1rem 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
|
||||
margin: 1rem 0 0 0;
|
||||
}
|
||||
|
||||
input {
|
||||
text-align: center;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: 1.2rem;
|
||||
width: 70%;
|
||||
padding: 1rem;
|
||||
margin: 0.7rem;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
button {
|
||||
font-weight: bold;
|
||||
|
||||
padding: 0.5rem 3rem 0.5rem 3rem;
|
||||
|
||||
font-size: 1rem;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button[name="submit"] {
|
||||
background-color: #F44336;
|
||||
color: white;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user