mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix edit button being shown for chat history and examples
This commit is contained in:
@ -692,9 +692,7 @@ PromptManagerModule.prototype.isPromptDeletionAllowed = function (prompt) {
|
|||||||
* @returns {boolean} True if the prompt can be edited, false otherwise.
|
* @returns {boolean} True if the prompt can be edited, false otherwise.
|
||||||
*/
|
*/
|
||||||
PromptManagerModule.prototype.isPromptEditAllowed = function (prompt) {
|
PromptManagerModule.prototype.isPromptEditAllowed = function (prompt) {
|
||||||
if (prompt.identifier === 'chatHistory') return true;
|
return !prompt.marker;
|
||||||
else if (prompt.identifier === 'dialogueExamples') return true;
|
|
||||||
else return !prompt.marker;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1220,7 +1218,7 @@ PromptManagerModule.prototype.renderPromptManagerListItems = function () {
|
|||||||
<span title="detach" class="prompt-manager-detach-action caution fa-solid fa-chain-broken"></span>
|
<span title="detach" class="prompt-manager-detach-action caution fa-solid fa-chain-broken"></span>
|
||||||
`;
|
`;
|
||||||
} else {
|
} else {
|
||||||
detachSpanHtml = `<span class="fa-solid"> </span>`;
|
detachSpanHtml = `<span class="fa-solid"></span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
let editSpanHtml = '';
|
let editSpanHtml = '';
|
||||||
@ -1229,7 +1227,7 @@ PromptManagerModule.prototype.renderPromptManagerListItems = function () {
|
|||||||
<span title="edit" class="prompt-manager-edit-action fa-solid fa-pencil"></span>
|
<span title="edit" class="prompt-manager-edit-action fa-solid fa-pencil"></span>
|
||||||
`;
|
`;
|
||||||
} else {
|
} else {
|
||||||
editSpanHtml = `<span class="fa-solid"> </span>`;
|
editSpanHtml = `<span class="fa-solid"></span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
let toggleSpanHtml = '';
|
let toggleSpanHtml = '';
|
||||||
@ -1238,7 +1236,7 @@ PromptManagerModule.prototype.renderPromptManagerListItems = function () {
|
|||||||
<span class="prompt-manager-toggle-action ${listEntry.enabled ? 'fa-solid fa-toggle-on' : 'fa-solid fa-toggle-off'}"></span>
|
<span class="prompt-manager-toggle-action ${listEntry.enabled ? 'fa-solid fa-toggle-on' : 'fa-solid fa-toggle-off'}"></span>
|
||||||
`;
|
`;
|
||||||
} else {
|
} else {
|
||||||
toggleSpanHtml = `<span class="fa-solid"> </span>`;
|
toggleSpanHtml = `<span class="fa-solid"></span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
listItemHtml += `
|
listItemHtml += `
|
||||||
|
Reference in New Issue
Block a user