mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-04-13 18:32:05 +02:00
lint: Use 4 space indent
This commit is contained in:
parent
c63cd87cc0
commit
08fedf3a96
@ -54,6 +54,7 @@ module.exports = {
|
|||||||
'require-yield': 'off',
|
'require-yield': 'off',
|
||||||
'quotes': ['error', 'single'],
|
'quotes': ['error', 'single'],
|
||||||
'semi': ['error', 'always'],
|
'semi': ['error', 'always'],
|
||||||
|
'indent': ['error', 4, { SwitchCase: 1, FunctionDeclaration: { parameters: 'first' } }],
|
||||||
|
|
||||||
// These rules should eventually be enabled.
|
// These rules should eventually be enabled.
|
||||||
'no-async-promise-executor': 'off',
|
'no-async-promise-executor': 'off',
|
||||||
|
@ -1379,6 +1379,11 @@ PromptManagerModule.prototype.renderPromptManager = function () {
|
|||||||
footerDiv.querySelector('.menu_button:last-child').addEventListener('click', this.handleNewPrompt);
|
footerDiv.querySelector('.menu_button:last-child').addEventListener('click', this.handleNewPrompt);
|
||||||
|
|
||||||
// Add prompt export dialogue and options
|
// Add prompt export dialogue and options
|
||||||
|
const exportForCharacter =`
|
||||||
|
<div class="row">
|
||||||
|
<a class="export-promptmanager-prompts-character list-group-item" data-i18n="Export for character">Export for character</a>
|
||||||
|
<span class="tooltip fa-solid fa-info-circle" title="Export prompts for this character, including their order."></span>
|
||||||
|
</div>`;
|
||||||
const exportPopup = `
|
const exportPopup = `
|
||||||
<div id="prompt-manager-export-format-popup" class="list-group">
|
<div id="prompt-manager-export-format-popup" class="list-group">
|
||||||
<div class="prompt-manager-export-format-popup-flex">
|
<div class="prompt-manager-export-format-popup-flex">
|
||||||
@ -1386,14 +1391,7 @@ PromptManagerModule.prototype.renderPromptManager = function () {
|
|||||||
<a class="export-promptmanager-prompts-full list-group-item" data-i18n="Export all">Export all</a>
|
<a class="export-promptmanager-prompts-full list-group-item" data-i18n="Export all">Export all</a>
|
||||||
<span class="tooltip fa-solid fa-info-circle" title="Export all your prompts to a file"></span>
|
<span class="tooltip fa-solid fa-info-circle" title="Export all your prompts to a file"></span>
|
||||||
</div>
|
</div>
|
||||||
${'global' === this.configuration.promptOrder.strategy
|
${'global' === this.configuration.promptOrder.strategy ? '' : exportForCharacter }
|
||||||
? ''
|
|
||||||
: `<div class="row">
|
|
||||||
<a class="export-promptmanager-prompts-character list-group-item" data-i18n="Export for character">Export
|
|
||||||
for character</a>
|
|
||||||
<span class="tooltip fa-solid fa-info-circle"
|
|
||||||
title="Export prompts for this character, including their order."></span>
|
|
||||||
</div>` }
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
@ -358,8 +358,7 @@ export function stringFormat(format) {
|
|||||||
return format.replace(/{(\d+)}/g, function (match, number) {
|
return format.replace(/{(\d+)}/g, function (match, number) {
|
||||||
return typeof args[number] != 'undefined'
|
return typeof args[number] != 'undefined'
|
||||||
? args[number]
|
? args[number]
|
||||||
: match
|
: match;
|
||||||
;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2098,17 +2098,15 @@ export function checkEmbeddedWorld(chid) {
|
|||||||
localStorage.setItem(checkKey, 1);
|
localStorage.setItem(checkKey, 1);
|
||||||
|
|
||||||
if (power_user.world_import_dialog) {
|
if (power_user.world_import_dialog) {
|
||||||
callPopup(`<h3>This character has an embedded World/Lorebook.</h3>
|
const html = `<h3>This character has an embedded World/Lorebook.</h3>
|
||||||
<h3>Would you like to import it now?</h3>
|
<h3>Would you like to import it now?</h3>
|
||||||
<div class="m-b-1">If you want to import it later, select "Import Card Lore" in the "More..." dropdown menu on the character panel.</div>`,
|
<div class="m-b-1">If you want to import it later, select "Import Card Lore" in the "More..." dropdown menu on the character panel.</div>`;
|
||||||
'confirm',
|
const checkResult = (result) => {
|
||||||
'',
|
|
||||||
{ okButton: 'Yes', })
|
|
||||||
.then((result) => {
|
|
||||||
if (result) {
|
if (result) {
|
||||||
importEmbeddedWorldInfo(true);
|
importEmbeddedWorldInfo(true);
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
callPopup(html, 'confirm', '', { okButton: 'Yes', }).then(checkResult);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
toastr.info(
|
toastr.info(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user