Merge branch 'dev' into dev

This commit is contained in:
Cohee
2023-06-28 12:02:34 +03:00
committed by GitHub
4 changed files with 15 additions and 4 deletions

View File

@ -1353,7 +1353,7 @@
</div> </div>
</h4> </h4>
<small class="horde_multiple_hint">You can select multiple models.<br>Avoid sending <small class="horde_multiple_hint">You can select multiple models.<br>Avoid sending
sensitive information to the Horde. <a id="horde_privacy_disclaimer" target="_blank" href="https://docs.sillytavern.app/usage/api-connections/koboldai/">Learn more</a></small> sensitive information to the Horde. <a id="horde_privacy_disclaimer" target="_blank" href="https://docs.sillytavern.app/usage/api-connections/horde/">Learn more</a></small>
<select id="horde_model" multiple> <select id="horde_model" multiple>
<option>-- Horde models not loaded --</option> <option>-- Horde models not loaded --</option>
</select> </select>

View File

@ -21,6 +21,7 @@ import {
import { favsToHotswap, isMobile } from "./RossAscends-mods.js"; import { favsToHotswap, isMobile } from "./RossAscends-mods.js";
import { import {
groups, groups,
resetSelectedGroup,
selected_group, selected_group,
} from "./group-chats.js"; } from "./group-chats.js";
@ -994,6 +995,7 @@ function doNewChat() {
} }
function doRandomChat() { function doRandomChat() {
resetSelectedGroup();
setCharacterId(Math.floor(Math.random() * characters.length)); setCharacterId(Math.floor(Math.random() * characters.length));
setTimeout(() => { setTimeout(() => {
replaceCurrentChat(); replaceCurrentChat();

View File

@ -4249,7 +4249,8 @@ body.no-blur #character_popup,
body.no-blur #world_popup, body.no-blur #world_popup,
body.no-blur #dialogue_popup, body.no-blur #dialogue_popup,
body.no-blur #select_chat_popup, body.no-blur #select_chat_popup,
body.no-blur .drawer-content { body.no-blur .drawer-content,
body.no-blur .select2-results__options {
background-color: black !important; background-color: black !important;
} }
@ -4869,6 +4870,10 @@ body.waifuMode .zoomed_avatar {
padding: 3px 5px; padding: 3px 5px;
} }
.select2-container.select2-container--focus .select2-selection--multiple {
border: 1px solid var(--white30a);
}
.select2-container .select2-selection--multiple .select2-selection__choice { .select2-container .select2-selection--multiple .select2-selection__choice {
border-radius: 5px; border-radius: 5px;
border-style: solid; border-style: solid;
@ -4917,6 +4922,10 @@ body.waifuMode .zoomed_avatar {
border-radius: 2px; border-radius: 2px;
} }
.select2-container .select2-selection--multiple .select2-selection__choice__remove {
color: var(--SmartThemeBodyColor);
}
/* Add the custom checkbox checkmark */ /* Add the custom checkbox checkmark */
.select2-results__option--selected.select2-results__option:before { .select2-results__option--selected.select2-results__option:before {
content: '\2713'; content: '\2713';

View File

@ -822,7 +822,6 @@ function charaFormatData(data) {
// This is supposed to save all the foreign keys that ST doesn't care about // This is supposed to save all the foreign keys that ST doesn't care about
const _ = require('lodash'); const _ = require('lodash');
const char = tryParse(data.json_data) || {}; const char = tryParse(data.json_data) || {};
console.log(data.tags);
// This function uses _.cond() to create a series of conditional checks that return the desired output based on the input data. // This function uses _.cond() to create a series of conditional checks that return the desired output based on the input data.
// It checks if data.alternate_greetings is an array, a string, or neither, and acts accordingly. // It checks if data.alternate_greetings is an array, a string, or neither, and acts accordingly.
@ -1869,10 +1868,11 @@ app.post("/importcharacter", urlencodedParser, async function (request, response
charaWrite(uploadPath, char, png_name, response, { file_name: png_name }); charaWrite(uploadPath, char, png_name, response, { file_name: png_name });
} else if (jsonData.name !== undefined) { } else if (jsonData.name !== undefined) {
console.log('Found a v1 character file.'); console.log('Found a v1 character file.');
console.log(jsonData);
if (jsonData.creator_notes) { if (jsonData.creator_notes) {
jsonData.creator_notes = jsonData.creator_notes.replace("Creator's notes go here.", ""); jsonData.creator_notes = jsonData.creator_notes.replace("Creator's notes go here.", "");
} }
let char = { let char = {
"name": jsonData.name, "name": jsonData.name,
"description": jsonData.description ?? '', "description": jsonData.description ?? '',