From ba3bffd9ebc66e280dd66aad3a4c71e4a189cb15 Mon Sep 17 00:00:00 2001 From: mmrbnjd Date: Fri, 3 Oct 2025 23:30:50 +0330 Subject: [PATCH] docker --- Presentation/AIAss/Docker Command.txt | 11 +- Presentation/Hushian.WebApi/DockerCommand.txt | 9 +- Presentation/Hushian.WebApi/appsettings.json | 2 +- .../Components/Verification.razor | 145 +++++++++--------- Presentation/HushianWebApp/DockerCommand.txt | 10 +- .../Pages/FromUserSide/LoginComponent.razor | 110 ++++++------- .../HushianWebApp/wwwroot/appsettings.json | 2 +- .../wwwroot/manifest.webmanifest | 4 +- 8 files changed, 156 insertions(+), 137 deletions(-) diff --git a/Presentation/AIAss/Docker Command.txt b/Presentation/AIAss/Docker Command.txt index c307eba..13f8c0e 100644 --- a/Presentation/AIAss/Docker Command.txt +++ b/Presentation/AIAss/Docker Command.txt @@ -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 \ No newline at end of file + 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 diff --git a/Presentation/Hushian.WebApi/DockerCommand.txt b/Presentation/Hushian.WebApi/DockerCommand.txt index 86bc8e3..c868cbf 100644 --- a/Presentation/Hushian.WebApi/DockerCommand.txt +++ b/Presentation/Hushian.WebApi/DockerCommand.txt @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/Presentation/Hushian.WebApi/appsettings.json b/Presentation/Hushian.WebApi/appsettings.json index 3ce7a08..bd48246 100644 --- a/Presentation/Hushian.WebApi/appsettings.json +++ b/Presentation/Hushian.WebApi/appsettings.json @@ -18,7 +18,7 @@ }, "aigrpcserver": { - "target": "192.168.1.12:5011" + "target": "192.168.1.14:5042" }, diff --git a/Presentation/HushianWebApp/Components/Verification.razor b/Presentation/HushianWebApp/Components/Verification.razor index c570484..782f7bd 100644 --- a/Presentation/HushianWebApp/Components/Verification.razor +++ b/Presentation/HushianWebApp/Components/Verification.razor @@ -1,5 +1,4 @@ - -@using Common.Dtos.Verification +@using Common.Dtos.Verification @using Common.Enums @using HushianWebApp.Service @inject VerificationService verificationService; @@ -10,27 +9,9 @@ @if (type == VerificationCodeType.ForgetPassword) { -
- - - - - - - -
+
+ +
@@ -43,27 +24,7 @@ else {
- - - - - - - - - +
} @@ -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 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,14 +116,16 @@ else else { 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() { code = code, codeType = type, Id = ID.Value, value = Value })) { @@ -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(); + // } + // } } + \ No newline at end of file diff --git a/Presentation/HushianWebApp/DockerCommand.txt b/Presentation/HushianWebApp/DockerCommand.txt index 6d6c234..c131694 100644 --- a/Presentation/HushianWebApp/DockerCommand.txt +++ b/Presentation/HushianWebApp/DockerCommand.txt @@ -1,4 +1,12 @@ E:\_hushian> docker build -f Presentation\HushianWebApp\Dockerfile -t hushianapp . -docker run --name hushian_app -d -p 5165:5165 sha256:cd08e4a869cb44e17fafdcf551e7eaa3f26c0c3d1420df78f695359bde08f0fb \ No newline at end of file +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 \ No newline at end of file diff --git a/Presentation/HushianWebApp/Pages/FromUserSide/LoginComponent.razor b/Presentation/HushianWebApp/Pages/FromUserSide/LoginComponent.razor index d08973c..fa194ef 100644 --- a/Presentation/HushianWebApp/Pages/FromUserSide/LoginComponent.razor +++ b/Presentation/HushianWebApp/Pages/FromUserSide/LoginComponent.razor @@ -45,38 +45,17 @@
-
- - - - - - - - -
+