фикс чата
This commit is contained in:
parent
0edf05029f
commit
a1c63cf71e
6 changed files with 1097 additions and 869 deletions
|
@ -6,6 +6,8 @@ COPY package.json package-lock.json ./
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
|
RUN npx update-browserslist-db@latest
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
1917
package-lock.json
generated
1917
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -11,9 +11,9 @@
|
||||||
"format": "prettier --write ."
|
"format": "prettier --write ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/adapter-auto": "^3.0.0",
|
"@sveltejs/adapter-auto": "^3.2.5",
|
||||||
"@sveltejs/adapter-node": "^5.2.0",
|
"@sveltejs/adapter-node": "^5.2.0",
|
||||||
"@sveltejs/kit": "^2.0.0",
|
"@sveltejs/kit": "^2.6.2",
|
||||||
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
||||||
"@types/node": "^20.11.16",
|
"@types/node": "^20.11.16",
|
||||||
"@types/websocket": "^1.0.10",
|
"@types/websocket": "^1.0.10",
|
||||||
|
|
|
@ -38,9 +38,12 @@
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{#if isOpen }
|
{#if isOpen }
|
||||||
|
<!-- svelte-ignore a11y-missing-attribute -->
|
||||||
<div class="dropdown" in:slide={{ duration: 300, delay: 150 }} out:slide={{ duration:300 }}>
|
<div class="dropdown" in:slide={{ duration: 300, delay: 150 }} out:slide={{ duration:300 }}>
|
||||||
<a href="/settings" class="listItem">Настройки</a>
|
<a href="/settings" class="listItem">Настройки</a>
|
||||||
<a on:click={handleLogout} class="listItem">Выйти</a>
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
|
<button on:click={handleLogout} class="listItem">Выйти</button>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -52,8 +52,6 @@
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
|
|
||||||
copiedInvitedLinkObj = document.getElementById('copiedInvitedLink')
|
|
||||||
|
|
||||||
token = localStorage.getItem('BPChat')
|
token = localStorage.getItem('BPChat')
|
||||||
|
|
||||||
const userData = await UserCheck();
|
const userData = await UserCheck();
|
||||||
|
@ -73,7 +71,7 @@
|
||||||
async function handleChatUrlChange() {
|
async function handleChatUrlChange() {
|
||||||
if (window.location.hash.startsWith('#id=')) {
|
if (window.location.hash.startsWith('#id=')) {
|
||||||
chatId = window.location.hash.slice(4);
|
chatId = window.location.hash.slice(4);
|
||||||
//console.log(chatId, " chatId")
|
console.log(chatId, " chatId")
|
||||||
|
|
||||||
msgLoaded = 0
|
msgLoaded = 0
|
||||||
|
|
||||||
|
@ -82,7 +80,7 @@
|
||||||
//if(currentChat == undefined){
|
//if(currentChat == undefined){
|
||||||
// window.location.href = '/c'
|
// window.location.href = '/c'
|
||||||
//}
|
//}
|
||||||
console.log(currentChat, " текущий чат")
|
//console.log(currentChat, " текущий чат")
|
||||||
pickedChatName = currentChat.chat_name
|
pickedChatName = currentChat.chat_name
|
||||||
pickedChatImg = currentChat.avatar_image
|
pickedChatImg = currentChat.avatar_image
|
||||||
|
|
||||||
|
@ -131,6 +129,7 @@
|
||||||
} else {
|
} else {
|
||||||
messages = []
|
messages = []
|
||||||
}
|
}
|
||||||
|
copiedInvitedLinkObj = document.getElementById('copiedInvitedLink')
|
||||||
}
|
}
|
||||||
handleChatUrlChange();
|
handleChatUrlChange();
|
||||||
window.addEventListener('hashchange', handleChatUrlChange);
|
window.addEventListener('hashchange', handleChatUrlChange);
|
||||||
|
@ -438,7 +437,7 @@ let pinOrNot = false
|
||||||
async function addPersonFunc(){
|
async function addPersonFunc(){
|
||||||
let inviteLink = await GetInviteLink(chatId)
|
let inviteLink = await GetInviteLink(chatId)
|
||||||
navigator.clipboard.writeText(inviteLink)
|
navigator.clipboard.writeText(inviteLink)
|
||||||
console.log(inviteLink)
|
//console.log(inviteLink)
|
||||||
|
|
||||||
copiedInvitedLinkObj.style.top = '-20%'
|
copiedInvitedLinkObj.style.top = '-20%'
|
||||||
|
|
||||||
|
@ -695,7 +694,7 @@ let pinOrNot = false
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="gradient">
|
<div class="gradient1">
|
||||||
{#if pinnedMsg == null}
|
{#if pinnedMsg == null}
|
||||||
<div class="noMsgDiv">
|
<div class="noMsgDiv">
|
||||||
<h2 class="noMsg1">Тут ничего нет</h2>
|
<h2 class="noMsg1">Тут ничего нет</h2>
|
||||||
|
@ -754,7 +753,7 @@ let pinOrNot = false
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
z-index: 2;
|
z-index: 4;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1400,11 +1399,12 @@ let pinOrNot = false
|
||||||
}
|
}
|
||||||
.headerDiv{
|
.headerDiv{
|
||||||
grid-column: span 3;
|
grid-column: span 3;
|
||||||
z-index: 2;
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gradient{
|
.gradient,
|
||||||
z-index: 2;
|
.gradient1{
|
||||||
|
z-index: 5;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
background:
|
background:
|
||||||
linear-gradient(#101010, #101010) padding-box,
|
linear-gradient(#101010, #101010) padding-box,
|
||||||
|
@ -1423,10 +1423,11 @@ let pinOrNot = false
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gradient::before{
|
.gradient::before,
|
||||||
|
.gradient1::before{
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-image: url('./image/noise.png');
|
background-image: url('/image/noise.png');
|
||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -1435,6 +1436,10 @@ let pinOrNot = false
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gradient1{
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
body{
|
body{
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -342,11 +342,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cropper-modal {
|
|
||||||
background-color: #101010;
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cropButtonsDiv{
|
.cropButtonsDiv{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
@ -489,7 +484,7 @@ button{
|
||||||
.submitPassword::before{
|
.submitPassword::before{
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-image: url('./image/noise.png');
|
background-image: url('/image/noise.png');
|
||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -617,7 +612,7 @@ input {
|
||||||
.mainDiv::before{
|
.mainDiv::before{
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-image: url('./image/noise.png');
|
background-image: url('/image/noise.png');
|
||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
Loading…
Add table
Reference in a new issue