diff --git a/public/img/times-circle.svg b/public/img/times-circle.svg new file mode 100644 index 000000000..cdee94147 --- /dev/null +++ b/public/img/times-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/index.html b/public/index.html index d20c7d3f5..b16c1cabf 100644 --- a/public/index.html +++ b/public/index.html @@ -217,6 +217,19 @@ $('#characloud_url').click(function(){ window.open('https://boosty.to/tavernai', '_blank'); }); + $('#character_search_bar').on('input', function() { + const searchValue = $(this).val().trim().toLowerCase(); + + if (!searchValue) { + $("#rm_print_charaters_block .character_select").show(); + } else { + $("#rm_print_charaters_block .character_select").each(function () { + $(this).children('.ch_name').text().toLowerCase().includes(searchValue) + ? $(this).show() + : $(this).hide(); + }); + } + }); function checkOnlineStatus(){ //console.log(online_status); if(online_status == 'no_connection'){ @@ -1330,7 +1343,7 @@ function select_rm_characters(){ menu_type = 'characters'; - $( "#rm_charaters_block" ).css("display", "block"); + $( "#rm_charaters_block" ).css("display", "flex"); $('#rm_charaters_block').css('opacity',0.0); $('#rm_charaters_block').transition({ opacity: 1.0, @@ -3754,8 +3767,15 @@