diff --git a/static/script.js b/static/script.js
index 6f3f1a1..c359c53 100644
--- a/static/script.js
+++ b/static/script.js
@@ -2115,6 +2115,10 @@ function renderLineupRow(row) {
${actionsHtml} |
`;
}
+
+
+
+
function makeDraggable(el) {
let dragging = false;
diff --git a/static/styles.css b/static/styles.css
index effc09e..d8c0d42 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -2260,4 +2260,35 @@ body:not(.edit-mode-on) .referee-search {
.coach-link-btn:hover .coach-name,
.coach-left:hover .coach-name {
color: #a9c7ff;
+}
+
+.player-link-btn {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin: 0;
+ border: none;
+ background: transparent;
+ color: inherit;
+ text-align: left;
+ cursor: pointer;
+ font: inherit;
+}
+
+.player-link-btn .last-name,
+.player-link-btn .first-name {
+ color: #8ab4ff;
+ text-decoration: underline;
+ text-underline-offset: 2px;
+}
+
+.player-link-btn:hover .last-name,
+.player-link-btn:hover .first-name {
+ color: #a9c7ff;
+}
+
+.player-link-btn:focus-visible {
+ outline: 2px solid rgba(138, 180, 255, 0.45);
+ outline-offset: 2px;
+ border-radius: 6px;
}
\ No newline at end of file
diff --git a/templates/match_workspace.html b/templates/match_workspace.html
index 233090e..f551bd3 100644
--- a/templates/match_workspace.html
+++ b/templates/match_workspace.html
@@ -1495,6 +1495,14 @@
return;
}
+ function swapNameParts(rawName) {
+ const parts = String(rawName || "").trim().split(/\s+/).filter(Boolean);
+ if (parts.length >= 2) {
+ return `${parts[1]} ${parts[0]}`;
+ }
+ return String(rawName || "").trim();
+ }
+
async function sendNeutralPersonTitle(name, role, logoUrl) {
const inputName = "ИГРОК - НЕЙТРАЛЬНЫЙ";
@@ -1540,14 +1548,15 @@
const trigger = event.target.closest(".vmix-person-trigger");
if (!trigger) return;
- const side = trigger.dataset.side;
- const name = (trigger.dataset.name || "").trim();
+ const side = (trigger.dataset.side || "").trim();
+ const rawName = (trigger.dataset.name || "").trim();
const role = (trigger.dataset.role || "").trim();
const logoUrl = side === "away" ? teamLogos.away : teamLogos.home;
- if (!name) return;
+ if (!rawName) return;
- sendNeutralPersonTitle(name, role, logoUrl);
+ const formattedName = swapNameParts(rawName);
+ sendNeutralPersonTitle(formattedName, role, logoUrl);
});
})();