-
Notifications
You must be signed in to change notification settings - Fork 5
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
Frame, member and project detail layout #67
base: v3
Are you sure you want to change the base?
Conversation
[add] i18n switch, LarkImage component [polish] project, member detail pages
<div className="container mx-auto max-w-screen-xl"> | ||
<PageHead title={t('member')} /> | ||
|
||
<h1 className="my-8">{t('member')}</h1> | ||
|
||
<ScrollList | ||
translator={i18n} | ||
store={memberStore} | ||
renderList={allItems => <MemberListLayout defaultData={allItems} />} | ||
defaultData={list} | ||
/> | ||
</div> | ||
<Frame | ||
title={t('member')} | ||
header={t('member')} | ||
store={memberStore} | ||
Layout={MemberListLayout} | ||
defaultData={list} | ||
/> |
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.
没必要这么高度封装吧?原有三者没有必然强关联,<Frame />
的命名也应该只包含容器、标题,而非具体内容。
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.
三个都是 PageHead
、h1
加 ScrollList
的结构,我可以更改命名为 FrameListLayout
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.
三个都是
PageHead
、h1
加ScrollList
的结构,我可以更改命名为FrameListLayout
如果非要这样的话,命名应该是 ScrollListPage
。
export const blobURLOf = (value: TableCellValue) => | ||
value instanceof Array | ||
? typeof value[0] === 'object' && ('file_token' in value[0] || 'attachmentToken' in value[0]) | ||
? `${fileBaseURI}/${value[0].name}` |
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.
不要再用文件名了,用 token。
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.
R2 那个 PR 合了调通了再改,blobClient 这些都要改
{/** | ||
* @todo replace with LarkImage after R2 is ready | ||
*/} | ||
<img className="object-fill" src={fileURLOf(project.image)} alt={String(project.name)} /> |
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.
现在可以直接用包装组件了,因为有自动的飞书后备接口。
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.
R2 那个 PR 合了调通了再改,blobClient 这些都要改
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.
R2 那个 PR 合了调通了再改,blobClient 这些都要改
包装组件也是调用的同样的 fileURLOf()
,逻辑和路径拼接是解耦的,相互不影响。
} | ||
|
||
/** | ||
* @todo remove ScrollList and use children instead? |
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.
Yes
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.
目前也是兼容直接传 children 的,先不做改动
Co-authored-by: South Drifted [email protected]
Checklist(清单):