mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Mobile prompt itemization - duh
- Make it into a popup. There is no space
This commit is contained in:
@ -5577,7 +5577,7 @@ async function promptItemize(itemizedPrompts, requestedMesId) {
|
||||
toastr.info(t`Copied!`);
|
||||
});
|
||||
|
||||
popup.dlg.querySelector('#showRawPrompt').addEventListener('click', function () {
|
||||
popup.dlg.querySelector('#showRawPrompt').addEventListener('click', async function () {
|
||||
//console.log(itemizedPrompts[PromptArrayItemForRawPromptDisplay].rawPrompt);
|
||||
console.log(PromptArrayItemForRawPromptDisplay);
|
||||
console.log(itemizedPrompts);
|
||||
@ -5585,6 +5585,17 @@ async function promptItemize(itemizedPrompts, requestedMesId) {
|
||||
|
||||
const rawPrompt = flatten(itemizedPrompts[PromptArrayItemForRawPromptDisplay].rawPrompt);
|
||||
|
||||
// Mobile needs special handholding. The side-view on the popup wouldn't work,
|
||||
// so we just show an additional popup for this.
|
||||
if (isMobile()) {
|
||||
const content = document.createElement('div');
|
||||
content.classList.add('tokenItemizingMaintext');
|
||||
content.innerText = rawPrompt;
|
||||
const popup = new Popup(content, POPUP_TYPE.TEXT, null, { allowVerticalScrolling: true, leftAlign: true });
|
||||
await popup.show();
|
||||
return;
|
||||
}
|
||||
|
||||
//let DisplayStringifiedPrompt = JSON.stringify(itemizedPrompts[PromptArrayItemForRawPromptDisplay].rawPrompt).replace(/\n+/g, '<br>');
|
||||
const rawPromptWrapper = document.getElementById('rawPromptWrapper');
|
||||
rawPromptWrapper.innerText = rawPrompt;
|
||||
|
Reference in New Issue
Block a user