feat: The Big One UI #47

Merged
j.gerla merged 115 commits from temp_screenshot_manual into dev 2026-01-28 08:27:30 +00:00
3 changed files with 34 additions and 3 deletions
Showing only changes of commit 46d900305a - Show all commits

View File

@@ -131,12 +131,11 @@ export const StatusList: React.FC<StatusListProps> = ({
<h3>{title}</h3> <h3>{title}</h3>
<ul> <ul>
{items.map((item, idx) => { {items.map((item, idx) => {
if (item.id === undefined) return null;
const isActive = !!activeIds[item.id]; const isActive = !!activeIds[item.id];
const showIndicator = type !== 'norm'; const showIndicator = type !== 'norm';
const canOverride = showIndicator && !isActive; const canOverride = showIndicator && !isActive;
// HIGHLIGHT LOGIC:
// If this is the "Goals" list, check if the current index matches
const isCurrentGoal = type === 'goal' && idx === currentGoalIndex; const isCurrentGoal = type === 'goal' && idx === currentGoalIndex;
const handleOverrideClick = () => { const handleOverrideClick = () => {
@@ -148,7 +147,7 @@ export const StatusList: React.FC<StatusListProps> = ({
<li key={item.id ?? idx} className={styles.statusItem}> <li key={item.id ?? idx} className={styles.statusItem}>
{showIndicator && ( {showIndicator && (
<span <span
className={`${styles.statusIndicator} ${canOverride ? styles.clickable : ''}`} className={`${styles.statusIndicator} ${isActive ? styles.active : styles.inactive} ${canOverride ? styles.clickable : ''}`}
onClick={handleOverrideClick} onClick={handleOverrideClick}
> >
{isActive ? "✔️" : "❌"} {isActive ? "✔️" : "❌"}

View File

@@ -156,6 +156,37 @@
content: '✔️ '; content: '✔️ ';
} }
.statusIndicator {
display: inline-block;
margin-right: 10px;
user-select: none;
transition: transform 0.1s ease;
font-size: 1.1rem;
}
.clickable {
cursor: pointer;
}
.clickable:hover {
transform: scale(1.2);
}
.active {
cursor: default;
opacity: 1;
}
.statusItem {
display: flex;
align-items: center;
margin-bottom: 0.4rem;
}
.itemDescription {
line-height: 1.4;
}
/* LOGS */ /* LOGS */
.logs { .logs {
grid-area: logs; grid-area: logs;

View File

@@ -73,6 +73,7 @@ const MonitoringPage: React.FC = () => {
data.norms.forEach((normUpdate: { id: string; active: boolean }) => { data.norms.forEach((normUpdate: { id: string; active: boolean }) => {
nextState[normUpdate.id] = normUpdate.active; nextState[normUpdate.id] = normUpdate.active;
console.log(`Conditional norm ${normUpdate.id} set to active: ${normUpdate.active}`);
}); });
return nextState; return nextState;