Refactor BumperPlaceholders and BumperFacts for improved logic and readability
Updated the BumperPlaceholders class to streamline token extraction from texts, enhancing performance and clarity. Modified BumperFacts to initialize slot titles with an empty array instead of a dictionary for better consistency. Renamed methods in BumperResolver for clarity, and refactored GridScheduleGenerator to simplify return logic. Additionally, improved the BumperLinesEditor component by implementing a keyed list for better state management and user experience.
This commit is contained in:
@@ -163,14 +163,17 @@ export function StoragePanel() {
|
||||
{/* Полоса состава хранилища — доли областей друг относительно друга. */}
|
||||
{storage > 0 && (
|
||||
<div className="flex h-3 overflow-hidden rounded-full bg-muted/40">
|
||||
{areas.map((area) => (
|
||||
<div
|
||||
key={area.area}
|
||||
className={AREA_COLORS[area.area]}
|
||||
style={{ width: `${percentOf(area.bytes, storage)}%` }}
|
||||
title={`${t(`admin.storage.areas.${area.area}`)} · ${formatBytes(area.bytes)}`}
|
||||
/>
|
||||
))}
|
||||
{areas.map((area) => {
|
||||
const name = t(`admin.storage.areas.${area.area}`)
|
||||
return (
|
||||
<div
|
||||
key={area.area}
|
||||
className={AREA_COLORS[area.area]}
|
||||
style={{ width: `${percentOf(area.bytes, storage)}%` }}
|
||||
title={`${name} · ${formatBytes(area.bytes)}`}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user