refactor: tighten inventory mana panel layout
Move the Mana panel to the right of the backpack column, widen the inventory window, and switch to a smaller Mag-Tools-style row layout with compact icons and status dots.
This commit is contained in:
parent
0e8186b8e5
commit
63ea242167
2 changed files with 129 additions and 46 deletions
|
|
@ -1562,8 +1562,8 @@ function renderInventoryManaPanel(state) {
|
||||||
|
|
||||||
const stateEl = document.createElement('div');
|
const stateEl = document.createElement('div');
|
||||||
const stateName = item.mana_state || 'unknown';
|
const stateName = item.mana_state || 'unknown';
|
||||||
stateEl.className = `inv-mana-state mana-state-${stateName}`;
|
stateEl.className = `inv-mana-state-dot mana-state-${stateName}`;
|
||||||
stateEl.textContent = stateName.replace(/_/g, ' ');
|
stateEl.title = stateName.replace(/_/g, ' ');
|
||||||
|
|
||||||
const manaEl = document.createElement('div');
|
const manaEl = document.createElement('div');
|
||||||
manaEl.className = 'inv-mana-value';
|
manaEl.className = 'inv-mana-value';
|
||||||
|
|
@ -1641,6 +1641,20 @@ function showInventoryWindow(name) {
|
||||||
const sidebar = document.createElement('div');
|
const sidebar = document.createElement('div');
|
||||||
sidebar.className = 'inv-sidebar';
|
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');
|
const burdenContainer = document.createElement('div');
|
||||||
burdenContainer.className = 'inv-burden-bar';
|
burdenContainer.className = 'inv-burden-bar';
|
||||||
const burdenFill = document.createElement('div');
|
const burdenFill = document.createElement('div');
|
||||||
|
|
@ -1658,26 +1672,13 @@ function showInventoryWindow(name) {
|
||||||
|
|
||||||
topSection.appendChild(equipGrid);
|
topSection.appendChild(equipGrid);
|
||||||
topSection.appendChild(sidebar);
|
topSection.appendChild(sidebar);
|
||||||
|
topSection.appendChild(manaPanel);
|
||||||
|
|
||||||
const bottomSection = document.createElement('div');
|
const bottomSection = document.createElement('div');
|
||||||
bottomSection.className = 'inv-bottom-section';
|
bottomSection.className = 'inv-bottom-section';
|
||||||
|
|
||||||
const itemSection = document.createElement('div');
|
const itemSection = document.createElement('div');
|
||||||
itemSection.className = 'inv-item-section';
|
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');
|
const contentsHeader = document.createElement('div');
|
||||||
contentsHeader.className = 'inv-contents-header';
|
contentsHeader.className = 'inv-contents-header';
|
||||||
|
|
@ -1689,7 +1690,6 @@ function showInventoryWindow(name) {
|
||||||
itemSection.appendChild(contentsHeader);
|
itemSection.appendChild(contentsHeader);
|
||||||
itemSection.appendChild(itemGrid);
|
itemSection.appendChild(itemGrid);
|
||||||
bottomSection.appendChild(itemSection);
|
bottomSection.appendChild(itemSection);
|
||||||
bottomSection.appendChild(manaPanel);
|
|
||||||
|
|
||||||
invContent.appendChild(topSection);
|
invContent.appendChild(topSection);
|
||||||
invContent.appendChild(bottomSection);
|
invContent.appendChild(bottomSection);
|
||||||
|
|
|
||||||
141
static/style.css
141
static/style.css
|
|
@ -735,7 +735,7 @@ body.noselect, body.noselect * {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 100px;
|
top: 100px;
|
||||||
left: 400px;
|
left: 400px;
|
||||||
width: 390px;
|
width: 540px;
|
||||||
height: 520px;
|
height: 520px;
|
||||||
background: rgba(20, 20, 20, 0.92);
|
background: rgba(20, 20, 20, 0.92);
|
||||||
backdrop-filter: blur(2px);
|
backdrop-filter: blur(2px);
|
||||||
|
|
@ -760,8 +760,9 @@ body.noselect, body.noselect * {
|
||||||
|
|
||||||
.inv-top-section {
|
.inv-top-section {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: flex-start;
|
||||||
height: 264px;
|
height: 264px;
|
||||||
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-equipment-grid {
|
.inv-equipment-grid {
|
||||||
|
|
@ -813,6 +814,7 @@ body.noselect, body.noselect * {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-burden-bar {
|
.inv-burden-bar {
|
||||||
|
|
@ -908,17 +910,11 @@ body.noselect, body.noselect * {
|
||||||
.inv-bottom-section {
|
.inv-bottom-section {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: column;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-right: 52px;
|
margin-right: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.inv-bottom-section > :first-child,
|
|
||||||
.inv-bottom-section > :nth-child(2) {
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-contents-header {
|
.inv-contents-header {
|
||||||
|
|
@ -952,14 +948,16 @@ body.noselect, body.noselect * {
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-mana-panel {
|
.inv-mana-panel {
|
||||||
width: 118px;
|
width: 150px;
|
||||||
min-width: 118px;
|
min-width: 150px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background: rgba(6, 10, 18, 0.92);
|
background: rgba(6, 10, 18, 0.92);
|
||||||
border: 1px solid var(--ac-border-light);
|
border: 1px solid var(--ac-border-light);
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
height: 100%;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-mana-header {
|
.inv-mana-header {
|
||||||
|
|
@ -990,62 +988,81 @@ body.noselect, body.noselect * {
|
||||||
|
|
||||||
.inv-mana-row {
|
.inv-mana-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 36px 1fr;
|
grid-template-columns: 18px 1fr 14px;
|
||||||
grid-template-rows: auto auto auto;
|
grid-template-rows: auto auto;
|
||||||
gap: 1px 6px;
|
gap: 1px 4px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: rgba(18, 24, 34, 0.9);
|
background: rgba(18, 24, 34, 0.9);
|
||||||
border: 1px solid rgba(255,255,255,0.08);
|
border: 1px solid rgba(255,255,255,0.08);
|
||||||
padding: 3px;
|
padding: 2px 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-mana-icon {
|
.inv-mana-icon {
|
||||||
grid-row: 1 / span 3;
|
grid-row: 1 / span 2;
|
||||||
width: 36px;
|
width: 16px;
|
||||||
height: 36px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-mana-icon .inventory-slot {
|
.inv-mana-icon .inventory-slot {
|
||||||
width: 36px;
|
width: 16px;
|
||||||
height: 36px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-mana-name {
|
.inv-mana-name {
|
||||||
color: #f2e6c9;
|
color: #f2e6c9;
|
||||||
font-size: 10px;
|
font-size: 9px;
|
||||||
line-height: 1.15;
|
line-height: 1.05;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-mana-state,
|
|
||||||
.inv-mana-value,
|
.inv-mana-value,
|
||||||
.inv-mana-time {
|
.inv-mana-time {
|
||||||
font-size: 10px;
|
font-size: 9px;
|
||||||
line-height: 1.1;
|
line-height: 1.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-mana-value {
|
.inv-mana-value {
|
||||||
color: #98d7ff;
|
color: #98d7ff;
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-mana-time {
|
.inv-mana-time {
|
||||||
color: #cfe6a0;
|
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 {
|
.mana-state-active {
|
||||||
color: #76d17f;
|
background: #76d17f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mana-state-not_active {
|
.mana-state-not_active {
|
||||||
color: #ff8e6f;
|
background: #ff8e6f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mana-state-unknown {
|
.mana-state-unknown {
|
||||||
color: #d4c27a;
|
background: #d4c27a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mana-state-not_activatable {
|
.mana-state-not_activatable {
|
||||||
color: #97a1ad;
|
background: #97a1ad;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inv-mana-empty {
|
.inv-mana-empty {
|
||||||
|
|
@ -2390,6 +2407,72 @@ table.ts-allegiance td:first-child {
|
||||||
border: 2px solid #8a7a44 !important;
|
border: 2px solid #8a7a44 !important;
|
||||||
background: #0e0c08 !important;
|
background: #0e0c08 !important;
|
||||||
resize: none !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 */
|
/* Custom resize grip for inventory window */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue