chore: move apps tips to the app page

chore/offline-the-sys-files
Joel 11 months ago
parent 81578f1705
commit 7b88f09ee7

@ -18,12 +18,12 @@ const AppTip: FC<Props> = ({
}) => { }) => {
const { t } = useTranslation() const { t } = useTranslation()
return ( return (
<div className='fixed bottom-0 left-0 right-0 z-10 border-t border-state-warning-hover px-[60px] py-4'> <div className='fixed bottom-0 left-0 right-0 z-10 border-t border-state-warning-hover px-12 py-4'>
<div className="absolute inset-0 bg-[linear-gradient(92deg,_rgba(247,144,9,0.25)_53.67%,_rgba(255,255,255,0)_100%)] opacity-40" /> <div className="absolute inset-0 bg-[linear-gradient(92deg,_rgba(247,144,9,0.25)_53.67%,_rgba(255,255,255,0)_100%)] opacity-40" />
<div className='relative flex items-center'> <div className='relative flex items-center'>
<div className='relative rounded-lg bg-text-accent p-1.5'> <div className='relative rounded-lg bg-text-accent p-1.5'>
<RiImage2Fill className='size-5 text-text-primary-on-surface' /> <RiImage2Fill className='size-5 text-text-primary-on-surface' />
<div className='border-px absolute left-[-2px] top-[-2px] size-2 rounded-[3px] border-white bg-components-badge-status-light-error-border-inner p-0.5'> <div className='absolute left-[-2px] top-[-2px] size-2 rounded-[3px] border border-white bg-components-badge-status-light-error-border-inner p-0.5'>
<div className='h-full w-full rounded-[3px] bg-components-badge-status-light-error-bg'></div> <div className='h-full w-full rounded-[3px] bg-components-badge-status-light-error-bg'></div>
</div> </div>
</div> </div>

@ -12,7 +12,6 @@ import Pagination from '@/app/components/base/pagination'
import { APP_PAGE_LIMIT } from '@/config' import { APP_PAGE_LIMIT } from '@/config'
import { noop } from 'lodash' import { noop } from 'lodash'
import Tip from './components/tip' import Tip from './components/tip'
import AppTip from './components/app-tip'
const i18nPrefix = 'app.checkLegacy' const i18nPrefix = 'app.checkLegacy'
const Page = () => { const Page = () => {
@ -94,7 +93,6 @@ const Page = () => {
<div className='ml-3 shrink-0 pr-8 pt-[108px]'> <div className='ml-3 shrink-0 pr-8 pt-[108px]'>
<Tip /> <Tip />
</div> </div>
<AppTip appNum={5} publishedNum={3} />
</div> </div>
) )
} }

@ -6,15 +6,19 @@ import style from '../list.module.css'
import Apps from './Apps' import Apps from './Apps'
import { useEducationInit } from '@/app/education-apply/hooks' import { useEducationInit } from '@/app/education-apply/hooks'
import { useGlobalPublicStore } from '@/context/global-public-context' import { useGlobalPublicStore } from '@/context/global-public-context'
import AppTip from './check-legacy/components/app-tip'
import cn from '@/utils/classnames'
const AppList = () => { const AppList = () => {
const { t } = useTranslation() const { t } = useTranslation()
useEducationInit() useEducationInit()
const { systemFeatures } = useGlobalPublicStore() const { systemFeatures } = useGlobalPublicStore()
const legacyAppNum = 5
const publishedAppNum = 3
return ( return (
<div className='relative flex h-0 shrink-0 grow flex-col overflow-y-auto bg-background-body'> <div className={cn('relative flex h-0 shrink-0 grow flex-col overflow-y-auto bg-background-body', legacyAppNum > 0 && 'pb-[74px]')}>
<Apps /> <Apps />
{!systemFeatures.branding.enabled && <footer className='shrink-0 grow-0 px-12 py-6'> {(!systemFeatures.branding.enabled && !legacyAppNum) && <footer className='shrink-0 grow-0 px-12 py-6'>
<h3 className='text-gradient text-xl font-semibold leading-tight'>{t('app.join')}</h3> <h3 className='text-gradient text-xl font-semibold leading-tight'>{t('app.join')}</h3>
<p className='system-sm-regular mt-1 text-text-tertiary'>{t('app.communityIntro')}</p> <p className='system-sm-regular mt-1 text-text-tertiary'>{t('app.communityIntro')}</p>
<div className='mt-3 flex items-center gap-2'> <div className='mt-3 flex items-center gap-2'>
@ -26,6 +30,10 @@ const AppList = () => {
</Link> </Link>
</div> </div>
</footer>} </footer>}
{legacyAppNum > 0 && (
<AppTip appNum={legacyAppNum} publishedNum={publishedAppNum} />
)}
</div > </div >
) )
} }

Loading…
Cancel
Save