diff --git a/package-lock.json b/package-lock.json index a4918d3..4ba5454 100644 --- a/package-lock.json +++ b/package-lock.json @@ -85,7 +85,6 @@ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", @@ -1529,7 +1528,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1674,7 +1672,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -1959,7 +1956,6 @@ "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -2275,9 +2271,9 @@ } }, "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.1.tgz", + "integrity": "sha512-IxfVbRFVlV8V/yRaGzk0UVIcsKKHMSfYw66T/u4nTwlWteQePsxe//LjudR1AMX4tZW3WFCh3Zqa/sjlqpbURQ==", "dev": true, "license": "ISC" }, @@ -2931,7 +2927,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -3022,7 +3017,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -3395,7 +3389,6 @@ "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", diff --git a/src/components/MitigationCard.jsx b/src/components/MitigationCard.jsx index 09827ae..28b3621 100644 --- a/src/components/MitigationCard.jsx +++ b/src/components/MitigationCard.jsx @@ -35,7 +35,7 @@ export default function MitigationCard({ group, active, accent, t }) {
{active ? `${group.measures.length} ${group.measures.length !== 1 ? t.measures : t.measure}` - : `Unlocks at Tier ${group.tier}`} + : t.unlocksAtTier(group.tier)}
diff --git a/src/components/MitigationCard.module.css b/src/components/MitigationCard.module.css index 31ea0b2..045c43d 100644 --- a/src/components/MitigationCard.module.css +++ b/src/components/MitigationCard.module.css @@ -11,7 +11,6 @@ .card:not(.cardInactive):hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 6px 24px -4px rgba(0, 0, 0, 0.25); - border-width: 2px !important; filter: brightness(1.08); } @@ -75,7 +74,7 @@ } .measuresWrapperOpen { - max-height: 600px; + max-height: 2000px; transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1); } diff --git a/src/components/RadarChart.jsx b/src/components/RadarChart.jsx index 6a20703..62bbb98 100644 --- a/src/components/RadarChart.jsx +++ b/src/components/RadarChart.jsx @@ -125,7 +125,7 @@ export default function RadarChart({ const cx = size / 2; const cy = size / 2; - const maxR = 130; + const maxR = size / 2 - 100; const levels = 5; const n = safeDims.length || 1; // prevents division by zero const angStep = 360 / n; @@ -407,32 +407,32 @@ export default function RadarChart({ width={tooltipW} height={tooltipH} rx={10} - fill="#1e293b" + fill="var(--bg-card)" stroke={tc} strokeWidth={1.5} filter="url(#tt-shadow)" /> - + {tooltip.label} {tooltip.value} - + {" "} / 4 )} diff --git a/src/components/RiskRadar.jsx b/src/components/RiskRadar.jsx index c55945e..7eea52f 100644 --- a/src/components/RiskRadar.jsx +++ b/src/components/RiskRadar.jsx @@ -259,7 +259,7 @@ export default function RiskRadar() {
🔒 - {lockedCount} locked {lockedCount !== 1 ? t.measures : t.measure} + {lockedCount} {t.locked} {lockedCount !== 1 ? t.measures : t.measure} {" — "} {locked.map((g, i) => ( diff --git a/src/constants.js b/src/constants.js index 8322403..a673058 100644 --- a/src/constants.js +++ b/src/constants.js @@ -12,13 +12,3 @@ export const TYPE_COLORS = { probabilistic: { color: "#a78bfa", bg: "#3b0764" }, organizational: { color: "#fb923c", bg: "#7c2d12" }, }; - -// export const VERSION = "1.5.2"; - -// export const TIER_BG = ["#10b981", "#f59e0b", "#f97316", "#ef4444"]; - -// export const TYPE_COLORS = { -// deterministic: { color: "#38bdf8", bg: "#0c4a6e" }, -// probabilistic: { color: "#a78bfa", bg: "#3b0764" }, -// organizational: { color: "#fb923c", bg: "#7c2d12" }, -// }; diff --git a/src/i18n.js b/src/i18n.js index 6126237..a3a7805 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -14,6 +14,8 @@ const T = { mitigationHeading: "Erforderliche Mitigationsmaßnahmen", measures: "Maßnahmen", measure: "Maßnahme", + locked: "gesperrt", + unlocksAtTier: (tier) => `Verfügbar ab Tier ${tier}`, docsButton: "Dokumentation", closeButton: "Schließen", langSwitch: "EN", @@ -374,6 +376,8 @@ Quellcode der Skills: https://github.com/LLM-Coding/vibe-coding-risk-radar/tree/ mitigationHeading: "Required Mitigation Measures", measures: "measures", measure: "measure", + locked: "locked", + unlocksAtTier: (tier) => `Unlocks at Tier ${tier}`, docsButton: "Documentation", closeButton: "Close", langSwitch: "DE", diff --git a/src/utils.js b/src/utils.js index c758940..5df9fac 100644 --- a/src/utils.js +++ b/src/utils.js @@ -8,32 +8,7 @@ export function polarToCartesian(cx, cy, r, angleDeg) { return { x: cx + r * Math.cos(rad), y: cy + r * Math.sin(rad) }; } -export function getOffsetPosition(cx, cy, r, angleDeg, offset = 0) { - const base = polarToCartesian(cx, cy, r, angleDeg); - if (offset === 0) return base; - const rad = ((angleDeg - 90) * Math.PI) / 180; - return { - x: base.x + offset * Math.cos(rad), - y: base.y + offset * Math.sin(rad), - }; -} - export function detectBrowserLanguage() { const nav = navigator.language || navigator.userLanguage || ""; return nav.startsWith("de") ? "de" : "en"; } - -// export function getTierIndex(values) { -// const mx = Math.max(...Object.values(values)); -// return mx <= 1 ? 0 : mx <= 2 ? 1 : mx <= 3 ? 2 : 3; -// } - -// export function polarToCartesian(cx, cy, r, angleDeg) { -// const rad = ((angleDeg - 90) * Math.PI) / 180; -// return { x: cx + r * Math.cos(rad), y: cy + r * Math.sin(rad) }; -// } - -// export function detectBrowserLanguage() { -// const nav = navigator.language || navigator.userLanguage || ""; -// return nav.startsWith("de") ? "de" : "en"; -// }