Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

consolidate table styles

Blue Mouse8b4bf220afe9
diff --git a/web/app/pages/Project/Settings/Annotations.tsx b/web/app/pages/Project/Settings/Annotations.tsx
index 47e298644..ed1ebe104 100644
--- a/web/app/pages/Project/Settings/Annotations.tsx
+++ b/web/app/pages/Project/Settings/Annotations.tsx
@@ -182,13 +182,13 @@ const Annotations = ({ projectId, allowedToManage }: AnnotationsProps) => {
<tr>
<th
scope='col'
- className='px-4 py-3 text-left text-xs font-medium tracking-wider text-gray-500 uppercase dark:text-gray-400'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
>
{t('project.settings.annotations.date')}
</th>
<th
scope='col'
- className='px-4 py-3 text-left text-xs font-medium tracking-wider text-gray-500 uppercase dark:text-gray-400'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
>
{t('project.settings.annotations.text')}
</th>
diff --git a/web/app/pages/Project/Settings/Emails/Emails.tsx b/web/app/pages/Project/Settings/Emails/Emails.tsx
index e839a19f1..b5f2986d6 100644
--- a/web/app/pages/Project/Settings/Emails/Emails.tsx
+++ b/web/app/pages/Project/Settings/Emails/Emails.tsx
@@ -168,16 +168,14 @@ const EmailList = ({ data, onRemove, setEmails }: EmailListProps) => {
}
return (
- <tr className='dark:bg-slate-800'>
- <td className='py-4 pr-3 pl-4 text-sm font-medium whitespace-nowrap text-gray-900 sm:pl-6 dark:text-white'>
- {email}
- </td>
- <td className='px-3 py-4 text-sm whitespace-nowrap text-gray-900 dark:text-white'>
+ <tr className='bg-white hover:bg-gray-50 dark:bg-slate-900 dark:hover:bg-slate-800/50'>
+ <td className='px-4 py-3 text-sm whitespace-nowrap text-gray-900 dark:text-gray-100'>{email}</td>
+ <td className='px-4 py-3 text-sm whitespace-nowrap text-gray-900 dark:text-gray-100'>
{language === 'en'
? dayjs(addedAt).locale(language).format('MMMM D, YYYY')
: dayjs(addedAt).locale(language).format('D MMMM, YYYY')}
</td>
- <td className='relative py-4 pr-2 text-right text-sm font-medium whitespace-nowrap'>
+ <td className='px-4 py-3 text-right text-sm whitespace-nowrap'>
{isConfirmed ? (
<div>
<button
@@ -403,50 +401,48 @@ const Emails = ({ projectId }: { projectId: string }) => {
</Button>
</div>
<div>
- <div className='mt-3 flex flex-col'>
- <div className='-mx-4 -my-2 overflow-x-auto sm:-mx-6 md:overflow-x-visible lg:-mx-8'>
- <div className='inline-block min-w-full py-2 md:px-6 lg:px-8'>
- {!loading && !_isEmpty(emails) ? (
- <div className='ring-1 ring-black/10 md:rounded-lg'>
- <table className='min-w-full divide-y divide-gray-300 dark:divide-gray-600'>
- <thead>
- <tr className='dark:bg-slate-800'>
- <th
- scope='col'
- className='py-3.5 pr-3 pl-4 text-left text-sm font-semibold text-gray-900 sm:pl-6 dark:text-white'
- >
- {t('auth.common.email')}
- </th>
- <th
- scope='col'
- className='px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white'
- >
- {t('auth.common.addedOn')}
- </th>
- <th scope='col' />
- </tr>
- </thead>
- <tbody className='divide-y divide-gray-300 dark:divide-gray-600'>
- {_map(emails, (email) => (
- <EmailList
- data={email}
- key={email.id}
- onRemove={() => {
- setEmailToRemove(email)
- setShowDeleteModal(true)
- }}
- setEmails={setEmails}
- />
- ))}
- </tbody>
- </table>
- </div>
- ) : null}
- {_isEmpty(emails) ? <NoSubscribers /> : null}
- {loading ? <Loader /> : null}
- </div>
+ {loading ? (
+ <div className='flex justify-center py-8'>
+ <Loader />
</div>
- </div>
+ ) : _isEmpty(emails) ? (
+ <NoSubscribers />
+ ) : (
+ <div className='overflow-hidden rounded-lg border border-gray-200 dark:border-slate-700'>
+ <table className='min-w-full divide-y divide-gray-200 dark:divide-slate-700'>
+ <thead className='bg-gray-50 dark:bg-slate-800'>
+ <tr>
+ <th
+ scope='col'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
+ >
+ {t('auth.common.email')}
+ </th>
+ <th
+ scope='col'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
+ >
+ {t('auth.common.addedOn')}
+ </th>
+ <th scope='col' />
+ </tr>
+ </thead>
+ <tbody className='divide-y divide-gray-200 bg-white dark:divide-slate-700 dark:bg-slate-900'>
+ {_map(emails, (email) => (
+ <EmailList
+ data={email}
+ key={email.id}
+ onRemove={() => {
+ setEmailToRemove(email)
+ setShowDeleteModal(true)
+ }}
+ setEmails={setEmails}
+ />
+ ))}
+ </tbody>
+ </table>
+ </div>
+ )}
</div>
<Modal
onClose={closeModal}
diff --git a/web/app/pages/Project/Settings/People/People.tsx b/web/app/pages/Project/Settings/People/People.tsx
index 864340463..13fa5a8b5 100644
--- a/web/app/pages/Project/Settings/People/People.tsx
+++ b/web/app/pages/Project/Settings/People/People.tsx
@@ -63,16 +63,14 @@ const TableUserRow = ({ data, onRemove, language, authedUserEmail, reloadProject
}
return (
- <tr className='dark:bg-slate-800'>
- <td className='py-4 pr-3 pl-4 text-sm font-medium whitespace-nowrap text-gray-900 sm:pl-6 dark:text-white'>
- {user?.email || 'N/A'}
- </td>
- <td className='px-3 py-4 text-sm whitespace-nowrap text-gray-900 dark:text-white'>
+ <tr className='bg-white hover:bg-gray-50 dark:bg-slate-900 dark:hover:bg-slate-800/50'>
+ <td className='px-4 py-3 text-sm whitespace-nowrap text-gray-900 dark:text-gray-100'>{user?.email || 'N/A'}</td>
+ <td className='px-4 py-3 text-sm whitespace-nowrap text-gray-900 dark:text-gray-100'>
{language === 'en'
? dayjs(created).locale(language).format('MMMM D, YYYY')
: dayjs(created).locale(language).format('D MMMM, YYYY')}
</td>
- <td className='relative py-4 pr-2 text-right text-sm font-medium whitespace-nowrap'>
+ <td className='px-4 py-3 text-right text-sm whitespace-nowrap'>
{confirmed ? (
<div>
<button
@@ -285,47 +283,41 @@ const People = ({ project, reloadProject }: PeopleProps) => {
{_isEmpty(share) ? (
<NoPeople />
) : (
- <div className='mt-3 flex flex-col'>
- <div className='-mx-4 -my-2 overflow-x-auto sm:-mx-6 md:overflow-x-visible lg:-mx-8'>
- <div className='inline-block min-w-full py-2 md:px-6 lg:px-8'>
- <div className='ring-1 ring-black/10 md:rounded-lg'>
- <table className='min-w-full divide-y divide-gray-300 dark:divide-gray-600'>
- <thead>
- <tr className='dark:bg-slate-800'>
- <th
- scope='col'
- className='py-3.5 pr-3 pl-4 text-left text-sm font-semibold text-gray-900 sm:pl-6 dark:text-white'
- >
- {t('auth.common.email')}
- </th>
- <th
- scope='col'
- className='px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white'
- >
- {t('profileSettings.sharedTable.joinedOn')}
- </th>
- <th scope='col' />
- </tr>
- </thead>
- <tbody className='divide-y divide-gray-300 dark:divide-gray-600'>
- {_map(share, (data) => (
- <TableUserRow
- data={data}
- key={data.id}
- onRemove={() => {
- setMemberToRemove(data)
- setShowDeleteModal(true)
- }}
- language={language}
- authedUserEmail={currentUser?.email}
- reloadProject={reloadProject}
- />
- ))}
- </tbody>
- </table>
- </div>
- </div>
- </div>
+ <div className='overflow-hidden rounded-lg border border-gray-200 dark:border-slate-700'>
+ <table className='min-w-full divide-y divide-gray-200 dark:divide-slate-700'>
+ <thead className='bg-gray-50 dark:bg-slate-800'>
+ <tr>
+ <th
+ scope='col'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
+ >
+ {t('auth.common.email')}
+ </th>
+ <th
+ scope='col'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
+ >
+ {t('profileSettings.sharedTable.joinedOn')}
+ </th>
+ <th scope='col' />
+ </tr>
+ </thead>
+ <tbody className='divide-y divide-gray-200 bg-white dark:divide-slate-700 dark:bg-slate-900'>
+ {_map(share, (data) => (
+ <TableUserRow
+ data={data}
+ key={data.id}
+ onRemove={() => {
+ setMemberToRemove(data)
+ setShowDeleteModal(true)
+ }}
+ language={language}
+ authedUserEmail={currentUser?.email}
+ reloadProject={reloadProject}
+ />
+ ))}
+ </tbody>
+ </table>
</div>
)}
</div>
diff --git a/web/app/pages/UserSettings/UserSettings.tsx b/web/app/pages/UserSettings/UserSettings.tsx
index e71c6a7d8..107b88caf 100644
--- a/web/app/pages/UserSettings/UserSettings.tsx
+++ b/web/app/pages/UserSettings/UserSettings.tsx
@@ -386,43 +386,37 @@ const UserSettings = () => {
</h3>
<div>
{!_isEmpty(user?.sharedProjects) ? (
- <div className='mt-3 flex flex-col'>
- <div className='-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8'>
- <div className='inline-block min-w-full py-2 align-middle md:px-6 lg:px-8'>
- <div className='overflow-hidden ring-1 ring-black/10 md:rounded-lg'>
- <table className='min-w-full divide-y divide-gray-300 dark:divide-gray-600'>
- <thead>
- <tr className='dark:bg-slate-800'>
- <th
- scope='col'
- className='py-3.5 pr-3 pl-4 text-left text-sm font-semibold text-gray-900 sm:pl-6 dark:text-white'
- >
- {t('profileSettings.sharedTable.project')}
- </th>
- <th
- scope='col'
- className='px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white'
- >
- {t('profileSettings.sharedTable.role')}
- </th>
- <th
- scope='col'
- className='px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white'
- >
- {t('profileSettings.sharedTable.joinedOn')}
- </th>
- <th scope='col' className='relative py-3.5 pr-4 pl-3 sm:pr-6' />
- </tr>
- </thead>
- <tbody className='divide-y divide-gray-300 dark:divide-gray-600'>
- {_map(user?.sharedProjects, (item) => (
- <ProjectList key={item.id} item={item} />
- ))}
- </tbody>
- </table>
- </div>
- </div>
- </div>
+ <div className='mt-3 overflow-hidden rounded-lg border border-gray-200 dark:border-slate-700'>
+ <table className='min-w-full divide-y divide-gray-200 dark:divide-slate-700'>
+ <thead className='bg-gray-50 dark:bg-slate-800'>
+ <tr>
+ <th
+ scope='col'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
+ >
+ {t('profileSettings.sharedTable.project')}
+ </th>
+ <th
+ scope='col'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
+ >
+ {t('profileSettings.sharedTable.role')}
+ </th>
+ <th
+ scope='col'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
+ >
+ {t('profileSettings.sharedTable.joinedOn')}
+ </th>
+ <th scope='col' />
+ </tr>
+ </thead>
+ <tbody className='divide-y divide-gray-200 bg-white dark:divide-slate-700 dark:bg-slate-900'>
+ {_map(user?.sharedProjects, (item) => (
+ <ProjectList key={item.id} item={item} />
+ ))}
+ </tbody>
+ </table>
</div>
) : (
<NoSharedProjects />
@@ -619,43 +613,37 @@ const UserSettings = () => {
</h3>
<div>
{!_isEmpty(user?.organisationMemberships) ? (
- <div className='mt-3 flex flex-col'>
- <div className='-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8'>
- <div className='inline-block min-w-full py-2 align-middle md:px-6 lg:px-8'>
- <div className='overflow-hidden ring-1 ring-black/10 md:rounded-lg'>
- <table className='min-w-full divide-y divide-gray-300 dark:divide-gray-600'>
- <thead>
- <tr className='dark:bg-slate-800'>
- <th
- scope='col'
- className='py-3.5 pr-3 pl-4 text-left text-sm font-semibold text-gray-900 sm:pl-6 dark:text-white'
- >
- {t('profileSettings.organisationsTable.organisation')}
- </th>
- <th
- scope='col'
- className='px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white'
- >
- {t('profileSettings.organisationsTable.role')}
- </th>
- <th
- scope='col'
- className='px-3 py-3.5 text-left text-sm font-semibold text-gray-900 dark:text-white'
- >
- {t('profileSettings.organisationsTable.joinedOn')}
- </th>
- <th scope='col' className='relative py-3.5 pr-4 pl-3 sm:pr-6' />
- </tr>
- </thead>
- <tbody className='divide-y divide-gray-300 dark:divide-gray-600'>
- {_map(user?.organisationMemberships, (membership) => (
- <Organisations key={membership.id} membership={membership} />
- ))}
- </tbody>
- </table>
- </div>
- </div>
- </div>
+ <div className='mt-3 overflow-hidden rounded-lg border border-gray-200 dark:border-slate-700'>
+ <table className='min-w-full divide-y divide-gray-200 dark:divide-slate-700'>
+ <thead className='bg-gray-50 dark:bg-slate-800'>
+ <tr>
+ <th
+ scope='col'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
+ >
+ {t('profileSettings.organisationsTable.organisation')}
+ </th>
+ <th
+ scope='col'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
+ >
+ {t('profileSettings.organisationsTable.role')}
+ </th>
+ <th
+ scope='col'
+ className='px-4 py-3 text-left text-xs font-bold tracking-wider text-gray-900 uppercase dark:text-white'
+ >
+ {t('profileSettings.organisationsTable.joinedOn')}
+ </th>
+ <th scope='col' />
+ </tr>
+ </thead>
+ <tbody className='divide-y divide-gray-200 bg-white dark:divide-slate-700 dark:bg-slate-900'>
+ {_map(user?.organisationMemberships, (membership) => (
+ <Organisations key={membership.id} membership={membership} />
+ ))}
+ </tbody>
+ </table>
</div>
) : (
<NoOrganisations />
diff --git a/web/app/pages/UserSettings/components/Organisations.tsx b/web/app/pages/UserSettings/components/Organisations.tsx
index a6fd0f80e..fcca74048 100644
--- a/web/app/pages/UserSettings/components/Organisations.tsx
+++ b/web/app/pages/UserSettings/components/Organisations.tsx
@@ -65,20 +65,18 @@ const Organisations = ({ membership }: OrganisationsProps) => {
}
return (
- <tr className='dark:bg-slate-800'>
- <td className='py-4 pr-3 pl-4 text-sm font-medium whitespace-nowrap text-gray-900 sm:pl-6 dark:text-white'>
- {organisation.name}
- </td>
- <td className='px-3 py-4 text-sm whitespace-nowrap text-gray-900 dark:text-white'>
+ <tr className='bg-white hover:bg-gray-50 dark:bg-slate-900 dark:hover:bg-slate-800/50'>
+ <td className='px-4 py-3 text-sm whitespace-nowrap text-gray-900 dark:text-gray-100'>{organisation.name}</td>
+ <td className='px-4 py-3 text-sm whitespace-nowrap text-gray-900 dark:text-gray-100'>
{t(`organisations.role.${role}.name`)}
</td>
- <td className='px-3 py-4 text-sm whitespace-nowrap text-gray-900 dark:text-white'>
+ <td className='px-4 py-3 text-sm whitespace-nowrap text-gray-900 dark:text-gray-100'>
{language === 'en'
? dayjs(created).locale(language).format('MMMM D, YYYY')
: dayjs(created).locale(language).format('D MMMM, YYYY')}
</td>
<td
- className={cx('relative py-4 pr-4 pl-3 text-right text-sm font-medium whitespace-nowrap sm:pr-6', {
+ className={cx('px-4 py-3 text-right text-sm whitespace-nowrap', {
hidden: role === 'owner',
})}
>
diff --git a/web/app/pages/UserSettings/components/ProjectList.tsx b/web/app/pages/UserSettings/components/ProjectList.tsx
index de58d9596..3d43c724f 100644
--- a/web/app/pages/UserSettings/components/ProjectList.tsx
+++ b/web/app/pages/UserSettings/components/ProjectList.tsx
@@ -59,19 +59,17 @@ const ProjectList = ({ item }: ProjectListProps) => {
}
return (
- <tr className='dark:bg-slate-800'>
- <td className='py-4 pr-3 pl-4 text-sm font-medium whitespace-nowrap text-gray-900 sm:pl-6 dark:text-white'>
- {project.name}
- </td>
- <td className='px-3 py-4 text-sm whitespace-nowrap text-gray-900 dark:text-white'>
+ <tr className='bg-white hover:bg-gray-50 dark:bg-slate-900 dark:hover:bg-slate-800/50'>
+ <td className='px-4 py-3 text-sm whitespace-nowrap text-gray-900 dark:text-gray-100'>{project.name}</td>
+ <td className='px-4 py-3 text-sm whitespace-nowrap text-gray-900 dark:text-gray-100'>
{t(`project.settings.roles.${role}.name`)}
</td>
- <td className='px-3 py-4 text-sm whitespace-nowrap text-gray-900 dark:text-white'>
+ <td className='px-4 py-3 text-sm whitespace-nowrap text-gray-900 dark:text-gray-100'>
{language === 'en'
? dayjs(created).locale(language).format('MMMM D, YYYY')
: dayjs(created).locale(language).format('D MMMM, YYYY')}
</td>
- <td className='relative py-4 pr-4 pl-3 text-right text-sm font-medium whitespace-nowrap sm:pr-6'>
+ <td className='px-4 py-3 text-right text-sm whitespace-nowrap'>
{confirmed ? (
<Button onClick={() => setShowDeleteModal(true)} danger small>
{t('common.quit')}