mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-20 02:59:26 +01:00
chore: Follow up fixes new login design
This commit is contained in:
parent
1a2eb272fa
commit
0f1bb4dccf
@ -36,48 +36,52 @@ class ConnectPageView extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Material(
|
child: Stack(
|
||||||
borderRadius: BorderRadius.circular(64),
|
children: [
|
||||||
elevation: 10,
|
Material(
|
||||||
color: Colors.transparent,
|
borderRadius: BorderRadius.circular(64),
|
||||||
child: CircleAvatar(
|
elevation: 10,
|
||||||
radius: 64,
|
color: Colors.transparent,
|
||||||
backgroundColor: Colors.white.withAlpha(200),
|
clipBehavior: Clip.hardEdge,
|
||||||
child: Stack(
|
child: CircleAvatar(
|
||||||
children: [
|
radius: 64,
|
||||||
Center(
|
backgroundColor: Colors.white.withAlpha(200),
|
||||||
child: avatar == null
|
child: avatar == null
|
||||||
? const Icon(
|
? const Icon(
|
||||||
Icons.person_outlined,
|
Icons.person_outlined,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
size: 64,
|
size: 64,
|
||||||
)
|
)
|
||||||
: FutureBuilder<Uint8List>(
|
: FutureBuilder<Uint8List>(
|
||||||
future: avatar.readAsBytes(),
|
future: avatar.readAsBytes(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
final bytes = snapshot.data;
|
final bytes = snapshot.data;
|
||||||
if (bytes == null) {
|
if (bytes == null) {
|
||||||
return const CircularProgressIndicator
|
return const CircularProgressIndicator
|
||||||
.adaptive();
|
.adaptive();
|
||||||
}
|
}
|
||||||
return Image.memory(bytes);
|
return Image.memory(
|
||||||
},
|
bytes,
|
||||||
),
|
fit: BoxFit.cover,
|
||||||
),
|
width: 128,
|
||||||
Positioned(
|
height: 128,
|
||||||
bottom: 0,
|
);
|
||||||
right: 0,
|
},
|
||||||
child: FloatingActionButton(
|
),
|
||||||
mini: true,
|
),
|
||||||
onPressed: controller.pickAvatar,
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
foregroundColor: Colors.black,
|
|
||||||
child: const Icon(Icons.camera_alt_outlined),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
right: 0,
|
||||||
|
child: FloatingActionButton(
|
||||||
|
mini: true,
|
||||||
|
onPressed: controller.pickAvatar,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
foregroundColor: Colors.black,
|
||||||
|
child: const Icon(Icons.camera_alt_outlined),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -34,9 +34,11 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||||||
|
|
||||||
void _updateFocus() {
|
void _updateFocus() {
|
||||||
if (benchmarkResults == null) _loadHomeserverList();
|
if (benchmarkResults == null) _loadHomeserverList();
|
||||||
setState(() {
|
if (homeserverFocusNode.hasFocus) {
|
||||||
displayServerList = homeserverFocusNode.hasFocus;
|
setState(() {
|
||||||
});
|
displayServerList = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void showServerInfo(HomeserverBenchmarkResult server) => showModalBottomSheet(
|
void showServerInfo(HomeserverBenchmarkResult server) => showModalBottomSheet(
|
||||||
@ -76,6 +78,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||||||
homeserverController.text = server;
|
homeserverController.text = server;
|
||||||
searchTerm = '';
|
searchTerm = '';
|
||||||
homeserverFocusNode.unfocus();
|
homeserverFocusNode.unfocus();
|
||||||
|
displayServerList = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/// Starts an analysis of the given homeserver. It uses the current domain and
|
/// Starts an analysis of the given homeserver. It uses the current domain and
|
||||||
|
Loading…
Reference in New Issue
Block a user