diff --git a/public/index.html b/public/index.html index 811138f2e..6fb88abe5 100644 --- a/public/index.html +++ b/public/index.html @@ -1222,7 +1222,7 @@ Trim Incomplete Sentences - + Include Newline @@ -1740,39 +1740,39 @@ - + - - - Send on Enter - - - Always disabled - Automatic (desktop) - Always enabled - - + + + Send on Enter + + + Always disabled + Automatic (desktop) + Always enabled + + - - Auto-swipe - - - + + Auto-swipe + + + - - - Enabled - - Minimum generated message length - - Blacklisted words - - - Blacklisted word count to swipe - + + + Enabled + + Minimum generated message length + + Blacklisted words + + + Blacklisted word count to swipe + + - Name @@ -2477,6 +2477,7 @@ CHAR is typing + @@ -2516,6 +2517,10 @@ Save bookmark + + + Open Author's Note + Convert to group diff --git a/public/script.js b/public/script.js index b93c53a82..fca41f91d 100644 --- a/public/script.js +++ b/public/script.js @@ -1539,7 +1539,7 @@ class StreamingProcessor { setGenerationProgress(0); $('.mes_buttons:last').show(); generatedPromtCache = ''; - + console.log("Generated text size:", text.length, text) if (power_user.auto_swipe) { @@ -5578,6 +5578,27 @@ $(document).ready(function () { $("#options [id]").on("click", function () { var id = $(this).attr("id"); + + if (id == "option_toggle_AN") { + if (selected_group || this_chid !== undefined && $("#floatingPrompt").css("display") === 'none') { + $("#floatingPrompt").css("display", "flex"); + $("#floatingPrompt").css("opacity", 0.0); + $("#floatingPrompt").transition({ + opacity: 1.0, + duration: animation_duration, + easing: animation_easing, + }); + $("#ANBlockToggle").click(); + } else { + $("#floatingPrompt").transition({ + opacity: 0.0, + duration: 250, + easing: animation_easing, + }); + setTimeout(function () { $("#floatingPrompt").hide(); }, 250); + } + } + if (id == "option_select_chat") { if ((selected_group && !is_group_generating) || (this_chid !== undefined && !is_send_press)) { displayPastChats(); diff --git a/public/scripts/RossAscends-mods.js b/public/scripts/RossAscends-mods.js index 952adedd7..651629bcf 100644 --- a/public/scripts/RossAscends-mods.js +++ b/public/scripts/RossAscends-mods.js @@ -106,10 +106,20 @@ function waitForElement(querySelector, timeout) { waitForElement("#expression-image", 10000).then(function () { dragElement(document.getElementById("expression-holder")); + dragElement(document.getElementById("floatingPrompt")); + }).catch(() => { console.log("expression holder not loaded yet"); }); +waitForElement("#floatingPrompt", 10000).then(function () { + + dragElement(document.getElementById("floatingPrompt")); + +}).catch(() => { + console.log("floating prompt box not loaded yet"); +}); + // Device detection const deviceInfo = await getDeviceInfo(); @@ -443,6 +453,7 @@ dragElement(document.getElementById("WorldInfo")); function dragElement(elmnt) { + var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0; if (document.getElementById(elmnt.id + "header")) { //ex: id="sheldheader" // if present, the header is where you move the DIV from, but this overrides everything else: @@ -453,6 +464,7 @@ function dragElement(elmnt) { } function dragMouseDown(e) { + //console.log(e); e = e || window.event; e.preventDefault(); // get the mouse cursor position at startup: diff --git a/public/scripts/extensions/floating-prompt/index.js b/public/scripts/extensions/floating-prompt/index.js index ead3cbd1a..5382df00a 100644 --- a/public/scripts/extensions/floating-prompt/index.js +++ b/public/scripts/extensions/floating-prompt/index.js @@ -100,7 +100,7 @@ async function moduleWorker() { if (lastMessageNumber <= 0 || chat_metadata[metadata_keys.interval] <= 0) { context.setExtensionPrompt(MODULE_NAME, ''); - $('#extension_floating_counter').text('No'); + $('#extension_floating_counter').text('(disabled)'); return; } @@ -110,57 +110,67 @@ async function moduleWorker() { const shouldAddPrompt = messagesTillInsertion == 0; const prompt = shouldAddPrompt ? $('#extension_floating_prompt').val() : ''; context.setExtensionPrompt(MODULE_NAME, prompt, chat_metadata[metadata_keys.position], chat_metadata[metadata_keys.depth]); - $('#extension_floating_counter').text(shouldAddPrompt ? 'This' : messagesTillInsertion); + $('#extension_floating_counter').text(shouldAddPrompt ? '0' : messagesTillInsertion); } (function () { function addExtensionsSettings() { const settingsHtml = ` - - - - Author's Note / Character Bias - - - - - Your notes are saved PER CHAT. When you start a new chat, you'll see the default / empty note. - Saving a bookmark will copy your note to a bookmark chat. Making changes to it won't update the note in a parent chat. - - Append the following text: - - - - - After scenario - - - - In-chat - - - Every N messages you send (set to 0 to disable): - - Insertion depth (for in-chat positioning): - - Appending to the prompt in next: No message(s) - - - - - Default note for new chats - + + + + + + Author's Note + - Default Author's Note - + + Unique to this chat. + Bookmarks inherit the Note from their parent, and can be changed individually after that. + + + + + + + + After scenario + + + + In-chat @ Depth + + + + + Insertion Frequency + + (0 = Disable) + + + User inputs until next insertion: (disabled) + + + + + + + Default Author's Note + + + + Will be automatically added as the Author's Note for all new chats. + + + `; - $('#extensions_settings').append(settingsHtml); + $('#movingDivs').append(settingsHtml); $('#extension_floating_prompt').on('input', onExtensionFloatingPromptInput); $('#extension_floating_interval').on('input', onExtensionFloatingIntervalInput); $('#extension_floating_depth').on('input', onExtensionFloatingDepthInput); diff --git a/public/scripts/extensions/floating-prompt/style.css b/public/scripts/extensions/floating-prompt/style.css index 2537e0487..6844684fa 100644 --- a/public/scripts/extensions/floating-prompt/style.css +++ b/public/scripts/extensions/floating-prompt/style.css @@ -1,4 +1,26 @@ -.floating_prompt_settings { +#floatingPrompt { + overflow-y: auto; + max-width: 90svw; + max-height: 90svh; + min-width: 100px; + min-height: 100px; + border-radius: 10px; + border: 1px solid var(--white30a); + position: fixed; + padding: 10px; + display: none; + flex-direction: column; + box-shadow: 0 0 10px var(--black70a); + z-index: 3000; + left: 0; + top: 0; + margin: 0; + right: unset; + width: calc(((100svw - var(--sheldWidth)) / 2) - 1px); + +} + +.floating_prompt_radio_group { display: flex; flex-direction: column; } @@ -11,9 +33,4 @@ .floating_prompt_settings textarea { font-size: calc(var(--mainFontSize) * 0.9); line-height: 1.2; -} - -.floating_prompt_radio_group { - display: flex; - flex-direction: column; } \ No newline at end of file diff --git a/public/style.css b/public/style.css index f0f48475b..5292201d9 100644 --- a/public/style.css +++ b/public/style.css @@ -845,7 +845,7 @@ select { font-family: "Noto Sans", "Noto Color Emoji", sans-serif; padding: 7px; - width: 100%; + /* width: 100%; */ margin: 5px 0; } @@ -3526,11 +3526,13 @@ label[for="extensions_autoconnect"] { backdrop-filter: blur(calc(var(--SmartThemeBlurStrength))); -webkit-backdrop-filter: blur(calc(var(--SmartThemeBlurStrength))); z-index: 9999 !important; + border: 1px solid var(--white30a); } .fillRight, .fillLeft, -#WorldInfo { +#WorldInfo, +#floatingPrompt { min-width: unset; position: fixed; } @@ -3887,7 +3889,8 @@ body.movingUI .drag-grabber { body.movingUI #sheld, body.movingUI .drawer-content, body.movingUI #expression-holder, -body.movingUI #avatar_zoom_popup { +body.movingUI #avatar_zoom_popup, +body.movingUI #floatingPrompt { resize: both; }