This commit is contained in:
mmrbnjd
2025-07-31 00:18:09 +03:30
parent 96d6f5c004
commit 39d2200ad9
2 changed files with 149 additions and 17 deletions

View File

@@ -29,12 +29,14 @@
<Button Color="ButtonColor.Danger" Size=ButtonSize.ExtraSmall Outline="true">
<Icon Name="IconName.Escape" /> اتمام گفتگو
</Button>
}
</span>
}
<div class="ms-auto">
<Button Color="ButtonColor.Secondary" Size=ButtonSize.Small Outline="true" @onclick="Logout">
<Icon Name="IconName.BoxArrowRight" /> خروج
</Button>
</div>
</div>
<!-- B1: Chat area -->
<div class="flex-fill border p-2 overflow-auto" id="B1" style="height: 300px; overflow-y: auto;">
@@ -109,12 +111,24 @@
}
else
{
<LoginComponent OnMultipleOfThree="EventCallback.Factory.Create(this, Afterlogin)" />
<div class="d-flex justify-content-center align-items-center" style="height: 100%;">
<div class="login-container p-4 bg-white rounded shadow-sm" style="max-width: 400px; width: 100%;">
<div class="text-center mb-4">
<h4 class="text-primary mb-2">ورود به سیستم</h4>
</div>
<LoginComponent OnMultipleOfThree="EventCallback.Factory.Create(this, Afterlogin)" />
</div>
</div>
}
}
else
{
//صحت سنجی لاگین در حال انجام است
<div class="d-flex justify-content-center align-items-center" style="height: 100%;">
<div class="text-center">
<Spinner Type="SpinnerType.Dots" Color="SpinnerColor.Primary" />
<p class="mt-3 text-muted">در حال بررسی وضعیت ...</p>
</div>
</div>
}
</div>
</div>
@@ -208,6 +222,14 @@
LastOpenChat = await ChatService.GetLastOpenChatInCompany(CompanyID);
StateHasChanged();
}
async Task Logout()
{
await baseController.RemoveToken();
await localStorageService.RemoveItem("U/key");
IsLogin = false;
StateHasChanged();
}
}
<style>
.chat-bubble {
@@ -249,4 +271,42 @@
border-radius: var(--bs-border-radius);
}
.login-container {
border: 1px solid #e9ecef;
background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}
.login-container h4 {
font-weight: 600;
color: #495057;
}
.login-container p {
font-size: 0.875rem;
line-height: 1.4;
}
/* Improve spacing in the main container */
.container-fluid {
padding: 1rem;
}
/* Better spacing for chat area */
#B1 {
margin-bottom: 1rem;
}
/* Improved input group styling */
.input-group {
margin-bottom: 1rem;
border-radius: 0.5rem;
overflow: hidden;
}
/* Better message input styling */
#B2 {
border-radius: 0.5rem;
background-color: #f8f9fa;
}
</style>