mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 04:59:26 +01:00
fix: Improve story page appearance
This commit is contained in:
parent
5efff9a1e9
commit
857eea428e
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:fluffychat/config/app_config.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
@ -105,6 +106,10 @@ class StoryView extends StatelessWidget {
|
|||||||
M2PopupMenuButton<PopupStoryAction>(
|
M2PopupMenuButton<PopupStoryAction>(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
onSelected: controller.onPopupStoryAction,
|
onSelected: controller.onPopupStoryAction,
|
||||||
|
icon: Icon(
|
||||||
|
Icons.adaptive.more_outlined,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
itemBuilder: (context) => [
|
itemBuilder: (context) => [
|
||||||
if (controller.currentEvent?.canRedact ?? false)
|
if (controller.currentEvent?.canRedact ?? false)
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
@ -303,7 +308,8 @@ class StoryView extends StatelessWidget {
|
|||||||
? LinearProgressIndicator(
|
? LinearProgressIndicator(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
minHeight: 2,
|
minHeight: 2,
|
||||||
backgroundColor: Colors.grey.shade600,
|
backgroundColor:
|
||||||
|
Colors.white.withOpacity(0.25),
|
||||||
value: controller.loadingMode
|
value: controller.loadingMode
|
||||||
? null
|
? null
|
||||||
: controller.progress.inMilliseconds /
|
: controller.progress.inMilliseconds /
|
||||||
@ -315,7 +321,7 @@ class StoryView extends StatelessWidget {
|
|||||||
height: 2,
|
height: 2,
|
||||||
color: i < controller.index
|
color: i < controller.index
|
||||||
? Colors.white
|
? Colors.white
|
||||||
: Colors.grey.shade600,
|
: Colors.white.withOpacity(0.25),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -324,36 +330,47 @@ class StoryView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
if (!controller.isOwnStory && currentEvent != null)
|
if (!controller.isOwnStory && currentEvent != null)
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 16,
|
bottom: 8,
|
||||||
left: 16,
|
left: 8,
|
||||||
right: 16,
|
right: 8,
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: TextField(
|
child: Material(
|
||||||
focusNode: controller.replyFocus,
|
borderRadius: const BorderRadius.only(
|
||||||
controller: controller.replyController,
|
bottomLeft: Radius.circular(AppConfig.borderRadius),
|
||||||
onSubmitted: controller.replyAction,
|
bottomRight: Radius.circular(AppConfig.borderRadius),
|
||||||
textInputAction: TextInputAction.send,
|
),
|
||||||
readOnly: controller.replyLoading,
|
shadowColor: Colors.black.withAlpha(64),
|
||||||
decoration: InputDecoration(
|
clipBehavior: Clip.hardEdge,
|
||||||
hintText: L10n.of(context)!.reply,
|
elevation: 4,
|
||||||
prefixIcon: IconButton(
|
child: TextField(
|
||||||
onPressed: controller.replyEmojiAction,
|
focusNode: controller.replyFocus,
|
||||||
icon: const Icon(Icons.emoji_emotions_outlined),
|
controller: controller.replyController,
|
||||||
),
|
onSubmitted: controller.replyAction,
|
||||||
suffixIcon: controller.replyLoading
|
textInputAction: TextInputAction.send,
|
||||||
? const SizedBox(
|
readOnly: controller.replyLoading,
|
||||||
width: 16,
|
decoration: InputDecoration(
|
||||||
height: 16,
|
contentPadding:
|
||||||
child: Center(
|
const EdgeInsets.fromLTRB(0, 16, 0, 16),
|
||||||
child: CircularProgressIndicator.adaptive(
|
hintText: L10n.of(context)!.reply,
|
||||||
strokeWidth: 2),
|
prefixIcon: IconButton(
|
||||||
|
onPressed: controller.replyEmojiAction,
|
||||||
|
icon: const Icon(Icons.emoji_emotions_outlined),
|
||||||
|
),
|
||||||
|
suffixIcon: controller.replyLoading
|
||||||
|
? const SizedBox(
|
||||||
|
width: 16,
|
||||||
|
height: 16,
|
||||||
|
child: Center(
|
||||||
|
child: CircularProgressIndicator.adaptive(
|
||||||
|
strokeWidth: 2),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: IconButton(
|
||||||
|
onPressed: controller.replyAction,
|
||||||
|
icon: const Icon(Icons.send_outlined),
|
||||||
),
|
),
|
||||||
)
|
fillColor: Theme.of(context).colorScheme.background,
|
||||||
: IconButton(
|
),
|
||||||
onPressed: controller.replyAction,
|
|
||||||
icon: const Icon(Icons.send_outlined),
|
|
||||||
),
|
|
||||||
fillColor: Theme.of(context).colorScheme.background,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user