mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Добавление профиля пользователя
This commit is contained in:
+4
-1
@@ -77,11 +77,14 @@
|
|||||||
<!-- Chat Interface -->
|
<!-- Chat Interface -->
|
||||||
<div id="chat-interface" style="display: none;">
|
<div id="chat-interface" style="display: none;">
|
||||||
<div class="all-container">
|
<div class="all-container">
|
||||||
|
<div class="profile" id="profile">
|
||||||
|
<div class="profileheader"><p>Твой профиль</p><a href="#" id="closeprofile">закрыть</a></div>
|
||||||
|
</div>
|
||||||
<div class="chat-list" id="chat-list">
|
<div class="chat-list" id="chat-list">
|
||||||
<header class="chat-header-left">
|
<header class="chat-header-left">
|
||||||
<div id="productname">Loading...</div>
|
<div id="productname">Loading...</div>
|
||||||
<div class="profile">
|
<div class="profile">
|
||||||
<a href="#"><img src="./src/images/default-avatar.png" alt=""></a>
|
<a href="#" id="profbut"><img src="./src/images/default-avatar.png" alt=""></a>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="chat-tabs">
|
<div class="chat-tabs">
|
||||||
|
|||||||
@@ -10,6 +10,35 @@
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#profile {
|
||||||
|
display: none;
|
||||||
|
flex-direction: column;
|
||||||
|
z-index: 2000;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
position: fixed;
|
||||||
|
height: 100vh;
|
||||||
|
width: 27%;
|
||||||
|
background-color: $color-dark-surface-container;
|
||||||
|
.profileheader{
|
||||||
|
display: flex;
|
||||||
|
gap: 200px;
|
||||||
|
p{
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
a{
|
||||||
|
text-decoration: none;
|
||||||
|
color: white;
|
||||||
|
border: solid 2px $color-dark-on-surface-variant;
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 10px;
|
||||||
|
&:hover{
|
||||||
|
background-color: rgba(255, 255, 255, 0.241);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#chat-list {
|
#chat-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -35,14 +64,15 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
|
|
||||||
a {
|
#closeprofile a {
|
||||||
display: flex;
|
|
||||||
color: $color-dark-surface;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
width: 100%;
|
color: white;
|
||||||
|
border: solid 2px $color-dark-on-surface-variant;
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
font-size: 26px;
|
background-color: rgba(255, 255, 255, 0.241);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,18 +134,23 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ponel {
|
.ponel {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 95%;
|
top: 95%;
|
||||||
left: 2%;
|
left: 0.5%;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: $color-dark-surface;
|
color: $color-dark-on-surface-variant;
|
||||||
|
border: solid 2px $color-dark-on-surface-variant;
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 10px;
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(255, 255, 255, 0.241);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -144,6 +144,7 @@ document.getElementById('message-form')!.addEventListener('submit', (e) => {
|
|||||||
|
|
||||||
document.getElementById("productname")!.textContent = PRODUCT_NAME;
|
document.getElementById("productname")!.textContent = PRODUCT_NAME;
|
||||||
document.title = PRODUCT_NAME;
|
document.title = PRODUCT_NAME;
|
||||||
|
// сварачивание и разворачивание чата
|
||||||
const but = document.getElementById('chat-recrol')!;
|
const but = document.getElementById('chat-recrol')!;
|
||||||
const but_list1 = document.getElementById('chat1but')!;
|
const but_list1 = document.getElementById('chat1but')!;
|
||||||
const but_list2 = document.getElementById('chat1but2')!;
|
const but_list2 = document.getElementById('chat1but2')!;
|
||||||
@@ -165,3 +166,18 @@ but_list2.addEventListener('click',() => {
|
|||||||
cont1.style.display = 'flex';
|
cont1.style.display = 'flex';
|
||||||
namechat.textContent = 'общий чат 2';
|
namechat.textContent = 'общий чат 2';
|
||||||
});
|
});
|
||||||
|
// открытие профиля
|
||||||
|
const butprofile = document.getElementById('profbut')!
|
||||||
|
const chatlist = document.getElementById('chat-list')!
|
||||||
|
const profile = document.getElementById('profile')!
|
||||||
|
const closeprofile = document.getElementById('closeprofile')!
|
||||||
|
butprofile.addEventListener('click',()=>{
|
||||||
|
chatlist.style.display = 'none'
|
||||||
|
cont1.style.display = 'none'
|
||||||
|
profile.style.display = 'flex'
|
||||||
|
|
||||||
|
})
|
||||||
|
closeprofile.addEventListener('click',()=>{
|
||||||
|
chatlist.style.display = 'flex'
|
||||||
|
profile.style.display = 'none'
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user