1
0
forked from baron/baron-sso

ci: enforce flutter/biome format checks and fix front lint violations

This commit is contained in:
Lectom C Han
2026-02-20 10:25:45 +09:00
parent 226a236bf2
commit c117e10f48
31 changed files with 472 additions and 709 deletions

View File

@@ -172,9 +172,7 @@ class AuthTimelineNotifier extends Notifier<AuthTimelineState> {
state = state.copyWith(
isLoading: false,
isLoadingMore: false,
error: tr(
'msg.userfront.dashboard.timeline.load_error',
),
error: tr('msg.userfront.dashboard.timeline.load_error'),
);
}
}

View File

@@ -71,9 +71,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
final confirmed = await showDialog<bool>(
context: context,
builder: (context) => AlertDialog(
title: Text(
tr('ui.userfront.dashboard.revoke.title'),
),
title: Text(tr('ui.userfront.dashboard.revoke.title')),
content: Text(
tr(
'msg.userfront.dashboard.revoke.confirm',
@@ -88,11 +86,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
TextButton(
onPressed: () => Navigator.of(context).pop(true),
style: TextButton.styleFrom(foregroundColor: Colors.red),
child: Text(
tr(
'ui.userfront.dashboard.revoke.confirm_button',
),
),
child: Text(tr('ui.userfront.dashboard.revoke.confirm_button')),
),
],
),
@@ -166,17 +160,13 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
tr(
'ui.userfront.dashboard.scopes.title',
),
tr('ui.userfront.dashboard.scopes.title'),
style: const TextStyle(fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
if (item.scopes.isEmpty)
Text(
tr(
'msg.userfront.dashboard.scopes.empty',
),
tr('msg.userfront.dashboard.scopes.empty'),
style: const TextStyle(color: Colors.grey),
)
else
@@ -199,9 +189,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
),
const SizedBox(height: 24),
Text(
tr(
'ui.userfront.dashboard.status_history',
),
tr('ui.userfront.dashboard.status_history'),
style: const TextStyle(fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
@@ -219,9 +207,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
builder: (context) {
final statusLabel = item.status == 'active'
? tr('ui.common.status.active')
: tr(
'ui.userfront.dashboard.status.revoked',
);
: tr('ui.userfront.dashboard.status.revoked');
return Text(
tr(
'msg.userfront.dashboard.current_status',
@@ -534,12 +520,8 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
? log.detailMap['approved_session_id'].toString()
: log.sessionId;
final tooltipLabel = isOidc
? tr(
'ui.userfront.dashboard.approved_session.userfront',
)
: tr(
'ui.userfront.dashboard.approved_session.default',
);
? tr('ui.userfront.dashboard.approved_session.userfront')
: tr('ui.userfront.dashboard.approved_session.default');
final tooltip = approvedSessionId.isEmpty
? tr(
'msg.userfront.dashboard.approved_session.none',
@@ -558,9 +540,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
tr(
'msg.userfront.dashboard.session_id_copied',
),
tr('msg.userfront.dashboard.session_id_copied'),
),
),
);
@@ -628,12 +608,8 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
? log.detailMap['approved_session_id'].toString()
: log.sessionId;
final tooltipLabel = isOidc
? tr(
'ui.userfront.dashboard.approved_session.userfront',
)
: tr(
'ui.userfront.dashboard.approved_session.default',
);
? tr('ui.userfront.dashboard.approved_session.userfront')
: tr('ui.userfront.dashboard.approved_session.default');
return InkWell(
onTap: approvedSessionId.isEmpty
? null
@@ -643,9 +619,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
tr(
'msg.userfront.dashboard.session_id_copied',
),
tr('msg.userfront.dashboard.session_id_copied'),
),
),
);
@@ -692,9 +666,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
final label = _appLabelForLog(log);
final clientId = log.clientId;
final tooltip = clientId.isEmpty
? tr(
'msg.userfront.dashboard.client_id_missing',
)
? tr('msg.userfront.dashboard.client_id_missing')
: tr(
'msg.userfront.dashboard.client_id',
fallback: 'Client ID: {{id}}',
@@ -814,21 +786,15 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
const SizedBox(height: 28),
],
_buildSectionTitle(
tr(
'ui.userfront.sections.apps',
),
tr(
'msg.userfront.sections.apps_subtitle',
),
tr('ui.userfront.sections.apps'),
tr('msg.userfront.sections.apps_subtitle'),
),
const SizedBox(height: 12),
_buildActivitySection(isMobile),
const SizedBox(height: 28),
_buildSectionTitle(
tr('ui.userfront.sections.audit'),
tr(
'msg.userfront.sections.audit_subtitle',
),
tr('msg.userfront.sections.audit_subtitle'),
),
const SizedBox(height: 12),
_buildAccessHistory(timelineState, timelineWide),
@@ -857,10 +823,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
tr(
'msg.userfront.greeting',
params: {'name': userName},
),
tr('msg.userfront.greeting', params: {'name': userName}),
style: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
@@ -963,9 +926,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
tr(
'msg.userfront.dashboard.activities.empty',
),
tr('msg.userfront.dashboard.activities.empty'),
style: TextStyle(
fontSize: 14,
color: Colors.grey[700],
@@ -974,9 +935,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
),
const SizedBox(height: 6),
Text(
tr(
'msg.userfront.dashboard.activities.empty_detail',
),
tr('msg.userfront.dashboard.activities.empty_detail'),
style: TextStyle(fontSize: 12, color: Colors.grey[600]),
),
],
@@ -992,9 +951,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
tr(
'msg.userfront.dashboard.activities.error',
),
tr('msg.userfront.dashboard.activities.error'),
style: TextStyle(fontSize: 12, color: Colors.grey[600]),
),
const SizedBox(height: 8),
@@ -1194,9 +1151,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
child: Text(
item.status == 'active'
? tr('ui.common.status.active')
: tr(
'ui.userfront.dashboard.status.revoked',
),
: tr('ui.userfront.dashboard.status.revoked'),
style: TextStyle(
fontSize: 11,
color: statusColor,
@@ -1264,12 +1219,8 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
)
: Text(
item.isRevoked
? tr(
'ui.userfront.dashboard.status.revoked',
)
: tr(
'ui.userfront.dashboard.revoke.title',
),
? tr('ui.userfront.dashboard.status.revoked')
: tr('ui.userfront.dashboard.revoke.title'),
style: const TextStyle(fontSize: 13),
),
),
@@ -1303,22 +1254,14 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
}
messenger.showSnackBar(
SnackBar(
content: Text(
tr(
'msg.userfront.dashboard.link_open_error',
),
),
content: Text(tr('msg.userfront.dashboard.link_open_error')),
),
);
} else {
if (!mounted) return;
messenger.showSnackBar(
SnackBar(
content: Text(
tr(
'msg.userfront.dashboard.link_missing',
),
),
content: Text(tr('msg.userfront.dashboard.link_missing')),
),
);
}
@@ -1344,11 +1287,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
tr(
'msg.userfront.dashboard.audit_load_error',
),
),
Text(tr('msg.userfront.dashboard.audit_load_error')),
const SizedBox(height: 8),
TextButton(
onPressed: () =>
@@ -1365,9 +1304,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
return _buildHistoryContainer(
child: Center(
child: Text(
tr(
'msg.userfront.dashboard.audit_empty',
),
tr('msg.userfront.dashboard.audit_empty'),
style: TextStyle(color: Colors.grey[600]),
),
),
@@ -1416,16 +1353,10 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
),
),
DataColumn(
label: Text(
tr('ui.userfront.audit.table.date'),
),
label: Text(tr('ui.userfront.audit.table.date')),
),
DataColumn(
label: Text(
tr(
'ui.userfront.audit.table.app',
),
),
label: Text(tr('ui.userfront.audit.table.app')),
),
DataColumn(
label: Text(
@@ -1433,30 +1364,16 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
),
),
DataColumn(
label: Text(
tr(
'ui.userfront.audit.table.device',
),
),
label: Text(tr('ui.userfront.audit.table.device')),
),
DataColumn(
label: Text(
tr(
'ui.userfront.audit.table.auth_method',
),
),
label: Text(tr('ui.userfront.audit.table.auth_method')),
),
DataColumn(
label: Text(
tr(
'ui.userfront.audit.table.result',
),
),
label: Text(tr('ui.userfront.audit.table.result')),
),
DataColumn(
label: Text(
tr('ui.userfront.audit.table.status'),
),
label: Text(tr('ui.userfront.audit.table.status')),
),
],
rows: state.items.map((log) {
@@ -1505,9 +1422,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
),
DataCell(
_selectableText(
tr(
'ui.userfront.audit.table.pending',
),
tr('ui.userfront.audit.table.pending'),
style: const TextStyle(color: Colors.grey),
),
),
@@ -1643,11 +1558,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
tr(
'msg.userfront.audit.load_more_error',
),
),
Text(tr('msg.userfront.audit.load_more_error')),
TextButton(
onPressed: () =>
ref.read(authTimelineProvider.notifier).loadMore(),