1 | // Licensed to the .NET Foundation under one or more agreements.
|
---|
2 | // The .NET Foundation licenses this file to you under the MIT license.
|
---|
3 | #nullable disable
|
---|
4 |
|
---|
5 | using System;
|
---|
6 | using Microsoft.AspNetCore.Mvc.Rendering;
|
---|
7 |
|
---|
8 | namespace PostgreSqlDotnetCore.Areas.Identity.Pages.Account.Manage
|
---|
9 | {
|
---|
10 | /// <summary>
|
---|
11 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
12 | /// directly from your code. This API may change or be removed in future releases.
|
---|
13 | /// </summary>
|
---|
14 | public static class ManageNavPages
|
---|
15 | {
|
---|
16 | /// <summary>
|
---|
17 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
18 | /// directly from your code. This API may change or be removed in future releases.
|
---|
19 | /// </summary>
|
---|
20 | public static string Index => "Index";
|
---|
21 |
|
---|
22 | /// <summary>
|
---|
23 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
24 | /// directly from your code. This API may change or be removed in future releases.
|
---|
25 | /// </summary>
|
---|
26 | public static string Email => "Email";
|
---|
27 |
|
---|
28 | /// <summary>
|
---|
29 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
30 | /// directly from your code. This API may change or be removed in future releases.
|
---|
31 | /// </summary>
|
---|
32 | public static string ChangePassword => "ChangePassword";
|
---|
33 |
|
---|
34 | /// <summary>
|
---|
35 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
36 | /// directly from your code. This API may change or be removed in future releases.
|
---|
37 | /// </summary>
|
---|
38 | public static string DownloadPersonalData => "DownloadPersonalData";
|
---|
39 |
|
---|
40 | /// <summary>
|
---|
41 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
42 | /// directly from your code. This API may change or be removed in future releases.
|
---|
43 | /// </summary>
|
---|
44 | public static string DeletePersonalData => "DeletePersonalData";
|
---|
45 |
|
---|
46 | /// <summary>
|
---|
47 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
48 | /// directly from your code. This API may change or be removed in future releases.
|
---|
49 | /// </summary>
|
---|
50 | public static string ExternalLogins => "ExternalLogins";
|
---|
51 |
|
---|
52 | /// <summary>
|
---|
53 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
54 | /// directly from your code. This API may change or be removed in future releases.
|
---|
55 | /// </summary>
|
---|
56 | public static string PersonalData => "PersonalData";
|
---|
57 |
|
---|
58 | /// <summary>
|
---|
59 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
60 | /// directly from your code. This API may change or be removed in future releases.
|
---|
61 | /// </summary>
|
---|
62 | public static string TwoFactorAuthentication => "TwoFactorAuthentication";
|
---|
63 |
|
---|
64 | /// <summary>
|
---|
65 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
66 | /// directly from your code. This API may change or be removed in future releases.
|
---|
67 | /// </summary>
|
---|
68 | public static string IndexNavClass(ViewContext viewContext) => PageNavClass(viewContext, Index);
|
---|
69 |
|
---|
70 | /// <summary>
|
---|
71 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
72 | /// directly from your code. This API may change or be removed in future releases.
|
---|
73 | /// </summary>
|
---|
74 | public static string EmailNavClass(ViewContext viewContext) => PageNavClass(viewContext, Email);
|
---|
75 |
|
---|
76 | /// <summary>
|
---|
77 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
78 | /// directly from your code. This API may change or be removed in future releases.
|
---|
79 | /// </summary>
|
---|
80 | public static string ChangePasswordNavClass(ViewContext viewContext) => PageNavClass(viewContext, ChangePassword);
|
---|
81 |
|
---|
82 | /// <summary>
|
---|
83 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
84 | /// directly from your code. This API may change or be removed in future releases.
|
---|
85 | /// </summary>
|
---|
86 | public static string DownloadPersonalDataNavClass(ViewContext viewContext) => PageNavClass(viewContext, DownloadPersonalData);
|
---|
87 |
|
---|
88 | /// <summary>
|
---|
89 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
90 | /// directly from your code. This API may change or be removed in future releases.
|
---|
91 | /// </summary>
|
---|
92 | public static string DeletePersonalDataNavClass(ViewContext viewContext) => PageNavClass(viewContext, DeletePersonalData);
|
---|
93 |
|
---|
94 | /// <summary>
|
---|
95 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
96 | /// directly from your code. This API may change or be removed in future releases.
|
---|
97 | /// </summary>
|
---|
98 | public static string ExternalLoginsNavClass(ViewContext viewContext) => PageNavClass(viewContext, ExternalLogins);
|
---|
99 |
|
---|
100 | /// <summary>
|
---|
101 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
102 | /// directly from your code. This API may change or be removed in future releases.
|
---|
103 | /// </summary>
|
---|
104 | public static string PersonalDataNavClass(ViewContext viewContext) => PageNavClass(viewContext, PersonalData);
|
---|
105 |
|
---|
106 | /// <summary>
|
---|
107 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
108 | /// directly from your code. This API may change or be removed in future releases.
|
---|
109 | /// </summary>
|
---|
110 | public static string TwoFactorAuthenticationNavClass(ViewContext viewContext) => PageNavClass(viewContext, TwoFactorAuthentication);
|
---|
111 |
|
---|
112 | /// <summary>
|
---|
113 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
|
---|
114 | /// directly from your code. This API may change or be removed in future releases.
|
---|
115 | /// </summary>
|
---|
116 | public static string PageNavClass(ViewContext viewContext, string page)
|
---|
117 | {
|
---|
118 | var activePage = viewContext.ViewData["ActivePage"] as string
|
---|
119 | ?? System.IO.Path.GetFileNameWithoutExtension(viewContext.ActionDescriptor.DisplayName);
|
---|
120 | return string.Equals(activePage, page, StringComparison.OrdinalIgnoreCase) ? "active" : null;
|
---|
121 | }
|
---|
122 | }
|
---|
123 | }
|
---|