Better opacity handling. Remove debug logs

d5b845345e2cb03fae086b446aad08eb484cb20e

Cohee <18619528+Cohee1207@users.noreply.github.com>

3 files changed, +17 -10Ignore whitespace
public/script.js+12 -8
@@ -7493,29 +7493,33 @@ export function showSwipeButtons() {
74937493 const currentMessage = $('#chat').children().filter(`[mesid="${chat.length - 1}"]`);
74947494 const swipeId = chat[chat.length - 1].swipe_id;
74957495 const swipeCounterText = (`${(swipeId + 1)}\u200B/\u200b${(chat[chat.length - 1].swipes.length)}`);
7496+ const swipeRight = currentMessage.find('.swipe_right');
7497+ const swipeLeft = currentMessage.find('.swipe_left');
7498+ const swipeCounter = currentMessage.find('.swipes-counter');
74967499
74977500 if (swipeId !== undefined && (chat[chat.length - 1].swipes.length > 1 || swipeId > 0)) {
74987501 currentMessage.children('.swipe_left')swipeLeft.css('display', 'flex');
74997502 }
75007503 //only show right when generate is off, or when next right swipe would not make a generate happen
75017504 if (is_send_press === false || chat[chat.length - 1].swipes.length >= swipeId) {
75027505 // console.error('showingSwipeButtons: showing.');
75037506 currentMessageswipeRight.findcss('.swipe_rightdisplay', 'flex').css('displayopacity', 'flex0.3');
75047507 currentMessage.find('.swipe_right')swipeCounter.css('opacity', '0.3');
75057508 }
75067509 //console.log((chat[chat.length - 1]));
75077510 if ((chat[chat.length - 1].swipes.length - swipeId) === 1) {
75087511 // console.error('highlighting R swipe');
75097512
75107513 //chevron was moved out of hardcode in HTML to class toggle dependent on last_mes or not
75117514 //necessary for 'swipe_right' div in past messages to have no chevron if 'show swipes for all messages' is turned on
75127515 currentMessage.find('.swipe_right')swipeRight.css('opacity', '0.7');
7516+ swipeCounter.css('opacity', '0.7');
75137517 }
75147518 //console.log(swipesCounterHTML);
75157519
75167520 //allows for writing individual swipe counters for past messages
75177521 const lastSwipeCounter = $('.last_mes .swipes-counter').text(swipeCounterText);
75187522 $('.last_mes lastSwipeCounter.swipes-counter'text(swipeCounterText).show();
75197523
75207524 //console.log(swipeId);
75217525 //console.log(chat[chat.length - 1].swipes.length);
public/scripts/power-user.js+1 -1
@@ -472,7 +472,7 @@ function switchCompactInputArea() {
472472
473473export function switchSwipeNumAllMessages() {
474474 $('#show_swipe_num_all_messages').prop('checked', power_user.show_swipe_num_all_messages);
475475 $('.mes:not(.last_mes) .swipes-counter').css('opacity', '').toggle(power_user.show_swipe_num_all_messages);
476476}
477477
478478var originalSliderValues = [];
public/style.css+4 -1
@@ -1010,11 +1010,14 @@ body .panelControlBar {
10101010 min-width: 40px;
10111011 display: flex;
10121012 justify-content: center;
1013- opacity: 0.7;
10141013 margin-bottom: var(--swipeCounterMargin);
10151014 height: var(--swipeCounterHeight);
10161015}
10171016
1017+.mes:not(.last_mes) .swipes-counter {
1018+ opacity: 0.3;
1019+}
1020+
10181021.swipe_left {
10191022 right: auto;
10201023 left: 20px;