diff --git a/static/script.js b/static/script.js index dbb8b598..9b81558b 100644 --- a/static/script.js +++ b/static/script.js @@ -1562,8 +1562,8 @@ function renderInventoryManaPanel(state) { const stateEl = document.createElement('div'); const stateName = item.mana_state || 'unknown'; - stateEl.className = `inv-mana-state mana-state-${stateName}`; - stateEl.textContent = stateName.replace(/_/g, ' '); + stateEl.className = `inv-mana-state-dot mana-state-${stateName}`; + stateEl.title = stateName.replace(/_/g, ' '); const manaEl = document.createElement('div'); manaEl.className = 'inv-mana-value'; @@ -1641,6 +1641,20 @@ function showInventoryWindow(name) { const sidebar = document.createElement('div'); sidebar.className = 'inv-sidebar'; + const manaPanel = document.createElement('div'); + manaPanel.className = 'inv-mana-panel'; + const manaHeader = document.createElement('div'); + manaHeader.className = 'inv-mana-header'; + manaHeader.textContent = 'Mana'; + const manaSummary = document.createElement('div'); + manaSummary.className = 'inv-mana-summary'; + manaSummary.textContent = 'Mana: loading'; + const manaListBody = document.createElement('div'); + manaListBody.className = 'inv-mana-list'; + manaPanel.appendChild(manaHeader); + manaPanel.appendChild(manaSummary); + manaPanel.appendChild(manaListBody); + const burdenContainer = document.createElement('div'); burdenContainer.className = 'inv-burden-bar'; const burdenFill = document.createElement('div'); @@ -1658,26 +1672,13 @@ function showInventoryWindow(name) { topSection.appendChild(equipGrid); topSection.appendChild(sidebar); + topSection.appendChild(manaPanel); const bottomSection = document.createElement('div'); bottomSection.className = 'inv-bottom-section'; const itemSection = document.createElement('div'); itemSection.className = 'inv-item-section'; - - const manaPanel = document.createElement('div'); - manaPanel.className = 'inv-mana-panel'; - const manaHeader = document.createElement('div'); - manaHeader.className = 'inv-mana-header'; - manaHeader.textContent = 'Mana'; - const manaSummary = document.createElement('div'); - manaSummary.className = 'inv-mana-summary'; - manaSummary.textContent = 'Mana: loading'; - const manaListBody = document.createElement('div'); - manaListBody.className = 'inv-mana-list'; - manaPanel.appendChild(manaHeader); - manaPanel.appendChild(manaSummary); - manaPanel.appendChild(manaListBody); const contentsHeader = document.createElement('div'); contentsHeader.className = 'inv-contents-header'; @@ -1689,7 +1690,6 @@ function showInventoryWindow(name) { itemSection.appendChild(contentsHeader); itemSection.appendChild(itemGrid); bottomSection.appendChild(itemSection); - bottomSection.appendChild(manaPanel); invContent.appendChild(topSection); invContent.appendChild(bottomSection); diff --git a/static/style.css b/static/style.css index 5f013b55..4b2d5efc 100644 --- a/static/style.css +++ b/static/style.css @@ -735,7 +735,7 @@ body.noselect, body.noselect * { position: fixed; top: 100px; left: 400px; - width: 390px; + width: 540px; height: 520px; background: rgba(20, 20, 20, 0.92); backdrop-filter: blur(2px); @@ -760,8 +760,9 @@ body.noselect, body.noselect * { .inv-top-section { display: flex; - justify-content: space-between; + justify-content: flex-start; height: 264px; + gap: 8px; } .inv-equipment-grid { @@ -813,6 +814,7 @@ body.noselect, body.noselect * { align-items: center; gap: 2px; overflow: visible; + flex-shrink: 0; } .inv-burden-bar { @@ -908,17 +910,11 @@ body.noselect, body.noselect * { .inv-bottom-section { flex: 1; display: flex; - flex-direction: row; + flex-direction: column; margin-top: 10px; - margin-right: 52px; + margin-right: 0; overflow: hidden; min-height: 0; - gap: 8px; -} - -.inv-bottom-section > :first-child, -.inv-bottom-section > :nth-child(2) { - flex-shrink: 0; } .inv-contents-header { @@ -952,14 +948,16 @@ body.noselect, body.noselect * { } .inv-mana-panel { - width: 118px; - min-width: 118px; + width: 150px; + min-width: 150px; display: flex; flex-direction: column; background: rgba(6, 10, 18, 0.92); border: 1px solid var(--ac-border-light); padding: 4px; min-height: 0; + height: 100%; + flex-shrink: 0; } .inv-mana-header { @@ -990,62 +988,81 @@ body.noselect, body.noselect * { .inv-mana-row { display: grid; - grid-template-columns: 36px 1fr; - grid-template-rows: auto auto auto; - gap: 1px 6px; + grid-template-columns: 18px 1fr 14px; + grid-template-rows: auto auto; + gap: 1px 4px; align-items: center; background: rgba(18, 24, 34, 0.9); border: 1px solid rgba(255,255,255,0.08); - padding: 3px; + padding: 2px 3px; } .inv-mana-icon { - grid-row: 1 / span 3; - width: 36px; - height: 36px; + grid-row: 1 / span 2; + width: 16px; + height: 16px; } .inv-mana-icon .inventory-slot { - width: 36px; - height: 36px; + width: 16px; + height: 16px; } .inv-mana-name { color: #f2e6c9; - font-size: 10px; - line-height: 1.15; + font-size: 9px; + line-height: 1.05; word-break: break-word; + grid-column: 2; + grid-row: 1; } -.inv-mana-state, .inv-mana-value, .inv-mana-time { - font-size: 10px; + font-size: 9px; line-height: 1.1; } .inv-mana-value { color: #98d7ff; + grid-column: 2; + grid-row: 2; } .inv-mana-time { color: #cfe6a0; + grid-column: 3; + grid-row: 2; + text-align: right; +} + +.inv-mana-state-dot { + grid-column: 3; + grid-row: 1; + width: 10px; + height: 10px; + border-radius: 50%; + justify-self: end; + align-self: start; + background: #97a1ad; + border: 1px solid rgba(0,0,0,0.65); + box-shadow: inset 0 0 1px rgba(255,255,255,0.2); } .mana-state-active { - color: #76d17f; + background: #76d17f; } .mana-state-not_active { - color: #ff8e6f; + background: #ff8e6f; } .mana-state-unknown { - color: #d4c27a; + background: #d4c27a; } .mana-state-not_activatable { - color: #97a1ad; + background: #97a1ad; } .inv-mana-empty { @@ -2390,6 +2407,72 @@ table.ts-allegiance td:first-child { border: 2px solid #8a7a44 !important; background: #0e0c08 !important; resize: none !important; + width: 540px !important; +} + +.inv-top-section { + justify-content: flex-start !important; + gap: 8px !important; +} + +.inv-bottom-section { + flex-direction: column !important; + margin-right: 0 !important; +} + +.inv-mana-panel { + width: 150px !important; + min-width: 150px !important; + height: 100% !important; + background: #111014 !important; + border: 1px solid #5a4a24 !important; +} + +.inv-mana-header { + font-size: 10px !important; + color: #ffffff !important; + border-bottom: none !important; + padding-bottom: 2px !important; +} + +.inv-mana-summary { + font-size: 9px !important; + color: #d4af37 !important; +} + +.inv-mana-row { + grid-template-columns: 18px 1fr 14px !important; + grid-template-rows: auto auto !important; + gap: 1px 4px !important; + padding: 2px 3px !important; + background: #1a1208 !important; + border: 1px solid #3a2818 !important; +} + +.inv-mana-icon { + grid-row: 1 / span 2 !important; + width: 16px !important; + height: 16px !important; +} + +.inv-mana-icon .inventory-slot { + width: 16px !important; + height: 16px !important; +} + +.inv-mana-name { + font-size: 9px !important; + line-height: 1.05 !important; +} + +.inv-mana-value, +.inv-mana-time { + font-size: 9px !important; +} + +.inv-mana-state-dot { + width: 10px !important; + height: 10px !important; } /* Custom resize grip for inventory window */