1
0
forked from baron/baron-sso

접속이력 브라우저 컬럼 추가

This commit is contained in:
2026-04-07 13:38:13 +09:00
parent 7b2004e05c
commit c95105f018
7 changed files with 72 additions and 20 deletions

View File

@@ -40,6 +40,8 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
static const double _historySessionMinWidth = 92;
static const double _historyOtherColumnsBaselineWidth = 780;
static const int _historySessionMinVisibleChars = 8;
static const double _historyStatusColumnWidth = 92;
static const double _historyActionColumnWidth = 108;
final ScrollController _pageScrollController = ScrollController();
final ScrollController _rpScrollController = ScrollController();
@@ -1678,18 +1680,23 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
}
Widget _buildHistoryStatusBadge(_HistorySessionStatus status) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: _historySessionStatusColor(status),
borderRadius: BorderRadius.circular(999),
),
child: Text(
_historySessionStatusLabel(status),
style: const TextStyle(
fontSize: 11,
color: Colors.white,
fontWeight: FontWeight.w600,
return SizedBox(
width: _historyStatusColumnWidth,
child: Center(
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: _historySessionStatusColor(status),
borderRadius: BorderRadius.circular(999),
),
child: Text(
_historySessionStatusLabel(status),
style: const TextStyle(
fontSize: 11,
color: Colors.white,
fontWeight: FontWeight.w600,
),
),
),
),
);
@@ -1703,7 +1710,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
final canRevoke =
!isCurrent && _revokingSessionId == null && session.isActive;
return SizedBox(
width: 108,
width: _historyActionColumnWidth,
child: OutlinedButton(
onPressed: canRevoke ? () => _onRevokeSession(session) : null,
style: OutlinedButton.styleFrom(
@@ -1797,6 +1804,9 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
DataColumn(
label: Text(tr('ui.userfront.audit.table.device')),
),
DataColumn(
label: Text(tr('ui.userfront.audit.table.browser')),
),
DataColumn(
label: Text(tr('ui.userfront.audit.table.auth_method')),
),
@@ -1804,10 +1814,20 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
label: Text(tr('ui.userfront.audit.table.result')),
),
DataColumn(
label: Text(tr('ui.userfront.audit.table.status')),
label: SizedBox(
width: _historyStatusColumnWidth,
child: Center(
child: Text(tr('ui.userfront.audit.table.status')),
),
),
),
DataColumn(
label: Text(tr('ui.userfront.audit.table.action')),
label: SizedBox(
width: _historyActionColumnWidth,
child: Center(
child: Text(tr('ui.userfront.audit.table.action')),
),
),
),
],
rows: items.map((log) {
@@ -1828,6 +1848,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
final deviceLabel = _deviceLabelFromUserAgent(
log.userAgent,
);
final browserLabel = _sessionBrowserLabel(log.userAgent);
return DataRow(
cells: [
DataCell(
@@ -1853,6 +1874,13 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
),
),
DataCell(_selectableText(deviceLabel)),
DataCell(
_selectableText(
browserLabel.isEmpty
? tr('ui.common.hyphen', fallback: '-')
: browserLabel,
),
),
DataCell(_buildAuthMethodCell(log, authMethod)),
DataCell(
_selectableText(
@@ -2005,6 +2033,16 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
},
),
),
_selectableText(
tr(
'msg.userfront.audit.browser',
params: {
'value': _sessionBrowserLabel(log.userAgent).isEmpty
? tr('ui.common.hyphen', fallback: '-')
: _sessionBrowserLabel(log.userAgent),
},
),
),
_buildAuthMethodLine(
log,
log.authMethod.isNotEmpty

View File

@@ -413,6 +413,7 @@ const Map<String, String> koStrings = {
"msg.dev.sidebar.notice": "개발자 전용 콘솔입니다.",
"msg.dev.sidebar.notice_detail": "연동 앱 등록 및 관리를 수행할 수 있습니다.",
"msg.info.saved_success": "저장이 완료되었습니다.",
"msg.userfront.audit.browser": "브라우저: {{value}}",
"msg.userfront.audit.date": "접속일자: {{value}}",
"msg.userfront.audit.device": "접속환경: {{value}}",
"msg.userfront.audit.end": "더 이상 항목이 없습니다.",
@@ -1697,6 +1698,7 @@ const Map<String, String> koStrings = {
"ui.userfront.audit.table.action": "관리",
"ui.userfront.audit.table.app": "애플리케이션",
"ui.userfront.audit.table.auth_method": "인증수단",
"ui.userfront.audit.table.browser": "브라우저",
"ui.userfront.audit.table.date": "접속일자",
"ui.userfront.audit.table.device": "접속환경",
"ui.userfront.audit.table.ip": "IP",
@@ -2316,6 +2318,7 @@ const Map<String, String> enStrings = {
"msg.dev.sidebar.notice": "Developer Console",
"msg.dev.sidebar.notice_detail": "Register and manage client applications.",
"msg.info.saved_success": "Saved successfully.",
"msg.userfront.audit.browser": "Browser: {{value}}",
"msg.userfront.audit.date": "Date: {{value}}",
"msg.userfront.audit.device": "Device: {{value}}",
"msg.userfront.audit.end": "No more items to show.",
@@ -3705,6 +3708,7 @@ const Map<String, String> enStrings = {
"ui.userfront.audit.table.action": "Action",
"ui.userfront.audit.table.app": "App",
"ui.userfront.audit.table.auth_method": "Auth Method",
"ui.userfront.audit.table.browser": "Browser",
"ui.userfront.audit.table.date": "Date",
"ui.userfront.audit.table.device": "Device",
"ui.userfront.audit.table.ip": "IP",