Feat/dataset notion import (#392)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: JzoNg <jzongcode@gmail.com>
This commit is contained in:
parent
f350948bde
commit
9253f72dea
96 changed files with 4479 additions and 367 deletions
|
|
@ -1,19 +1,19 @@
|
|||
'use client'
|
||||
import { useState } from 'react'
|
||||
import s from './index.module.css'
|
||||
import cn from 'classnames'
|
||||
import useSWR from 'swr'
|
||||
import dayjs from 'dayjs'
|
||||
import 'dayjs/locale/zh-cn'
|
||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||
import I18n from '@/context/i18n'
|
||||
import { useContext } from 'use-context-selector'
|
||||
import { fetchMembers } from '@/service/common'
|
||||
import { UserPlusIcon } from '@heroicons/react/24/outline'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import s from './index.module.css'
|
||||
import InviteModal from './invite-modal'
|
||||
import InvitedModal from './invited-modal'
|
||||
import Operation from './operation'
|
||||
import { fetchMembers } from '@/service/common'
|
||||
import I18n from '@/context/i18n'
|
||||
import { useAppContext } from '@/context/app-context'
|
||||
import Avatar from '@/app/components/base/avatar'
|
||||
import { useWorkspacesContext } from '@/context/workspace-context'
|
||||
|
|
@ -35,18 +35,18 @@ const MembersPage = () => {
|
|||
const owner = accounts.filter(account => account.role === 'owner')?.[0]?.email === userProfile.email
|
||||
const { workspaces } = useWorkspacesContext()
|
||||
const currentWrokspace = workspaces.filter(item => item.current)?.[0]
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<div className='flex items-center mb-4 p-3 bg-gray-50 rounded-2xl'>
|
||||
<div className={cn(s['logo-icon'], 'shrink-0')}></div>
|
||||
<div className='grow mx-2'>
|
||||
<div className='text-sm font-medium text-gray-900'>{currentWrokspace.name}</div>
|
||||
<div className='text-sm font-medium text-gray-900'>{currentWrokspace?.name}</div>
|
||||
<div className='text-xs text-gray-500'>{t('common.userProfile.workspace')}</div>
|
||||
</div>
|
||||
<div className='
|
||||
shrink-0 flex items-center py-[7px] px-3 border-[0.5px] border-gray-200
|
||||
shrink-0 flex items-center py-[7px] px-3 border-[0.5px] border-gray-200
|
||||
text-[13px] font-medium text-primary-600 bg-white
|
||||
shadow-[0_1px_2px_rgba(16,24,40,0.05)] rounded-lg cursor-pointer
|
||||
' onClick={() => setInviteModalVisible(true)}>
|
||||
|
|
@ -78,10 +78,10 @@ const MembersPage = () => {
|
|||
<div className='shrink-0 flex items-center w-[104px] py-2 text-[13px] text-gray-700'>{dayjs(Number((account.last_login_at || account.created_at)) * 1000).locale(locale === 'zh-Hans' ? 'zh-cn' : 'en').fromNow()}</div>
|
||||
<div className='shrink-0 w-[96px] flex items-center'>
|
||||
{
|
||||
owner && account.role !== 'owner'
|
||||
(owner && account.role !== 'owner')
|
||||
? <Operation member={account} onOperate={() => mutate()} />
|
||||
: <div className='px-3 text-[13px] text-gray-700'>{RoleMap[account.role] || RoleMap.normal}</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
|
|
@ -111,4 +111,4 @@ const MembersPage = () => {
|
|||
)
|
||||
}
|
||||
|
||||
export default MembersPage
|
||||
export default MembersPage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue