1
0
mirror of https://github.com/bitwarden/server synced 2025-12-24 04:03:25 +00:00
Files
server/src/Admin/Views/Users/Index.cshtml
renovate[bot] b2b0f1e70e [deps] Auth: Update bootstrap to v5 [SECURITY] (#4881)
* [deps] Auth: Update bootstrap to v5 [SECURITY]

* Update bootstrap and import dependencies in site.scss

* Update site.scss to include the theme color 'dark'

* Refactor site.scss to merge the 'primary-accent' theme color into the existing theme colors

* Update bootstrap classes for v5

* Refactor form layout in Index.cshtml and AddExistingOrganization.cshtml

* Revert change to the shield icon in the navbar

* Fix organization form select inputs

* Fixed search input sizes

* Fix elements in Providers and Users search

* More bootstrap migration

* Revert change to tax rate delete button

* Add missing label classes in Users/Edit.cshtml

* More component migrations

* Refactor form classes and labels in CreateMsp.cshtml and CreateReseller.cshtml

* Update package dependencies in Sso

* Revert changes to Providers/Edit.cshtml

* Refactor CreateMultiOrganizationEnterprise.cshtml and Providers/Edit.cshtml for bootstrap 5

* Refactor webpack.config.js to use @popperjs/core instead of popper.js

* Remove popperjs package dependency

* Restore Bootstrap 4 link styling behavior

- Remove default text decoration
- Add underline only on hover

* Update Bootstrap to version 5.3.3

* Update deprecated text color classes from 'text-muted' to 'text-body-secondary' across various views

* Refactor provider edit view for bootstrap 5

* Remove underline in Add/Create organization links in provider page

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rui Tome <rtome@bitwarden.com>
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
2024-11-19 12:04:54 +00:00

130 lines
4.4 KiB
Plaintext

@model UsersModel
@{
ViewData["Title"] = "Users";
}
<h1>Users</h1>
<form class="row row-cols-lg-auto g-3 align-items-center mb-2" method="get">
<div class="col-12">
<label class="visually-hidden" asp-for="Email">Email</label>
<input type="text" class="form-control" placeholder="Email" asp-for="Email" name="email">
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary" title="Search">
<i class="fa fa-search"></i> Search
</button>
</div>
</form>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Email</th>
<th style="width: 150px;">Created</th>
<th style="width: 170px; min-width: 170px;">Details</th>
</tr>
</thead>
<tbody>
@if (!Model.Items.Any())
{
<tr>
<td colspan="4">No results to list.</td>
</tr>
}
else
{
@foreach (var user in Model.Items)
{
<tr>
<td>
<a asp-action="@Model.Action" asp-route-id="@user.Id">@user.Email</a>
</td>
<td>
<span title="@user.CreationDate.ToString()">
@user.CreationDate.ToShortDateString()
</span>
</td>
<td>
@if (user.Premium)
{
<i class="fa fa-star fa-lg fa-fw"
title="Premium, expires @(user.PremiumExpirationDate?.ToShortDateString() ?? "-")">
</i>
}
else
{
<i class="fa fa-star-o fa-lg fa-fw text-body-secondary" title="Not Premium"></i>
}
@if (user.MaxStorageGb.HasValue && user.MaxStorageGb > 1)
{
<i class="fa fa-plus-square fa-lg fa-fw"
title="Additional Storage, @(user.MaxStorageGb - 1) GB">
</i>
}
else
{
<i class="fa fa-plus-square-o fa-lg fa-fw text-body-secondary"
title="No Additional Storage">
</i>
}
@if (user.EmailVerified)
{
<i class="fa fa-check-circle fa-lg fa-fw" title="Email Verified"></i>
}
else
{
<i class="fa fa-times-circle-o fa-lg fa-fw text-body-secondary" title="Email Not Verified"></i>
}
@if (user.TwoFactorEnabled)
{
<i class="fa fa-lock fa-lg fa-fw" title="2FA Enabled"></i>
}
else
{
<i class="fa fa-unlock fa-lg fa-fw text-body-secondary" title="2FA Not Enabled"></i>
}
</td>
</tr>
}
}
</tbody>
</table>
</div>
<nav>
<ul class="pagination">
@if (Model.PreviousPage.HasValue)
{
<li class="page-item">
<a class="page-link" asp-action="Index" asp-route-page="@Model.PreviousPage.Value"
asp-route-count="@Model.Count" asp-route-email="@Model.Email">
Previous
</a>
</li>
}
else
{
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Previous</a>
</li>
}
@if (Model.NextPage.HasValue)
{
<li class="page-item">
<a class="page-link" asp-action="Index" asp-route-page="@Model.NextPage.Value"
asp-route-count="@Model.Count" asp-route-email="@Model.Email">
Next
</a>
</li>
}
else
{
<li class="page-item disabled">
<a class="page-link" href="#" tabindex="-1">Next</a>
</li>
}
</ul>
</nav>