Skip to content

Commit

Permalink
feat(platform): UserCenter: update release show
Browse files Browse the repository at this point in the history
  • Loading branch information
yyc-git committed Dec 21, 2023
1 parent 5f563de commit cd5978d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/1.0.0-beta.3.org
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ TODO perf: only

* DONE fix tour: end tour->start tour: should reset

* TODO fix: release time before error?
* DONE fix: release time before error?

-1?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ let make = (~service: FrontendType.service) => {
version: data["tag_name"],
releaseDateUntilNow: Moment.moment(.).subtract(.
Moment.createMomentFromDate(. published_at),
).dayOfYear(.),
).dayOfYear(.) - 1,
}: UserCenterStoreType.release
),
),
Expand All @@ -280,6 +280,8 @@ let make = (~service: FrontendType.service) => {

()->Js.Promise.resolve
},
// let releaseDateUntilNow =

// Js.log(Moment.moment(.))
// Js.log(Moment.createMomentFromDate(. published_at))
// Js.log(Moment.moment(.).subtract(. Moment.createMomentFromDate(. published_at)))
Expand Down Expand Up @@ -488,7 +490,11 @@ let make = (~service: FrontendType.service) => {
{React.string({j`Meta3D ${version}`})}
</Typography.Title>
<Typography.Title level=5>
{React.string({j`${releaseDateUntilNow->IntUtils.intToString}天前更新`})}
{React.string(
releaseDateUntilNow == 0
? {j`今天`}
: j`${releaseDateUntilNow->IntUtils.intToString}天前` ++ {j`更新`},
)}
</Typography.Title>
</>
}}
Expand Down

0 comments on commit cd5978d

Please sign in to comment.