Skip to content

改进没有模板时 /模板 的交互 #5636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
Godsing opened this issue Aug 14, 2022 · 4 comments
Closed
1 task done

改进没有模板时 /模板 的交互 #5636

Godsing opened this issue Aug 14, 2022 · 4 comments
Assignees
Milestone

Comments

@Godsing
Copy link

Godsing commented Aug 14, 2022

该问题是否已经被报告过了? Is there an existing issue for this?

  • 我已经搜索了 Issues,没有发现类似问题
    I have searched the existing issues

描述问题 Describe the problem

输入斜杠"/"并点击"模板"后,无反应。
查看控制台,看到如下 warning ⚠️:(每次输入斜杠"/"并点击"模板",就会新增一条相同的 warning)

fetch post error TypeError: Cannot read properties of null (reading 'forEach')
    at main.fd9d4f134e610e43b7f5.js:1:746054
    at main.fd9d4f134e610e43b7f5.js:1:1035713
(匿名) @ main.fd9d4f134e610e43b7f5.js:1
Promise.catch(异步)
t.fetchPost @ main.fd9d4f134e610e43b7f5.js:1
showTpl @ main.fd9d4f134e610e43b7f5.js:1
fill @ main.fd9d4f134e610e43b7f5.js:1
select @ main.fd9d4f134e610e43b7f5.js:1
(匿名) @ main.fd9d4f134e610e43b7f5.js:1

期待的结果 Expected result

展示模板库供选择

截屏或者录屏演示 Screenshot or screen recording presentation

No response

版本环境 Version environment

- Version: 2.1.6
- Operating System: macOS 12.2
- Browser (if used): Not used

日志文件 Log file

siyuan.log

更多信息 More information

No response

@88250
Copy link
Member

88250 commented Aug 14, 2022

我这里重现不了问题,请重建索引以后再试试看。

@88250
Copy link
Member

88250 commented Aug 14, 2022

我先关闭了,如果还有问题请继续跟帖,谢谢 🙏

@88250 88250 closed this as completed Aug 14, 2022
@Godsing
Copy link
Author

Godsing commented Aug 17, 2022

发现原因了:是因为我没有下载任何模板,所以点击模板时无反应,随便下载一个模板后就可以使用了。
顺便提个小建议哈:当用户点击模板时,如果没有已下载的模板,可以给用户一个提示,比如“请到「设置->集市->模板」中先下载模板!”,否则像我这种第一次使用思源笔记的用户,折腾好几天,试了3台电脑(mac, mac-m1, windows),debugger都报相同的错,才意识到“模板可能需要手动下载,而不是安装软件就有的!”(꒦_꒦)

@88250
Copy link
Member

88250 commented Aug 17, 2022

收到,谢谢。

@88250 88250 changed the title 输入斜杠"/"并点击"模板"后无反应 改进没有模板时 /模板 的交互 Aug 17, 2022
@88250 88250 modified the milestones: 2.1.10, 2.1.8 Aug 17, 2022
@88250 88250 reopened this Aug 17, 2022
88250 added a commit that referenced this issue Aug 17, 2022

Unverified

This user has not yet uploaded their public signing key.
Vanessa219 added a commit that referenced this issue Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants