Skip to content

Commit

Permalink
Updated Version and Dynamic Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonKirill authored and github-actions[bot] committed Feb 25, 2025
1 parent 40d4230 commit b223722
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 2 additions & 0 deletions chat_client/static/css/klatchatNano.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ text-align: center;
line-height: 50px;
user-select: none;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
}


Expand Down
17 changes: 12 additions & 5 deletions chat_client/static/js/klatchatNano.js
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ async function buildUserMessageHTML(userData, cid, messageID, messageText, timeC
*/
const shrinkNickname = (nick) => {
const index = nick.indexOf('_');
return (index !== -1 && index < 8) ? nick.substring(0, index) : nick.substring(0, 8);
return (index !== -1 && index < 7) ? nick.substring(0, index) : nick.substring(0, 7);
}

/**
Expand Down Expand Up @@ -2392,12 +2392,16 @@ async function buildSubmindHTML(promptID, submindID, submindUserData, submindRes
* Gets winner field HTML based on provided winner
* @return {string} built winner field HTML
* @param nickname of the winner
* @param winner_response
*/
async function buildPromptWinnerHTML(nickname) {
async function buildPromptWinnerHTML(nickname, winner_response) {
return `
<div class="d-flex flex-column align-items-center justify-content-center">
<span class="mt-2">Selected winner</span>
<span class="mt-2 mb-3 font-weight-bold">Selected winner</span>
${await buildPromptParticipantIcon(nickname)}
<div style="max-width: 400px; margin-top: 20px;">
${winner_response}
</div>
</div>
`
}
Expand Down Expand Up @@ -2480,7 +2484,10 @@ async function buildPromptHTML(prompt) {
});
if (promptData['winner'] === submindUserData['nickname']) {
winnerFound = true;
promptData['winner'] = await buildPromptWinnerHTML(submindUserData['nickname']);
promptData['winner'] = await buildPromptWinnerHTML(
submindUserData['nickname'],
data.proposed_responses['message_text']
);
}
submindsHTML += await buildSubmindHTML(prompt['_id'], submindID, submindUserData,
data.proposed_responses, data.submind_opinions, data.votes);
Expand Down Expand Up @@ -3313,7 +3320,7 @@ async function buildConversation(conversationData, skin, remember = true, conver
const textInputElem = document.getElementById(conversationData['_id'] + '-input');
if (chatInputButton.hasAttribute('data-target-cid')) {
textInputElem.addEventListener('keyup', async (e) => {
if (e.shiftKey && e.key === 'Enter') {
if (e.key === 'Enter' && !e.shiftKey) {
await sendMessage(textInputElem, conversationData['_id']);
}
});
Expand Down
4 changes: 2 additions & 2 deletions version.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

__version__ = "0.4.14a1"
__version_ts__ = 1739959187
__version__ = "0.4.14a2"
__version_ts__ = 1740501020

0 comments on commit b223722

Please sign in to comment.