#1128 Auto-Expand Message Actions
This commit is contained in:
parent
ece34dc337
commit
688551ffa6
|
@ -360,3 +360,11 @@ body.movingUI #groupMemberListPopout {
|
||||||
body.noShadows * {
|
body.noShadows * {
|
||||||
text-shadow: none !important;
|
text-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.expandMessageActions .mes .mes_buttons .extraMesButtons {
|
||||||
|
display: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.expandMessageActions .mes .mes_buttons .extraMesButtonsHint {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
|
@ -2889,6 +2889,11 @@
|
||||||
<span data-i18n="Waifu Mode">Visual Novel Mode</span>
|
<span data-i18n="Waifu Mode">Visual Novel Mode</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<label for="expandMessageActions" class="checkbox_label">
|
||||||
|
<input id="expandMessageActions" type="checkbox" />
|
||||||
|
<span data-i18n="Auto-Expand Message Actions">Auto-Expand Message Actions</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
<label for="messageTimerEnabled" class="checkbox_label">
|
<label for="messageTimerEnabled" class="checkbox_label">
|
||||||
<input id="messageTimerEnabled" type="checkbox" />
|
<input id="messageTimerEnabled" type="checkbox" />
|
||||||
<span data-i18n="Message Timer">Message Timer</span>
|
<span data-i18n="Message Timer">Message Timer</span>
|
||||||
|
|
|
@ -152,6 +152,7 @@ let power_user = {
|
||||||
mesIDDisplay_enabled: false,
|
mesIDDisplay_enabled: false,
|
||||||
max_context_unlocked: false,
|
max_context_unlocked: false,
|
||||||
message_token_count_enabled: false,
|
message_token_count_enabled: false,
|
||||||
|
expand_message_actions: false,
|
||||||
prefer_character_prompt: true,
|
prefer_character_prompt: true,
|
||||||
prefer_character_jailbreak: true,
|
prefer_character_jailbreak: true,
|
||||||
quick_continue: false,
|
quick_continue: false,
|
||||||
|
@ -235,6 +236,7 @@ const storage_keys = {
|
||||||
timestamp_model_icon: 'TimestampModelIcon',
|
timestamp_model_icon: 'TimestampModelIcon',
|
||||||
mesIDDisplay_enabled: 'mesIDDisplayEnabled',
|
mesIDDisplay_enabled: 'mesIDDisplayEnabled',
|
||||||
message_token_count_enabled: 'MessageTokenCountEnabled',
|
message_token_count_enabled: 'MessageTokenCountEnabled',
|
||||||
|
expand_message_actions: 'ExpandMessageActions',
|
||||||
};
|
};
|
||||||
|
|
||||||
let browser_has_focus = true;
|
let browser_has_focus = true;
|
||||||
|
@ -368,6 +370,13 @@ function switchTokenCount() {
|
||||||
$("#messageTokensEnabled").prop("checked", power_user.message_token_count_enabled);
|
$("#messageTokensEnabled").prop("checked", power_user.message_token_count_enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function switchMessageActions() {
|
||||||
|
const value = localStorage.getItem(storage_keys.expand_message_actions);
|
||||||
|
power_user.expand_message_actions = value === null ? false : value == "true";
|
||||||
|
$("body").toggleClass("expandMessageActions", power_user.expand_message_actions);
|
||||||
|
$("#expandMessageActions").prop("checked", power_user.expand_message_actions);
|
||||||
|
}
|
||||||
|
|
||||||
function switchMesIDDisplay() {
|
function switchMesIDDisplay() {
|
||||||
const value = localStorage.getItem(storage_keys.mesIDDisplay_enabled);
|
const value = localStorage.getItem(storage_keys.mesIDDisplay_enabled);
|
||||||
power_user.mesIDDisplay_enabled = value === null ? true : value == "true";
|
power_user.mesIDDisplay_enabled = value === null ? true : value == "true";
|
||||||
|
@ -662,6 +671,13 @@ async function applyTheme(name) {
|
||||||
switchMesIDDisplay();
|
switchMesIDDisplay();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'expand_message_actions',
|
||||||
|
action: async () => {
|
||||||
|
localStorage.setItem(storage_keys.expand_message_actions, String(power_user.expand_message_actions));
|
||||||
|
switchMessageActions();
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'hotswap_enabled',
|
key: 'hotswap_enabled',
|
||||||
action: async () => {
|
action: async () => {
|
||||||
|
@ -733,6 +749,7 @@ switchTimestamps();
|
||||||
switchIcons();
|
switchIcons();
|
||||||
switchMesIDDisplay();
|
switchMesIDDisplay();
|
||||||
switchTokenCount();
|
switchTokenCount();
|
||||||
|
switchMessageActions();
|
||||||
|
|
||||||
function loadPowerUserSettings(settings, data) {
|
function loadPowerUserSettings(settings, data) {
|
||||||
// Load from settings.json
|
// Load from settings.json
|
||||||
|
@ -2106,6 +2123,13 @@ $(document).ready(() => {
|
||||||
switchTokenCount();
|
switchTokenCount();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#expandMessageActions").on("input", function () {
|
||||||
|
const value = !!$(this).prop('checked');
|
||||||
|
power_user.expand_message_actions = value;
|
||||||
|
localStorage.setItem(storage_keys.expand_message_actions, String(power_user.expand_message_actions));
|
||||||
|
switchMessageActions();
|
||||||
|
});
|
||||||
|
|
||||||
$("#mesIDDisplayEnabled").on("input", function () {
|
$("#mesIDDisplayEnabled").on("input", function () {
|
||||||
const value = !!$(this).prop('checked');
|
const value = !!$(this).prop('checked');
|
||||||
power_user.mesIDDisplay_enabled = value;
|
power_user.mesIDDisplay_enabled = value;
|
||||||
|
|
Loading…
Reference in New Issue