Skip to content

Commit

Permalink
🔀 Merge pull request #359 from COS301-SE-2024/dev/feat/final_ui_fixes
Browse files Browse the repository at this point in the history
💄 UI Update: Updated login and register page and improved some text readability in app UI
  • Loading branch information
ChuufMaster authored Sep 30, 2024
2 parents a1d9b60 + 5eb6ce6 commit 7184424
Show file tree
Hide file tree
Showing 5 changed files with 257 additions and 89 deletions.
4 changes: 2 additions & 2 deletions beakpeek/lib/View/Map/heat_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class HeatMapState extends State<HeatMap> {
'This is an Endangered Species! Est. Population: $population',
style: GlobalStyles.contentPrimary(context).copyWith(
fontWeight: FontWeight.w400,
color: const Color.fromARGB(255, 202, 110, 104),
color: AppColors.textColor(context),
fontSize: 12,
),
textAlign: TextAlign.left, // Align the text to the right
Expand All @@ -84,7 +84,7 @@ class HeatMapState extends State<HeatMap> {
'This is not an Endangered Species!',
style: GlobalStyles.contentPrimary(context).copyWith(
fontWeight: FontWeight.w400,
color: const Color.fromARGB(255, 119, 189, 121),
color: AppColors.textColor(context),
fontSize: 16,
),
textAlign: TextAlign.left, // Align the text to the right
Expand Down
43 changes: 10 additions & 33 deletions beakpeek/lib/View/Sightings/sightings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,34 +106,10 @@ class _SightingsState extends State<Sightings> {
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Filter by:',
'Sort by name:',
style: GlobalStyles.contentPrimary(context),
),
const SizedBox(width: 8.0),
DropdownButton<String>(
dropdownColor: AppColors.popupColor(context),
value: selectedFilter,
items: [
DropdownMenuItem(
value: 'name',
child: Text(
'Name',
style: GlobalStyles.contentPrimary(context),
),
),
DropdownMenuItem(
value: 'rarity',
child: Text(
'Rarity',
style: GlobalStyles.contentPrimary(context),
),
),
],
onChanged: onFilterChanged,
style: GlobalStyles.primaryButtonText(context),
underline: Container(),
),
const SizedBox(width: 16.0),
SizedBox(width: screenWidth * 0.08),
Row(
children: [
SizedBox(
Expand All @@ -148,13 +124,13 @@ class _SightingsState extends State<Sightings> {
reportRateASC();
}
},
child: Icon(
Icons.arrow_upward,
color: AppColors.iconColor(context),
child: Text(
'A-Z',
style: GlobalStyles.secondaryButtonText(context),
),
),
),
const SizedBox(width: 8.0),
const SizedBox(width: 6.0),
SizedBox(
width: 80.0,
height: 34.0,
Expand All @@ -167,12 +143,13 @@ class _SightingsState extends State<Sightings> {
reportRateDESC();
}
},
child: Icon(
Icons.arrow_downward,
color: AppColors.iconColor(context),
child: Text(
'Z-A',
style: GlobalStyles.secondaryButtonText(context),
),
),
),
SizedBox(height: screenHeight * 0.05),
],
),
],
Expand Down
2 changes: 1 addition & 1 deletion beakpeek/lib/View/UserProfile/user_profile_widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Widget levelProgressBar(BuildContext context) {
xpLabel,
style: GlobalStyles.contentPrimary(context).copyWith(
fontWeight: FontWeight.bold,
color: AppColors.primaryColorLight,
color: Colors.black54,
fontSize: 16,
),
),
Expand Down
139 changes: 114 additions & 25 deletions dotnet/UserApi/UserApi/Areas/Identity/Pages/Account/Login.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,70 +6,157 @@ ViewData["Title"] = "Log in";
@* Model.ReturnUrl = Request.Query["ReturnUrl"]; *@
}

<h1>@ViewData["Title"]</h1>
<style>
body {
background-color: #f3f1eD;
font-family: Arial, Helvetica, sans-serif;
}
h1, h2, h3 {
color: #033a30;
text-align: center;
}
.login-container {
background-color: #f3f1eD;
padding: 30px;
border-radius: 10px;
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
margin-top: 50px;
margin-left: 20px;
margin-right: 20px;
}
.form-floating label {
font-weight: 600;
color: #1d695b;
}
.btn-primary {
background-color: #033a30;
border: none;
padding: 10px;
font-size: 1.2em;
border-radius: 30px;
box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.3);
}
.btn-primary:hover {
background-color: #1d695b;
}
.external-login-button {
margin: auto;
display: block;
width: 80%;
border-radius: 30px;
box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.3);
border: 1px solid #033a30;
color: #033a30;
padding: 10px;
}
.external-login-button .btn {
width: 100%;
}
.login-section {
padding: 10px;
background-color: #f3f1eD;
}
.form-check-label {
font-weight: 500;
}
.form-check-input {
margin-right: 10px;
}
#forgot-password, a {
color: #1d695b;
text-decoration: none;
}
#forgot-password:hover, a:hover {
text-decoration: underline;
}
.row {
display: flex;
justify-content: center;
align-items: center;
}
.form-control {
border-radius: 15px;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
</style>

<div class="row">
<div class="col-md-4">
<section>
<div class="col-md-4 login-container">
<section class="login-section">
<form id="account" method="post">
<h2>Use a local account to log in.</h2>
<h2>Log in to Your Account</h2>
<hr />
<div asp-validation-summary="ModelOnly" class="text-danger" role="alert"></div>

@* Email field *@
<div class="form-floating mb-3">
<input asp-for="Input.Email" class="form-control" autocomplete="username" aria-required="true"
placeholder="[email protected]" />
<label asp-for="Input.Email" class="form-label">Email / Username</label>
<span asp-validation-for="Input.Email" class="text-danger"></span>
</div>

@* Password field *@
<div class="form-floating mb-3">
<input asp-for="Input.Password" class="form-control" autocomplete="current-password"
aria-required="true" placeholder="password" />
aria-required="true" placeholder="password" type="password" id="Input_Password" />
<label asp-for="Input.Password" class="form-label">Password</label>
<span asp-validation-for="Input.Password" class="text-danger"></span>
</div>

@* Show password checkbox *@
<div class="checkbox mb-3">
<label class="form-label">
<label class="form-check-label">
<input type="checkbox" name="showPassword" id="ckShowPass" onclick="myshowp(this)"
class="form-check-input" />
Show Password
</label>
</div>

@* Remember me checkbox *@
<div class="checkbox mb-3">
<label asp-for="Input.RememberMe" class="form-label">
<label asp-for="Input.RememberMe" class="form-check-label">
<input class="form-check-input" asp-for="Input.RememberMe" />
@Html.DisplayNameFor(m => m.Input.RememberMe)
</label>
</div>

@* Log in button *@
<div>
<button id="login-submit" type="submit" class="w-100 btn btn-lg btn-primary">Log in</button>
</div>


<div>
@* Register new user *@
<br />
<p>
<a asp-page="./Register" asp-route-returnUrl="@Model.ReturnUrl">Register as a new user</a>
</p>

<br />
<p>
<a id="forgot-password" asp-page="./ForgotPassword">Forgot your password?</a>
</p>

<br />
@* <p>
<a asp-area="Identity" asp-page="/Account/Register">Register</a>
</p> *@
@* <p>
<a id="resend-confirmation" asp-page="./ResendEmailConfirmation">Resend email confirmation</a>
</p> *@
</div>
</form>
</section>
</div>
<div class="col-md-6 col-md-offset-2">
<section>

<div class="col-md-6">
<section class="login-section">
<br>
<h3>Use another service to log in.</h3>
<hr />
<br>
@{
if ((Model.ExternalLogins?.Count ?? 0) == 0)
{
Expand All @@ -89,8 +176,10 @@ ViewData["Title"] = "Log in";
<p>
@foreach (var provider in Model.ExternalLogins!)
{
<button type="submit" class="btn btn-primary" name="provider" value="@provider.Name"
title="Log in using your @provider.DisplayName account">@provider.DisplayName</button>
<button type="submit" class="btn btn-outline-primary external-login-button" name="provider" value="@provider.Name"
title="Log in using your @provider.DisplayName account">
Log in with @provider.DisplayName
</button>
}
</p>
</div>
Expand Down
Loading

0 comments on commit 7184424

Please sign in to comment.