docker
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
docker build -t ai_assistance:v1 .
|
docker build -t ai_assistance .
|
||||||
|
|
||||||
docker run --name openai_assistance -d -p 5042:5010 ai_assistance:v1
|
docker run --name openai_assistance -d -p 5042:5010 ai_assistance
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------------
|
||||||
|
in local => docker build -t mmrbnjd/ai_assistance:latest .
|
||||||
|
in local => docker push mmrbnjd/ai_assistance:latest
|
||||||
|
in server => docker pull mmrbnjd/ai_assistance:latest
|
||||||
|
in server => docker run -d -p 5042:5010 --restart always mmrbnjd/ai_assistance:latest
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
E:\_hushian> docker build -f Presentation\Hushian.WebApi\Dockerfile -t hushianapi .
|
E:\_hushian> docker build -f Presentation\Hushian.WebApi\Dockerfile -t hushianapi .
|
||||||
|
|
||||||
docker run --name hushian_api -d -p 8080:8080 hushianapi
|
docker run --name hushian_api -d -p 2201:8080 hushianapi
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------------
|
||||||
|
in local => docker build -f Presentation\Hushian.WebApi\Dockerfile -t mmrbnjd/hushianapi:latest .
|
||||||
|
in local => docker push mmrbnjd/hushianapi:latest
|
||||||
|
in server => docker pull mmrbnjd/hushianapi:latest
|
||||||
|
in server => docker run -d -p 2201:8080 --restart always mmrbnjd/hushianapi:latest
|
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
"aigrpcserver": {
|
"aigrpcserver": {
|
||||||
"target": "192.168.1.12:5011"
|
"target": "192.168.1.14:5042"
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
|
@using Common.Dtos.Verification
|
||||||
@using Common.Dtos.Verification
|
|
||||||
@using Common.Enums
|
@using Common.Enums
|
||||||
@using HushianWebApp.Service
|
@using HushianWebApp.Service
|
||||||
@inject VerificationService verificationService;
|
@inject VerificationService verificationService;
|
||||||
@@ -10,27 +9,9 @@
|
|||||||
</div>
|
</div>
|
||||||
@if (type == VerificationCodeType.ForgetPassword)
|
@if (type == VerificationCodeType.ForgetPassword)
|
||||||
{
|
{
|
||||||
<div style="justify-content: space-between;margin-top:5px;;margin-bottom:15px">
|
<div style="justify-content: space-between;margin-top:5px;margin-bottom:15px">
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
<input class="cus-input" maxlength='4' @bind-value="code" @bind-value:event="oninput" />
|
||||||
@bind="code1" @oninput="MoveNext"
|
</div>
|
||||||
style="width: 40px; height: 40px; text-align: center; border: 2px solid #ccc; border-radius: 5px; font-size: 20px;"
|
|
||||||
@ref="input1" />
|
|
||||||
|
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code2" @oninput="MoveNext"
|
|
||||||
style="width: 40px; height: 40px; text-align: center; border: 2px solid #ccc; border-radius: 5px; font-size: 20px;"
|
|
||||||
@ref="input2" />
|
|
||||||
|
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code3" @oninput="MoveNext"
|
|
||||||
style="width: 40px; height: 40px; text-align: center; border: 2px solid #ccc; border-radius: 5px; font-size: 20px;"
|
|
||||||
@ref="input3" />
|
|
||||||
|
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code4" @oninput="OnLastInput"
|
|
||||||
style="width: 40px; height: 40px; text-align: center; border: 2px solid #ccc; border-radius: 5px; font-size: 20px;"
|
|
||||||
@ref="input4" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="justify-content: space-between">
|
<div style="justify-content: space-between">
|
||||||
<TextInput @bind-value=Value type="password" name="Value" style="text-align:center;margin-top: 10px;;margin-left: 10px" placeholder="کلمه عبور جدید" required="required" />
|
<TextInput @bind-value=Value type="password" name="Value" style="text-align:center;margin-top: 10px;;margin-left: 10px" placeholder="کلمه عبور جدید" required="required" />
|
||||||
@@ -43,27 +24,7 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
<div style="justify-content: space-between;margin-top:5px">
|
<div style="justify-content: space-between;margin-top:5px">
|
||||||
|
<input class="cus-input" maxlength='4' @bind-value="code" @bind-value:event="oninput" />
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code1" @oninput="MoveNext"
|
|
||||||
style="width: 40px; height: 40px; text-align: center; border: 2px solid #ccc; border-radius: 5px; font-size: 20px;"
|
|
||||||
@ref="input1" />
|
|
||||||
|
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code2" @oninput="MoveNext"
|
|
||||||
style="width: 40px; height: 40px; text-align: center; border: 2px solid #ccc; border-radius: 5px; font-size: 20px;"
|
|
||||||
@ref="input2" />
|
|
||||||
|
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code3" @oninput="MoveNext"
|
|
||||||
style="width: 40px; height: 40px; text-align: center; border: 2px solid #ccc; border-radius: 5px; font-size: 20px;"
|
|
||||||
@ref="input3" />
|
|
||||||
|
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code4" @oninput="OnLastInput"
|
|
||||||
style="width: 40px; height: 40px; text-align: center; border: 2px solid #ccc; border-radius: 5px; font-size: 20px;"
|
|
||||||
@ref="input4" />
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -82,7 +43,18 @@ else
|
|||||||
public string sendValue { get; set; }
|
public string sendValue { get; set; }
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public int? ID { get; set; }
|
public int? ID { get; set; }
|
||||||
public string? code { get; set; }
|
private string? _code = string.Empty;
|
||||||
|
public string? code
|
||||||
|
{
|
||||||
|
get { return _code; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_code = value;
|
||||||
|
if (value.Length == 4)
|
||||||
|
onClick().ConfigureAwait(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
[Parameter] public string? Title { get; set; }
|
[Parameter] public string? Title { get; set; }
|
||||||
[Inject] protected ToastService ToastService { get; set; } = default!;
|
[Inject] protected ToastService ToastService { get; set; } = default!;
|
||||||
[Parameter] public EventCallback<VerificationCodeType> OnMultipleOfThree { get; set; }
|
[Parameter] public EventCallback<VerificationCodeType> OnMultipleOfThree { get; set; }
|
||||||
@@ -92,7 +64,7 @@ else
|
|||||||
string resendmsg = "ارسال مجدد";
|
string resendmsg = "ارسال مجدد";
|
||||||
bool Disabledresendmsg = false;
|
bool Disabledresendmsg = false;
|
||||||
//-----------------
|
//-----------------
|
||||||
private string code1, code2, code3, code4;
|
//private string code1, code2, code3, code4;
|
||||||
|
|
||||||
private ElementReference input1, input2, input3, input4;
|
private ElementReference input1, input2, input3, input4;
|
||||||
}
|
}
|
||||||
@@ -144,14 +116,16 @@ else
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Value != ReValue)
|
if (Value != ReValue)
|
||||||
{ ToastService.Notify(new(ToastType.Warning, $"کلمه عبور جدید و تکرار متفاوت هستند"));
|
{
|
||||||
return;}
|
ToastService.Notify(new(ToastType.Warning, $"کلمه عبور جدید و تکرار متفاوت هستند"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
loading = true;
|
loading = true;
|
||||||
if (await verificationService.ConfirmedCode(new ConfirmedCodeDto()
|
if (await verificationService.ConfirmedCode(new ConfirmedCodeDto()
|
||||||
{ code = code, codeType = type, Id = ID.Value, value = Value }))
|
{ code = code, codeType = type, Id = ID.Value, value = Value }))
|
||||||
{
|
{
|
||||||
@@ -161,35 +135,54 @@ else
|
|||||||
}
|
}
|
||||||
loading = false;
|
loading = false;
|
||||||
}
|
}
|
||||||
private async Task MoveNext(ChangeEventArgs e)
|
// private async Task MoveNext(ChangeEventArgs e)
|
||||||
{
|
// {
|
||||||
if (e.Value?.ToString()?.Length == 1)
|
// if (e.Value?.ToString()?.Length == 1)
|
||||||
{
|
// {
|
||||||
if (input1.Context == null) return;
|
// if (input1.Context == null) return;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(code1))
|
// if (string.IsNullOrEmpty(code1))
|
||||||
await input2.FocusAsync();
|
// await input2.FocusAsync();
|
||||||
else if (string.IsNullOrEmpty(code2))
|
// else if (string.IsNullOrEmpty(code2))
|
||||||
await input3.FocusAsync();
|
// await input3.FocusAsync();
|
||||||
else if (string.IsNullOrEmpty(code3))
|
// else if (string.IsNullOrEmpty(code3))
|
||||||
await input4.FocusAsync();
|
// await input4.FocusAsync();
|
||||||
else if (string.IsNullOrEmpty(code4))
|
// else if (string.IsNullOrEmpty(code4))
|
||||||
{
|
// {
|
||||||
code = $"{code1}{code2}{code3}{code4}";
|
// code = $"{code1}{code2}{code3}{code4}";
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
private async Task OnLastInput(ChangeEventArgs e)
|
// private async Task OnLastInput(ChangeEventArgs e)
|
||||||
{
|
// {
|
||||||
code4 = e.Value?.ToString();
|
// ///code4 = e.Value?.ToString();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(code4) && code4.Length == 1)
|
// if (!string.IsNullOrEmpty(code) && code.Length == 4)
|
||||||
{
|
// {
|
||||||
code = $"{code1}{code2}{code3}{code4}";
|
// // code = $"{code1}{code2}{code3}{code4}";
|
||||||
if(type==VerificationCodeType.PhoneNumberConfirmed)
|
// if (type == VerificationCodeType.PhoneNumberConfirmed)
|
||||||
await onClick();
|
// await onClick();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.cus-input {
|
||||||
|
direction: ltr;
|
||||||
|
display: block;
|
||||||
|
margin: 2em auto;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
width: 6ch;
|
||||||
|
background: repeating-linear-gradient(90deg, dimgrey 0, dimgrey 1ch, transparent 0, transparent 1.5ch) 0 100%/ 5.5ch 2px no-repeat;
|
||||||
|
font: 5ch droid sans mono, consolas, monospace;
|
||||||
|
letter-spacing: 0.5ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus {
|
||||||
|
outline: none;
|
||||||
|
color: dodgerblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
@@ -1,4 +1,12 @@
|
|||||||
E:\_hushian> docker build -f Presentation\HushianWebApp\Dockerfile -t hushianapp .
|
E:\_hushian> docker build -f Presentation\HushianWebApp\Dockerfile -t hushianapp .
|
||||||
|
|
||||||
|
|
||||||
docker run --name hushian_app -d -p 5165:5165 sha256:cd08e4a869cb44e17fafdcf551e7eaa3f26c0c3d1420df78f695359bde08f0fb
|
docker run --name hushian_app -d -p 5165:5165 sha256:cd08e4a869cb44e17fafdcf551e7eaa3f26c0c3d1420df78f695359bde08f0fb
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------------------
|
||||||
|
in local => docker build -f Presentation\HushianWebApp\Dockerfile -t mmrbnjd/hushianapp:latest .
|
||||||
|
in local => docker push mmrbnjd/hushianapp:latest
|
||||||
|
in server => docker pull mmrbnjd/hushianapp:latest
|
||||||
|
in server => docker run -d -p 2101:5165 --restart always mmrbnjd/hushianapp:latest
|
@@ -45,38 +45,17 @@
|
|||||||
|
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
|
|
||||||
<div class="verification-inputs" style="display: flex; gap: 8px; direction: ltr;">
|
<input class="cus-input" maxlength='4' @bind-value="Code" @bind-value:event="oninput"/>
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code1" @oninput="MoveNext"
|
|
||||||
style="width: 45px; height: 45px; text-align: center; border: 2px solid #ccc; border-radius: 8px; font-size: 18px; font-weight: bold;"
|
|
||||||
@ref="input1" autoFocus />
|
|
||||||
|
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code2" @oninput="MoveNext"
|
|
||||||
style="width: 45px; height: 45px; text-align: center; border: 2px solid #ccc; border-radius: 8px; font-size: 18px; font-weight: bold;"
|
|
||||||
@ref="input2" />
|
|
||||||
|
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code3" @oninput="MoveNext"
|
|
||||||
style="width: 45px; height: 45px; text-align: center; border: 2px solid #ccc; border-radius: 8px; font-size: 18px; font-weight: bold;"
|
|
||||||
@ref="input3" />
|
|
||||||
|
|
||||||
<input maxlength="1" type="text" inputmode="numeric" pattern="[0-9]*"
|
|
||||||
@bind="code4" @oninput="OnLastInput"
|
|
||||||
style="width: 45px; height: 45px; text-align: center; border: 2px solid #ccc; border-radius: 8px; font-size: 18px; font-weight: bold;"
|
|
||||||
@ref="input4" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Button Color="ButtonColor.Link"
|
<Button Color="ButtonColor.Link"
|
||||||
Disabled="@isButtonDisabled"
|
Disabled="@isButtonDisabled"
|
||||||
@onclick="async () =>
|
@onclick="async () =>
|
||||||
{
|
{
|
||||||
await verificationService.ReSendCode(ID);
|
await verificationService.ReSendCode(ID);
|
||||||
await verifiTimer();
|
await verifiTimer();
|
||||||
}"
|
}"
|
||||||
Style="padding: 6px 16px; font-size: 14px; background-color: #f8f9fa; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;margin-bottom: -10px;">
|
Style="padding: 6px 16px; font-size: 14px; background-color: #f8f9fa; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;margin-bottom: -10px;">
|
||||||
|
|
||||||
<span>ارسال مجدد</span>
|
<span>ارسال مجدد</span>
|
||||||
|
|
||||||
@@ -98,9 +77,16 @@
|
|||||||
[Parameter] public EventCallback OnMultipleOfThree { get; set; }
|
[Parameter] public EventCallback OnMultipleOfThree { get; set; }
|
||||||
public string Username { get; set; }
|
public string Username { get; set; }
|
||||||
public int ID { get; set; } = 0;
|
public int ID { get; set; } = 0;
|
||||||
public string Code { get; set; } = string.Empty;
|
private string _code = string.Empty;
|
||||||
|
public string Code { get { return _code; } set
|
||||||
|
{
|
||||||
|
_code=value;
|
||||||
|
if (value.Length == 4)
|
||||||
|
ver().ConfigureAwait(true);
|
||||||
|
|
||||||
|
} }
|
||||||
//-----------------
|
//-----------------
|
||||||
private string code1, code2, code3, code4;
|
// private string code1, code2, code3, code4;
|
||||||
private ElementReference input1, input2, input3, input4;
|
private ElementReference input1, input2, input3, input4;
|
||||||
string validateStyleUser = "";
|
string validateStyleUser = "";
|
||||||
private bool isButtonDisabled = true;
|
private bool isButtonDisabled = true;
|
||||||
@@ -161,35 +147,35 @@
|
|||||||
await OnMultipleOfThree.InvokeAsync();
|
await OnMultipleOfThree.InvokeAsync();
|
||||||
visible = false;
|
visible = false;
|
||||||
}
|
}
|
||||||
private async Task MoveNext(ChangeEventArgs e)
|
// private async Task MoveNext(ChangeEventArgs e)
|
||||||
{
|
// {
|
||||||
if (e.Value?.ToString()?.Length == 1)
|
// if (e.Value?.ToString()?.Length == 1)
|
||||||
{
|
// {
|
||||||
if (input1.Context == null) return;
|
// if (input1.Context == null) return;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(code1))
|
// if (string.IsNullOrEmpty(code1))
|
||||||
await input2.FocusAsync();
|
// await input2.FocusAsync();
|
||||||
else if (string.IsNullOrEmpty(code2))
|
// else if (string.IsNullOrEmpty(code2))
|
||||||
await input3.FocusAsync();
|
// await input3.FocusAsync();
|
||||||
else if (string.IsNullOrEmpty(code3))
|
// else if (string.IsNullOrEmpty(code3))
|
||||||
await input4.FocusAsync();
|
// await input4.FocusAsync();
|
||||||
else if (string.IsNullOrEmpty(code4))
|
// else if (string.IsNullOrEmpty(code4))
|
||||||
{
|
// {
|
||||||
Code = $"{code1}{code2}{code3}{code4}";
|
// Code = $"{code1}{code2}{code3}{code4}";
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
private async Task OnLastInput(ChangeEventArgs e)
|
// private async Task OnLastInput(ChangeEventArgs e)
|
||||||
{
|
// {
|
||||||
code4 = e.Value?.ToString();
|
// code4 = e.Value?.ToString();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(code4) && code4.Length == 1)
|
// if (!string.IsNullOrEmpty(code4) && code4.Length == 1)
|
||||||
{
|
// {
|
||||||
Code = $"{code1}{code2}{code3}{code4}";
|
// Code = $"{code1}{code2}{code3}{code4}";
|
||||||
|
|
||||||
await ver();
|
// await ver();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
<script>
|
<script>
|
||||||
function formatPhoneNumber(input) {
|
function formatPhoneNumber(input) {
|
||||||
@@ -281,4 +267,22 @@
|
|||||||
box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
|
box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
|
||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cus-input {
|
||||||
|
direction:ltr;
|
||||||
|
display: block;
|
||||||
|
margin: 2em auto;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
width: 6ch;
|
||||||
|
background: repeating-linear-gradient(90deg, dimgrey 0, dimgrey 1ch, transparent 0, transparent 1.5ch) 0 100%/ 5.5ch 2px no-repeat;
|
||||||
|
font: 5ch droid sans mono, consolas, monospace;
|
||||||
|
letter-spacing: 0.5ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus {
|
||||||
|
outline: none;
|
||||||
|
color: dodgerblue;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"BaseAddress": "http://192.168.1.12:1011/api/",
|
"BaseAddress": "http://192.168.1.14:2201/api/",
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "HushianWebApp",
|
"name": "هوشیان",
|
||||||
"short_name": "HushianWebApp",
|
"short_name": "هوشیان",
|
||||||
"id": "./",
|
"id": "./",
|
||||||
"start_url": "./",
|
"start_url": "./",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
|
Reference in New Issue
Block a user