1
0
forked from baron/baron-sso

린트 적용

This commit is contained in:
2026-02-23 16:18:01 +09:00
parent 04938d7cd9
commit 68becb43bc
36 changed files with 1240 additions and 1057 deletions

View File

@@ -34,16 +34,12 @@ class _LocaleGateState extends State<LocaleGate> {
Future<void> _applyLocale() async {
final normalized = normalizeLocaleCode(widget.localeCode);
LocaleStorage.write(normalized);
webWindow.setTitle(
tr('ui.userfront.app_title'),
);
webWindow.setTitle(tr('ui.userfront.app_title'));
if (context.locale.languageCode == normalized) {
return;
}
await context.setLocale(Locale(normalized));
webWindow.setTitle(
tr('ui.userfront.app_title'),
);
webWindow.setTitle(tr('ui.userfront.app_title'));
}
@override

View File

@@ -76,7 +76,7 @@ String buildLocalizedPath(String localeCode, Uri uri) {
}
}
final newPath = '/${[localeCode, ...restSegments].join('/')}';
// Return only the path and query part to avoid GoRouter confusion with full URLs
final newUri = uri.replace(path: newPath);
String result = newUri.path;

View File

@@ -299,10 +299,7 @@ class AuthProxyService {
} else {
final errorBody = jsonDecode(response.body);
throw Exception(
errorBody['error'] ??
tr(
'err.userfront.auth_proxy.consent_fetch',
),
errorBody['error'] ?? tr('err.userfront.auth_proxy.consent_fetch'),
);
}
} finally {
@@ -333,10 +330,7 @@ class AuthProxyService {
} else {
final errorBody = jsonDecode(response.body);
throw Exception(
errorBody['error'] ??
tr(
'err.userfront.auth_proxy.consent_accept',
),
errorBody['error'] ?? tr('err.userfront.auth_proxy.consent_accept'),
);
}
} finally {
@@ -363,10 +357,7 @@ class AuthProxyService {
} else {
final errorBody = jsonDecode(response.body);
throw Exception(
errorBody['error'] ??
tr(
'err.userfront.auth_proxy.consent_reject',
),
errorBody['error'] ?? tr('err.userfront.auth_proxy.consent_reject'),
);
}
} finally {
@@ -810,7 +801,7 @@ class AuthProxyService {
body: jsonEncode({
'level': level,
'message': message,
if (data != null) 'data': data,
'data': ?data,
}),
);
_recordClientLogSuccess();
@@ -934,7 +925,7 @@ class AuthProxyService {
'name': name,
'phone': phone,
'affiliationType': affiliationType,
if (companyCode != null) 'companyCode': companyCode,
'companyCode': ?companyCode,
'department': department,
'termsAccepted': termsAccepted,
}),

View File

@@ -15,10 +15,7 @@ class LanguageSelector extends StatelessWidget {
Widget build(BuildContext context) {
final current = context.locale.languageCode;
final items = [
DropdownMenuItem(
value: 'ko',
child: Text(tr('ui.common.language_ko')),
),
DropdownMenuItem(value: 'ko', child: Text(tr('ui.common.language_ko'))),
DropdownMenuItem(
value: 'en',
child: Text(tr('ui.common.language_en', fallback: 'English')),