docs: #338 improving signup UI

This commit is contained in:
Hamid Reza Mohammadi 2022-07-01 12:10:45 +04:30
parent 1525357f2b
commit bb2836c906
25 changed files with 65 additions and 41 deletions

View File

@ -15,7 +15,7 @@
گنجور » نمایش خوانش
</title>
<link href="~/dist/skin/pink.flag/css/jplayer.pink.flag.min.css" rel="stylesheet" type="text/css" />
<link href="~/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="~/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
<script>

View File

@ -11,7 +11,7 @@
<title>انتخاب قطعهٔ موسیقی مرتبط با شعر از بیپتونز</title>
<meta name="robots" content="noindex, nofollow" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/spotify.css" rel="stylesheet" type="text/css" />
<script src="/lib/jquery/dist/jquery.min.js"></script>

View File

@ -14,7 +14,7 @@
@ViewData["Title"]
</title>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />

View File

@ -12,7 +12,7 @@
@ViewData["Title"]
</title>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/fab.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />

View File

@ -10,7 +10,7 @@
<title>انتخاب قطعه‌ای از برنامهٔ گلها مرتبط با این شعر</title>
<meta name="robots" content="noindex, nofollow" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/spotify.css" rel="stylesheet" type="text/css" />
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="~/js/golha.js"></script>

View File

@ -14,7 +14,7 @@
@ViewData["Title"]
</title>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/fab.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />

View File

@ -12,7 +12,7 @@
<title>
@Html.Raw(ViewData["Title"])
</title>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/fab.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />

View File

@ -13,7 +13,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex, nofollow" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="hdr">

View File

@ -12,7 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="شاعران و نویسندگان گنجور روی نقشهٔ جغرافیایی" />
<meta charset="utf-8" />
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/css/leaflet.css" />
<style>
.leaflet-container {

View File

@ -11,7 +11,7 @@
<title>
@Html.Raw(ViewData["Title"])
</title>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/fab.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />

View File

@ -11,7 +11,7 @@
<title>پیشنهاد شعر مرتبط با تصویر</title>
<meta name="robots" content="noindex, nofollow" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/spotify.css" rel="stylesheet" type="text/css" />
<script src="/lib/jquery/dist//jquery.min.js"></script>

View File

@ -12,7 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex, nofollow" />
<title>اطلاعات رتبه‌بندی خوانش‌های شعر</title>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
</head>
<body>

View File

@ -11,7 +11,7 @@
<meta name="robots" content="noindex, nofollow" />
<title>درخواست حذف حاشیه</title>
<script src="/lib/jquery/dist/jquery.min.js"></script>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<style>
label {
width: 100px;

View File

@ -13,7 +13,7 @@
<meta name="robots" content="noindex, nofollow" />
<title>گزارش خطا در خوانش</title>
<script src="/lib/jquery/dist/jquery.min.js"></script>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<style>
label {
width: 100px;

View File

@ -12,7 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex, nofollow" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="hdr">

View File

@ -15,7 +15,7 @@
@ViewData["Title"]
</title>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/fab.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />

View File

@ -10,7 +10,7 @@
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" />
<link href="/dist/skin/blue.monday/css/jplayer.blue.monday.min.css" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/fab.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />

View File

@ -9,7 +9,7 @@
</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" />
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/fab.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />

View File

@ -2,19 +2,7 @@
@model GanjooRazor.Pages.SignUpModel
@{
Layout = null;
if (Model.SignupPhase1)
{
ViewData["Title"] = "گنجور » نام‌نویسی » ورود ایمیل";
}
else
if(Model.SignupVerifyEmailPhase)
{
ViewData["Title"] = "گنجور » نام‌نویسی » ورود رمز دریافتی در ایمیل";
}
else
{
ViewData["Title"] = "گنجور » نام‌نویسی » مرحلهٔ نهایی";
}
}
<!DOCTYPE html>
<html lang="fa-IR" dir="rtl">
@ -24,7 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noindex, nofollow" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
</head>
<body class="bk-background">
<div id="hdr">
@ -193,6 +181,19 @@
}
</div>
<partial name="_FooterPartial" model="null" />
</div>
@if (!string.IsNullOrEmpty(ViewData["GoogleAnalyticsCode"].ToString()))
{
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=@(ViewData["GoogleAnalyticsCode"])"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', '@ViewData["GoogleAnalyticsCode"]');
</script>
}
</body>
</html>

View File

@ -54,6 +54,24 @@ namespace GanjooRazor.Pages
[BindProperty]
public VerifiedSignUpViewModelWithRepPass FinalViewModel { get; set; }
private void _FillViewData()
{
ViewData["GoogleAnalyticsCode"] = Configuration["GoogleAnalyticsCode"];
if (SignupPhase1)
{
ViewData["Title"] = "گنجور » نام‌نویسی » ورود ایمیل";
}
else
if (SignupVerifyEmailPhase)
{
ViewData["Title"] = "گنجور » نام‌نویسی » ورود رمز دریافتی در ایمیل";
}
else
{
ViewData["Title"] = "گنجور » نام‌نویسی » مرحلهٔ نهایی";
}
}
public async Task<IActionResult> OnGetAsync()
{
if (bool.Parse(Configuration["MaintenanceMode"]))
@ -86,6 +104,8 @@ namespace GanjooRazor.Pages
CaptchaImageUrl = $"{APIRoot.InternetUrl}/api/rimages/{SignUpViewModel.CaptchaImageId}.jpg";
_FillViewData();
return Page();
}
@ -98,7 +118,7 @@ namespace GanjooRazor.Pages
SignupFinalPhase = false;
var response = await _httpClient.PostAsync($"{APIRoot.Url}/api/users/signup", new StringContent(JsonConvert.SerializeObject(SignUpViewModel), Encoding.UTF8, "application/json"));
if(!response.IsSuccessStatusCode)
if (!response.IsSuccessStatusCode)
{
LastError = JsonConvert.DeserializeObject<string>(await response.Content.ReadAsStringAsync());
@ -122,12 +142,13 @@ namespace GanjooRazor.Pages
SignUpViewModel.CaptchaImageId = JsonConvert.DeserializeObject<Guid>(await response.Content.ReadAsStringAsync());
CaptchaImageUrl = $"{APIRoot.InternetUrl}/api/rimages/{SignUpViewModel.CaptchaImageId}.jpg";
return Page();
}
SignupPhase1 = false;
SignupVerifyEmailPhase = true;
_FillViewData();
return Page();
}
@ -160,6 +181,8 @@ namespace GanjooRazor.Pages
SignupVerifyEmailPhase = false;
SignupFinalPhase = true;
_FillViewData();
return Page();
}
@ -171,7 +194,7 @@ namespace GanjooRazor.Pages
SignupVerifyEmailPhase = false;
SignupFinalPhase = true;
if(FinalViewModel.Password != FinalViewModel.PasswordConfirmation)
if (FinalViewModel.Password != FinalViewModel.PasswordConfirmation)
{
LastError = "گذرواژه و تکرار آن یکی نیستند.";
return Page();
@ -240,7 +263,7 @@ namespace GanjooRazor.Pages
Response.Cookies.Append("CanEdit", canEditContent.ToString(), cookieOption);
_FillViewData();
return Redirect($"{Configuration["SiteUrl"]}/User");
}

View File

@ -13,7 +13,7 @@
@ViewData["Title"]
</title>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/fab.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />

View File

@ -11,7 +11,7 @@
<title>انتخاب قطعهٔ موسیقی مرتبط با شعر از اسپاتیفای</title>
<meta name="robots" content="noindex, nofollow" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link href="/css/spotify.css" rel="stylesheet" type="text/css" />
<script src="/lib/jquery/dist/jquery.min.js"></script>

View File

@ -14,7 +14,7 @@
گنجور » برگردان‌ها و نویس‌های شعر
</title>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<link href="~/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="~/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
</head>

View File

@ -14,7 +14,7 @@
@ViewData["Title"]
</title>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />

View File

@ -15,7 +15,7 @@
@ViewData["Title"]
</title>
<link href="/css/p8.css?version=45" rel="stylesheet" type="text/css" />
<link href="/css/p8.css?version=46" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />