Skip to content

Commit

Permalink
Some updates
Browse files Browse the repository at this point in the history
  • Loading branch information
3r1s-s committed Aug 19, 2024
1 parent f1166a7 commit 9b26c6b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ const en = {
"emojis": "Emojis",
"uploademoji": "Upload Emoji",
"chatsettings": "Chat Settings",
"leave": "Leave",
"update": "Save Chat",
},
"inputs": { // update
Expand Down
11 changes: 9 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,9 @@ function chatMembers(chatId) {
<button class="member button" onclick="addMembertoGCModal('${chatId}')">Add Member</button>
<div class="member-list">
</div>
<hr>
<div class="settings-buttons-row" id="chat-members-manage">
</div>
</div>
`;
const memberList = mainContainer.querySelector('.member-list');
Expand All @@ -2880,14 +2883,18 @@ function chatMembers(chatId) {
ownercont.innerHTML = `
<p class="subsubheader">${data.owner} is the owner</p>
`
const leavecont = mainContainer.querySelector('#chat-members-manage');
leavecont.innerHTML = `
<button onclick="closeChatModal(event, '${chatId}', '${escapeHTML(data.nickname)}')" id="chat-update" class="settings-button-in red">${lang().chats.leave}</button>
`
}
if (memberList) {
data.members.forEach(member => {
const memberItem = document.createElement('div');
memberItem.className = 'member-in';
memberItem.innerHTML = `
<span>@${member}</span>
${data.owner === localStorage.getItem("username") || member === localStorage.getItem("username") ? `<div class="mem-ops">
${data.owner === localStorage.getItem("username") ? `<div class="mem-ops">
<div class="mem-op tooltip left" onclick="removeMemberFromGC('${chatId}', '${member}')" title="${lang().action.remove}" data-tooltip="${lang().action.remove}">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor" d="M2.3352 13.6648C2.78215 14.1117 3.50678 14.1117 3.95372 13.6648L8 9.61851L12.0463 13.6648C12.4932 14.1117 13.2179 14.1117 13.6648 13.6648C14.1117 13.2179 14.1117 12.4932 13.6648 12.0463L9.61851 8L13.6648 3.95372C14.1117 3.50678 14.1117 2.78214 13.6648 2.3352C13.2179 1.88826 12.4932 1.88827 12.0463 2.33521L8 6.38149L3.95372 2.33521C3.50678 1.88827 2.78214 1.88827 2.3352 2.33521C1.88826 2.78215 1.88827 3.50678 2.33521 3.95372L6.38149 8L2.33521 12.0463C1.88827 12.4932 1.88827 13.2179 2.3352 13.6648Z"></path>
Expand Down Expand Up @@ -3866,7 +3873,7 @@ function closeChatModal(e, chatId, chatName) {
mdlt.innerHTML = `
<h3>${lang().action.leavegc}</h3>
<hr class="mdl-hr">
<span class="subheader">${lang().leave_sub.desc} ${chatName}${lang().leave_sub.end}</span>
<span class="subheader">${lang().leave_sub.desc} ${escapeHTML(chatName)}${lang().leave_sub.end}</span>
`;
}
const mdbt = mdl.querySelector('.modal-bottom');
Expand Down
5 changes: 4 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2814,14 +2814,17 @@ possible future styling
margin: var(--button-margin) 0;
display: flex;
flex-direction: column;
max-height: 450px;
overflow-y: scroll;
overflow-x: visible;
}

.emoji-list {
gap: var(--button-margin);
margin: var(--button-margin) 0;
display: flex;
flex-direction: column;
max-height: 300px;
max-height: 450px;
overflow-y: scroll;
overflow-x: visible;
}
Expand Down

0 comments on commit 9b26c6b

Please sign in to comment.