refactor: 移除 AppBar 刷新按钮,统一使用下拉刷新
6 个页面(仪表盘、服务器、任务、告警、审批、常驻指令) 删除右上角 IconButton(Icons.refresh),保留已有的 RefreshIndicator 下拉刷新。 Terminal 页面的刷新按钮是"重新连接"功能,保持不变。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1c291ce6c0
commit
6a84519090
|
|
@ -62,12 +62,6 @@ class _AlertsPageState extends ConsumerState<AlertsPage> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('告警中心'),
|
title: const Text('告警中心'),
|
||||||
actions: [
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Icons.refresh),
|
|
||||||
onPressed: () => ref.invalidate(alertEventsProvider),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
body: RefreshIndicator(
|
body: RefreshIndicator(
|
||||||
onRefresh: () async => ref.invalidate(alertEventsProvider),
|
onRefresh: () async => ref.invalidate(alertEventsProvider),
|
||||||
|
|
|
||||||
|
|
@ -80,12 +80,6 @@ class _ApprovalsPageState extends ConsumerState<ApprovalsPage> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('审批中心'),
|
title: const Text('审批中心'),
|
||||||
actions: [
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Icons.refresh),
|
|
||||||
onPressed: () => ref.invalidate(approvalsProvider),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
|
|
|
||||||
|
|
@ -139,16 +139,6 @@ class DashboardPage extends ConsumerWidget {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('仪表盘'),
|
title: const Text('仪表盘'),
|
||||||
actions: [
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Icons.refresh),
|
|
||||||
onPressed: () {
|
|
||||||
ref.invalidate(serverSummaryProvider);
|
|
||||||
ref.invalidate(alertSummaryProvider);
|
|
||||||
ref.invalidate(recentOpsProvider);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
body: RefreshIndicator(
|
body: RefreshIndicator(
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
|
|
|
||||||
|
|
@ -49,12 +49,6 @@ class _ServersPageState extends ConsumerState<ServersPage> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('服务器'),
|
title: const Text('服务器'),
|
||||||
actions: [
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Icons.refresh),
|
|
||||||
onPressed: () => ref.invalidate(serversProvider),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
body: RefreshIndicator(
|
body: RefreshIndicator(
|
||||||
onRefresh: () async => ref.invalidate(serversProvider),
|
onRefresh: () async => ref.invalidate(serversProvider),
|
||||||
|
|
|
||||||
|
|
@ -42,12 +42,6 @@ class StandingOrdersPage extends ConsumerWidget {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('常驻指令'),
|
title: const Text('常驻指令'),
|
||||||
actions: [
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Icons.refresh),
|
|
||||||
onPressed: () => ref.invalidate(standingOrdersProvider),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
body: RefreshIndicator(
|
body: RefreshIndicator(
|
||||||
onRefresh: () async => ref.invalidate(standingOrdersProvider),
|
onRefresh: () async => ref.invalidate(standingOrdersProvider),
|
||||||
|
|
|
||||||
|
|
@ -55,12 +55,6 @@ class TasksPage extends ConsumerWidget {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('运维任务'),
|
title: const Text('运维任务'),
|
||||||
actions: [
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Icons.refresh),
|
|
||||||
onPressed: () => ref.invalidate(tasksProvider),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
body: RefreshIndicator(
|
body: RefreshIndicator(
|
||||||
onRefresh: () async => ref.invalidate(tasksProvider),
|
onRefresh: () async => ref.invalidate(tasksProvider),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue