1
0
forked from baron/baron-sso

local 브런치 code-check 오류 수정

This commit is contained in:
2026-04-01 14:47:00 +09:00
parent 391773ac90
commit e5ebd26182
10 changed files with 48 additions and 30 deletions

View File

@@ -46,10 +46,9 @@ function AppLayout() {
const isMockRoleEnabled =
isDevRoleOverrideEnabled &&
window.localStorage.getItem("X-Mock-Role-Enabled") === "true";
const mockRoleOverride =
isMockRoleEnabled
? window.localStorage.getItem("X-Mock-Role")
: null;
const mockRoleOverride = isMockRoleEnabled
? window.localStorage.getItem("X-Mock-Role")
: null;
const [theme, setTheme] = useState<"light" | "dark">(() => {
const stored = window.localStorage.getItem("admin_theme");
return stored === "dark" ? "dark" : "light";
@@ -337,10 +336,7 @@ function AppLayout() {
const handleSessionExpiryToggle = () => {
setIsSessionExpiryEnabled((prev) => {
const next = !prev;
window.localStorage.setItem(
"baron_session_expiry_enabled",
String(next),
);
window.localStorage.setItem("baron_session_expiry_enabled", String(next));
return next;
});
};
@@ -413,10 +409,7 @@ function AppLayout() {
{t("ui.admin.header.plane", "ADMIN PLANE")}
</p>
<span className="text-lg font-semibold">
{t(
"ui.admin.header.subtitle",
"Manage your organization",
)}
{t("ui.admin.header.subtitle", "Manage your organization")}
</span>
</div>
@@ -518,9 +511,7 @@ function AppLayout() {
onClick={handleSessionExpiryToggle}
className={[
"relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition",
isSessionExpiryEnabled
? "bg-primary"
: "bg-muted",
isSessionExpiryEnabled ? "bg-primary" : "bg-muted",
].join(" ")}
>
<span
@@ -580,7 +571,9 @@ function AppLayout() {
type="button"
onClick={() => {
setIsProfileOpen(false);
navigate(`/users/${profile?.id || auth.user?.profile.sub}`);
navigate(
`/users/${profile?.id || auth.user?.profile.sub}`,
);
}}
className="mt-2 flex w-full items-center gap-2 rounded-lg border border-border px-3 py-2 text-left text-sm text-foreground transition hover:bg-muted/20"
>

View File

@@ -130,8 +130,12 @@ const RoleSwitcher: FC = () => {
alignItems: "center",
}}
>
<span>{t("ui.admin.dev_role_switcher_real", "실제 역할 사용")}</span>
{!isOverrideEnabled && <span style={{ marginLeft: "8px" }}></span>}
<span>
{t("ui.admin.dev_role_switcher_real", "실제 역할 사용")}
</span>
{!isOverrideEnabled && (
<span style={{ marginLeft: "8px" }}></span>
)}
</button>
{(["super_admin", "tenant_admin", "rp_admin", "user"] as const).map(
(role) => (

View File

@@ -10,7 +10,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
it("returns false when remaining time is above the 5 minute threshold", () => {
expect(
shouldAttemptSlidingSessionRenew({
expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS + 1_000) / 1000),
expiresAtSec: Math.floor(
(nowMs + SESSION_RENEW_THRESHOLD_MS + 1_000) / 1000,
),
nowMs,
isEnabled: true,
isAuthenticated: true,
@@ -24,7 +26,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
it("returns true when remaining time is within the 5 minute threshold", () => {
expect(
shouldAttemptSlidingSessionRenew({
expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000),
expiresAtSec: Math.floor(
(nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000,
),
nowMs,
isEnabled: true,
isAuthenticated: true,
@@ -38,7 +42,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
it("returns false when automatic renewal is disabled", () => {
expect(
shouldAttemptSlidingSessionRenew({
expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000),
expiresAtSec: Math.floor(
(nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000,
),
nowMs,
isEnabled: false,
isAuthenticated: true,
@@ -52,7 +58,9 @@ describe("shouldAttemptSlidingSessionRenew", () => {
it("returns false when the last renew attempt is still within the throttle window", () => {
expect(
shouldAttemptSlidingSessionRenew({
expiresAtSec: Math.floor((nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000),
expiresAtSec: Math.floor(
(nowMs + SESSION_RENEW_THRESHOLD_MS - 1_000) / 1000,
),
nowMs,
isEnabled: true,
isAuthenticated: true,

View File

@@ -702,6 +702,7 @@ title = ""
[ui.admin]
brand = ""
dev_role_switcher = ""
dev_role_switcher_real = ""
title = ""
[ui.admin.api_keys]
@@ -1429,6 +1430,7 @@ type = ""
[ui.dev.clients.type]
pkce = ""
private = ""
pkce_headless = ""
[ui.dev.dashboard]
ready_badge = ""

View File

@@ -276,10 +276,7 @@ function AppLayout() {
const handleSessionExpiryToggle = () => {
setIsSessionExpiryEnabled((prev) => {
const next = !prev;
window.localStorage.setItem(
"baron_session_expiry_enabled",
String(next),
);
window.localStorage.setItem("baron_session_expiry_enabled", String(next));
return next;
});
};
@@ -467,9 +464,7 @@ function AppLayout() {
onClick={handleSessionExpiryToggle}
className={[
"relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition",
isSessionExpiryEnabled
? "bg-primary"
: "bg-muted",
isSessionExpiryEnabled ? "bg-primary" : "bg-muted",
].join(" ")}
>
<span

View File

@@ -15,7 +15,7 @@ export type ClientSummary = {
jwks?: string | Record<string, unknown>;
redirectUris: string[];
scopes: string[];
metadata?: Record<string, any>;
metadata?: Record<string, unknown>;
};
export type ClientListResponse = {

View File

@@ -846,6 +846,7 @@ name = ""
[ui.admin.header]
plane = ""
subtitle = ""
[ui.admin.nav]
api_keys = ""

View File

@@ -776,6 +776,7 @@ title = "Sign-up complete"
[ui.admin]
brand = "Brand"
dev_role_switcher = "🛠 DEV Role Switcher"
dev_role_switcher_real = "Use real role"
title = "Admin Control"
[ui.admin.api_keys]
@@ -899,6 +900,7 @@ name = "NAME"
[ui.admin.header]
plane = "Admin Plane"
subtitle = "Manage tenants, policies, and operators"
[ui.admin.nav]
api_keys = "API Keys"
@@ -1560,6 +1562,7 @@ type = "Type"
[ui.dev.clients.type]
pkce = "PKCE"
private = "Server side App"
pkce_headless = "Headless PKCE"
[ui.dev.dashboard]
ready_badge = "devfront ready"
@@ -1596,7 +1599,9 @@ plane = "Dev Plane"
subtitle = "Manage your applications"
[ui.dev.session]
auto_extend = "Session expiry controls"
active = "Checking expiration..."
disabled = "Auto extend disabled"
unknown = "Unknown"
expired = "Session expired"
expiring = "Expiring soon: {{minutes}}m {{seconds}}s left"

View File

@@ -70,6 +70,7 @@ greeting = "안녕하세요, {{name}}님"
[ui.admin]
brand = "Baron 로그인"
dev_role_switcher = "🛠 DEV Role Switcher"
dev_role_switcher_real = "실제 역할 사용"
title = "Admin Control"
[ui.common]
@@ -375,6 +376,7 @@ import_csv = "CSV 임포트"
[ui.admin.header]
plane = "Admin Plane"
subtitle = "관리 및 정책 운영"
[ui.admin.nav]
api_keys = "API 키"
@@ -463,7 +465,9 @@ plane = "Dev Plane"
subtitle = "Manage your applications"
[ui.dev.session]
auto_extend = "세션 만료 관리"
active = "세션 활성"
disabled = "자동 연장 비활성화"
unknown = "알 수 없음"
expired = "세션 만료"
expiring = "만료 임박: {{minutes}}분 {{seconds}}초 남음"
@@ -1277,6 +1281,7 @@ type = "유형"
[ui.dev.clients.type]
private = "Server side App"
pkce = "PKCE"
pkce_headless = "Headless PKCE"
[ui.dev.dashboard.badge]
consent_guard = "Consent guard ready"

View File

@@ -70,6 +70,7 @@ greeting = ""
[ui.admin]
brand = ""
dev_role_switcher = ""
dev_role_switcher_real = ""
title = ""
[ui.common]
@@ -375,6 +376,7 @@ import_csv = ""
[ui.admin.header]
plane = ""
subtitle = ""
[ui.admin.nav]
api_keys = ""
@@ -463,7 +465,9 @@ plane = ""
subtitle = ""
[ui.dev.session]
auto_extend = ""
active = ""
disabled = ""
unknown = ""
expired = ""
expiring = ""
@@ -1277,6 +1281,7 @@ type = ""
[ui.dev.clients.type]
pkce = ""
private = ""
pkce_headless = ""
[ui.dev.dashboard.badge]
consent_guard = ""