New chat menu

This commit is contained in:
LittleSheep 2024-04-19 19:48:31 +08:00
parent ac280f2d40
commit 9ac7357e49
4 changed files with 34 additions and 14 deletions

View File

@ -38,6 +38,8 @@
"reactionAdded": "Your reaction has been added.",
"reactionRemoved": "Your reaction has been removed.",
"chatNew": "New Chat",
"chatNewCreate": "Create a channel",
"chatNewJoin": "Join a exists channel",
"chatMessagePlaceholder": "Write a message...",
"chatMessageEditNotify": "You are about editing a message.",
"chatMessageReplyNotify": "You are about replying a message.",

View File

@ -38,6 +38,8 @@
"reactionAdded": "你的反应已被添加。",
"reactionRemoved": "你的反应已被移除。",
"chatNew": "新聊天",
"chatNewCreate": "新建频道",
"chatNewJoin": "加入已有频道",
"chatMessagePlaceholder": "发条消息……",
"chatMessageEditNotify": "你正在编辑信息中……",
"chatMessageReplyNotify": "你正在回复消息中……",

View File

@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@ -19,6 +20,20 @@ class ChatNewAction extends StatelessWidget {
style: Theme.of(context).textTheme.headlineSmall,
),
),
Expanded(
child: ListView(
children: [
ListTile(
leading: const Icon(Icons.add),
title: Text(AppLocalizations.of(context)!.chatNewCreate),
),
ListTile(
leading: const Icon(Icons.travel_explore),
title: Text(AppLocalizations.of(context)!.chatNewJoin),
),
],
),
),
],
),
);

View File

@ -29,20 +29,21 @@ class ChatMessage extends StatelessWidget {
Container(
padding: const EdgeInsets.only(left: 8, right: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(math.pi),
child: const Icon(Icons.reply, size: 16),
),
const SizedBox(width: 8),
CircleAvatar(
radius: 10,
backgroundImage: NetworkImage(item.replyTo!.sender.account.avatar),
),
]),
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(math.pi),
child: const Icon(Icons.reply, size: 16),
),
const SizedBox(width: 8),
CircleAvatar(
radius: 10,
backgroundImage: NetworkImage(item.replyTo!.sender.account.avatar),
),
],
),
),
Expanded(
child: Column(