forked from baron/baron-sso
조직도 표현 개선
This commit is contained in:
@@ -231,7 +231,7 @@ body = "We could not find an account for that information.\\\\\\\\\\\\\\\\nPleas
|
||||
[msg.userfront.login.verification]
|
||||
approved = "Approved. Complete sign-in in the original window."
|
||||
approved_local = "Approved. This device is already signed in, and the remote window will be signed in shortly."
|
||||
approved_remote = "Approved. Please return to the original browser or PC screen."
|
||||
approved_remote = "Your requested sign-in is complete."
|
||||
pending_remote = "Checking the sign-in approval request. Please wait."
|
||||
success = "Sign-in approval completed."
|
||||
|
||||
@@ -582,6 +582,7 @@ title = "Account not found"
|
||||
|
||||
[ui.userfront.login.verification]
|
||||
action_label = "Done"
|
||||
action_label_remote = "Go to sign-in window"
|
||||
action_label_close = "Close Window"
|
||||
page_title = "Sign-in approval"
|
||||
title = "Approval complete"
|
||||
|
||||
@@ -455,7 +455,7 @@ body = "가입되지 않은 정보입니다.\\\\n회원가입 후 이용해 주
|
||||
[msg.userfront.login.verification]
|
||||
approved = "승인되었습니다. 로그인은 요청하신 창에서 완료됩니다."
|
||||
approved_local = "승인 되었습니다. 이 기기는 로그인되어 있는 상태입니다. 원격 창도 로그인이 될 예정입니다"
|
||||
approved_remote = "승인되었습니다. 요청하신 브라우저 또는 PC 화면으로 돌아가 주세요."
|
||||
approved_remote = "요청하신 로그인이 완료되었습니다"
|
||||
pending_remote = "승인 요청을 확인하고 있습니다. 잠시만 기다려 주세요."
|
||||
success = "로그인 승인에 성공했습니다."
|
||||
|
||||
@@ -804,6 +804,7 @@ title = "미등록 회원"
|
||||
|
||||
[ui.userfront.login.verification]
|
||||
action_label = "확인"
|
||||
action_label_remote = "로그인 창으로 이동하기"
|
||||
page_title = "로그인 승인"
|
||||
title = "승인 완료"
|
||||
action_label_close = "창 닫기"
|
||||
|
||||
@@ -776,6 +776,7 @@ title = ""
|
||||
|
||||
[ui.userfront.login.verification]
|
||||
action_label = ""
|
||||
action_label_remote = ""
|
||||
action_label_close = ""
|
||||
page_title = ""
|
||||
title = ""
|
||||
|
||||
@@ -146,8 +146,10 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
_markVerificationApproved(
|
||||
tr('msg.userfront.login.verification.approved_remote'),
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr('ui.userfront.login.verification.action_label_close'),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -859,63 +861,91 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
}
|
||||
}
|
||||
|
||||
void _moveToSigninOrCloseVerificationWindow() {
|
||||
if (webWindow.hasOpener()) {
|
||||
webWindow.close();
|
||||
return;
|
||||
}
|
||||
context.go(buildLocalizedSigninPath(Uri.base));
|
||||
}
|
||||
|
||||
Widget _buildVerificationResultView() {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return Center(
|
||||
child: Padding(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.check_circle_outline,
|
||||
color: Colors.green,
|
||||
size: 72,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
_verificationTitle,
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.green,
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 420),
|
||||
child: Material(
|
||||
color: colorScheme.surface,
|
||||
elevation: 12,
|
||||
shadowColor: Colors.black.withValues(alpha: 0.18),
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(24, 28, 24, 24),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.check_circle_outline,
|
||||
color: colorScheme.primary,
|
||||
size: 72,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
_verificationTitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
_verificationMessage.isEmpty
|
||||
? tr('msg.userfront.login.verification.success')
|
||||
: _verificationMessage,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: colorScheme.onSurfaceVariant),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: FilledButton(
|
||||
onPressed: () {
|
||||
if (_onVerificationAction != null) {
|
||||
_runVerificationExitAction();
|
||||
return;
|
||||
}
|
||||
if (_verificationOnly) {
|
||||
_closeVerificationWindowIfPossible();
|
||||
return;
|
||||
}
|
||||
final hasLocalSession =
|
||||
(AuthTokenStore.getToken()?.isNotEmpty ?? false) ||
|
||||
AuthTokenStore.usesCookie();
|
||||
final target = hasLocalSession
|
||||
? buildLocalizedHomePath(Uri.base)
|
||||
: buildLocalizedSigninPath(Uri.base);
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_verificationOnly = false;
|
||||
_verificationApproved = false;
|
||||
});
|
||||
}
|
||||
context.go(target);
|
||||
},
|
||||
child: Text(
|
||||
_verificationActionLabel,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
_verificationMessage.isEmpty
|
||||
? tr('msg.userfront.login.verification.success')
|
||||
: _verificationMessage,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(color: Colors.black54),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
FilledButton(
|
||||
onPressed: () {
|
||||
if (_onVerificationAction != null) {
|
||||
_runVerificationExitAction();
|
||||
return;
|
||||
}
|
||||
if (_verificationOnly) {
|
||||
_closeVerificationWindowIfPossible();
|
||||
return;
|
||||
}
|
||||
final hasLocalSession =
|
||||
(AuthTokenStore.getToken()?.isNotEmpty ?? false) ||
|
||||
AuthTokenStore.usesCookie();
|
||||
final target = hasLocalSession
|
||||
? buildLocalizedHomePath(Uri.base)
|
||||
: buildLocalizedSigninPath(Uri.base);
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_verificationOnly = false;
|
||||
_verificationApproved = false;
|
||||
});
|
||||
}
|
||||
context.go(target);
|
||||
},
|
||||
child: Text(_verificationActionLabel),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -956,12 +986,6 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(_verificationPageTitle),
|
||||
leading: _verificationApproved && _onVerificationAction != null
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: _runVerificationExitAction,
|
||||
)
|
||||
: null,
|
||||
actions: const [ThemeToggleButton(compact: true)],
|
||||
),
|
||||
body: _verificationApproved
|
||||
@@ -999,9 +1023,9 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
remoteApprovedMessage,
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_close',
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
}
|
||||
return;
|
||||
@@ -1035,9 +1059,9 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
remoteApprovedMessage,
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_close',
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
}
|
||||
return;
|
||||
@@ -1092,9 +1116,9 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
remoteApprovedMessage,
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_close',
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
}
|
||||
return;
|
||||
@@ -1113,9 +1137,9 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
remoteApprovedMessage,
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_close',
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -1127,8 +1151,10 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
_markVerificationApproved(
|
||||
remoteApprovedMessage,
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr('ui.userfront.login.verification.action_label_close'),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -1146,9 +1172,9 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
remoteApprovedMessage,
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_close',
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
}
|
||||
return;
|
||||
@@ -1194,9 +1220,9 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
remoteApprovedMessage,
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_close',
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
}
|
||||
return;
|
||||
@@ -1215,9 +1241,9 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
remoteApprovedMessage,
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_close',
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -1229,8 +1255,10 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
_markVerificationApproved(
|
||||
remoteApprovedMessage,
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr('ui.userfront.login.verification.action_label_close'),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -1246,9 +1274,9 @@ class _LoginScreenState extends ConsumerState<LoginScreen>
|
||||
remoteApprovedMessage,
|
||||
title: tr('ui.userfront.login.verification.title_remote'),
|
||||
actionLabel: tr(
|
||||
'ui.userfront.login.verification.action_label_close',
|
||||
'ui.userfront.login.verification.action_label_remote',
|
||||
),
|
||||
onAction: _closeVerificationWindowIfPossible,
|
||||
onAction: _moveToSigninOrCloseVerificationWindow,
|
||||
);
|
||||
}
|
||||
return;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user