Index.cshtml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. @page
  2. @using Microsoft.AspNetCore.Http.Extensions
  3. @using Microsoft.AspNetCore.Mvc.Localization
  4. @using AuthServer.Pages
  5. @using Volo.Abp.Users
  6. @using Volo.Abp.AspNetCore.Mvc.UI.Theming
  7. @using Volo.Abp.Ui.Branding
  8. @model IndexModel
  9. @inject ICurrentUser CurrentUser
  10. @inject IBrandingProvider BrandingProvider
  11. @inject ITheme Theme
  12. @{
  13. Layout = Theme.GetEmptyLayout();
  14. }
  15. <div class="d-flex align-items-center" style="min-height: 100vh;">
  16. <div class="container">
  17. <abp-row>
  18. <div class="col mx-auto account-column">
  19. <div class="account-brand p-4 text-center mb-1">
  20. @if (!BrandingProvider.LogoUrl.IsNullOrEmpty())
  21. {
  22. <a class="navbar-brand" href="/" alt="@BrandingProvider.AppName"></a>
  23. }
  24. else
  25. {
  26. <h1>@BrandingProvider.AppName</h1>
  27. }
  28. </div>
  29. <abp-card>
  30. <abp-card-body>
  31. <div class="container">
  32. <abp-row>
  33. <abp-column size="_9">
  34. <div class="d-flex align-items-center">
  35. <div class="me-3 p-2">
  36. <i class="fa fa-user d-block" style="font-size: 10em; color: #12b900"></i>
  37. </div>
  38. <div class="p2">
  39. @if (CurrentUser.IsAuthenticated)
  40. {
  41. <span class="fs-16">
  42. Welcome <span class="fw-7">@CurrentUser.UserName</span>
  43. </span>
  44. <span class="fs-14 d-block text-dark-800 opacity-75 mb-1">@CurrentUser.Email</span>
  45. <div class="d-grid gap-2">
  46. <a abp-button="Outline_Primary" asp-controller="Manage" asp-action="Index" asp-area="Account">MyAccount</a>
  47. <a abp-button="Primary" asp-controller="Logout" asp-action="Index" asp-area="Account">Logout</a>
  48. </div>
  49. }
  50. else
  51. {
  52. <a abp-button="Primary" asp-controller="Login" asp-action="Index" asp-area="Account">Login</a>
  53. }
  54. </div>
  55. </div>
  56. </abp-column>
  57. </abp-row>
  58. <hr class="m-4" />
  59. <abp-row>
  60. @foreach (var application in Model.Applications)
  61. {
  62. <abp-column size-md="_4" class="mb-2">
  63. <abp-card>
  64. <abp-card-body>
  65. @if (!application.LogoUri.IsNullOrEmpty())
  66. {
  67. <div class="mx-auto">
  68. <img src="@application.LogoUri" style="height:64px" class="mb-3" />
  69. </div>
  70. }
  71. <h4>@application.DisplayName</h4>
  72. <span class="text-muted">@application.ClientUri</span>
  73. <div class="mt-1">
  74. <a abp-button="Outline_Secondary" href="@application.ClientUri">Visit</a>
  75. </div>
  76. </abp-card-body>
  77. </abp-card>
  78. </abp-column>
  79. }
  80. </abp-row>
  81. </div>
  82. </abp-card-body>
  83. </abp-card>
  84. </div>
  85. </abp-row>
  86. </div>
  87. </div>