This commit is contained in:
SillyLossy
2023-04-13 21:50:24 +03:00
69 changed files with 163 additions and 246 deletions

View File

@@ -203,16 +203,18 @@ function RA_checkOnlineStatus() {
$("#send_textarea").attr("placeholder", "Not connected to API!"); //Input bar placeholder tells users they are not connected
$("#send_form").addClass('no-connection'); //entire input form area is red when not connected
$("#send_but").css("display", "none"); //send button is hidden when not connected;
$("#API-status-top").addClass("redOverlayGlow");
$("#API-status-top").removeClass("fa-plug");
$("#API-status-top").addClass("fa-plug-circle-exclamation redOverlayGlow");
connection_made = false;
} else {
if (online_status !== undefined && online_status !== "no_connection") {
$("#send_textarea").attr("placeholder", "Type a message..."); //on connect, placeholder tells user to type message
const formColor = power_user.fast_ui_mode ? "var(--black90a)" : "var(--black60a)";
const formColor = power_user.fast_ui_mode ? "var(--SmartThemeFastUIBGColor)" : "var(--SmartThemeBlurTintColor)";
/* console.log("RA-AC -- connected, coloring input as " + formColor); */
$('#send_form').removeClass("no-connection");
$("#send_form").css("background-color", formColor); //on connect, form BG changes to transprent black
$("#API-status-top").removeClass("redOverlayGlow");
$("#API-status-top").removeClass("fa-plug-circle-exclamation redOverlayGlow");
$("#API-status-top").addClass("fa-plug");
connection_made = true;
retry_delay = 100;
RA_AC_retries = 1;

View File

@@ -7,13 +7,13 @@ const UPDATE_INTERVAL = 1000;
function setDiceIcon() {
const sendButton = document.getElementById('roll_dice');
sendButton.style.backgroundImage = `url(/img/dice-solid.svg)`;
/* sendButton.style.backgroundImage = `url(/img/dice-solid.svg)`; */
sendButton.classList.remove('spin');
}
async function doDiceRoll() {
let value = $(this).data('value');
if (value == 'custom') {
value = await callPopup('Enter the dice formula:<br><i>(for example, <tt>2d6</tt>)</i>', 'input');
}
@@ -29,7 +29,7 @@ async function doDiceRoll() {
function addDiceRollButton() {
const buttonHtml = `
<input id="roll_dice" type="button" />
<div id="roll_dice" class="fa-solid fa-dice" /></div>
<div id="dice_dropdown">
<ul class="list-group">
<li class="list-group-item" data-value="d4">d4</li>

View File

@@ -3,6 +3,7 @@
width: 40px;
height: 40px;
margin: 0;
margin-right: 5px;
padding: 1px;
background: no-repeat;
background-size: 26px auto;
@@ -11,10 +12,10 @@
border: none;
cursor: pointer;
transition: 0.3s;
filter: invert(1);
font-size: 30px;
opacity: 0.5;
}
#roll_dice:hover {
opacity: 1;
}
}

View File

@@ -237,7 +237,7 @@ function onClickExpressionImage() {
<div class="inline-drawer">
<div class="inline-drawer-toggle inline-drawer-header">
<b>View supported images</b>
<div class="inline-drawer-icon down"></div>
<div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
</div>
<div class="inline-drawer-content">
<p class="offline_mode">You are in offline mode. Click on the image below to set the expression.</p>

View File

@@ -95,13 +95,13 @@ async function moduleWorker() {
$('#extension_floating_counter').text(shouldAddPrompt ? 'This' : messagesTillInsertion);
}
(function() {
(function () {
function addExtensionsSettings() {
const settingsHtml = `
<h4>Author's Note / Character Bias</h4>
<div class="floating_prompt_settings">
<label for="extension_floating_prompt">Append the following text:</label>
<textarea id="extension_floating_prompt" class="text_pole" rows="2"></textarea>
<textarea id="extension_floating_prompt" class="text_pole" rows="8"></textarea>
<label>
<input type="radio" name="extension_floating_position" value="0" />
After scenario
@@ -119,11 +119,11 @@ async function moduleWorker() {
<div class="inline-drawer">
<div class="inline-drawer-toggle inline-drawer-header">
<b>Default note for new chats</b>
<div class="inline-drawer-icon down"></div>
<div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
</div>
<div class="inline-drawer-content">
<label for="extension_floating_default">Default Author's Note</label>
<textarea id="extension_floating_default" class="text_pole" rows="3"
<textarea id="extension_floating_default" class="text_pole" rows="8"
placeholder="Example:\n[Scenario: wacky adventures; Genre: romantic comedy; Style: verbose, creative]"></textarea>
</div>
</div>

View File

@@ -84,11 +84,11 @@ function onBotChange() {
async function generatePoe(finalPrompt) {
if (poe_settings.auto_purge) {
let count_to_delete = -1;
if (auto_jailbroken && got_reply) {
count_to_delete = 2;
}
await purgeConversation(count_to_delete);
}
@@ -196,7 +196,7 @@ async function onConnectClick() {
setButtonState(true);
is_get_status_poe = true;
try {
await checkStatusPoe();
}
@@ -208,7 +208,7 @@ async function onConnectClick() {
function setButtonState(value) {
is_poe_button_press = value;
$("#api_loading_poe").css("display", value ? 'block' : 'none');
$("#api_loading_poe").css("display", value ? 'inline-block' : 'none');
$("#poe_connect").css("display", value ? 'none' : 'block');
}

View File

@@ -151,22 +151,22 @@ async function applyThemeColor(type) {
if (type === 'main') {
document.documentElement.style.setProperty('--SmartThemeBodyColor', power_user.main_text_color);
console.log($MainTextColorPicker.color);
}
if (type === 'italics') {
document.documentElement.style.setProperty('--SmartThemeEmColor', power_user.italics_text_color);
console.log($ItalicsTextColorPicker.color);
}
if (type === 'fastUIBG') {
document.documentElement.style.setProperty('--SmartThemeFastUIBGColor', power_user.fastui_bg_color);
console.log($FastUIBGColorPicker.color);
}
if (type === 'blurTint') {
document.documentElement.style.setProperty('--SmartThemeBlurTintColor', power_user.blur_tint_color);
console.log($BlurTintColorPicker.color);
}
// a small delay to let the browser do the layout redraw