ваше сообщение коммита
This commit is contained in:
@@ -1,3 +1,38 @@
|
|||||||
|
/* Общие стили для всех элементов */
|
||||||
|
* {
|
||||||
|
font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Стили для монопространственных шрифтов (код, верификация) */
|
||||||
|
code, .verification-code code, .address {
|
||||||
|
font-family: 'Courier New', Courier, monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Унификация размеров шрифтов */
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 18px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
button, .btn, .auth-btn, .send-email-btn, .verify-btn, .wallet-disconnect-btn-small, .cancel-btn {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, textarea {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
.app-container {
|
.app-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
@@ -8,9 +43,9 @@
|
|||||||
|
|
||||||
/* Стили для боковой панели */
|
/* Стили для боковой панели */
|
||||||
.sidebar {
|
.sidebar {
|
||||||
width: 84px;
|
width: 110px;
|
||||||
min-width: 84px;
|
min-width: 110px;
|
||||||
background-color: #FFDA58;
|
background-color: #f5f5f5;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -18,11 +53,12 @@
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar.sidebar-expanded {
|
.sidebar.sidebar-expanded {
|
||||||
width: 250px;
|
width: 325px;
|
||||||
min-width: 250px;
|
min-width: 325px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-button {
|
.menu-button {
|
||||||
@@ -37,7 +73,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: 68px;
|
margin-bottom: 68px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 22px;
|
left: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hamburger {
|
.hamburger {
|
||||||
@@ -69,10 +105,10 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
width: 84px;
|
width: 110px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 22px;
|
left: 35px;
|
||||||
top: 108px;
|
top: 108px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +134,7 @@
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 60px;
|
left: 65px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-expanded .nav-btn-text {
|
.sidebar-expanded .nav-btn-text {
|
||||||
@@ -106,48 +142,57 @@
|
|||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-btn-number {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-expanded .nav-btn {
|
||||||
|
width: auto;
|
||||||
|
min-width: 200px;
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Стили для основного контента */
|
/* Стили для основного контента */
|
||||||
.main-content {
|
.main-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
margin-left: 110px;
|
||||||
margin-left: 84px;
|
transition: margin 0.3s ease;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-left: 110px;
|
||||||
|
padding: 0 20px;
|
||||||
|
height: 100vh;
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-expanded ~ .main-content {
|
.sidebar-expanded ~ .main-content {
|
||||||
margin-left: 250px;
|
margin-left: 325px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
/* Стили для адаптации основного содержимого при скрытии правой панели */
|
||||||
padding: 20px;
|
.main-content.no-right-sidebar {
|
||||||
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.main-content:not(.no-right-sidebar) {
|
||||||
font-size: 24px;
|
margin-right: 300px;
|
||||||
font-weight: bold;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hand-emoji {
|
/* Стили для контейнера чата */
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subtitle {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #555;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Стили для чата */
|
|
||||||
.chat-container {
|
.chat-container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0 20px 20px;
|
width: 100%;
|
||||||
overflow: hidden;
|
height: calc(100vh - 140px);
|
||||||
|
position: relative;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-messages {
|
.chat-messages {
|
||||||
@@ -158,6 +203,13 @@
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 120px; /* Увеличиваем отступ для возможного расширения chat-input */
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message {
|
.message {
|
||||||
@@ -194,77 +246,165 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 10px;
|
padding: 15px;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 40px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
min-height: 70px;
|
||||||
|
max-height: 200px; /* Максимальная высота */
|
||||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-input textarea {
|
.chat-input textarea {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
border: none;
|
border: 1px solid #e0e0e0;
|
||||||
resize: none;
|
resize: vertical; /* Разрешаем вертикальное изменение размера */
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
height: 40px;
|
min-height: 40px;
|
||||||
|
max-height: 170px; /* Максимальная высота минус padding */
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
background-color: white;
|
||||||
|
line-height: 1.4;
|
||||||
.chat-input textarea:focus {
|
|
||||||
outline: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-input button {
|
.chat-input button {
|
||||||
background-color: #E8E8E8;
|
background-color: white;
|
||||||
color: #555;
|
color: #333;
|
||||||
border: none;
|
border: 1px solid #333;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
align-self: flex-start;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-input button:hover:not(:disabled) {
|
.chat-input button:hover:not(:disabled) {
|
||||||
background-color: #d8d8d8;
|
background-color: #f0f0f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-input button:disabled {
|
.chat-input button:disabled {
|
||||||
opacity: 0.5;
|
background-color: #f5f5f5;
|
||||||
|
color: #999;
|
||||||
|
border-color: #ddd;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Стили для правой панели с информацией о кошельке */
|
/* Стили для правой панели с информацией о кошельке */
|
||||||
.wallet-sidebar {
|
.wallet-sidebar {
|
||||||
width: 250px;
|
position: fixed;
|
||||||
min-width: 250px;
|
top: 0;
|
||||||
background-color: #FFDA58;
|
right: 0;
|
||||||
padding: 15px;
|
width: 300px;
|
||||||
display: flex;
|
height: 100vh;
|
||||||
flex-direction: column;
|
background: white;
|
||||||
box-sizing: border-box;
|
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
|
||||||
|
padding: 20px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
max-height: 100vh;
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-buttons {
|
||||||
|
margin-top: 40px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Общий стиль для кнопок */
|
||||||
|
.wallet-connect-btn,
|
||||||
|
.wallet-disconnect-btn,
|
||||||
|
.auth-btn,
|
||||||
|
.bot-link,
|
||||||
|
.verify-btn,
|
||||||
|
.send-email-btn,
|
||||||
|
.cancel-btn {
|
||||||
|
border: 1px solid #333;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: white;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 10px 15px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-connect-btn,
|
||||||
|
.wallet-disconnect-btn {
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
white-space: normal;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1.3;
|
||||||
|
border: 1px solid #333;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 12px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wallet-connect-btn {
|
.wallet-connect-btn {
|
||||||
background-color: #4CAF50;
|
background-color: white;
|
||||||
color: white;
|
color: #333;
|
||||||
border: none;
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 12px 20px;
|
|
||||||
font-size: 16px;
|
|
||||||
cursor: pointer;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wallet-disconnect-btn {
|
.wallet-disconnect-btn {
|
||||||
background-color: #f44336;
|
background-color: white;
|
||||||
color: white;
|
color: #e74c3c;
|
||||||
border: none;
|
border-color: #e74c3c;
|
||||||
border-radius: 8px;
|
}
|
||||||
padding: 12px 20px;
|
|
||||||
font-size: 16px;
|
.wallet-connect-btn:hover {
|
||||||
cursor: pointer;
|
background-color: #f0f0f0;
|
||||||
margin-bottom: 30px;
|
}
|
||||||
|
|
||||||
|
.wallet-disconnect-btn:hover {
|
||||||
|
background-color: #ffebee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auth-btn {
|
||||||
|
padding: 12px 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #333;
|
||||||
|
background-color: white;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.email-btn,
|
||||||
|
.telegram-btn {
|
||||||
|
color: #333;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auth-btn:hover,
|
||||||
|
.bot-link:hover,
|
||||||
|
.verify-btn:hover:not(:disabled),
|
||||||
|
.send-email-btn:hover:not(:disabled),
|
||||||
|
.cancel-btn:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bot-link {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 4px;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 14px;
|
||||||
|
background-color: white;
|
||||||
|
color: #333;
|
||||||
|
border: 1px solid #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.balance-container {
|
.balance-container {
|
||||||
@@ -312,72 +452,38 @@
|
|||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.language-selector {
|
|
||||||
margin-top: auto;
|
|
||||||
align-self: flex-end;
|
|
||||||
background-color: white;
|
|
||||||
padding: 5px 10px;
|
|
||||||
border-radius: 4px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-icon {
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Стили для кнопок авторизации */
|
/* Стили для кнопок авторизации */
|
||||||
.auth-buttons {
|
.auth-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
|
margin-bottom: 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 220px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.auth-buttons h3 {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.auth-btn-container {
|
.auth-btn-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 220px;
|
margin-bottom: 15px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-btn {
|
.verification-block,
|
||||||
padding: 12px 10px;
|
.email-form,
|
||||||
border: none;
|
.email-verification-form {
|
||||||
border-radius: 8px;
|
background-color: white;
|
||||||
cursor: pointer;
|
border-radius: 4px;
|
||||||
font-size: 14px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.email-btn {
|
|
||||||
background-color: #2196F3;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.telegram-btn {
|
|
||||||
background-color: #0088cc;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Стили для блока верификации Telegram */
|
|
||||||
.verification-block {
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
|
||||||
margin-bottom: 10px;
|
margin-bottom: 15px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 220px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
border: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.verification-code {
|
.verification-code {
|
||||||
@@ -405,9 +511,8 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: all;
|
user-select: all;
|
||||||
border: 1px dashed #ddd;
|
border: 1px dashed #ddd;
|
||||||
max-width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
display: block;
|
||||||
text-overflow: ellipsis;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -418,24 +523,6 @@
|
|||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot-link {
|
|
||||||
display: block;
|
|
||||||
background-color: #0088cc;
|
|
||||||
color: white;
|
|
||||||
text-align: center;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 6px;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: bold;
|
|
||||||
transition: background-color 0.2s;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bot-link:hover {
|
|
||||||
background-color: #006699;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-info {
|
.user-info {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
@@ -461,28 +548,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Стили для форм верификации Email */
|
/* Стили для форм верификации Email */
|
||||||
.email-form {
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
|
|
||||||
width: 100%;
|
|
||||||
max-width: 220px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.email-verification-form {
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
|
|
||||||
width: 100%;
|
|
||||||
max-width: 220px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.email-verification-form p {
|
.email-verification-form p {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@@ -510,23 +575,22 @@
|
|||||||
|
|
||||||
.verify-btn {
|
.verify-btn {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
background-color: #4CAF50;
|
background-color: white;
|
||||||
color: white;
|
color: #333;
|
||||||
border: none;
|
border: 1px solid #333;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
height: 32px;
|
||||||
|
|
||||||
.verify-btn:hover:not(:disabled) {
|
|
||||||
background-color: #3e8e41;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.verify-btn:disabled {
|
.verify-btn:disabled {
|
||||||
background-color: #cccccc;
|
background-color: #f5f5f5;
|
||||||
|
color: #999;
|
||||||
|
border-color: #ddd;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,23 +619,24 @@
|
|||||||
|
|
||||||
.send-email-btn {
|
.send-email-btn {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
background-color: #4CAF50;
|
background-color: white;
|
||||||
color: white;
|
color: #333;
|
||||||
border: none;
|
border: 1px solid #333;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-left: 8px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
height: 32px;
|
||||||
|
width: 100%;
|
||||||
.send-email-btn:hover:not(:disabled) {
|
margin-left: 0;
|
||||||
background-color: #3e8e41;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.send-email-btn:disabled {
|
.send-email-btn:disabled {
|
||||||
background-color: #cccccc;
|
background-color: #f5f5f5;
|
||||||
|
color: #999;
|
||||||
|
border-color: #ddd;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,9 +653,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cancel-btn {
|
.cancel-btn {
|
||||||
background-color: #f8f8f8;
|
background-color: white;
|
||||||
color: #333;
|
color: #333;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #333;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 8px 15px;
|
padding: 8px 15px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@@ -600,19 +665,20 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancel-btn:hover {
|
|
||||||
background-color: #e8e8e8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-message {
|
.error-message {
|
||||||
background-color: #ffebee;
|
background-color: white;
|
||||||
color: #e74c3c;
|
color: #e74c3c;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
border-radius: 8px;
|
border-radius: 4px;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
word-wrap: break-word;
|
||||||
|
word-break: break-word;
|
||||||
|
border: 1px solid #e74c3c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close-error {
|
.close-error {
|
||||||
@@ -634,39 +700,15 @@
|
|||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wallet-connect-btn,
|
|
||||||
.wallet-disconnect-btn {
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 100%;
|
|
||||||
white-space: normal;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 1.3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.email-verification-form strong {
|
.email-verification-form strong {
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-message {
|
|
||||||
background-color: #ffebee;
|
|
||||||
color: #e74c3c;
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin-top: 10px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
word-wrap: break-word;
|
|
||||||
word-break: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Медиа-запрос для узких экранов */
|
/* Медиа-запрос для узких экранов */
|
||||||
@media (max-width: 1300px) {
|
@media (max-width: 1300px) {
|
||||||
.wallet-sidebar {
|
.wallet-sidebar {
|
||||||
width: 220px;
|
width: 286px;
|
||||||
min-width: 220px;
|
min-width: 286px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -684,4 +726,292 @@
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.main-content:not(.no-right-sidebar) {
|
||||||
|
margin-right: 286px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-wallet-sidebar {
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
font-size: 18px;
|
||||||
|
top: 8px;
|
||||||
|
right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-buttons {
|
||||||
|
margin-top: 35px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Стиль для кнопки в нижней части боковой панели */
|
||||||
|
.sidebar-bottom-btn {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 30px;
|
||||||
|
left: 35px;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
transition: width 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Обновленный стиль для кнопки при раскрытом меню */
|
||||||
|
.sidebar-expanded .sidebar-bottom-btn {
|
||||||
|
width: auto;
|
||||||
|
min-width: 200px;
|
||||||
|
text-align: left;
|
||||||
|
padding-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-expanded .nav-btn-number {
|
||||||
|
position: absolute;
|
||||||
|
left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Кнопка закрытия правой панели */
|
||||||
|
.close-wallet-sidebar {
|
||||||
|
position: static;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: white;
|
||||||
|
color: #333;
|
||||||
|
border: 1px solid #333;
|
||||||
|
font-size: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1;
|
||||||
|
z-index: 2;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-wallet-sidebar:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-expanded .sidebar-bottom-btn .nav-btn-text {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
position: static;
|
||||||
|
margin-left: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.email-form-error {
|
||||||
|
color: #e74c3c;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.email-form-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Стили для заголовка правой панели */
|
||||||
|
.wallet-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Кнопки в верхней части правой панели */
|
||||||
|
.wallet-top-buttons {
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-connect-btn-top,
|
||||||
|
.wallet-disconnect-btn-top {
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: white;
|
||||||
|
border: 1px solid #333;
|
||||||
|
font-size: 14px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-connect-btn-top {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-disconnect-btn-top {
|
||||||
|
color: #e74c3c;
|
||||||
|
border-color: #e74c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-connect-btn-top:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-disconnect-btn-top:hover {
|
||||||
|
background-color: #ffebee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-disconnect-btn-small {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 60px;
|
||||||
|
width: 90px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: white;
|
||||||
|
color: #333;
|
||||||
|
border: 1px solid #333;
|
||||||
|
font-size: 14px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1;
|
||||||
|
z-index: 2;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-disconnect-btn-small:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-connect-btn-small {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
right: 160px;
|
||||||
|
width: 100px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: white;
|
||||||
|
color: #333;
|
||||||
|
border: 1px solid #333;
|
||||||
|
font-size: 14px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1;
|
||||||
|
z-index: 2;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-connect-btn-small:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-connect-btn-header,
|
||||||
|
.wallet-disconnect-btn-header {
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: white;
|
||||||
|
border: 1px solid #333;
|
||||||
|
font-size: 14px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0 15px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-connect-btn-header {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-disconnect-btn-header {
|
||||||
|
color: #e74c3c;
|
||||||
|
border-color: #e74c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-connect-btn-header:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wallet-disconnect-btn-header:hover {
|
||||||
|
background-color: #ffebee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-container {
|
||||||
|
padding-top: 0;
|
||||||
|
max-width: 1200px;
|
||||||
|
margin: 0 auto;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
padding: 20px 0;
|
||||||
|
margin-bottom: 40px; /* Увеличиваем отступ после заголовка */
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
margin: 5px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Стили для правой панели */
|
||||||
|
.wallet-sidebar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 300px;
|
||||||
|
height: 100vh;
|
||||||
|
background: white;
|
||||||
|
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
|
||||||
|
padding: 20px;
|
||||||
|
overflow-y: auto;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Стили для основного контента */
|
||||||
|
.content-container {
|
||||||
|
padding: 20px 15px;
|
||||||
|
margin-right: 300px; /* Учитываем ширину правой панели */
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 60px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-top: 1px solid #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer p {
|
||||||
|
margin: 0;
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,20 +29,22 @@
|
|||||||
<button class="nav-btn" @click="navigateTo('page6')">
|
<button class="nav-btn" @click="navigateTo('page6')">
|
||||||
<div class="nav-btn-number">6</div>
|
<div class="nav-btn-number">6</div>
|
||||||
<div class="nav-btn-text">Кнопка 6</div>
|
<div class="nav-btn-text">Кнопка 6</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<!-- Кнопка 7 в нижней части боковой панели -->
|
||||||
|
<button class="nav-btn sidebar-bottom-btn" @click="toggleWalletSidebar">
|
||||||
|
<div class="nav-btn-number">7</div>
|
||||||
|
<div class="nav-btn-text">{{ showWalletSidebar ? 'Скрыть панель' : 'Подключиться' }}</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Основной контент -->
|
<!-- Основной контент -->
|
||||||
<div class="main-content">
|
<div class="main-content" :class="{ 'no-right-sidebar': !showWalletSidebar }">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="title">
|
<h1 class="title">✌️HB3 - Accelerator DLE (Digital Legal Entity - DAO Fork)</h1>
|
||||||
<span class="hand-emoji">✌️</span> HB3 - Accelerator DLE (Digital Legal Entity - DAO Fork)
|
<p class="subtitle">Венчурный фонд и поставщик программного обеспечения</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="subtitle">
|
|
||||||
Венчурный фонд и поставщик программного обеспечения
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="chat-container">
|
<div class="chat-container">
|
||||||
<div class="chat-messages" ref="messagesContainer">
|
<div class="chat-messages" ref="messagesContainer">
|
||||||
@@ -50,8 +52,8 @@
|
|||||||
:class="['message', message.role === 'assistant' ? 'ai-message' : 'user-message']">
|
:class="['message', message.role === 'assistant' ? 'ai-message' : 'user-message']">
|
||||||
<div class="message-content" v-html="formatMessage(message.content)"></div>
|
<div class="message-content" v-html="formatMessage(message.content)"></div>
|
||||||
<div class="message-time">{{ formatTime(message.timestamp || message.created_at) }}</div>
|
<div class="message-time">{{ formatTime(message.timestamp || message.created_at) }}</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="chat-input">
|
<div class="chat-input">
|
||||||
<textarea
|
<textarea
|
||||||
@@ -62,47 +64,51 @@
|
|||||||
></textarea>
|
></textarea>
|
||||||
<button @click="handleMessage(newMessage)" :disabled="isLoading || !newMessage.trim()">
|
<button @click="handleMessage(newMessage)" :disabled="isLoading || !newMessage.trim()">
|
||||||
{{ isLoading ? 'Отправка...' : 'Отправить' }}
|
{{ isLoading ? 'Отправка...' : 'Отправить' }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Правая панель с информацией о кошельке -->
|
<!-- Правая панель с информацией о кошельке -->
|
||||||
<div class="wallet-sidebar">
|
<div class="wallet-sidebar" v-if="showWalletSidebar">
|
||||||
<button v-if="!isAuthenticated" @click="handleWalletAuth" class="wallet-connect-btn">
|
<div class="wallet-header">
|
||||||
Подключить кошелек
|
<button v-if="!isAuthenticated" @click="handleWalletAuth" class="wallet-connect-btn-header">
|
||||||
</button>
|
Подключить кошелек
|
||||||
<button v-else @click="disconnectWallet" class="wallet-disconnect-btn">
|
</button>
|
||||||
Отключить кошелек
|
<button v-if="isAuthenticated" @click="disconnectWallet" class="wallet-disconnect-btn-header">
|
||||||
</button>
|
Отключить
|
||||||
|
</button>
|
||||||
|
<button class="close-wallet-sidebar" @click="toggleWalletSidebar">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Добавляем дополнительные кнопки авторизации -->
|
<!-- Добавляем дополнительные кнопки авторизации -->
|
||||||
<div v-if="!isAuthenticated && messages.length > 0" class="auth-buttons">
|
<div v-if="!isAuthenticated && messages.length > 0" class="auth-buttons">
|
||||||
|
<h3>Авторизация через:</h3>
|
||||||
<div v-if="!showTelegramVerification" class="auth-btn-container">
|
<div v-if="!showTelegramVerification" class="auth-btn-container">
|
||||||
<button @click="handleTelegramAuth" class="auth-btn telegram-btn">
|
<button @click="handleTelegramAuth" class="auth-btn telegram-btn">
|
||||||
Подключить Telegram
|
Подключить Telegram
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="showTelegramVerification" class="verification-block">
|
<div v-if="showTelegramVerification" class="verification-block">
|
||||||
<div class="verification-code">
|
<div class="verification-code">
|
||||||
<span>Код верификации:</span>
|
<span>Код верификации:</span>
|
||||||
<code @click="copyCode(telegramVerificationCode)">{{ telegramVerificationCode }}</code>
|
<code @click="copyCode(telegramVerificationCode)">{{ telegramVerificationCode }}</code>
|
||||||
<span v-if="codeCopied" class="copied-message">Скопировано!</span>
|
<span v-if="codeCopied" class="copied-message">Скопировано!</span>
|
||||||
</div>
|
</div>
|
||||||
<a :href="telegramBotLink" target="_blank" class="bot-link">Открыть бота Telegram</a>
|
<a :href="telegramBotLink" target="_blank" class="bot-link">Открыть бота Telegram</a>
|
||||||
<button @click="cancelTelegramAuth" class="cancel-btn">Отмена</button>
|
<button @click="cancelTelegramAuth" class="cancel-btn">Отмена</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!showEmailForm && !showEmailVerificationInput" class="auth-btn-container">
|
<div v-if="!showEmailForm && !showEmailVerificationInput" class="auth-btn-container">
|
||||||
<button @click="handleEmailAuth" class="auth-btn email-btn">
|
<button @click="handleEmailAuth" class="auth-btn email-btn">
|
||||||
Подключить Email
|
Подключить Email
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Форма для Email верификации (встроена в auth-buttons) -->
|
<!-- Форма для Email верификации (встроена в auth-buttons) -->
|
||||||
<div v-if="showEmailForm" class="email-form">
|
<div v-if="showEmailForm" class="email-form">
|
||||||
<p>Введите ваш email для получения кода подтверждения:</p>
|
<p>Введите ваш email для получения кода подтверждения:</p>
|
||||||
<div class="email-input-container">
|
<div class="email-form-container">
|
||||||
<input
|
<input
|
||||||
v-model="emailInput"
|
v-model="emailInput"
|
||||||
type="email"
|
type="email"
|
||||||
@@ -112,37 +118,38 @@
|
|||||||
/>
|
/>
|
||||||
<button @click="sendEmailVerification" class="send-email-btn" :disabled="isEmailSending">
|
<button @click="sendEmailVerification" class="send-email-btn" :disabled="isEmailSending">
|
||||||
{{ isEmailSending ? 'Отправка...' : 'Отправить код' }}
|
{{ isEmailSending ? 'Отправка...' : 'Отправить код' }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
<button @click="cancelEmailAuth" class="cancel-btn">Отмена</button>
|
<button @click="cancelEmailAuth" class="cancel-btn">Отмена</button>
|
||||||
<p v-if="emailFormatError" class="email-format-error">Пожалуйста, введите корректный email</p>
|
<p v-if="emailFormatError" class="email-format-error">Пожалуйста, введите корректный email</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Форма для ввода кода верификации Email (встроена в auth-buttons) -->
|
<!-- Форма для ввода кода верификации Email (встроена в auth-buttons) -->
|
||||||
<div v-if="showEmailVerificationInput" class="email-verification-form">
|
<div v-if="showEmailVerificationInput" class="email-verification-form">
|
||||||
<p>На ваш email <strong>{{ emailVerificationEmail }}</strong> отправлен код подтверждения.</p>
|
<p>На ваш email <strong>{{ emailVerificationEmail }}</strong> отправлен код подтверждения.</p>
|
||||||
<div class="verification-input">
|
<div class="email-form-container">
|
||||||
<input
|
<input
|
||||||
v-model="emailVerificationCode"
|
v-model="emailVerificationCode"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Введите код верификации"
|
placeholder="Введите код верификации"
|
||||||
maxlength="6"
|
maxlength="6"
|
||||||
|
class="email-input"
|
||||||
/>
|
/>
|
||||||
<button @click="verifyEmailCode" class="verify-btn" :disabled="isVerifying">
|
<button @click="verifyEmailCode" class="send-email-btn" :disabled="isVerifying">
|
||||||
{{ isVerifying ? 'Проверка...' : 'Подтвердить' }}
|
{{ isVerifying ? 'Проверка...' : 'Подтвердить' }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button @click="cancelEmailAuth" class="cancel-btn">Отмена</button>
|
<button @click="cancelEmailAuth" class="cancel-btn">Отмена</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Сообщение об ошибке в Email -->
|
<!-- Сообщение об ошибке в Email -->
|
||||||
<div v-if="emailError" class="error-message">
|
<div v-if="emailError" class="error-message">
|
||||||
{{ emailError }}
|
{{ emailError }}
|
||||||
<button class="close-error" @click="clearEmailError">×</button>
|
<button class="close-error" @click="clearEmailError">×</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Блок баланса токенов -->
|
<!-- Блок баланса токенов -->
|
||||||
<div class="balance-container">
|
<div class="balance-container">
|
||||||
@@ -151,7 +158,7 @@
|
|||||||
<span class="token-name">ETH:</span>
|
<span class="token-name">ETH:</span>
|
||||||
<span class="token-amount">{{ tokenBalances.eth }}</span>
|
<span class="token-amount">{{ tokenBalances.eth }}</span>
|
||||||
<span class="token-symbol">{{ TOKEN_CONTRACTS.eth.symbol }}</span>
|
<span class="token-symbol">{{ TOKEN_CONTRACTS.eth.symbol }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="token-balance">
|
<div class="token-balance">
|
||||||
<span class="token-name">ARB:</span>
|
<span class="token-name">ARB:</span>
|
||||||
<span class="token-amount">{{ tokenBalances.arbitrum }}</span>
|
<span class="token-amount">{{ tokenBalances.arbitrum }}</span>
|
||||||
@@ -175,7 +182,7 @@
|
|||||||
<div v-if="auth.address?.value" class="user-info-item">
|
<div v-if="auth.address?.value" class="user-info-item">
|
||||||
<span class="user-info-label">Кошелек:</span>
|
<span class="user-info-label">Кошелек:</span>
|
||||||
<span class="user-info-value">{{ truncateAddress(auth.address.value) }}</span>
|
<span class="user-info-value">{{ truncateAddress(auth.address.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="auth.telegramId?.value" class="user-info-item">
|
<div v-if="auth.telegramId?.value" class="user-info-item">
|
||||||
<span class="user-info-label">Telegram:</span>
|
<span class="user-info-label">Telegram:</span>
|
||||||
<span class="user-info-value">{{ auth.telegramId.value }}</span>
|
<span class="user-info-value">{{ auth.telegramId.value }}</span>
|
||||||
@@ -185,10 +192,6 @@
|
|||||||
<span class="user-info-value">{{ auth.email.value }}</span>
|
<span class="user-info-value">{{ auth.email.value }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="language-selector">
|
|
||||||
RU <span class="dropdown-icon">▼</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -259,6 +262,9 @@ const tokenBalances = ref({
|
|||||||
polygon: '0'
|
polygon: '0'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Состояние для отображения правой панели
|
||||||
|
const showWalletSidebar = ref(false);
|
||||||
|
|
||||||
// Функция для управления сайдбаром
|
// Функция для управления сайдбаром
|
||||||
const toggleSidebar = () => {
|
const toggleSidebar = () => {
|
||||||
showSidebar.value = !showSidebar.value;
|
showSidebar.value = !showSidebar.value;
|
||||||
@@ -270,6 +276,13 @@ const navigateTo = (page) => {
|
|||||||
console.log(`Навигация на страницу: ${page}`);
|
console.log(`Навигация на страницу: ${page}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Функция для переключения отображения правой панели
|
||||||
|
const toggleWalletSidebar = () => {
|
||||||
|
showWalletSidebar.value = !showWalletSidebar.value;
|
||||||
|
// Сохраняем в localStorage предпочтение пользователя
|
||||||
|
localStorage.setItem('showWalletSidebar', showWalletSidebar.value);
|
||||||
|
};
|
||||||
|
|
||||||
// Функция для копирования кода
|
// Функция для копирования кода
|
||||||
const copyCode = (code) => {
|
const copyCode = (code) => {
|
||||||
navigator.clipboard.writeText(code).then(() => {
|
navigator.clipboard.writeText(code).then(() => {
|
||||||
@@ -302,18 +315,9 @@ const handleEmailAuth = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Функция для отмены email авторизации
|
|
||||||
const cancelEmailAuth = () => {
|
|
||||||
showEmailForm.value = false;
|
|
||||||
showEmailVerificationInput.value = false;
|
|
||||||
emailError.value = '';
|
|
||||||
emailFormatError.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Функция для отправки запроса на верификацию email
|
// Функция для отправки запроса на верификацию email
|
||||||
const sendEmailVerification = async () => {
|
const sendEmailVerification = async () => {
|
||||||
try {
|
try {
|
||||||
// Очищаем сообщения об ошибках
|
|
||||||
emailFormatError.value = false;
|
emailFormatError.value = false;
|
||||||
emailError.value = '';
|
emailError.value = '';
|
||||||
|
|
||||||
@@ -326,30 +330,21 @@ const sendEmailVerification = async () => {
|
|||||||
isEmailSending.value = true;
|
isEmailSending.value = true;
|
||||||
|
|
||||||
// Отправляем запрос на сервер для инициализации email аутентификации
|
// Отправляем запрос на сервер для инициализации email аутентификации
|
||||||
try {
|
const response = await axios.post('/api/auth/email/init', { email: emailInput.value });
|
||||||
const response = await axios.post('/api/auth/email/init', { email: emailInput.value });
|
|
||||||
|
|
||||||
if (response.data.success) {
|
if (response.data.success) {
|
||||||
// Скрываем форму ввода email
|
// Скрываем форму ввода email
|
||||||
showEmailForm.value = false;
|
showEmailForm.value = false;
|
||||||
// Показываем форму для ввода кода
|
// Показываем форму для ввода кода
|
||||||
showEmailVerificationInput.value = true;
|
showEmailVerificationInput.value = true;
|
||||||
// Скрываем старую форму кода верификации
|
// Скрываем старую форму кода верификации
|
||||||
showEmailVerification.value = false;
|
showEmailVerification.value = false;
|
||||||
// Сохраняем email
|
// Сохраняем email
|
||||||
emailVerificationEmail.value = emailInput.value;
|
emailVerificationEmail.value = emailInput.value;
|
||||||
// Очищаем поле для ввода кода
|
// Очищаем поле для ввода кода
|
||||||
emailVerificationCode.value = '';
|
emailVerificationCode.value = '';
|
||||||
} else {
|
} else {
|
||||||
emailError.value = response.data.error || 'Ошибка инициализации аутентификации по email';
|
emailError.value = response.data.error || 'Ошибка инициализации аутентификации по email';
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error sending email verification:', error);
|
|
||||||
if (error.response && error.response.data && error.response.data.error) {
|
|
||||||
emailError.value = error.response.data.error;
|
|
||||||
} else {
|
|
||||||
emailError.value = 'Ошибка при отправке кода. Пожалуйста, проверьте правильность email или попробуйте позже.';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
emailError.value = 'Ошибка при запросе кода подтверждения';
|
emailError.value = 'Ошибка при запросе кода подтверждения';
|
||||||
@@ -373,11 +368,8 @@ const verifyEmailCode = async () => {
|
|||||||
// Показываем индикатор процесса верификации
|
// Показываем индикатор процесса верификации
|
||||||
isVerifying.value = true;
|
isVerifying.value = true;
|
||||||
|
|
||||||
// Преобразуем код в верхний регистр перед отправкой
|
|
||||||
const code = emailVerificationCode.value.toUpperCase();
|
|
||||||
|
|
||||||
const response = await axios.post('/api/auth/check-email-verification', {
|
const response = await axios.post('/api/auth/check-email-verification', {
|
||||||
code: code
|
code: emailVerificationCode.value
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.data.success) {
|
if (response.data.success) {
|
||||||
@@ -398,27 +390,10 @@ const verifyEmailCode = async () => {
|
|||||||
// Обновляем состояние аутентификации
|
// Обновляем состояние аутентификации
|
||||||
await auth.checkAuth();
|
await auth.checkAuth();
|
||||||
|
|
||||||
// Загружаем историю сообщений
|
// Перезагружаем страницу для обновления UI через 1 секунду
|
||||||
messages.value = [];
|
setTimeout(() => {
|
||||||
offset.value = 0;
|
window.location.reload();
|
||||||
hasMoreMessages.value = true;
|
}, 1000);
|
||||||
await loadMoreMessages();
|
|
||||||
|
|
||||||
// Связываем гостевые сообщения
|
|
||||||
try {
|
|
||||||
await api.post('/api/chat/link-guest-messages');
|
|
||||||
console.log('Guest messages linked to authenticated user');
|
|
||||||
|
|
||||||
// Перезагружаем сообщения после связывания
|
|
||||||
messages.value = [];
|
|
||||||
offset.value = 0;
|
|
||||||
await loadMoreMessages();
|
|
||||||
} catch (linkError) {
|
|
||||||
console.error('Error linking guest messages:', linkError);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Обновляем баланс токенов
|
|
||||||
await updateBalances();
|
|
||||||
} else {
|
} else {
|
||||||
emailError.value = response.data.message || 'Неверный код верификации';
|
emailError.value = response.data.message || 'Неверный код верификации';
|
||||||
}
|
}
|
||||||
@@ -430,6 +405,140 @@ const verifyEmailCode = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Функция для отмены Email аутентификации
|
||||||
|
const cancelEmailAuth = () => {
|
||||||
|
showEmailForm.value = false;
|
||||||
|
showEmailVerificationInput.value = false;
|
||||||
|
showEmailVerification.value = false;
|
||||||
|
emailInput.value = '';
|
||||||
|
emailVerificationCode.value = '';
|
||||||
|
emailError.value = '';
|
||||||
|
emailFormatError.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Функция для отправки сообщения
|
||||||
|
const handleMessage = async (text) => {
|
||||||
|
try {
|
||||||
|
const messageContent = text.trim();
|
||||||
|
if (!messageContent) return;
|
||||||
|
|
||||||
|
// Показываем правую панель только если пользователь не аутентифицирован
|
||||||
|
if (!isAuthenticated.value) {
|
||||||
|
showWalletSidebar.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
newMessage.value = '';
|
||||||
|
isLoading.value = true;
|
||||||
|
|
||||||
|
if (!isAuthenticated.value) {
|
||||||
|
// Сохраняем в таблицу guest_messages
|
||||||
|
const response = await api.post('/api/chat/guest-message', {
|
||||||
|
message: messageContent,
|
||||||
|
language: userLanguage.value
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.data.success) {
|
||||||
|
const userMessage = {
|
||||||
|
id: response.data.messageId,
|
||||||
|
content: messageContent,
|
||||||
|
role: 'user',
|
||||||
|
timestamp: new Date().toISOString()
|
||||||
|
};
|
||||||
|
messages.value.push(userMessage);
|
||||||
|
|
||||||
|
// Показываем сообщение с просьбой авторизоваться
|
||||||
|
messages.value.push({
|
||||||
|
id: Date.now() + 1,
|
||||||
|
content: 'Для получения ответа от ассистента, пожалуйста, авторизуйтесь одним из способов в правой панели.',
|
||||||
|
role: 'assistant',
|
||||||
|
timestamp: new Date().toISOString()
|
||||||
|
});
|
||||||
|
|
||||||
|
// Устанавливаем флаг отправки сообщения
|
||||||
|
if (!hasUserSentMessage.value) {
|
||||||
|
hasUserSentMessage.value = true;
|
||||||
|
localStorage.setItem('hasUserSentMessage', 'true');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new Error(response.data.error || 'Ошибка при отправке сообщения');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Для авторизованного пользователя сохраняем в messages
|
||||||
|
const response = await api.post('/api/chat/message', {
|
||||||
|
message: messageContent,
|
||||||
|
language: userLanguage.value
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.data.success) {
|
||||||
|
const message = {
|
||||||
|
id: response.data.messageId,
|
||||||
|
content: messageContent,
|
||||||
|
role: 'user',
|
||||||
|
timestamp: new Date().toISOString(),
|
||||||
|
hasResponse: true
|
||||||
|
};
|
||||||
|
messages.value.push(message);
|
||||||
|
|
||||||
|
const aiMessage = {
|
||||||
|
id: response.data.aiMessageId,
|
||||||
|
content: response.data.message,
|
||||||
|
role: 'assistant',
|
||||||
|
timestamp: new Date().toISOString()
|
||||||
|
};
|
||||||
|
messages.value.push(aiMessage);
|
||||||
|
} else {
|
||||||
|
throw new Error(response.data.error || 'Ошибка при отправке сообщения');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
scrollToBottom();
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error sending message:', error);
|
||||||
|
messages.value.push({
|
||||||
|
id: Date.now(),
|
||||||
|
content: error.message || 'Произошла ошибка при отправке сообщения. Пожалуйста, попробуйте еще раз.',
|
||||||
|
role: 'assistant',
|
||||||
|
timestamp: new Date().toISOString()
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
isLoading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Обработка прокрутки
|
||||||
|
const handleScroll = async () => {
|
||||||
|
const element = messagesContainer.value;
|
||||||
|
if (
|
||||||
|
!isLoadingMore.value &&
|
||||||
|
hasMoreMessages.value &&
|
||||||
|
element.scrollTop === 0
|
||||||
|
) {
|
||||||
|
await loadMoreMessages();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Функция получения балансов
|
||||||
|
const updateBalances = async () => {
|
||||||
|
if (auth.isAuthenticated.value && auth.address?.value) {
|
||||||
|
try {
|
||||||
|
const balances = await fetchTokenBalances();
|
||||||
|
tokenBalances.value = balances;
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error updating balances:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Функция отмены Telegram аутентификации
|
||||||
|
const cancelTelegramAuth = () => {
|
||||||
|
showTelegramVerification.value = false;
|
||||||
|
if (telegramAuthCheckInterval.value) {
|
||||||
|
clearInterval(telegramAuthCheckInterval.value);
|
||||||
|
telegramAuthCheckInterval.value = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Обработчик для Telegram аутентификации
|
// Обработчик для Telegram аутентификации
|
||||||
const handleTelegramAuth = async () => {
|
const handleTelegramAuth = async () => {
|
||||||
try {
|
try {
|
||||||
@@ -683,119 +792,17 @@ const formatMessage = (text) => {
|
|||||||
return DOMPurify.sanitize(rawHtml);
|
return DOMPurify.sanitize(rawHtml);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Функция для отправки сообщения
|
// Инициализация состояния правой панели при загрузке
|
||||||
const handleMessage = async (text) => {
|
|
||||||
try {
|
|
||||||
const messageContent = text.trim();
|
|
||||||
if (!messageContent) return;
|
|
||||||
|
|
||||||
newMessage.value = '';
|
|
||||||
isLoading.value = true;
|
|
||||||
|
|
||||||
if (!isAuthenticated.value) {
|
|
||||||
// Сохраняем в таблицу guest_messages
|
|
||||||
const response = await api.post('/api/chat/guest-message', {
|
|
||||||
message: messageContent,
|
|
||||||
language: userLanguage.value
|
|
||||||
});
|
|
||||||
|
|
||||||
if (response.data.success) {
|
|
||||||
const userMessage = {
|
|
||||||
id: response.data.messageId,
|
|
||||||
content: messageContent,
|
|
||||||
role: 'user',
|
|
||||||
timestamp: new Date().toISOString()
|
|
||||||
};
|
|
||||||
messages.value.push(userMessage);
|
|
||||||
|
|
||||||
// Показываем сообщение с просьбой авторизоваться
|
|
||||||
messages.value.push({
|
|
||||||
id: Date.now() + 1,
|
|
||||||
content: 'Для получения ответа от ассистента, пожалуйста, авторизуйтесь одним из способов в правой панели.',
|
|
||||||
role: 'assistant',
|
|
||||||
timestamp: new Date().toISOString()
|
|
||||||
});
|
|
||||||
|
|
||||||
// НЕ показываем форму email автоматически и НЕ устанавливаем showEmailAlternatives
|
|
||||||
// showEmailForm.value = true;
|
|
||||||
// showEmailAlternatives.value = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Для авторизованного пользователя сохраняем в messages
|
|
||||||
const response = await api.post('/api/chat/message', {
|
|
||||||
message: messageContent,
|
|
||||||
language: userLanguage.value
|
|
||||||
});
|
|
||||||
|
|
||||||
if (response.data.success) {
|
|
||||||
const message = {
|
|
||||||
id: response.data.messageId,
|
|
||||||
content: messageContent,
|
|
||||||
role: 'user',
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
hasResponse: true
|
|
||||||
};
|
|
||||||
messages.value.push(message);
|
|
||||||
|
|
||||||
const aiMessage = {
|
|
||||||
id: response.data.aiMessageId,
|
|
||||||
content: response.data.message,
|
|
||||||
role: 'assistant',
|
|
||||||
timestamp: new Date().toISOString()
|
|
||||||
};
|
|
||||||
messages.value.push(aiMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
await nextTick();
|
|
||||||
scrollToBottom();
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error sending message:', error);
|
|
||||||
messages.value.push({
|
|
||||||
id: Date.now(),
|
|
||||||
content: 'Произошла ошибка при отправке сообщения.',
|
|
||||||
role: 'assistant',
|
|
||||||
timestamp: new Date().toISOString()
|
|
||||||
});
|
|
||||||
} finally {
|
|
||||||
isLoading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Обработка прокрутки
|
|
||||||
const handleScroll = async () => {
|
|
||||||
const element = messagesContainer.value;
|
|
||||||
if (
|
|
||||||
!isLoadingMore.value &&
|
|
||||||
hasMoreMessages.value &&
|
|
||||||
element.scrollTop === 0
|
|
||||||
) {
|
|
||||||
await loadMoreMessages();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Функция получения балансов
|
|
||||||
const updateBalances = async () => {
|
|
||||||
if (auth.isAuthenticated.value && auth.address?.value) {
|
|
||||||
try {
|
|
||||||
const balances = await fetchTokenBalances();
|
|
||||||
tokenBalances.value = balances;
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error updating balances:', error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Функция отмены Telegram аутентификации
|
|
||||||
const cancelTelegramAuth = () => {
|
|
||||||
showTelegramVerification.value = false;
|
|
||||||
if (telegramAuthCheckInterval.value) {
|
|
||||||
clearInterval(telegramAuthCheckInterval.value);
|
|
||||||
telegramAuthCheckInterval.value = null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
// Загружаем состояние правой панели из localStorage
|
||||||
|
const savedSidebarState = localStorage.getItem('showWalletSidebar');
|
||||||
|
if (savedSidebarState !== null) {
|
||||||
|
showWalletSidebar.value = savedSidebarState === 'true';
|
||||||
|
} else {
|
||||||
|
// По умолчанию правая панель скрыта
|
||||||
|
showWalletSidebar.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Добавляем слушатель прокрутки
|
// Добавляем слушатель прокрутки
|
||||||
if (messagesContainer.value) {
|
if (messagesContainer.value) {
|
||||||
messagesContainer.value.addEventListener('scroll', handleScroll);
|
messagesContainer.value.addEventListener('scroll', handleScroll);
|
||||||
|
|||||||
Reference in New Issue
Block a user