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 .
|
||||
|
||||
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": {
|
||||
"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 HushianWebApp.Service
|
||||
@inject VerificationService verificationService;
|
||||
@@ -10,26 +9,8 @@
|
||||
</div>
|
||||
@if (type == VerificationCodeType.ForgetPassword)
|
||||
{
|
||||
<div style="justify-content: space-between;margin-top:5px;;margin-bottom:15px">
|
||||
<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 style="justify-content: space-between;margin-top:5px;margin-bottom:15px">
|
||||
<input class="cus-input" maxlength='4' @bind-value="code" @bind-value:event="oninput" />
|
||||
</div>
|
||||
|
||||
<div style="justify-content: space-between">
|
||||
@@ -43,27 +24,7 @@
|
||||
else
|
||||
{
|
||||
<div style="justify-content: space-between;margin-top:5px">
|
||||
|
||||
<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" />
|
||||
|
||||
<input class="cus-input" maxlength='4' @bind-value="code" @bind-value:event="oninput" />
|
||||
|
||||
</div>
|
||||
}
|
||||
@@ -82,7 +43,18 @@ else
|
||||
public string sendValue { get; set; }
|
||||
[Parameter]
|
||||
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; }
|
||||
[Inject] protected ToastService ToastService { get; set; } = default!;
|
||||
[Parameter] public EventCallback<VerificationCodeType> OnMultipleOfThree { get; set; }
|
||||
@@ -92,7 +64,7 @@ else
|
||||
string resendmsg = "ارسال مجدد";
|
||||
bool Disabledresendmsg = false;
|
||||
//-----------------
|
||||
private string code1, code2, code3, code4;
|
||||
//private string code1, code2, code3, code4;
|
||||
|
||||
private ElementReference input1, input2, input3, input4;
|
||||
}
|
||||
@@ -144,8 +116,10 @@ else
|
||||
else
|
||||
{
|
||||
if (Value != ReValue)
|
||||
{ ToastService.Notify(new(ToastType.Warning, $"کلمه عبور جدید و تکرار متفاوت هستند"));
|
||||
return;}
|
||||
{
|
||||
ToastService.Notify(new(ToastType.Warning, $"کلمه عبور جدید و تکرار متفاوت هستند"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -161,35 +135,54 @@ else
|
||||
}
|
||||
loading = false;
|
||||
}
|
||||
private async Task MoveNext(ChangeEventArgs e)
|
||||
{
|
||||
if (e.Value?.ToString()?.Length == 1)
|
||||
{
|
||||
if (input1.Context == null) return;
|
||||
// private async Task MoveNext(ChangeEventArgs e)
|
||||
// {
|
||||
// if (e.Value?.ToString()?.Length == 1)
|
||||
// {
|
||||
// if (input1.Context == null) return;
|
||||
|
||||
if (string.IsNullOrEmpty(code1))
|
||||
await input2.FocusAsync();
|
||||
else if (string.IsNullOrEmpty(code2))
|
||||
await input3.FocusAsync();
|
||||
else if (string.IsNullOrEmpty(code3))
|
||||
await input4.FocusAsync();
|
||||
else if (string.IsNullOrEmpty(code4))
|
||||
{
|
||||
code = $"{code1}{code2}{code3}{code4}";
|
||||
}
|
||||
}
|
||||
}
|
||||
private async Task OnLastInput(ChangeEventArgs e)
|
||||
{
|
||||
code4 = e.Value?.ToString();
|
||||
// if (string.IsNullOrEmpty(code1))
|
||||
// await input2.FocusAsync();
|
||||
// else if (string.IsNullOrEmpty(code2))
|
||||
// await input3.FocusAsync();
|
||||
// else if (string.IsNullOrEmpty(code3))
|
||||
// await input4.FocusAsync();
|
||||
// else if (string.IsNullOrEmpty(code4))
|
||||
// {
|
||||
// code = $"{code1}{code2}{code3}{code4}";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// private async Task OnLastInput(ChangeEventArgs e)
|
||||
// {
|
||||
// ///code4 = e.Value?.ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(code4) && code4.Length == 1)
|
||||
{
|
||||
code = $"{code1}{code2}{code3}{code4}";
|
||||
if(type==VerificationCodeType.PhoneNumberConfirmed)
|
||||
await onClick();
|
||||
}
|
||||
}
|
||||
// if (!string.IsNullOrEmpty(code) && code.Length == 4)
|
||||
// {
|
||||
// // code = $"{code1}{code2}{code3}{code4}";
|
||||
// if (type == VerificationCodeType.PhoneNumberConfirmed)
|
||||
// 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>
|
@@ -2,3 +2,11 @@
|
||||
|
||||
|
||||
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,28 +45,7 @@
|
||||
|
||||
<div class="d-flex justify-content-center">
|
||||
|
||||
<div class="verification-inputs" style="display: flex; gap: 8px; direction: ltr;">
|
||||
<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>
|
||||
<input class="cus-input" maxlength='4' @bind-value="Code" @bind-value:event="oninput"/>
|
||||
|
||||
</div>
|
||||
<Button Color="ButtonColor.Link"
|
||||
@@ -98,9 +77,16 @@
|
||||
[Parameter] public EventCallback OnMultipleOfThree { get; set; }
|
||||
public string Username { get; set; }
|
||||
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;
|
||||
string validateStyleUser = "";
|
||||
private bool isButtonDisabled = true;
|
||||
@@ -161,35 +147,35 @@
|
||||
await OnMultipleOfThree.InvokeAsync();
|
||||
visible = false;
|
||||
}
|
||||
private async Task MoveNext(ChangeEventArgs e)
|
||||
{
|
||||
if (e.Value?.ToString()?.Length == 1)
|
||||
{
|
||||
if (input1.Context == null) return;
|
||||
// private async Task MoveNext(ChangeEventArgs e)
|
||||
// {
|
||||
// if (e.Value?.ToString()?.Length == 1)
|
||||
// {
|
||||
// if (input1.Context == null) return;
|
||||
|
||||
if (string.IsNullOrEmpty(code1))
|
||||
await input2.FocusAsync();
|
||||
else if (string.IsNullOrEmpty(code2))
|
||||
await input3.FocusAsync();
|
||||
else if (string.IsNullOrEmpty(code3))
|
||||
await input4.FocusAsync();
|
||||
else if (string.IsNullOrEmpty(code4))
|
||||
{
|
||||
Code = $"{code1}{code2}{code3}{code4}";
|
||||
}
|
||||
}
|
||||
}
|
||||
private async Task OnLastInput(ChangeEventArgs e)
|
||||
{
|
||||
code4 = e.Value?.ToString();
|
||||
// if (string.IsNullOrEmpty(code1))
|
||||
// await input2.FocusAsync();
|
||||
// else if (string.IsNullOrEmpty(code2))
|
||||
// await input3.FocusAsync();
|
||||
// else if (string.IsNullOrEmpty(code3))
|
||||
// await input4.FocusAsync();
|
||||
// else if (string.IsNullOrEmpty(code4))
|
||||
// {
|
||||
// Code = $"{code1}{code2}{code3}{code4}";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// private async Task OnLastInput(ChangeEventArgs e)
|
||||
// {
|
||||
// code4 = e.Value?.ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(code4) && code4.Length == 1)
|
||||
{
|
||||
Code = $"{code1}{code2}{code3}{code4}";
|
||||
// if (!string.IsNullOrEmpty(code4) && code4.Length == 1)
|
||||
// {
|
||||
// Code = $"{code1}{code2}{code3}{code4}";
|
||||
|
||||
await ver();
|
||||
}
|
||||
}
|
||||
// await ver();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
<script>
|
||||
function formatPhoneNumber(input) {
|
||||
@@ -281,4 +267,22 @@
|
||||
box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
|
||||
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>
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"BaseAddress": "http://192.168.1.12:1011/api/",
|
||||
"BaseAddress": "http://192.168.1.14:2201/api/",
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "HushianWebApp",
|
||||
"short_name": "HushianWebApp",
|
||||
"name": "هوشیان",
|
||||
"short_name": "هوشیان",
|
||||
"id": "./",
|
||||
"start_url": "./",
|
||||
"display": "standalone",
|
||||
|
Reference in New Issue
Block a user