Fix broken HTML and code style

This commit is contained in:
Cohee 2024-04-11 19:21:59 +03:00
parent 0b06303442
commit d2ac782c3c
2 changed files with 4 additions and 6 deletions

View File

@ -4092,7 +4092,7 @@
<div id="persona_pagination_container" class="flex1"></div>
<i id="persona_grid_toggle" class="fa-solid fa-table-cells-large menu_button" data-i18n="[title]Toggle grid view" title="Toggle grid view"></i>
</div>
<div id="user_avatar_block" data-i18n="[no_desc_text]No persona description" no_desc_text="[No description]>
<div id="user_avatar_block" data-i18n="[no_desc_text]No persona description" no_desc_text="[No description]">
<div class="avatar_upload">+</div>
</div>
<form id="form_upload_avatar" action="javascript:void(null);" method="post" enctype="multipart/form-data">

View File

@ -275,9 +275,7 @@ export async function favsToHotswap() {
//helpful instruction message if no characters are favorited
if (favs.length == 0) {
container.html('<small><span><i class="fa-solid fa-star"></i> '
+ container.attr('no_favs')
+ '</span></small>');
container.html(`<small><span><i class="fa-solid fa-star"></i>${DOMPurify.sanitize(container.attr('no_favs'))}</span></small>`);
return;
}
@ -287,7 +285,7 @@ export async function favsToHotswap() {
//changes input bar and send button display depending on connection status
function RA_checkOnlineStatus() {
if (online_status == 'no_connection') {
var send_textarea = $('#send_textarea');
const send_textarea = $('#send_textarea');
send_textarea.attr('placeholder', send_textarea.attr('no_connection_text')); //Input bar placeholder tells users they are not connected
$('#send_form').addClass('no-connection'); //entire input form area is red when not connected
$('#send_but').addClass('displayNone'); //send button is hidden when not connected;
@ -297,7 +295,7 @@ function RA_checkOnlineStatus() {
connection_made = false;
} else {
if (online_status !== undefined && online_status !== 'no_connection') {
var send_textarea = $('#send_textarea');
const send_textarea = $('#send_textarea');
send_textarea.attr('placeholder', send_textarea.attr('connected_text')); //on connect, placeholder tells user to type message
$('#send_form').removeClass('no-connection');
$('#API-status-top').removeClass('fa-plug-circle-exclamation redOverlayGlow');