💄 Optimize styles

This commit is contained in:
LittleSheep 2024-06-27 12:33:43 +08:00
parent 6260e63b09
commit 43242de659
3 changed files with 30 additions and 23 deletions

View File

@ -225,7 +225,7 @@ class SolianMessages extends Translations {
'accountStatusInvisible': 'Invisible', 'accountStatusInvisible': 'Invisible',
'accountStatusInvisibleDesc': 'Will show as offline, but all features still remain normal', 'accountStatusInvisibleDesc': 'Will show as offline, but all features still remain normal',
'accountStatusOffline': 'Offline', 'accountStatusOffline': 'Offline',
'accountLastSeenAt': 'Last seen at @date ago', 'accountLastSeenAt': '@date ago online',
'accountStatusLabel': 'Status Text', 'accountStatusLabel': 'Status Text',
'accountStatusClearAt': 'Clear At', 'accountStatusClearAt': 'Clear At',
'accountStatusNegative': 'Negative', 'accountStatusNegative': 'Negative',

View File

@ -130,7 +130,7 @@ class _AccountStatusEditorDialogState extends State<AccountStatusEditorDialog> {
int _attitude = 0; int _attitude = 0;
DateTime? _clearAt; DateTime? _clearAt;
bool _isInvisible = false; bool _isInvisible = false;
bool _isSlient = false; bool _isSilent = false;
final _labelController = TextEditingController(); final _labelController = TextEditingController();
final _clearAtController = TextEditingController(); final _clearAtController = TextEditingController();
@ -169,7 +169,7 @@ class _AccountStatusEditorDialogState extends State<AccountStatusEditorDialog> {
_labelController.value.text, _labelController.value.text,
_attitude, _attitude,
clearAt: _clearAt, clearAt: _clearAt,
isSilent: _isSlient, isSilent: _isSilent,
isInvisible: _isInvisible, isInvisible: _isInvisible,
isUpdate: widget.currentStatus != null, isUpdate: widget.currentStatus != null,
); );
@ -183,11 +183,14 @@ class _AccountStatusEditorDialogState extends State<AccountStatusEditorDialog> {
void syncWidget() { void syncWidget() {
if (widget.currentStatus != null) { if (widget.currentStatus != null) {
_clearAt = widget.currentStatus!.clearAt; _clearAt = widget.currentStatus!.clearAt;
if (_clearAt != null) {
_clearAtController.text = DateFormat('y/M/d HH:mm').format(_clearAt!); _clearAtController.text = DateFormat('y/M/d HH:mm').format(_clearAt!);
}
_labelController.text = widget.currentStatus!.label; _labelController.text = widget.currentStatus!.label;
_attitude = widget.currentStatus!.attitude; _attitude = widget.currentStatus!.attitude;
_isInvisible = widget.currentStatus!.isInvisible; _isInvisible = widget.currentStatus!.isInvisible;
_isSlient = widget.currentStatus!.isNoDisturb; _isSilent = widget.currentStatus!.isNoDisturb;
} }
} }
@ -223,7 +226,7 @@ class _AccountStatusEditorDialogState extends State<AccountStatusEditorDialog> {
onTapOutside: (_) => onTapOutside: (_) =>
FocusManager.instance.primaryFocus?.unfocus(), FocusManager.instance.primaryFocus?.unfocus(),
), ),
const SizedBox(height: 16), const SizedBox(height: 5),
TextField( TextField(
controller: _clearAtController, controller: _clearAtController,
readOnly: true, readOnly: true,
@ -278,6 +281,7 @@ class _AccountStatusEditorDialogState extends State<AccountStatusEditorDialog> {
], ],
), ),
), ),
const SizedBox(height: 5),
SingleChildScrollView( SingleChildScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: Wrap( child: Wrap(
@ -285,10 +289,10 @@ class _AccountStatusEditorDialogState extends State<AccountStatusEditorDialog> {
runSpacing: 0, runSpacing: 0,
children: [ children: [
ChoiceChip( ChoiceChip(
selected: _isSlient, selected: _isSilent,
label: Text('accountStatusSilent'.tr), label: Text('accountStatusSilent'.tr),
onSelected: (val) { onSelected: (val) {
setState(() => _isSlient = val); setState(() => _isSilent = val);
}, },
), ),
ChoiceChip( ChoiceChip(

View File

@ -273,7 +273,9 @@ class _PostItemState extends State<PostItem> {
attachmentsId: item.attachments ?? List.empty(), attachmentsId: item.attachments ?? List.empty(),
divided: true, divided: true,
), ),
PostQuickAction( SizedBox(
width: MediaQuery.of(context).size.width * 0.9,
child: PostQuickAction(
isShowReply: widget.isShowReply, isShowReply: widget.isShowReply,
isReactable: widget.isReactable, isReactable: widget.isReactable,
item: widget.item, item: widget.item,
@ -289,6 +291,7 @@ class _PostItemState extends State<PostItem> {
right: 16, right: 16,
bottom: 10, bottom: 10,
), ),
),
], ],
); );
} }