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