Skip to content

Commit

Permalink
feat: support for file messages
Browse files Browse the repository at this point in the history
  • Loading branch information
XcantloadX committed Jan 17, 2024
1 parent 2380f54 commit 0e9cffe
Show file tree
Hide file tree
Showing 17 changed files with 207 additions and 18 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
TypstMomoTalk 是 Typst 的一个模板,专用于制作碧蓝档案的 MomoTalk 聊天记录图片。

相较于其他编辑器的优点:
* 高度可自定义;
* 高度可自定义,易于扩展修改
* 类似于 Markdown 的纯文本式编辑体验;
* 可导出为 SVG 与 PDF 矢量图。
相较于其他编辑器的缺点:
Expand All @@ -26,12 +26,12 @@ WIP
## 待办 Todo
- 更多消息
- [ ] 支持行动消息的人物注明
- [ ] 支持文件消息
- [x] 支持文件消息
- [ ] 支持分享卡片消息
- [ ] 支持转账/红包消息
- 其他
- [ ] i18n 支持
- [ ] 优化分页逻辑
- [ ] i18n 支持
- [ ] 优化分页逻辑

## 版权 Copyright
本项目中所有游戏素材图片均来自 [SchaleDB](https://schale.gg/),版权归上海悠星网络科技有限公司(Yostar)与韩国乐线股份有限公司(NEXON)所属。
Expand Down
12 changes: 11 additions & 1 deletion examples/introduction.typ
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#import "/momotalk/momotalk.typ": *
#import "/momotalk/files.typ": *
#import "/momotalk/characters.typ" : *
#show: doc => chat(
doc,
Expand Down Expand Up @@ -28,6 +29,7 @@
(PS:由于字体原因,粗体和中文斜体无法显示。)
],
[当然,你也可以插入图片:#image("/examples/azusa.jpg", width: 30%)],
// arguments(no_box: true)[#image("/examples/azusa.jpg", width: 30%)],
[
以及标题:
= 标题
Expand Down Expand Up @@ -114,11 +116,19 @@
))
#sensei(voice_call[对方已拒绝])
#yuuka[行动消息展示:]
#yuuka[行动消息:]
#action[这是一条行动消息 #emoji.thumb]
#time[15:22:41]
#unsend[优香]
#unsend[优香]
#time[以下是新消息]
#yuuka[文件消息:]
#yuuka((
file("RABBIT dance.mp3", "3.2 MB"),
file("a.mp4", "4.7 GB"),
file("本月开支.xlsx", "2.7 MB", footer: [MomoTalk 电脑版])
))
#sensei(file("检讨.docx", "6.7 MB"))

#yuuka[更多消息类型正在开发中!]
1 change: 1 addition & 0 deletions momotalk/assets/files/audio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/document.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/exe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/image.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/pack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/pdf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/psd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/sheet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/slide.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/txt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/unknown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions momotalk/assets/files/video.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0e9cffe

Please sign in to comment.