|
|
@@ -31,8 +31,10 @@
|
|
|
|
#admin-content article > .admin-story-reply { display: none; }
|
|
|
|
#admin-content article > .admin-story-reply { display: none; }
|
|
|
|
#admin-content .admin-simple-conversation > h2,
|
|
|
|
#admin-content .admin-simple-conversation > h2,
|
|
|
|
#admin-content .admin-simple-conversation > p:not(.admin-story-empty),
|
|
|
|
#admin-content .admin-simple-conversation > p:not(.admin-story-empty),
|
|
|
|
#admin-content .admin-simple-conversation article > :not(.admin-story-reply) { display: none; }
|
|
|
|
#admin-content .admin-simple-conversation article > :not(.admin-story-player):not(.admin-story-reply) { display: none; }
|
|
|
|
|
|
|
|
#admin-content .admin-simple-conversation article > .admin-story-player,
|
|
|
|
#admin-content .admin-simple-conversation article > .admin-story-reply { display: block; margin-block: .85rem; white-space: pre-wrap; }
|
|
|
|
#admin-content .admin-simple-conversation article > .admin-story-reply { display: block; margin-block: .85rem; white-space: pre-wrap; }
|
|
|
|
|
|
|
|
#admin-content .admin-simple-conversation article > .admin-story-player { font-weight: 650; }
|
|
|
|
#admin-content pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 32rem; overflow: auto; }
|
|
|
|
#admin-content pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 32rem; overflow: auto; }
|
|
|
|
#admin-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem; }
|
|
|
|
#admin-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem; }
|
|
|
|
#player-search { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
|
|
|
|
#player-search { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
|
|
|
@@ -717,7 +719,11 @@
|
|
|
|
let showedPlayerInput = false;
|
|
|
|
let showedPlayerInput = false;
|
|
|
|
for (const event of group.events) {
|
|
|
|
for (const event of group.events) {
|
|
|
|
const payload = event.payload || {};
|
|
|
|
const payload = event.payload || {};
|
|
|
|
if (payload.player_message) { adminElement('p', `Spelaren: ${payload.player_message}`, card); showedPlayerInput = true; }
|
|
|
|
if (payload.player_message) {
|
|
|
|
|
|
|
|
const playerLine = adminElement('p', `Spelaren: ${payload.player_message}`, card);
|
|
|
|
|
|
|
|
playerLine.className = 'admin-story-player';
|
|
|
|
|
|
|
|
showedPlayerInput = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
const reply = payload.reply || payload.npc_reply;
|
|
|
|
const reply = payload.reply || payload.npc_reply;
|
|
|
|
if (reply) {
|
|
|
|
if (reply) {
|
|
|
|
const story = adminElement('p', `Berättelsen: ${reply}`, card);
|
|
|
|
const story = adminElement('p', `Berättelsen: ${reply}`, card);
|
|
|
@@ -738,9 +744,15 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!showedPlayerInput) {
|
|
|
|
if (!showedPlayerInput) {
|
|
|
|
const failedTurnInput = [...group.interactions].reverse().map(latestPlayerText).find(Boolean);
|
|
|
|
const failedTurnInput = [...group.interactions].reverse().map(latestPlayerText).find(Boolean);
|
|
|
|
if (failedTurnInput) adminElement('p', `Spelaren: ${failedTurnInput}`, card);
|
|
|
|
if (failedTurnInput) {
|
|
|
|
|
|
|
|
const playerLine = adminElement('p', `Spelaren: ${failedTurnInput}`, card);
|
|
|
|
|
|
|
|
playerLine.className = 'admin-story-player';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (const message of group.messages) {
|
|
|
|
|
|
|
|
const playerLine = adminElement('p', `Spelare: ${message.message}`, card);
|
|
|
|
|
|
|
|
playerLine.className = 'admin-story-player';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (const message of group.messages) adminElement('p', `Spelarmeddelande: ${message.message}`, card);
|
|
|
|
|
|
|
|
for (const interaction of group.interactions) {
|
|
|
|
for (const interaction of group.interactions) {
|
|
|
|
if (!interaction.response) continue;
|
|
|
|
if (!interaction.response) continue;
|
|
|
|
const button = adminElement('button', `AI-svar · ${interaction.prompt_id} · ${interaction.outcome}: ${interaction.response}`, card);
|
|
|
|
const button = adminElement('button', `AI-svar · ${interaction.prompt_id} · ${interaction.outcome}: ${interaction.response}`, card);
|
|
|
|