Skip to content

Commit

Permalink
move using from every viewpage to _viewimports 🍈
Browse files Browse the repository at this point in the history
  • Loading branch information
anjoy8 committed Apr 5, 2019
1 parent a6f9ba8 commit 442f753
Show file tree
Hide file tree
Showing 23 changed files with 30 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Account/ExternalLogin.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Christ3D.Infrastruct.Identity.Models.AccountViewModels.ExternalLoginViewModel
@model ExternalLoginViewModel
@{
ViewData["Title"] = "Register";
}
Expand Down
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Account/ForgotPassword.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Christ3D.Infrastruct.Identity.Models.AccountViewModels.ForgotPasswordViewModel
@model ForgotPasswordViewModel
@{
ViewData["Title"] = "Forgot your password?";
}
Expand Down
4 changes: 2 additions & 2 deletions Christ3D.UI.Web/Views/Account/Login.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
@using System.Linq
@using Microsoft.AspNetCore.Http
@using Microsoft.AspNetCore.Http.Authentication
@model Christ3D.Infrastruct.Identity.Models.AccountViewModels.LoginViewModel
@inject Microsoft.AspNetCore.Identity.SignInManager<Christ3D.Infrastruct.Identity.Models.ApplicationUser> SignInManager
@model LoginViewModel
@inject SignInManager<ApplicationUser> SignInManager

@{
ViewData["Title"] = "Log in";
Expand Down
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Account/LoginWith2fa.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Christ3D.Infrastruct.Identity.Models.AccountViewModels.LoginWith2faViewModel
@model LoginWith2faViewModel
@{
ViewData["Title"] = "Two-factor authentication";
}
Expand Down
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Account/LoginWithRecoveryCode.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Christ3D.Infrastruct.Identity.Models.AccountViewModels.LoginWithRecoveryCodeViewModel
@model LoginWithRecoveryCodeViewModel
@{
ViewData["Title"] = "Recovery code verification";
}
Expand Down
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Account/Register.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Christ3D.Infrastruct.Identity.Models.AccountViewModels.RegisterViewModel
@model RegisterViewModel
@{
ViewData["Title"] = "Register";
}
Expand Down
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Account/ResetPassword.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Christ3D.Infrastruct.Identity.Models.AccountViewModels.ResetPasswordViewModel
@model ResetPasswordViewModel
@{
ViewData["Title"] = "Reset password";
}
Expand Down
3 changes: 1 addition & 2 deletions Christ3D.UI.Web/Views/Manage/ChangePassword.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using Christ3D.UI.Web.Views.Manage
@model Christ3D.Infrastruct.Identity.Models.ManageViewModels.ChangePasswordViewModel
@model ChangePasswordViewModel
@{
ViewData["Title"] = "Change password";
ViewData.AddActivePage(ManageNavPages.ChangePassword);
Expand Down
3 changes: 1 addition & 2 deletions Christ3D.UI.Web/Views/Manage/Disable2fa.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using Christ3D.UI.Web.Views.Manage
@{
@{
ViewData["Title"] = "Disable two-factor authentication (2FA)";
ViewData.AddActivePage(ManageNavPages.TwoFactorAuthentication);
}
Expand Down
4 changes: 1 addition & 3 deletions Christ3D.UI.Web/Views/Manage/EnableAuthenticator.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@using Christ3D.Infrastruct.Identity.Models.ManageViewModels
@using Christ3D.UI.Web.Views.Manage
@model EnableAuthenticatorViewModel
@model EnableAuthenticatorViewModel
@{
ViewData["Title"] = "Enable authenticator";
ViewData.AddActivePage(ManageNavPages.TwoFactorAuthentication);
Expand Down
3 changes: 1 addition & 2 deletions Christ3D.UI.Web/Views/Manage/ExternalLogins.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using Christ3D.UI.Web.Views.Manage
@model Christ3D.Infrastruct.Identity.Models.ManageViewModels.ExternalLoginsViewModel
@model ExternalLoginsViewModel
@{
ViewData["Title"] = "Manage your external logins";
ViewData.AddActivePage(ManageNavPages.ExternalLogins);
Expand Down
3 changes: 1 addition & 2 deletions Christ3D.UI.Web/Views/Manage/GenerateRecoveryCodes.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using Christ3D.UI.Web.Views.Manage
@model Christ3D.Infrastruct.Identity.Models.ManageViewModels.GenerateRecoveryCodesViewModel
@model GenerateRecoveryCodesViewModel
@{
ViewData["Title"] = "Recovery codes";
ViewData.AddActivePage(ManageNavPages.TwoFactorAuthentication);
Expand Down
3 changes: 1 addition & 2 deletions Christ3D.UI.Web/Views/Manage/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using Christ3D.UI.Web.Views.Manage
@model Christ3D.Infrastruct.Identity.Models.ManageViewModels.IndexViewModel
@model IndexViewModel
@{
ViewData["Title"] = "Profile";
ViewData.AddActivePage(ManageNavPages.Index);
Expand Down
3 changes: 1 addition & 2 deletions Christ3D.UI.Web/Views/Manage/ResetAuthenticator.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using Christ3D.UI.Web.Views.Manage
@{
@{
ViewData["Title"] = "Reset authenticator key";
ViewData.AddActivePage(ManageNavPages.TwoFactorAuthentication);
}
Expand Down
3 changes: 1 addition & 2 deletions Christ3D.UI.Web/Views/Manage/SetPassword.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using Christ3D.UI.Web.Views.Manage
@model Christ3D.Infrastruct.Identity.Models.ManageViewModels.SetPasswordViewModel
@model SetPasswordViewModel
@{
ViewData["Title"] = "Set password";
ViewData.AddActivePage(ManageNavPages.ChangePassword);
Expand Down
3 changes: 1 addition & 2 deletions Christ3D.UI.Web/Views/Manage/TwoFactorAuthentication.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using Christ3D.UI.Web.Views.Manage
@model Christ3D.Infrastruct.Identity.Models.ManageViewModels.TwoFactorAuthenticationViewModel
@model TwoFactorAuthenticationViewModel
@{
ViewData["Title"] = "Two-factor authentication";
ViewData.AddActivePage(ManageNavPages.TwoFactorAuthentication);
Expand Down
3 changes: 1 addition & 2 deletions Christ3D.UI.Web/Views/Manage/_ManageNav.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@using Christ3D.UI.Web.Views.Manage
@inject Microsoft.AspNetCore.Identity.SignInManager<Christ3D.Infrastruct.Identity.Models.ApplicationUser> SignInManager
@inject SignInManager<ApplicationUser> SignInManager
@{
var hasExternalLogins = (await SignInManager.GetExternalAuthenticationSchemesAsync()).Any();
}
Expand Down
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Student/Create.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Christ3D.Application.ViewModels.StudentViewModel
@model StudentViewModel
@{
ViewData["Title"] = "Register new Student";
}
Expand Down
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Student/Delete.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Christ3D.Application.ViewModels.StudentViewModel
@model StudentViewModel
@{
ViewData["Title"] = "Delete Student";
}
Expand Down
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Student/Details.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Christ3D.Application.ViewModels.StudentViewModel
@model StudentViewModel
@{
ViewData["Title"] = "Student Details";
}
Expand Down
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Student/Edit.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Christ3D.Application.ViewModels.StudentViewModel
@model StudentViewModel
@{
ViewData["Title"] = "Edit Student";
}
Expand Down
2 changes: 1 addition & 1 deletion Christ3D.UI.Web/Views/Student/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model IEnumerable<Christ3D.Application.ViewModels.StudentViewModel>
@model IEnumerable<StudentViewModel>
@{
ViewData["Title"] = "Student Management";
}
Expand Down
7 changes: 7 additions & 0 deletions Christ3D.UI.Web/Views/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
@using Christ3D.UI.Web
@using Christ3D.UI.Web.Models
@using Christ3D.Infrastruct.Identity.Models.AccountViewModels
@using Christ3D.Infrastruct.Identity.Models
@using Microsoft.AspNetCore.Identity
@using Christ3D.UI.Web.Views.Manage
@using Christ3D.Infrastruct.Identity.Models.ManageViewModels
@using Christ3D.Application.ViewModels

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper "*, Christ3D.UI.Web"

0 comments on commit 442f753

Please sign in to comment.