Compare commits
5 Commits
f494f70003
...
9d0e19c56f
Author | SHA1 | Date | |
---|---|---|---|
9d0e19c56f | |||
acf4e634fe | |||
25942c2338 | |||
a4f81f6ba1 | |||
c1b9090e51 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"sync": {
|
||||
"region": "solian-next",
|
||||
"region": "solian",
|
||||
"configPath": "roadsign.toml"
|
||||
},
|
||||
"deployments": [
|
||||
|
@ -74,6 +74,7 @@ class ChatMessageController extends ChangeNotifier {
|
||||
_wsSubscription = _ws.stream.stream.listen((event) {
|
||||
switch (event.method) {
|
||||
case 'events.new':
|
||||
if (event.payload?['channel_id'] != channel?.id) break;
|
||||
final payload = SnChatMessage.fromJson(event.payload!);
|
||||
_addMessage(payload);
|
||||
break;
|
||||
|
@ -106,6 +106,44 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
}
|
||||
|
||||
if (widget.gridded) {
|
||||
final fullOfImage =
|
||||
widget.data.where((ele) => ele?.mediaType == SnMediaType.image).length == widget.data.length;
|
||||
if(!fullOfImage) {
|
||||
return Container(
|
||||
margin: widget.padding ?? EdgeInsets.zero,
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor,
|
||||
border: Border(
|
||||
top: borderSide,
|
||||
bottom: borderSide,
|
||||
),
|
||||
borderRadius: AttachmentList.kDefaultRadius,
|
||||
),
|
||||
child: ClipRRect(
|
||||
borderRadius: AttachmentList.kDefaultRadius,
|
||||
child: Column(
|
||||
spacing: 4,
|
||||
children: widget.data
|
||||
.mapIndexed(
|
||||
(idx, ele) => GestureDetector(
|
||||
child: AspectRatio(
|
||||
aspectRatio: ele?.data['ratio']?.toDouble() ?? 1,
|
||||
child: Container(
|
||||
constraints: constraints,
|
||||
child: AttachmentItem(
|
||||
data: ele,
|
||||
heroTag: heroTags[idx],
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return Container(
|
||||
margin: widget.padding ?? EdgeInsets.zero,
|
||||
decoration: BoxDecoration(
|
||||
|
@ -251,11 +251,14 @@ class _ChatMessageText extends StatelessWidget {
|
||||
buttonItems: items,
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
constraints: const BoxConstraints(maxWidth: 480),
|
||||
child: MarkdownTextContent(
|
||||
content: data.body['text'],
|
||||
isAutoWarp: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (data.updatedAt != data.createdAt)
|
||||
Text(
|
||||
'messageEditedHint'.tr(),
|
||||
|
@ -117,7 +117,7 @@ class ChatMessageInputState extends State<ChatMessageInput> {
|
||||
// Send the message
|
||||
// NOTICE This future should not be awaited, so that the message can be sent in the background and the user can continue to type
|
||||
widget.controller.sendMessage(
|
||||
'messages.new',
|
||||
_editingMessage != null ? 'messages.edit' : 'messages.new',
|
||||
_contentController.text,
|
||||
attachments: _attachments.where((e) => e.attachment != null).map((e) => e.attachment!.rid).toList(),
|
||||
relatedId: _editingMessage?.id,
|
||||
|
@ -880,6 +880,7 @@ class _PostContentBody extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
if (data.body['content'] == null) return const SizedBox.shrink();
|
||||
final content = MarkdownTextContent(
|
||||
isAutoWarp: data.type == 'story',
|
||||
isEnlargeSticker: true,
|
||||
textScaler: isEnlarge ? TextScaler.linear(1.1) : null,
|
||||
content: data.body['content'],
|
||||
|
@ -1,9 +1,9 @@
|
||||
id = "solian-next"
|
||||
id = "solian"
|
||||
|
||||
[[locations]]
|
||||
id = "solian-next"
|
||||
host = ["sn-next.solsynth.dev"]
|
||||
id = "solian"
|
||||
host = ["sn.solsynth.dev"]
|
||||
path = ["/"]
|
||||
[[locations.destinations]]
|
||||
id = "solian-next-web"
|
||||
uri = "files:///workdir/solian-next?fallback=index.html&index=index.html"
|
||||
id = "solian-web"
|
||||
uri = "files:///workdir/solian?fallback=index.html&index=index.html"
|
||||
|
Loading…
x
Reference in New Issue
Block a user