Skip to content

Commit 18811dc

Browse files
committed
Fix layout of dialogs
1 parent 10a4d07 commit 18811dc

File tree

10 files changed

+327
-328
lines changed

10 files changed

+327
-328
lines changed

api/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ packages:
318318
dependency: transitive
319319
description:
320320
name: meta
321-
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
321+
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
322322
url: "https://pub.dev"
323323
source: hosted
324-
version: "1.16.0"
324+
version: "1.17.0"
325325
mime:
326326
dependency: transitive
327327
description:

app/lib/pages/alarm/countdown.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class _AlarmCountdownPageState extends State<AlarmCountdownPage> {
6262
children: [
6363
FittedBox(
6464
child: Text(
65-
'${_duration.inDays}:${_duration.inHours % 24}:${(_duration.inMinutes % 60).toString().padLeft(2, '0')}:${(_duration.inSeconds % 60).toString().padLeft(2, '0')}',
65+
'${_duration.inDays}:${(_duration.inHours % 24).toString().padLeft(2, '0')}:${(_duration.inMinutes % 60).toString().padLeft(2, '0')}:${(_duration.inSeconds % 60).toString().padLeft(2, '0')}',
6666
style: TextStyle(
6767
fontSize: fontSize.toDouble(),
6868
fontWeight: FontWeight.w900,
@@ -72,11 +72,12 @@ class _AlarmCountdownPageState extends State<AlarmCountdownPage> {
7272
const SizedBox(height: 20),
7373
Text(
7474
_alarm.title,
75-
style: Theme.of(context).textTheme.headlineMedium,
75+
style: TextTheme.of(context).headlineLarge,
7676
),
7777
const SizedBox(height: 4),
7878
Text(
7979
DateFormat.yMMMMEEEEd().format(_alarm.date),
80+
style: TextTheme.of(context).bodyLarge,
8081
),
8182
Text(
8283
DateFormat.Hm().format(_alarm.date),

app/lib/pages/notes/label.dart

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class LabelDialog extends StatelessWidget {
3030
var currentSource = source ?? '';
3131
var currentService =
3232
context.read<FlowCubit>().getService(currentSource).label;
33-
return AlertDialog(
33+
return ResponsiveAlertDialog(
3434
title: Row(
3535
mainAxisSize: MainAxisSize.min,
3636
children: [
@@ -56,45 +56,42 @@ class LabelDialog extends StatelessWidget {
5656
: AppLocalizations.of(context).editLabel),
5757
],
5858
),
59-
content: SizedBox(
60-
width: 500,
61-
child: Column(children: [
62-
if (source == null) ...[
63-
SourceDropdown<LabelService>(
64-
value: currentSource,
65-
buildService: (e) => e.label,
66-
onChanged: (connected) {
67-
currentSource = connected?.source ?? '';
68-
},
69-
),
70-
const SizedBox(height: 16),
71-
],
72-
TextFormField(
73-
decoration: InputDecoration(
74-
labelText: AppLocalizations.of(context).name,
75-
filled: true,
76-
icon: const PhosphorIcon(PhosphorIconsLight.fileText),
77-
),
78-
initialValue: currentLabel.name,
79-
onChanged: (value) {
80-
currentLabel = currentLabel.copyWith(name: value);
59+
constraints: const BoxConstraints(maxWidth: LeapBreakpoints.compact),
60+
content: ListView(shrinkWrap: true, children: [
61+
if (source == null) ...[
62+
SourceDropdown<LabelService>(
63+
value: currentSource,
64+
buildService: (e) => e.label,
65+
onChanged: (connected) {
66+
currentSource = connected?.source ?? '';
8167
},
8268
),
8369
const SizedBox(height: 16),
84-
MarkdownField(
85-
decoration: InputDecoration(
86-
labelText: AppLocalizations.of(context).description,
87-
border: const OutlineInputBorder(),
88-
icon: const PhosphorIcon(PhosphorIconsLight.fileText),
89-
),
90-
value: currentLabel.description,
91-
onChanged: (value) {
92-
currentLabel = currentLabel.copyWith(description: value);
93-
},
94-
)
95-
]),
96-
),
97-
scrollable: true,
70+
],
71+
TextFormField(
72+
decoration: InputDecoration(
73+
labelText: AppLocalizations.of(context).name,
74+
filled: true,
75+
icon: const PhosphorIcon(PhosphorIconsLight.fileText),
76+
),
77+
initialValue: currentLabel.name,
78+
onChanged: (value) {
79+
currentLabel = currentLabel.copyWith(name: value);
80+
},
81+
),
82+
const SizedBox(height: 16),
83+
MarkdownField(
84+
decoration: InputDecoration(
85+
labelText: AppLocalizations.of(context).description,
86+
border: const OutlineInputBorder(),
87+
icon: const PhosphorIcon(PhosphorIconsLight.fileText),
88+
),
89+
value: currentLabel.description,
90+
onChanged: (value) {
91+
currentLabel = currentLabel.copyWith(description: value);
92+
},
93+
)
94+
]),
9895
actions: [
9996
TextButton(
10097
onPressed: () => Navigator.of(context).pop(),

app/lib/pages/resources/resource.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ResourceDialog extends StatelessWidget {
3939
title: Text(create
4040
? AppLocalizations.of(context).createResource
4141
: AppLocalizations.of(context).editResource),
42-
constraints: const BoxConstraints(maxWidth: 600, maxHeight: 800),
42+
constraints: const BoxConstraints(maxWidth: 600, maxHeight: 500),
4343
content: DefaultTabController(
4444
length: tabs ? 3 : 1,
4545
child: Column(

app/lib/pages/users/user.dart

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'package:flow_api/models/model.dart';
33
import 'package:flutter/material.dart';
44
import 'package:flutter_bloc/flutter_bloc.dart';
55
import 'package:flow/src/generated/i18n/app_localizations.dart';
6+
import 'package:material_leap/material_leap.dart';
67
import 'package:phosphor_flutter/phosphor_flutter.dart';
78
import 'package:flow_api/models/user/model.dart';
89
import 'package:flow_api/models/user/service.dart';
@@ -23,50 +24,47 @@ class UserDialog extends StatelessWidget {
2324
var currentSource = source ?? '';
2425
var currentService =
2526
context.read<FlowCubit>().getService(currentSource).user;
26-
return AlertDialog(
27+
return ResponsiveAlertDialog(
2728
title: Text(source == null
2829
? AppLocalizations.of(context).createUser
2930
: AppLocalizations.of(context).editUser),
30-
content: SizedBox(
31-
width: 500,
32-
child: Column(children: [
33-
if (source == null) ...[
34-
SourceDropdown<UserService>(
35-
value: currentSource,
36-
buildService: (e) => e.user,
37-
onChanged: (connected) {
38-
currentSource = connected?.source ?? '';
39-
currentService = connected?.model;
40-
},
41-
),
42-
],
43-
const SizedBox(height: 16),
44-
TextFormField(
45-
decoration: InputDecoration(
46-
labelText: AppLocalizations.of(context).name,
47-
filled: true,
48-
icon: const PhosphorIcon(PhosphorIconsLight.fileText),
49-
),
50-
initialValue: currentUser.name,
51-
onChanged: (value) {
52-
currentUser = currentUser.copyWith(name: value);
31+
constraints: const BoxConstraints(maxWidth: LeapBreakpoints.compact),
32+
content: ListView(shrinkWrap: true, children: [
33+
if (source == null) ...[
34+
SourceDropdown<UserService>(
35+
value: currentSource,
36+
buildService: (e) => e.user,
37+
onChanged: (connected) {
38+
currentSource = connected?.source ?? '';
39+
currentService = connected?.model;
5340
},
5441
),
55-
const SizedBox(height: 16),
56-
MarkdownField(
57-
decoration: InputDecoration(
58-
labelText: AppLocalizations.of(context).description,
59-
border: const OutlineInputBorder(),
60-
icon: const PhosphorIcon(PhosphorIconsLight.fileText),
61-
),
62-
value: currentUser.description,
63-
onChanged: (value) {
64-
currentUser = currentUser.copyWith(description: value);
65-
},
42+
],
43+
const SizedBox(height: 16),
44+
TextFormField(
45+
decoration: InputDecoration(
46+
labelText: AppLocalizations.of(context).name,
47+
filled: true,
48+
icon: const PhosphorIcon(PhosphorIconsLight.fileText),
49+
),
50+
initialValue: currentUser.name,
51+
onChanged: (value) {
52+
currentUser = currentUser.copyWith(name: value);
53+
},
54+
),
55+
const SizedBox(height: 16),
56+
MarkdownField(
57+
decoration: InputDecoration(
58+
labelText: AppLocalizations.of(context).description,
59+
border: const OutlineInputBorder(),
60+
icon: const PhosphorIcon(PhosphorIconsLight.fileText),
6661
),
67-
]),
68-
),
69-
scrollable: true,
62+
value: currentUser.description,
63+
onChanged: (value) {
64+
currentUser = currentUser.copyWith(description: value);
65+
},
66+
),
67+
]),
7068
actions: [
7169
TextButton(
7270
onPressed: () => Navigator.of(context).pop(),

app/lib/widgets/markdown_field.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class _MarkdownFieldState extends State<MarkdownField> {
8282
],
8383
)
8484
: Column(
85+
mainAxisSize: MainAxisSize.min,
8586
children: [
8687
SizedBox(height: widget.toolbar?.height),
8788
GestureDetector(

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"@astrojs/check": "^0.9.4",
1414
"@astrojs/react": "^4.2.7",
1515
"@astrojs/starlight": "^0.34.3",
16-
"@phosphor-icons/react": "^2.1.7",
16+
"@phosphor-icons/react": "^2.1.8",
1717
"@types/react": "^19.1.4",
1818
"@types/react-dom": "^19.1.5",
19-
"astro": "^5.7.12",
19+
"astro": "^5.7.13",
2020
"react": "^19.1.0",
2121
"react-dom": "^19.1.0",
2222
"remark-gemoji": "^8.0.0",
@@ -26,7 +26,7 @@
2626
"packageManager": "[email protected]",
2727
"devDependencies": {
2828
"@vite-pwa/astro": "^1.1.0",
29-
"sass": "^1.88.0",
29+
"sass": "^1.89.0",
3030
"sharp": "^0.34.1",
3131
"vite-plugin-pwa": "^1.0.0",
3232
"workbox-window": "^7.3.0"

0 commit comments

Comments
 (0)