Skip to content

Commit

Permalink
fix: update right panel form
Browse files Browse the repository at this point in the history
  • Loading branch information
MuZhou233 committed Jul 1, 2024
1 parent 7b0a279 commit 3a92eda
Show file tree
Hide file tree
Showing 17 changed files with 404 additions and 515 deletions.
2 changes: 0 additions & 2 deletions lib/route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ import 'view/pages/settings/user/user_manage_page.dart';
import 'view/pages/tiphereth/tiphereth_frame_page.dart';
import 'view/pages/web_landing_page.dart';
import 'view/pages/yesod/yesod_action_manage_page.dart';
import 'view/pages/yesod/yesod_feed_manage_add_panel.dart';
import 'view/pages/yesod/yesod_feed_manage_edit_panel.dart';
import 'view/pages/yesod/yesod_feed_manage_page.dart';
import 'view/pages/yesod/yesod_nav.dart';
import 'view/pages/yesod/yesod_recent_page.dart';
Expand Down
12 changes: 0 additions & 12 deletions lib/view/pages/settings/app/app_add_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,13 @@ class AppAddPanel extends StatelessWidget {
return null;
},
),
const SizedBox(
height: 16,
),
TextFormField(
onSaved: (newValue) => shortDescription = newValue!,
decoration: const InputDecoration(
border: OutlineInputBorder(),
labelText: '描述',
),
),
const SizedBox(
height: 16,
),
TextFormField(
onSaved: (newValue) => iconImageUrl = newValue!,
decoration: const InputDecoration(
Expand All @@ -66,9 +60,6 @@ class AppAddPanel extends StatelessWidget {
),
maxLines: null,
),
const SizedBox(
height: 16,
),
TextFormField(
onSaved: (newValue) => backgroundImageUrl = newValue!,
decoration: const InputDecoration(
Expand All @@ -77,9 +68,6 @@ class AppAddPanel extends StatelessWidget {
),
maxLines: null,
),
const SizedBox(
height: 16,
),
TextFormField(
onSaved: (newValue) => coverImageUrl = newValue!,
decoration: const InputDecoration(
Expand Down
18 changes: 0 additions & 18 deletions lib/view/pages/settings/app/app_edit_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ class _AppEditPanelState extends State<AppEditPanel> {
Text('ID: ${widget.app.id.id.toHexString()}'),
Text('Source: ${appSourceString(widget.app.source)}'),
Text('SourceUrl: ${widget.app.sourceUrl}'),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: widget.app.id.id.toString(),
readOnly: true,
Expand All @@ -66,9 +63,6 @@ class _AppEditPanelState extends State<AppEditPanel> {
labelText: 'ID',
),
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: name,
readOnly: readOnly,
Expand All @@ -84,9 +78,6 @@ class _AppEditPanelState extends State<AppEditPanel> {
return null;
},
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: shortDescription,
readOnly: readOnly,
Expand All @@ -97,9 +88,6 @@ class _AppEditPanelState extends State<AppEditPanel> {
),
maxLines: null,
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: iconImageUrl,
readOnly: readOnly,
Expand All @@ -110,9 +98,6 @@ class _AppEditPanelState extends State<AppEditPanel> {
),
maxLines: null,
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: backgroundImageUrl,
readOnly: readOnly,
Expand All @@ -123,9 +108,6 @@ class _AppEditPanelState extends State<AppEditPanel> {
),
maxLines: null,
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: coverImageUrl,
readOnly: readOnly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ class AppPackageAddPanel extends StatelessWidget {
return null;
},
),
const SizedBox(
height: 16,
),
TextFormField(
onSaved: (newValue) => description = newValue!,
decoration: const InputDecoration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ class _AppPackageEditPanelState extends State<AppPackageEditPanel> {
title: const Text('应用包详情'),
formFields: [
Text('ID: ${widget.appPackage.id.id.toHexString()}'),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: name,
onSaved: (newValue) => name = newValue!,
Expand All @@ -63,9 +60,6 @@ class _AppPackageEditPanelState extends State<AppPackageEditPanel> {
return null;
},
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: description,
onSaved: (newValue) => description = newValue!,
Expand All @@ -75,9 +69,6 @@ class _AppPackageEditPanelState extends State<AppPackageEditPanel> {
),
maxLines: null,
),
const SizedBox(
height: 16,
),
ElevatedButton(
onPressed: () {
unawaited(showDialog<void>(
Expand Down
12 changes: 0 additions & 12 deletions lib/view/pages/settings/notify/notify_target_add_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ class NotifyTargetAddPanel extends StatelessWidget {
return null;
},
),
const SizedBox(
height: 16,
),
TextFormField(
onChanged: (newValue) => description = newValue,
decoration: const InputDecoration(
Expand All @@ -68,9 +65,6 @@ class NotifyTargetAddPanel extends StatelessWidget {
labelText: '备注',
),
),
const SizedBox(
height: 16,
),
DropdownButtonFormField(
decoration: InputDecoration(
icon: const Icon(Icons.place),
Expand All @@ -93,9 +87,6 @@ class NotifyTargetAddPanel extends StatelessWidget {
return null;
},
),
const SizedBox(
height: 16,
),
TextFormField(
onChanged: (newValue) => token = newValue,
decoration: const InputDecoration(
Expand All @@ -110,9 +101,6 @@ class NotifyTargetAddPanel extends StatelessWidget {
return null;
},
),
const SizedBox(
height: 16,
),
SwitchFormField(
onSaved: (newValue) => enabled = newValue ?? false,
title: const Text('启用'),
Expand Down
15 changes: 0 additions & 15 deletions lib/view/pages/settings/notify/notify_target_edit_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ class NotifyTargetEditPanel extends StatelessWidget {
labelText: 'ID',
),
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: name,
onSaved: (newValue) => name = newValue!,
Expand All @@ -76,9 +73,6 @@ class NotifyTargetEditPanel extends StatelessWidget {
return null;
},
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: description,
onSaved: (newValue) => description = newValue!,
Expand All @@ -88,9 +82,6 @@ class NotifyTargetEditPanel extends StatelessWidget {
label: Text('备注'),
),
),
const SizedBox(
height: 16,
),
DropdownButtonFormField(
decoration: InputDecoration(
icon: const Icon(Icons.place),
Expand All @@ -113,9 +104,6 @@ class NotifyTargetEditPanel extends StatelessWidget {
return null;
},
),
const SizedBox(
height: 16,
),
TextFormField(
onSaved: (newValue) => token = newValue!,
decoration: const InputDecoration(
Expand All @@ -124,9 +112,6 @@ class NotifyTargetEditPanel extends StatelessWidget {
label: Text('Token'),
),
),
const SizedBox(
height: 16,
),
SwitchFormField(
initialValue: enabled,
onSaved: (newValue) => enabled = newValue!,
Expand Down
15 changes: 0 additions & 15 deletions lib/view/pages/settings/porter/porter_edit_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ class PorterEditPanel extends StatelessWidget {
labelText: 'ID',
),
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: porter.name,
readOnly: true,
Expand All @@ -56,9 +53,6 @@ class PorterEditPanel extends StatelessWidget {
labelText: '名称',
),
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: porter.version,
readOnly: true,
Expand All @@ -67,9 +61,6 @@ class PorterEditPanel extends StatelessWidget {
label: Text('版本'),
),
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: porter.globalName,
readOnly: true,
Expand All @@ -78,9 +69,6 @@ class PorterEditPanel extends StatelessWidget {
labelText: '全局名称',
),
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: porter.featureSummary,
readOnly: true,
Expand All @@ -89,9 +77,6 @@ class PorterEditPanel extends StatelessWidget {
label: Text('支持功能'),
),
),
const SizedBox(
height: 16,
),
SwitchFormField(
initialValue: enabled,
onSaved: (newValue) => enabled = newValue!,
Expand Down
12 changes: 0 additions & 12 deletions lib/view/pages/settings/session/session_edit_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,20 @@ class SessionEditPanel extends StatelessWidget {
labelText: S.of(context).id,
),
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: '${session.deviceInfo.deviceName} ',
readOnly: true,
decoration: InputDecoration(
labelText: S.of(context).deviceName,
),
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: '${session.deviceInfo.systemVersion} ',
readOnly: true,
decoration: InputDecoration(
label: Text(S.of(context).operatingSystem),
),
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue:
'${session.deviceInfo.clientName} ${session.deviceInfo.clientVersion}',
Expand All @@ -73,9 +64,6 @@ class SessionEditPanel extends StatelessWidget {
labelText: S.of(context).client,
),
),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: session.createTime
.toDateTime(toLocal: true)
Expand Down
9 changes: 0 additions & 9 deletions lib/view/pages/settings/user/user_add_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ class _UserAddPanelState extends State<UserAddPanel> {
return null;
},
),
const SizedBox(
height: 16,
),
TextFormField(
onSaved: (newValue) => password = newValue!,
obscureText: passwordSecure,
Expand Down Expand Up @@ -89,9 +86,6 @@ class _UserAddPanelState extends State<UserAddPanel> {
return null;
},
),
const SizedBox(
height: 16,
),
DropdownButtonFormField(
decoration: const InputDecoration(
icon: Icon(Icons.security),
Expand Down Expand Up @@ -119,9 +113,6 @@ class _UserAddPanelState extends State<UserAddPanel> {
});
},
),
const SizedBox(
height: 16,
),
DropdownButtonFormField(
decoration: const InputDecoration(
icon: Icon(Icons.settings),
Expand Down
12 changes: 0 additions & 12 deletions lib/view/pages/settings/user/user_edit_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ class _UserEditPanelState extends State<UserEditPanel> {
title: const Text('用户详情'),
formFields: [
Text('ID: ${widget.user.id.id.toHexString()}'),
const SizedBox(
height: 16,
),
TextFormField(
initialValue: username,
onSaved: (newValue) => username = newValue!,
Expand All @@ -69,9 +66,6 @@ class _UserEditPanelState extends State<UserEditPanel> {
return null;
},
),
const SizedBox(
height: 16,
),
DropdownButtonFormField(
decoration: const InputDecoration(
icon: Icon(Icons.security),
Expand Down Expand Up @@ -99,9 +93,6 @@ class _UserEditPanelState extends State<UserEditPanel> {
});
},
),
const SizedBox(
height: 16,
),
DropdownButtonFormField(
decoration: const InputDecoration(
icon: Icon(Icons.settings),
Expand All @@ -125,9 +116,6 @@ class _UserEditPanelState extends State<UserEditPanel> {
});
},
),
const SizedBox(
height: 16,
),
ExpansionTile(
title: const Text('修改密码'),
children: [
Expand Down
Loading

0 comments on commit 3a92eda

Please sign in to comment.