-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
616 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/screens/discovery/catalog-detail/component/info/content/ds.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* @Author: czy0729 | ||
* @Date: 2024-08-10 14:28:41 | ||
* @Last Modified by: czy0729 | ||
* @Last Modified time: 2024-08-10 14:28:41 | ||
*/ | ||
import { rc } from '@utils/dev' | ||
import { COMPONENT as PARENT } from '../ds' | ||
|
||
export const COMPONENT = rc(PARENT, 'Content') |
26 changes: 26 additions & 0 deletions
26
src/screens/discovery/catalog-detail/component/info/content/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* @Author: czy0729 | ||
* @Date: 2024-08-10 13:59:11 | ||
* @Last Modified by: czy0729 | ||
* @Last Modified time: 2024-08-10 14:29:27 | ||
*/ | ||
import React from 'react' | ||
import { Expand, RenderHtml } from '@components' | ||
import { _ } from '@stores' | ||
import { appNavigate } from '@utils' | ||
import { obc } from '@utils/decorators' | ||
import { Ctx } from '../../../types' | ||
import { COMPONENT } from './ds' | ||
|
||
function Content(props, { $, navigation }: Ctx) { | ||
const { content } = $.detail | ||
if (!content) return null | ||
|
||
return ( | ||
<Expand style={_.mt.lg} ratio={0.64}> | ||
<RenderHtml html={content} onLinkPress={href => appNavigate(href, navigation)} /> | ||
</Expand> | ||
) | ||
} | ||
|
||
export default obc(Content, COMPONENT) |
10 changes: 10 additions & 0 deletions
10
src/screens/discovery/catalog-detail/component/info/desc/ds.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* @Author: czy0729 | ||
* @Date: 2024-08-10 14:32:58 | ||
* @Last Modified by: czy0729 | ||
* @Last Modified time: 2024-08-10 14:41:18 | ||
*/ | ||
import { rc } from '@utils/dev' | ||
import { COMPONENT as PARENT } from '../ds' | ||
|
||
export const COMPONENT = rc(PARENT, 'Desc') |
54 changes: 54 additions & 0 deletions
54
src/screens/discovery/catalog-detail/component/info/desc/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* @Author: czy0729 | ||
* @Date: 2024-08-10 13:59:11 | ||
* @Last Modified by: czy0729 | ||
* @Last Modified time: 2024-08-10 14:11:31 | ||
*/ | ||
import React from 'react' | ||
import { Flex, Text } from '@components' | ||
import { _ } from '@stores' | ||
import { simpleTime } from '@utils' | ||
import { obc } from '@utils/decorators' | ||
import { t } from '@utils/fetch' | ||
import { Ctx } from '../../../types' | ||
import { COMPONENT } from './ds' | ||
|
||
function Desc(props, { $, navigation }: Ctx) { | ||
const { avatar, nickname, userId, time } = $.detail | ||
if (!nickname || time) return null | ||
|
||
const lastUpdate = $.params._lastUpdate || '' | ||
return ( | ||
<Flex style={_.mt.sm}> | ||
<Text | ||
type='title' | ||
size={13} | ||
lineHeight={15} | ||
bold | ||
onPress={() => { | ||
navigation.push('Zone', { | ||
userId, | ||
_id: userId, | ||
_name: nickname, | ||
_image: avatar | ||
}) | ||
|
||
t('目录详情.跳转', { | ||
to: 'Zone', | ||
catalogId: $.catalogId, | ||
userId | ||
}) | ||
}} | ||
> | ||
{nickname} | ||
</Text> | ||
<Text type='sub' size={13} lineHeight={15} bold> | ||
{nickname ? ` · ` : ''} | ||
{simpleTime(String(time).replace(/\n/g, ''))} | ||
{!!lastUpdate && ` · 最后更新 ${simpleTime(lastUpdate)}`} | ||
</Text> | ||
</Flex> | ||
) | ||
} | ||
|
||
export default obc(Desc, COMPONENT) |
10 changes: 10 additions & 0 deletions
10
src/screens/discovery/catalog-detail/component/info/footer/ds.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* @Author: czy0729 | ||
* @Date: 2024-08-10 14:32:58 | ||
* @Last Modified by: czy0729 | ||
* @Last Modified time: 2024-08-10 14:41:06 | ||
*/ | ||
import { rc } from '@utils/dev' | ||
import { COMPONENT as PARENT } from '../ds' | ||
|
||
export const COMPONENT = rc(PARENT, 'Footer') |
Oops, something went wrong.