This commit is contained in:
mmrbnjd
2025-08-18 19:34:34 +03:30
parent 88aac97280
commit 36019a2f80
4 changed files with 33 additions and 18 deletions

View File

@@ -14,16 +14,23 @@
<Toasts class="p-3" AutoHide="true" Delay="4000" Placement="ToastsPlacement.TopRight" /> <Toasts class="p-3" AutoHide="true" Delay="4000" Placement="ToastsPlacement.TopRight" />
<div class="bb-page"> <div class="bb-page">
<Sidebar @ref="sidebar" <Sidebar @ref="sidebar"
Href="/" Href="/"
IconName="IconName.BootstrapFill" IconName="IconName.BootstrapFill"
Title="هوشــیان" Title="هوشــیان"
BadgeText="v1.3.1" BadgeText="v1.3.1"
ImageSrc="/before/assets/images/logofilehushian.png" ImageSrc="/before/assets/images/logofilehushian.png"
DataProvider="SidebarDataProvider" DataProvider="SidebarDataProvider"
Width="200" Width="200"
WidthUnit="Unit.Px" /> WidthUnit="Unit.Px" />
<main> <main>
<div class="d-flex align-items-center justify-content-end"> <div class="d-flex align-items-center justify-content-end">
<NavLink href="@{
hrefuserpanel
}">لینک گفتگو کاربر با شما</NavLink>
<NavLink href="@{
hrefai
}">لینک گفتگو کاربر با دستیار هوش مصنوعی</NavLink>
<p>شناسه شرکت : @CompanyID</p>
<div class="text-white text-end d-flex flex-column justify-content-center align-items-end mx-2"> <div class="text-white text-end d-flex flex-column justify-content-center align-items-end mx-2">
<div style="color: black;" class="fw-bold">@Fullname</div> <div style="color: black;" class="fw-bold">@Fullname</div>
<h6 style="color: black;">@TitleRole</h6> <h6 style="color: black;">@TitleRole</h6>
@@ -31,7 +38,7 @@
@if (img != null && img.Length > 0) @if (img != null && img.Length > 0)
{ {
<Image Src=@GetImageSource() Class="rounded" Alt="placeholder" @onclick="EditCurrentUser" <Image Src=@GetImageSource() Class="rounded" Alt="placeholder" @onclick="EditCurrentUser"
Style="height: 30px;cursor:pointer;margin-left:10px" /> Style="height: 30px;cursor:pointer;margin-left:10px" />
} }
else else
@@ -41,7 +48,7 @@
<Button Color="ButtonColor.Danger" Size="ButtonSize.Small" <Button Color="ButtonColor.Danger" Size="ButtonSize.Small"
@onclick=OnCliclLogout Style="margin-left:10px"> @onclick=OnCliclLogout Style="margin-left:10px">
<Icon Name="IconName.DoorOpen" /> خروج <Icon Name="IconName.DoorOpen" /> خروج
</Button> </Button>
@@ -70,11 +77,14 @@
</div> </div>
@code { @code {
public string hrefuserpanel { get { return $"UserCP/{CompanyID}"; } }
public string hrefai { get { return $"aichat/{CompanyID}"; } }
private Modal modal = default!; private Modal modal = default!;
public string Info { get; set; } = ""; public string Info { get; set; } = "";
private string SelectedMenu = "page2"; private string SelectedMenu = "page2";
public string Username { get; set; } public string Username { get; set; }
public string Fullname { get; set; } public string Fullname { get; set; }
public int CompanyID { get; set; } = 0;
public byte[]? img { get; set; } public byte[]? img { get; set; }
public string Role { get; set; } public string Role { get; set; }
bool isonline = false; bool isonline = false;
@@ -89,6 +99,7 @@
//Roles = await localStorageService.GetItem<List<string>>("Role"); //Roles = await localStorageService.GetItem<List<string>>("Role");
Username = await localStorageService.GetItem<string>("C/Username"); Username = await localStorageService.GetItem<string>("C/Username");
Fullname = await localStorageService.GetItem<string>("C/Fullname"); Fullname = await localStorageService.GetItem<string>("C/Fullname");
CompanyID = await localStorageService.GetItem<int>("C/CompanyId");
string UserID = await localStorageService.GetItem<string>("C/UserID"); string UserID = await localStorageService.GetItem<string>("C/UserID");
img = await localStorageService.GetItem<byte[]?>("C/img"); img = await localStorageService.GetItem<byte[]?>("C/img");
} }

View File

@@ -248,7 +248,7 @@
{ {
@msg.text @msg.text
} }
</div> </div>
@if (msg.Type != Common.Enums.ConversationType.UE) @if (msg.Type != Common.Enums.ConversationType.UE)
{ {
if (msg.IsRead) if (msg.IsRead)
@@ -295,11 +295,11 @@
<!-- Audio Recording Button --> <!-- Audio Recording Button -->
<Button Color="@(IsRecording ? ButtonColor.Danger : ButtonColor.Secondary)" <Button Color="@(IsRecording ? ButtonColor.Danger : ButtonColor.Secondary)"
Size=ButtonSize.Small Size=ButtonSize.Small
Outline="true" Outline="true"
@onclick="ToggleAudioRecording" @onclick="ToggleAudioRecording"
class=@($"audio-btn {(IsRecording ? "recording" : "")}") class=@($"audio-btn {(IsRecording ? "recording" : "")}")
title="@(IsRecording ? "توقف ضبط" : "ضبط صدا")"> title="@(IsRecording ? "توقف ضبط" : "ضبط صدا")">
@if (IsRecording) @if (IsRecording)
{ {
<Icon Name="IconName.StopCircle" Class="recording-pulse" /> <Icon Name="IconName.StopCircle" Class="recording-pulse" />
@@ -338,6 +338,7 @@
<Button Color="ButtonColor.Danger" Size=ButtonSize.ExtraSmall Outline="true" @onclick="ClearRecordedAudio">حذف صدا</Button> <Button Color="ButtonColor.Danger" Size=ButtonSize.ExtraSmall Outline="true" @onclick="ClearRecordedAudio">حذف صدا</Button>
</div> </div>
} }
<!-- Recording Status --> <!-- Recording Status -->
@if (IsRecording) @if (IsRecording)
{ {
@@ -349,17 +350,18 @@
</div> </div>
} }
</div> </div>
} }
</div> </div>
</div> </div>
</div> </div>
@code { @code {
Common.Dtos.CurrentUserInfo CurrentUser { get; set; } Common.Dtos.CurrentUserInfo CurrentUser { get; set; }
List<Read_GroupDto> _Group = new List<Read_GroupDto>(); List<Read_GroupDto> _Group = new List<Read_GroupDto>();
//------------------------------------- //-------------------------------------

View File

@@ -55,3 +55,4 @@ namespace HushianWebApp.Service