Compare commits
5 Commits
f494f70003
...
9d0e19c56f
Author | SHA1 | Date | |
---|---|---|---|
9d0e19c56f | |||
acf4e634fe | |||
25942c2338 | |||
a4f81f6ba1 | |||
c1b9090e51 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sync": {
|
"sync": {
|
||||||
"region": "solian-next",
|
"region": "solian",
|
||||||
"configPath": "roadsign.toml"
|
"configPath": "roadsign.toml"
|
||||||
},
|
},
|
||||||
"deployments": [
|
"deployments": [
|
||||||
|
@ -74,6 +74,7 @@ class ChatMessageController extends ChangeNotifier {
|
|||||||
_wsSubscription = _ws.stream.stream.listen((event) {
|
_wsSubscription = _ws.stream.stream.listen((event) {
|
||||||
switch (event.method) {
|
switch (event.method) {
|
||||||
case 'events.new':
|
case 'events.new':
|
||||||
|
if (event.payload?['channel_id'] != channel?.id) break;
|
||||||
final payload = SnChatMessage.fromJson(event.payload!);
|
final payload = SnChatMessage.fromJson(event.payload!);
|
||||||
_addMessage(payload);
|
_addMessage(payload);
|
||||||
break;
|
break;
|
||||||
|
@ -106,6 +106,44 @@ class _AttachmentListState extends State<AttachmentList> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (widget.gridded) {
|
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(
|
return Container(
|
||||||
margin: widget.padding ?? EdgeInsets.zero,
|
margin: widget.padding ?? EdgeInsets.zero,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
@ -251,11 +251,14 @@ class _ChatMessageText extends StatelessWidget {
|
|||||||
buttonItems: items,
|
buttonItems: items,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
child: Container(
|
||||||
|
constraints: const BoxConstraints(maxWidth: 480),
|
||||||
child: MarkdownTextContent(
|
child: MarkdownTextContent(
|
||||||
content: data.body['text'],
|
content: data.body['text'],
|
||||||
isAutoWarp: true,
|
isAutoWarp: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
if (data.updatedAt != data.createdAt)
|
if (data.updatedAt != data.createdAt)
|
||||||
Text(
|
Text(
|
||||||
'messageEditedHint'.tr(),
|
'messageEditedHint'.tr(),
|
||||||
|
@ -117,7 +117,7 @@ class ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
// Send the message
|
// 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
|
// 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(
|
widget.controller.sendMessage(
|
||||||
'messages.new',
|
_editingMessage != null ? 'messages.edit' : 'messages.new',
|
||||||
_contentController.text,
|
_contentController.text,
|
||||||
attachments: _attachments.where((e) => e.attachment != null).map((e) => e.attachment!.rid).toList(),
|
attachments: _attachments.where((e) => e.attachment != null).map((e) => e.attachment!.rid).toList(),
|
||||||
relatedId: _editingMessage?.id,
|
relatedId: _editingMessage?.id,
|
||||||
|
@ -880,6 +880,7 @@ class _PostContentBody extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (data.body['content'] == null) return const SizedBox.shrink();
|
if (data.body['content'] == null) return const SizedBox.shrink();
|
||||||
final content = MarkdownTextContent(
|
final content = MarkdownTextContent(
|
||||||
|
isAutoWarp: data.type == 'story',
|
||||||
isEnlargeSticker: true,
|
isEnlargeSticker: true,
|
||||||
textScaler: isEnlarge ? TextScaler.linear(1.1) : null,
|
textScaler: isEnlarge ? TextScaler.linear(1.1) : null,
|
||||||
content: data.body['content'],
|
content: data.body['content'],
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
id = "solian-next"
|
id = "solian"
|
||||||
|
|
||||||
[[locations]]
|
[[locations]]
|
||||||
id = "solian-next"
|
id = "solian"
|
||||||
host = ["sn-next.solsynth.dev"]
|
host = ["sn.solsynth.dev"]
|
||||||
path = ["/"]
|
path = ["/"]
|
||||||
[[locations.destinations]]
|
[[locations.destinations]]
|
||||||
id = "solian-next-web"
|
id = "solian-web"
|
||||||
uri = "files:///workdir/solian-next?fallback=index.html&index=index.html"
|
uri = "files:///workdir/solian?fallback=index.html&index=index.html"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user