Merge branch 'krille/better-fabs' into 'main'

chore: Improve FABs

See merge request famedly/fluffychat!655
This commit is contained in:
Krille Fear 2021-12-31 08:40:09 +00:00
commit 690cc7bf29
4 changed files with 15 additions and 19 deletions

View File

@ -2685,5 +2685,7 @@
"body": {}
}
},
"whoCanSeeMyStoriesDesc": "Please note that people can see and contact each other in your story."
"whoCanSeeMyStoriesDesc": "Please note that people can see and contact each other in your story.",
"whatIsGoingOn": "What is going on?",
"addDescription": "Add description"
}

View File

@ -101,8 +101,9 @@ class AddStoryView extends StatelessWidget {
onChanged: controller.updateColors,
decoration: InputDecoration(
border: InputBorder.none,
hintText:
controller.hasMedia ? 'Add description' : 'How are you?',
hintText: controller.hasMedia
? L10n.of(context)!.addDescription
: L10n.of(context)!.whatIsGoingOn,
filled: false,
hintStyle: TextStyle(
color: Colors.white.withOpacity(0.5),
@ -116,7 +117,6 @@ class AddStoryView extends StatelessWidget {
),
],
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButton:
controller.controller.text.isEmpty && !controller.hasMedia
? null
@ -125,7 +125,7 @@ class AddStoryView extends StatelessWidget {
label: Text(L10n.of(context)!.publish),
backgroundColor: Theme.of(context).colorScheme.surface,
foregroundColor: Theme.of(context).colorScheme.onSurface,
icon: const Icon(Icons.check_circle),
icon: const Icon(Icons.send_rounded),
),
);
}

View File

@ -113,13 +113,12 @@ class _InviteStoryPageState extends State<InviteStoryPage> {
),
);
}),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
floatingActionButton: FloatingActionButton.extended(
onPressed: _inviteAction,
label: Text(L10n.of(context)!.publish),
backgroundColor: Theme.of(context).colorScheme.surface,
foregroundColor: Theme.of(context).colorScheme.onSurface,
icon: const Icon(Icons.upload_outlined),
icon: const Icon(Icons.send_rounded),
),
);
}

View File

@ -206,18 +206,13 @@ class ChatListView extends StatelessWidget {
Expanded(child: _ChatListViewBody(controller)),
]),
floatingActionButton: selectMode == SelectMode.normal
? controller.scrolledToTop
? FloatingActionButton.extended(
isExtended: controller.scrolledToTop,
onPressed: () =>
VRouter.of(context).to('/newprivatechat'),
icon: const Icon(CupertinoIcons.chat_bubble),
label: Text(L10n.of(context).newChat),
)
: FloatingActionButton(
onPressed: () =>
VRouter.of(context).to('/newprivatechat'),
child: const Icon(CupertinoIcons.chat_bubble),
)
: null,
bottomNavigationBar: Column(
mainAxisSize: MainAxisSize.min,