diff --git a/src/facilities/pit/pit.js b/src/facilities/pit/pit.js index 4b377f034145e3b5eb4e5029b2d91d2c384f21e1..15f070c61c0f214e7e1c207a08b847bd1a4c3c14 100644 --- a/src/facilities/pit/pit.js +++ b/src/facilities/pit/pit.js @@ -69,8 +69,8 @@ App.Facilities.Pit.pit = function() { if (V.pit.slavesFighting !== null) { const [slave1, slave2] = V.pit.slavesFighting; - el.append(`You have scheduled `, App.UI.DOM.slaveDescriptionDialog(getSlave(slave1)), ` and `, - contextualIntro(getSlave(slave1), getSlave(slave2), true), " to fight this week."); + el.append(`You have scheduled `, App.UI.DOM.referenceSlaveWithPreview(getSlave(slave1), SlaveFullName(getSlave(slave1))), ` and `, + App.UI.DOM.referenceSlaveWithPreview(getSlave(slave2), SlaveFullName(getSlave(slave2))), " to fight this week."); App.UI.DOM.appendNewElement("div", el, App.UI.DOM.link(`Cancel it`, () => { V.pit.slavesFighting = null; diff --git a/src/facilities/pit/pitWorkaround.js b/src/facilities/pit/pitWorkaround.js index f0a40dcb0a08232190beb1e9967bc8f2239dbecd..b4f8fe0bcdc7401360f7a5de5f00c28ed95e488c 100644 --- a/src/facilities/pit/pitWorkaround.js +++ b/src/facilities/pit/pitWorkaround.js @@ -24,21 +24,23 @@ App.Facilities.Pit.workaround = function() { ); for (const slave of V.slaves) { + const div = document.createElement("div"); if (V.pit.slavesFighting.includes(slave.ID)) { - App.UI.DOM.appendNewElement("div", f, SlaveFullName(slave), ['indent']); + div.append("Assign"); } else { - App.UI.DOM.appendNewElement("div", f, App.UI.DOM.link(SlaveFullName(slave), () => { + div.append(App.UI.DOM.link("Assign", () => { if (V.pit.slavesFighting.length > 1) { V.pit.slavesFighting.shift(); } - V.pit.slavesFighting.push(slave.ID); - V.passageSwitchHandler = () => { }; + V.passageSwitchHandler = () => { + }; App.UI.reload(); - V.passageSwitchHandler = passageHandler; - }), ['indent']); + })); } + div.append(" ", App.UI.DOM.referenceSlaveWithPreview(slave, SlaveFullName(slave))); + f.append(div); } function passageHandler() {