Skip to content

Commit 50e2805

Browse files
authored
Merge pull request #17 from raifdmueller/fix/tech-debt-pr15
Fix tech debt from PR #15 (Muss + Sollte)
2 parents 8f22981 + eee7d67 commit 50e2805

8 files changed

Lines changed: 16 additions & 55 deletions

File tree

package-lock.json

Lines changed: 3 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/MitigationCard.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function MitigationCard({ group, active, accent, t }) {
3535
<div className={styles.subtitle} style={{ opacity: active ? 1 : 0.4 }}>
3636
{active
3737
? `${group.measures.length} ${group.measures.length !== 1 ? t.measures : t.measure}`
38-
: `Unlocks at Tier ${group.tier}`}
38+
: t.unlocksAtTier(group.tier)}
3939
</div>
4040
</div>
4141
</div>

src/components/MitigationCard.module.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
.card:not(.cardInactive):hover {
1212
transform: translateY(-2px) scale(1.01);
1313
box-shadow: 0 6px 24px -4px rgba(0, 0, 0, 0.25);
14-
border-width: 2px !important;
1514
filter: brightness(1.08);
1615
}
1716

@@ -75,7 +74,7 @@
7574
}
7675

7776
.measuresWrapperOpen {
78-
max-height: 600px;
77+
max-height: 2000px;
7978
transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
8079
}
8180

src/components/RadarChart.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default function RadarChart({
125125

126126
const cx = size / 2;
127127
const cy = size / 2;
128-
const maxR = 130;
128+
const maxR = size / 2 - 100;
129129
const levels = 5;
130130
const n = safeDims.length || 1; // prevents division by zero
131131
const angStep = 360 / n;
@@ -407,32 +407,32 @@ export default function RadarChart({
407407
width={tooltipW}
408408
height={tooltipH}
409409
rx={10}
410-
fill="#1e293b"
410+
fill="var(--bg-card)"
411411
stroke={tc}
412412
strokeWidth={1.5}
413413
filter="url(#tt-shadow)"
414414
/>
415415
<rect x={tipX} y={tipY} width={4} height={tooltipH} rx={4} fill={tc} />
416-
<text x={tipX + 14} y={tipY + 19} fill="#94a3b8" fontSize="11" fontWeight="500">
416+
<text x={tipX + 14} y={tipY + 19} fill="var(--text-secondary)" fontSize="11" fontWeight="500">
417417
{tooltip.label}
418418
</text>
419419
<text x={tipX + 14} y={tipY + 39} fill={tc} fontSize="19" fontWeight="800">
420420
{tooltip.value}
421-
<tspan fill="#475569" fontSize="11" fontWeight="400">
421+
<tspan fill="var(--text-muted)" fontSize="11" fontWeight="400">
422422
{" "}
423423
/ 4
424424
</tspan>
425425
</text>
426426
<polygon
427427
points={`${tipX + tooltipW / 2 - 7},${tipY + tooltipH} ${tipX + tooltipW / 2 + 7},${tipY + tooltipH} ${tipX + tooltipW / 2},${tipY + tooltipH + 10}`}
428-
fill="#1e293b"
428+
fill="var(--bg-card)"
429429
stroke={tc}
430430
strokeWidth={1.5}
431431
strokeLinejoin="round"
432432
/>
433433
<polygon
434434
points={`${tipX + tooltipW / 2 - 5},${tipY + tooltipH - 1} ${tipX + tooltipW / 2 + 5},${tipY + tooltipH - 1} ${tipX + tooltipW / 2},${tipY + tooltipH + 8}`}
435-
fill="#1e293b"
435+
fill="var(--bg-card)"
436436
/>
437437
</g>
438438
)}

src/components/RiskRadar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ export default function RiskRadar() {
259259
<div className={styles.lockedSummary}>
260260
<span className={styles.lockedIcon}>🔒</span>
261261
<span className={styles.lockedText}>
262-
{lockedCount} locked {lockedCount !== 1 ? t.measures : t.measure}
262+
{lockedCount} {t.locked} {lockedCount !== 1 ? t.measures : t.measure}
263263
{" — "}
264264
{locked.map((g, i) => (
265265
<span key={g.tier}>

src/constants.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,3 @@ export const TYPE_COLORS = {
1212
probabilistic: { color: "#a78bfa", bg: "#3b0764" },
1313
organizational: { color: "#fb923c", bg: "#7c2d12" },
1414
};
15-
16-
// export const VERSION = "1.5.2";
17-
18-
// export const TIER_BG = ["#10b981", "#f59e0b", "#f97316", "#ef4444"];
19-
20-
// export const TYPE_COLORS = {
21-
// deterministic: { color: "#38bdf8", bg: "#0c4a6e" },
22-
// probabilistic: { color: "#a78bfa", bg: "#3b0764" },
23-
// organizational: { color: "#fb923c", bg: "#7c2d12" },
24-
// };

src/i18n.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ const T = {
1414
mitigationHeading: "Erforderliche Mitigationsmaßnahmen",
1515
measures: "Maßnahmen",
1616
measure: "Maßnahme",
17+
locked: "gesperrt",
18+
unlocksAtTier: (tier) => `Verfügbar ab Tier ${tier}`,
1719
docsButton: "Dokumentation",
1820
closeButton: "Schließen",
1921
langSwitch: "EN",
@@ -374,6 +376,8 @@ Quellcode der Skills: https://github.com/LLM-Coding/vibe-coding-risk-radar/tree/
374376
mitigationHeading: "Required Mitigation Measures",
375377
measures: "measures",
376378
measure: "measure",
379+
locked: "locked",
380+
unlocksAtTier: (tier) => `Unlocks at Tier ${tier}`,
377381
docsButton: "Documentation",
378382
closeButton: "Close",
379383
langSwitch: "DE",

src/utils.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,7 @@ export function polarToCartesian(cx, cy, r, angleDeg) {
88
return { x: cx + r * Math.cos(rad), y: cy + r * Math.sin(rad) };
99
}
1010

11-
export function getOffsetPosition(cx, cy, r, angleDeg, offset = 0) {
12-
const base = polarToCartesian(cx, cy, r, angleDeg);
13-
if (offset === 0) return base;
14-
const rad = ((angleDeg - 90) * Math.PI) / 180;
15-
return {
16-
x: base.x + offset * Math.cos(rad),
17-
y: base.y + offset * Math.sin(rad),
18-
};
19-
}
20-
2111
export function detectBrowserLanguage() {
2212
const nav = navigator.language || navigator.userLanguage || "";
2313
return nav.startsWith("de") ? "de" : "en";
2414
}
25-
26-
// export function getTierIndex(values) {
27-
// const mx = Math.max(...Object.values(values));
28-
// return mx <= 1 ? 0 : mx <= 2 ? 1 : mx <= 3 ? 2 : 3;
29-
// }
30-
31-
// export function polarToCartesian(cx, cy, r, angleDeg) {
32-
// const rad = ((angleDeg - 90) * Math.PI) / 180;
33-
// return { x: cx + r * Math.cos(rad), y: cy + r * Math.sin(rad) };
34-
// }
35-
36-
// export function detectBrowserLanguage() {
37-
// const nav = navigator.language || navigator.userLanguage || "";
38-
// return nav.startsWith("de") ? "de" : "en";
39-
// }

0 commit comments

Comments
 (0)