mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Add power-user option to toggle card filenames.
Rephrased 'resize' option so It's Not Talking Like This.
This commit is contained in:
		| @@ -2262,7 +2262,10 @@ | |||||||
|                                 </a> |                                 </a> | ||||||
|                             </label> |                             </label> | ||||||
|                             <label for="never_resize_avatars"><input id="never_resize_avatars" type="checkbox" /> |                             <label for="never_resize_avatars"><input id="never_resize_avatars" type="checkbox" /> | ||||||
|                                 <span data-i18n="Never Resize Avatars">Never Resize Avatars</span> |                                 <span data-i18n="Never resize avatars">Never resize avatars</span> | ||||||
|  |                             </label> | ||||||
|  |                             <label for="show_card_avatar_urls"><input id="show_card_avatar_urls" type="checkbox" /> | ||||||
|  |                                 <span data-i18n="Show avatar filenames">Show avatar filenames</span> | ||||||
|                             </label> |                             </label> | ||||||
|                              |                              | ||||||
|                             <div class="inline-drawer wide100p flexFlowColumn"> |                             <div class="inline-drawer wide100p flexFlowColumn"> | ||||||
|   | |||||||
| @@ -226,6 +226,7 @@ export { | |||||||
|     extension_prompt_types, |     extension_prompt_types, | ||||||
|     updateVisibleDivs, |     updateVisibleDivs, | ||||||
|     mesForShowdownParse, |     mesForShowdownParse, | ||||||
|  |     printCharacters, | ||||||
| } | } | ||||||
|  |  | ||||||
| // API OBJECT FOR EXTERNAL WIRING | // API OBJECT FOR EXTERNAL WIRING | ||||||
| @@ -803,7 +804,9 @@ async function printCharacters() { | |||||||
|         template.find('img').attr('src', this_avatar); |         template.find('img').attr('src', this_avatar); | ||||||
|         template.find('.avatar').attr('title', item.avatar); |         template.find('.avatar').attr('title', item.avatar); | ||||||
|         template.find('.ch_name').text(item.name); |         template.find('.ch_name').text(item.name); | ||||||
|  |         if (power_user.show_card_avatar_urls) { | ||||||
|             template.find('.ch_avatar_url').text(item.avatar); |             template.find('.ch_avatar_url').text(item.avatar); | ||||||
|  |         } | ||||||
|         template.find('.ch_fav_icon').css("display", 'none'); |         template.find('.ch_fav_icon').css("display", 'none'); | ||||||
|         template.toggleClass('is_fav', item.fav || item.fav == 'true'); |         template.toggleClass('is_fav', item.fav || item.fav == 'true'); | ||||||
|         template.find('.ch_fav').val(item.fav); |         template.find('.ch_fav').val(item.fav); | ||||||
|   | |||||||
| @@ -12,6 +12,7 @@ import { | |||||||
|     eventSource, |     eventSource, | ||||||
|     event_types, |     event_types, | ||||||
|     getCurrentChatId, |     getCurrentChatId, | ||||||
|  |     printCharacters, | ||||||
|     name1, |     name1, | ||||||
|     name2, |     name2, | ||||||
| } from "../script.js"; | } from "../script.js"; | ||||||
| @@ -106,6 +107,7 @@ let power_user = { | |||||||
|     chat_display: chat_styles.DEFAULT, |     chat_display: chat_styles.DEFAULT, | ||||||
|     sheld_width: sheld_width.DEFAULT, |     sheld_width: sheld_width.DEFAULT, | ||||||
|     never_resize_avatars: false, |     never_resize_avatars: false, | ||||||
|  |     show_card_avatar_urls: true, | ||||||
|     play_message_sound: false, |     play_message_sound: false, | ||||||
|     play_sound_unfocused: true, |     play_sound_unfocused: true, | ||||||
|     auto_save_msg_edits: false, |     auto_save_msg_edits: false, | ||||||
| @@ -584,6 +586,7 @@ function loadPowerUserSettings(settings, data) { | |||||||
|     $("#play_message_sound").prop("checked", power_user.play_message_sound); |     $("#play_message_sound").prop("checked", power_user.play_message_sound); | ||||||
|     $("#play_sound_unfocused").prop("checked", power_user.play_sound_unfocused); |     $("#play_sound_unfocused").prop("checked", power_user.play_sound_unfocused); | ||||||
|     $("#never_resize_avatars").prop("checked", power_user.never_resize_avatars); |     $("#never_resize_avatars").prop("checked", power_user.never_resize_avatars); | ||||||
|  |     $("#show_card_avatar_urls").prop("checked", power_user.show_card_avatar_urls); | ||||||
|     $("#auto_save_msg_edits").prop("checked", power_user.auto_save_msg_edits); |     $("#auto_save_msg_edits").prop("checked", power_user.auto_save_msg_edits); | ||||||
|     $("#allow_name1_display").prop("checked", power_user.allow_name1_display); |     $("#allow_name1_display").prop("checked", power_user.allow_name1_display); | ||||||
|     $("#allow_name2_display").prop("checked", power_user.allow_name2_display); |     $("#allow_name2_display").prop("checked", power_user.allow_name2_display); | ||||||
| @@ -1160,6 +1163,11 @@ $(document).ready(() => { | |||||||
|         power_user.never_resize_avatars = !!$(this).prop('checked'); |         power_user.never_resize_avatars = !!$(this).prop('checked'); | ||||||
|         saveSettingsDebounced(); |         saveSettingsDebounced(); | ||||||
|     }); |     }); | ||||||
|  |     $("#show_card_avatar_urls").on('input', function () { | ||||||
|  |         power_user.show_card_avatar_urls = !!$(this).prop('checked'); | ||||||
|  |         printCharacters(); | ||||||
|  |         saveSettingsDebounced(); | ||||||
|  |     }); | ||||||
|      |      | ||||||
|     $("#play_message_sound").on('input', function () { |     $("#play_message_sound").on('input', function () { | ||||||
|         power_user.play_message_sound = !!$(this).prop('checked'); |         power_user.play_message_sound = !!$(this).prop('checked'); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user