Small fix

This commit is contained in:
Yokayo 2024-06-12 16:50:08 +07:00
parent a1a9f0002c
commit 839d79f407
2 changed files with 8 additions and 25 deletions

View File

@ -4821,14 +4821,14 @@
<option data-field="name" data-order="random" data-i18n="Random">Random</option>
</select>
</form>
<div class="rm_tag_controls" data-i18n="[show_only_favorites_text]tags_show_only_favorites;[show_only_groups_text]tags_show_only_groups" show_only_favorites_text="Show only favorites" show_only_groups_text="Show only groups">
<div class="rm_tag_controls">
<div class="tags rm_tag_filter"></div>
<div class="tags rm_tag_bogus_drilldown"></div>
</div>
<hr>
</div>
<div id="rm_print_characters_pagination" pagination_template_of="of" data-i18n="[pagination_template_of]pagination_template_of;[pagination_template_page_string]pagination_template_page_string" pagination_template_page_string="page">
<div id="rm_print_characters_pagination">
<i id="charListGridToggle" class="fa-solid fa-table-cells-large menu_button" title="Toggle character grid view" data-i18n="[title]Toggle character grid view"></i>
<i id="bulkEditButton" class="fa-solid fa-edit menu_button bulkEditButton" title="Bulk edit characters&#13;&#13;Click to toggle characters&#13;Shift + Click to select/deselect a range of characters&#13;Right-click for actions" data-i18n="[title]Bulk_edit_characters"></i>
<div id="bulkSelectedCount" class="bulkEditOptionElement paginationjs-nav"></div>

View File

@ -499,7 +499,6 @@ let rawPromptPopper = Popper.createPopper(document.getElementById('dialogue_popu
// Saved here for performance reasons
const messageTemplate = $('#message_template .mes');
const chatElement = $('#chat');
const textHolder = $('#API-status-top');
let dialogueResolve = null;
let dialogueCloseStop = false;
@ -745,19 +744,8 @@ const per_page_default = 50;
var is_advanced_char_open = false;
/**
* The type of the right menu
* @typedef {'characters' | 'character_edit' | 'create' | 'group_edit' | 'group_create' | '' } MenuType
*/
/**
* The type of the right menu that is currently open
* @type {MenuType}
*/
export let menu_type = '';
export let menu_type = ''; //what is selected in the menu
export let selected_button = ''; //which button pressed
//create pole save
let create_save = {
name: '',
@ -913,7 +901,7 @@ function cancelStatusCheck() {
export function displayOnlineStatus() {
if (online_status == 'no_connection') {
$('.online_status_indicator').removeClass('success');
$('.online_status_text').text(textHolder.attr('no_connection_text'));
$('.online_status_text').text($('#API-status-top').attr('no_connection_text'));
} else {
$('.online_status_indicator').addClass('success');
$('.online_status_text').text(online_status);
@ -5420,14 +5408,8 @@ export function resetChatState() {
characters.length = 0;
}
/**
*
* @param {'characters' | 'character_edit' | 'create' | 'group_edit' | 'group_create'} value
*/
export function setMenuType(value) {
menu_type = value;
// Allow custom CSS to see which menu type is active
document.getElementById('right-nav-panel').dataset.menuType = menu_type;
}
export function setExternalAbortController(controller) {
@ -6809,7 +6791,7 @@ export function select_selected_character(chid) {
//character select
//console.log('select_selected_character() -- starting with input of -- ' + chid + ' (name:' + characters[chid].name + ')');
select_rm_create();
setMenuType('character_edit');
menu_type = 'character_edit';
$('#delete_button').css('display', 'flex');
$('#export_button').css('display', 'flex');
var display_name = characters[chid].name;
@ -6885,7 +6867,7 @@ export function select_selected_character(chid) {
}
function select_rm_create() {
setMenuType('create');
menu_type = 'create';
//console.log('select_rm_Create() -- selected button: '+selected_button);
if (selected_button == 'create') {
@ -6946,7 +6928,7 @@ function select_rm_create() {
function select_rm_characters() {
const doFullRefresh = menu_type === 'characters';
setMenuType('characters');
menu_type = 'characters';
selectRightMenuWithAnimation('rm_characters_block');
printCharacters(doFullRefresh);
}
@ -8971,6 +8953,7 @@ jQuery(async function () {
$('#rm_button_settings').click(function () {
selected_button = 'settings';
menu_type = 'settings';
selectRightMenuWithAnimation('rm_api_block');
});
$('#rm_button_characters').click(function () {