From e3d279cb83f2449d2f275e95f0ef97493e12c59d Mon Sep 17 00:00:00 2001 From: kyy Date: Mon, 6 Apr 2026 14:54:57 +0900 Subject: [PATCH] =?UTF-8?q?code=20check=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- devfront/tests/helpers/devfront-fixtures.ts | 16 + locales/template.toml | 300 +++++++++++++++++- userfront/assets/translations/template.toml | 157 +++++++++ .../presentation/pages/profile_page.dart | 2 - 4 files changed, 472 insertions(+), 3 deletions(-) diff --git a/devfront/tests/helpers/devfront-fixtures.ts b/devfront/tests/helpers/devfront-fixtures.ts index d3643940..e90806bd 100644 --- a/devfront/tests/helpers/devfront-fixtures.ts +++ b/devfront/tests/helpers/devfront-fixtures.ts @@ -196,6 +196,22 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) { }); }; + await page.route("**/api/v1/user/me", async (route) => { + return json(route, { + id: "playwright-user", + loginId: "playwright@example.com", + email: "playwright@example.com", + name: "Playwright User", + phoneNumber: "", + department: "QA", + tenantId: "tenant-a", + tenantName: "Tenant A", + role: "rp_admin", + createdAt: "2026-03-03T00:00:00.000Z", + updatedAt: "2026-03-03T00:00:00.000Z", + }); + }); + await page.route("**/api/v1/dev/**", async (route) => { const request = route.request(); const url = new URL(request.url()); diff --git a/locales/template.toml b/locales/template.toml index adaca6bf..ff8d60a1 100644 --- a/locales/template.toml +++ b/locales/template.toml @@ -73,7 +73,280 @@ scope_admin = "" session_ttl = "" tenant_headers = "" -[msg.admin.api_keys] +[msg.userfront.error] +detail_contact = "" +detail_generic = "" +detail_request = "" +id = "" +title = "" +title_generic = "" +title_with_code = "" +type = "" + +[msg.userfront.forgot] +description = "" +dry_send = "" +error = "" +input_required = "" +sent = "" + +[msg.userfront.login] +cookie_check_failed = "" +dry_send = "" +link_failed = "" +link_send_failed = "" +link_sent_email = "" +link_sent_phone = "" +link_timeout = "" +no_account = "" +oidc_failed = "" +qr_expired = "" +qr_init_failed = "" +qr_login_required = "" +token_missing = "" +verification_failed = "" + +[msg.userfront.login_success] +subtitle = "" + +[msg.userfront.consent] +accept_error = "" +client_id = "" +client_unknown = "" +description = "" +load_error = "" +missing_redirect = "" +redirect_notice = "" +scope_count = "" + +[msg.userfront.profile] +department_missing = "" +department_required = "" +email_missing = "" +greeting = "" +load_failed = "" +name_missing = "" +name_required = "" +phone_required = "" +phone_verify_required = "" +update_failed = "" +update_success = "" + +[msg.userfront.qr] +camera_error = "" +permission_error = "" +permission_required = "" + +[msg.userfront.reset] +invalid_body = "" +invalid_link = "" +invalid_title = "" +policy_loading = "" +success = "" + +[msg.userfront.sections] +apps_subtitle = "" +audit_subtitle = "" +sessions_subtitle = "" + +[msg.userfront.settings] +disabled = "" + +[msg.userfront.signup] +failed = "" +privacy_full = "" +tos_full = "" + +[ui.admin.audit] +export_csv = "" +load_more = "" +target = "" +title = "" + +[ui.admin.groups] +import_csv = "" + +[ui.admin.header] +plane = "" +subtitle = "" + +[ui.admin.nav] +api_keys = "" +audit_logs = "" +auth_guard = "" +logout = "" +overview = "" +relying_parties = "" +tenant_dashboard = "" +user_groups = "" +tenants = "" +users = "" + +[ui.admin.org] +download_template = "" +import_btn = "" +import_title = "" +start_import = "" + +[ui.admin.overview] +kicker = "" +title = "" + +[ui.admin.profile] +manageable_tenants = "" + +[ui.admin.role] +rp_admin = "" +super_admin = "" +tenant_admin = "" +user = "" + +[ui.admin.tenants] +add = "" +title = "" + +[ui.common.badge] +admin_only = "" +command_only = "" +system = "" + +[ui.common.status] +active = "" +blocked = "" +failure = "" +inactive = "" +ok = "" +pending = "" +success = "" + +[ui.dev.nav] +clients = "" +logout = "" + +[ui.dev.tenant] +single_notice = "" +switch_success = "" +workspace = "" +workspace_desc = "" + +[ui.dev.audit] +load_more = "" +title = "" + +[ui.dev.profile] +menu_aria = "" +menu_title = "" +unknown_email = "" +unknown_name = "" +title = "" +subtitle = "" +loading = "" +error = "" + +[ui.dev.clients] +new = "" +search_placeholder = "" +tenant_scoped = "" +untitled = "" + +[ui.dev.dashboard] +ready_badge = "" + +[ui.dev.header] +plane = "" +subtitle = "" + +[ui.dev.session] +auto_extend = "" +active = "" +disabled = "" +unknown = "" +expired = "" +expiring = "" +remaining = "" +refresh = "" +refreshing = "" + +[ui.userfront.app_label] +admin_console = "" +baron = "" +dev_console = "" + +[ui.userfront.auth_method] +ory = "" +session = "" + +[ui.userfront.dashboard] +last_auth_label = "" +status_history = "" + +[ui.userfront.device] +android = "" +ios = "" +linux = "" +macos = "" +windows = "" + +[ui.userfront.error] +go_home = "" +go_login = "" + +[ui.userfront.forgot] +heading = "" +input_label = "" +submit = "" +title = "" + +[ui.userfront.login] +forgot_password = "" +signup = "" + +[ui.userfront.login_success] +later = "" +qr = "" +title = "" + +[ui.userfront.consent] +accept = "" +requested_scopes = "" +title = "" + +[ui.userfront.nav] +dashboard = "" +logout = "" +profile = "" +qr_scan = "" + +[ui.userfront.profile] +department_empty = "" +manage = "" +user_fallback = "" + +[ui.userfront.qr] +rescan = "" +result_success = "" +title = "" + +[ui.userfront.reset] +confirm_password = "" +new_password = "" +submit = "" +subtitle = "" +title = "" + +[ui.userfront.sections] +apps = "" +audit = "" +sessions = "" + +[ui.userfront.session] +active = "" +unknown = "" + +[ui.userfront.signup] +complete = "" +next_step = "" +title = "" [msg.admin.api_keys.create] error = "" @@ -559,6 +832,20 @@ empty = "" empty_detail = "" error = "" +[msg.userfront.dashboard.sessions] +browser = "" +empty = "" +empty_detail = "" +error = "" +os = "" +recent_app = "" +session_id = "" + +[msg.userfront.dashboard.sessions.revoke] +confirm = "" +error = "" +success = "" + [msg.userfront.dashboard.approved_session] copy_click = "" copy_tap = "" @@ -2070,6 +2357,17 @@ status_history = "" [ui.userfront.dashboard.activity] linked = "" +[ui.userfront.dashboard.sessions] +active_badge = "" +current_badge = "" +current_disabled = "" +unknown_device = "" +unknown_session = "" + +[ui.userfront.dashboard.sessions.revoke] +action = "" +title = "" + [ui.userfront.dashboard.approved_session] default = "" userfront = "" diff --git a/userfront/assets/translations/template.toml b/userfront/assets/translations/template.toml index 18c8594b..e569bcfc 100644 --- a/userfront/assets/translations/template.toml +++ b/userfront/assets/translations/template.toml @@ -72,7 +72,139 @@ email = "" offline_access = "" openid = "" phone = "" + +[msg.userfront.profile] +department_missing = "" +department_required = "" +email_missing = "" +greeting = "" +load_failed = "" +name_missing = "" +name_required = "" +phone_required = "" +phone_verify_required = "" +update_failed = "" +update_success = "" + +[msg.userfront.qr] +camera_error = "" +permission_error = "" +permission_required = "" + +[msg.userfront.reset] +invalid_body = "" +invalid_link = "" +invalid_title = "" +policy_loading = "" +success = "" + +[msg.userfront.sections] +apps_subtitle = "" +audit_subtitle = "" +sessions_subtitle = "" + +[msg.userfront.settings] +disabled = "" + +[msg.userfront.signup] +failed = "" +privacy_full = "" +tos_full = "" + +[ui.common.badge] +admin_only = "" +command_only = "" +system = "" + +[ui.common.status] +active = "" +blocked = "" +failure = "" +inactive = "" +ok = "" +pending = "" +success = "" + +[ui.userfront.app_label] +admin_console = "" +baron = "" +dev_console = "" + +[ui.userfront.auth_method] +ory = "" +session = "" + +[ui.userfront.dashboard] +last_auth_label = "" +status_history = "" + +[ui.userfront.device] +android = "" +ios = "" +linux = "" +macos = "" +windows = "" + +[ui.userfront.error] +go_home = "" +go_login = "" + +[ui.userfront.forgot] +heading = "" +input_label = "" +submit = "" +title = "" + +[ui.userfront.login] +forgot_password = "" +signup = "" + +[ui.userfront.login_success] +later = "" +qr = "" +title = "" + +[ui.userfront.consent] +accept = "" +requested_scopes = "" +title = "" + +[ui.userfront.nav] +dashboard = "" +logout = "" profile = "" +qr_scan = "" + +[ui.userfront.profile] +department_empty = "" +manage = "" +user_fallback = "" + +[ui.userfront.qr] +rescan = "" +result_success = "" +title = "" + +[ui.userfront.reset] +confirm_password = "" +new_password = "" +submit = "" +subtitle = "" +title = "" + +[ui.userfront.sections] +apps = "" +audit = "" +sessions = "" + +[ui.userfront.session] +active = "" +unknown = "" + +[ui.userfront.signup] +complete = "" +next_step = "" +title = "" [msg.userfront.dashboard] approved_device = "" @@ -94,6 +226,20 @@ empty = "" empty_detail = "" error = "" +[msg.userfront.dashboard.sessions] +browser = "" +empty = "" +empty_detail = "" +error = "" +os = "" +recent_app = "" +session_id = "" + +[msg.userfront.dashboard.sessions.revoke] +confirm = "" +error = "" +success = "" + [msg.userfront.dashboard.approved_session] copy_click = "" copy_tap = "" @@ -450,6 +596,17 @@ status_history = "" [ui.userfront.dashboard.activity] linked = "" +[ui.userfront.dashboard.sessions] +active_badge = "" +current_badge = "" +current_disabled = "" +unknown_device = "" +unknown_session = "" + +[ui.userfront.dashboard.sessions.revoke] +action = "" +title = "" + [ui.userfront.dashboard.approved_session] default = "" userfront = "" diff --git a/userfront/lib/features/profile/presentation/pages/profile_page.dart b/userfront/lib/features/profile/presentation/pages/profile_page.dart index bf8f6d50..39987e19 100644 --- a/userfront/lib/features/profile/presentation/pages/profile_page.dart +++ b/userfront/lib/features/profile/presentation/pages/profile_page.dart @@ -3,11 +3,9 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; import 'package:logging/logging.dart'; import 'package:userfront/i18n.dart'; -import '../../../../core/notifiers/auth_notifier.dart'; import '../../../../core/i18n/locale_utils.dart'; import '../../../../core/services/auth_proxy_service.dart'; import '../../../../core/services/logout_service.dart'; -import '../../../../core/services/auth_token_store.dart'; import '../../../../core/ui/layout_breakpoints.dart'; import '../../../../core/ui/toast_service.dart'; import '../../../../core/widgets/language_selector.dart';