-
Notifications
You must be signed in to change notification settings - Fork 6
Add [Open Library] & Library Work Flow #20
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
base: main
Are you sure you want to change the base?
Conversation
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.
- 很多问题在不同文件都有,不一一列举,但都要改
- 软件开发要一个一个模块来,代码量太大对开发者、reviewer、AI 都有巨大上下文负担,很容易跑偏、卡死
- 以后要在看板上多拆几个 issue,不要闷头搞很久后发一个差不多做完整个项目的巨大 PR……
translation/zh-CN.ts
Outdated
donate_books: '捐赠书籍', | ||
how_it_works: '运作方式', | ||
how_it_works_description: '三个简单步骤借阅社区书籍', | ||
step_1_find_book: '1. 寻找书籍', |
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.
数字序号放在 HTML 结构中用 <ol />
实现。
translation/zh-CN.ts
Outdated
available: '可借阅', | ||
borrowed: '已借出', | ||
reset_filters: '重置筛选', | ||
showing_books: '显示 {0} 本书,共 {1} 本', |
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.
</Col> | ||
<Col md={9}> | ||
<h1>{book.title}</h1> | ||
<h5 className="text-muted mb-3">by {book.author}</h5> |
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.
作者信息不是标题,一般用 <cite />
:https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/cite
<Row className="mt-4"> | ||
<Col sm={6} md={3} className="mb-3"> | ||
<div className="text-muted small">ISBN</div> | ||
<div>{book.isbn || 'N/A'}</div> | ||
</Col> | ||
<Col sm={6} md={3} className="mb-3"> | ||
<div className="text-muted small">Publisher</div> | ||
<div>{book.publisher || 'N/A'}</div> | ||
</Col> | ||
<Col sm={6} md={3} className="mb-3"> | ||
<div className="text-muted small">Published</div> | ||
<div>{book.publishYear || 'N/A'}</div> | ||
</Col> | ||
<Col sm={6} md={3} className="mb-3"> | ||
<div className="text-muted small">Pages</div> | ||
<div>{book.pageCount || 'N/A'}</div> | ||
</Col> | ||
</Row> |
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.
<Row className="mt-4"> | |
<Col sm={6} md={3} className="mb-3"> | |
<div className="text-muted small">ISBN</div> | |
<div>{book.isbn || 'N/A'}</div> | |
</Col> | |
<Col sm={6} md={3} className="mb-3"> | |
<div className="text-muted small">Publisher</div> | |
<div>{book.publisher || 'N/A'}</div> | |
</Col> | |
<Col sm={6} md={3} className="mb-3"> | |
<div className="text-muted small">Published</div> | |
<div>{book.publishYear || 'N/A'}</div> | |
</Col> | |
<Col sm={6} md={3} className="mb-3"> | |
<div className="text-muted small">Pages</div> | |
<div>{book.pageCount || 'N/A'}</div> | |
</Col> | |
</Row> | |
<Row as="ul" className="list-unstyled mt-4 g-3" sm={2} md={4}> | |
<Col as="li"> | |
<div className="text-muted small">ISBN</div> | |
<div>{book.isbn || 'N/A'}</div> | |
</Col> | |
<Col as="li"> | |
<div className="text-muted small">Publisher</div> | |
<div>{book.publisher || 'N/A'}</div> | |
</Col> | |
<Col as="li"> | |
<div className="text-muted small">Published</div> | |
<div>{book.publishYear || 'N/A'}</div> | |
</Col> | |
<Col as="li"> | |
<div className="text-muted small">Pages</div> | |
<div>{book.pageCount || 'N/A'}</div> | |
</Col> | |
</Row> |
{book.reviews && book.reviews.length > 0 ? ( | ||
<div> |
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.
{book.reviews && book.reviews.length > 0 ? ( | |
<div> | |
{book.reviews?.[0] ? ( | |
<> |
<div className="table-responsive"> | ||
<table className="table table-hover"> |
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.
{new Date( | ||
history.borrowDate, | ||
).toLocaleDateString()} |
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.
{new Date( | |
history.borrowDate, | |
).toLocaleDateString()} | |
{formatDate(history.borrowDate, 'YYYY-MM-DD')} |
- 服务端地区设置和用户浏览器通常不同,
toLocaleXXX()
的结果也会不同,会出现 SSR 报错 - https://web-cell.dev/web-utility/functions/formatDate.html
Checklist(清单):
Closes #15