diff --git a/public/script.js b/public/script.js index e95f4a769..8421d264c 100644 --- a/public/script.js +++ b/public/script.js @@ -1500,9 +1500,9 @@ async function Generate(type, automatic_trigger, force_name2) { } const blockHeading = main_api === 'openai' ? '' : // OpenAI handler always expects it - power_user.custom_chat_separator ? power_user.custom_chat_separator : - power_user.disable_examples_formatting ? '' : - is_pygmalion ? '' : `This is how ${name2} should talk`; + power_user.custom_chat_separator ? power_user.custom_chat_separator : + power_user.disable_examples_formatting ? '' : + is_pygmalion ? '' : `This is how ${name2} should talk`; let mesExamplesArray = mesExamples.split(//gi).slice(1).map(block => `${blockHeading}\n${block.trim()}\n`); if (main_api === 'openai') { @@ -3351,7 +3351,7 @@ function read_bg_load(input) { setBackground(html); $("#bg1").css( "background-image", - `url(${e.target.result})` + `url("${e.target.result}")` ); $("#form_bg_download").after( `
diff --git a/public/style.css b/public/style.css index 05e0813f0..808168003 100644 --- a/public/style.css +++ b/public/style.css @@ -180,7 +180,7 @@ code { } #bg1 { - background-image: url(backgrounds/tavern1.jpg); + background-image: url('backgrounds/tavern day.jpg'); z-index: -2; } diff --git a/server.js b/server.js index 1afe69866..d60d63408 100644 --- a/server.js +++ b/server.js @@ -959,7 +959,7 @@ app.post("/getuseravatars", jsonParser, function (request, response) { }); app.post("/setbackground", jsonParser, function (request, response) { - var bg = "#bg1 {background-image: url(../backgrounds/" + request.body.bg + ");}"; + var bg = "#bg1 {background-image: url('../backgrounds/" + request.body.bg + "');}"; fs.writeFile('public/css/bg_load.css', bg, 'utf8', function (err) { if (err) { response.send(err); @@ -1471,14 +1471,14 @@ app.post("/importcharacter", urlencodedParser, async function (request, response jsonData.name = sanitize(jsonData.name); png_name = getPngName(jsonData.name); - let char = { "name": jsonData.name, "description": jsonData.description ?? '', "personality": jsonData.personality ?? '', "first_mes": jsonData.first_mes ?? '', "avatar": 'none', "chat": humanizedISO8601DateTime(), "mes_example": jsonData.mes_example ?? '', "scenario": jsonData.scenario ?? '', "create_date": humanizedISO8601DateTime(), "talkativeness": jsonData.talkativeness ?? 0.5 }; + let char = { "name": jsonData.name, "description": jsonData.description ?? '', "personality": jsonData.personality ?? '', "first_mes": jsonData.first_mes ?? '', "avatar": 'none', "chat": jsonData.name + " - " + humanizedISO8601DateTime(), "mes_example": jsonData.mes_example ?? '', "scenario": jsonData.scenario ?? '', "create_date": humanizedISO8601DateTime(), "talkativeness": jsonData.talkativeness ?? 0.5 }; char = JSON.stringify(char); charaWrite('./public/img/ai4.png', char, png_name, response, { file_name: png_name }); } else if (jsonData.char_name !== undefined) {//json Pygmalion notepad jsonData.char_name = sanitize(jsonData.char_name); png_name = getPngName(jsonData.char_name); - let char = { "name": jsonData.char_name, "description": jsonData.char_persona ?? '', "personality": '', "first_mes": jsonData.char_greeting ?? '', "avatar": 'none', "chat": humanizedISO8601DateTime(), "mes_example": jsonData.example_dialogue ?? '', "scenario": jsonData.world_scenario ?? '', "create_date": humanizedISO8601DateTime(), "talkativeness": jsonData.talkativeness ?? 0.5 }; + let char = { "name": jsonData.char_name, "description": jsonData.char_persona ?? '', "personality": '', "first_mes": jsonData.char_greeting ?? '', "avatar": 'none', "chat": jsonData.name + " - " + humanizedISO8601DateTime(), "mes_example": jsonData.example_dialogue ?? '', "scenario": jsonData.world_scenario ?? '', "create_date": humanizedISO8601DateTime(), "talkativeness": jsonData.talkativeness ?? 0.5 }; char = JSON.stringify(char); charaWrite('./public/img/ai4.png', char, png_name, response, { file_name: png_name }); } else { @@ -1501,7 +1501,7 @@ app.post("/importcharacter", urlencodedParser, async function (request, response png_name = getPngName(jsonData.name); if (jsonData.name !== undefined) { - let char = { "name": jsonData.name, "description": jsonData.description ?? '', "personality": jsonData.personality ?? '', "first_mes": jsonData.first_mes ?? '', "avatar": 'none', "chat": humanizedISO8601DateTime(), "mes_example": jsonData.mes_example ?? '', "scenario": jsonData.scenario ?? '', "create_date": humanizedISO8601DateTime(), "talkativeness": jsonData.talkativeness ?? 0.5 }; + let char = { "name": jsonData.name, "description": jsonData.description ?? '', "personality": jsonData.personality ?? '', "first_mes": jsonData.first_mes ?? '', "avatar": 'none', "chat": jsonData.name + " - " + humanizedISO8601DateTime(), "mes_example": jsonData.mes_example ?? '', "scenario": jsonData.scenario ?? '', "create_date": humanizedISO8601DateTime(), "talkativeness": jsonData.talkativeness ?? 0.5 }; char = JSON.stringify(char); await charaWrite(uploadPath, char, png_name, response, { file_name: png_name }); }