-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(filter) 支持使用 js 代码自定义筛选 oier/school/contest #130
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for oierdb ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
总体不错(其实我之前也实现过类似的,anyway very good),几个建议: 哦对了,一个比较关键的一点是最好支持下异步,我当时写的时候默认当 AsyncFunction 处理的(两个地方,一个是 new AsyncFunction,一个是返回的 |
这个能保证安全性吗?我也是一直在考虑安全性才没有做这个功能来着 |
其实我觉得还好吧,反正就是一个前端的,代码都是自己输入的,就和 F12 控制台的功能一样,只是加了个展示而已 |
代码是在用户浏览器端运行的,不会对服务端造成影响(毕竟部署是静态的),用户代码产生的奇怪后果应该交给用户自己承担 |
Co-authored-by: yhx-12243 <yhx12243@gmail.com>
Monaco 的深色模式模式适配做一下吧。 标题栏可以改一下名,其他几个板块的名称都是名词,感觉一个动词放到这里不是很合适…… |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此外,我看还从 cdn.jsdelivr.net 上加载了一些资源,可否移动到 cdnjs 上加载?目前 OIerDb 在使用我自建的 cdnjs.baoshuo.ren 的镜像。
src/pages/filter/index.tsx
Outdated
</Table.Cell> | ||
<Table.Cell textAlign="center">{school.rank + 1}</Table.Cell> | ||
<Table.Cell> | ||
<Link to={'/school/' + school.id}>{school.name}</Link> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Link to={'/school/' + school.id}>{school.name}</Link> | |
<Link to={`/school/${school.id}`}>{school.name}</Link> |
src/pages/filter/index.tsx
Outdated
<Table.Row key={contest.id}> | ||
<Table.Cell>{contest.id + 1}</Table.Cell> | ||
<Table.Cell> | ||
<Link to={'/contest/' + contest.id}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Link to={'/contest/' + contest.id}> | |
<Link to={`/contest/${contest.id}`}> |
@renbaoshuo 这个可以换成啥呀,感觉不太想得到合适的两字名词 |
我感觉放到顶栏其实不太合适,可以考虑把入口放到搜索框的附近,然后叫「自定义搜索」? |
Demo 可以见 https://oier.yaoxi-std.dev/
(可能有些网络环境的 bug 导致随机 404,不过这个 demo 等到合并以后就不开了所以懒得修)