Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
remove duplicate tailwind config and use single config (#10237)
Browse files Browse the repository at this point in the history
* remove duplicate tailwind config and use single config

* format files

---------

Co-authored-by: Daniel Belmes <[email protected]>
Co-authored-by: Daniel Belmes <[email protected]>
  • Loading branch information
3 people authored May 26, 2024
1 parent 7897dcc commit c28913d
Show file tree
Hide file tree
Showing 37 changed files with 79 additions and 203 deletions.
8 changes: 4 additions & 4 deletions packages/client-core/src/admin/adminRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const AdminTopBar = () => {
}

return (
<div className="bg-theme-surface-main flex h-16 w-full items-center justify-between px-8 py-4">
<div className="flex h-16 w-full items-center justify-between bg-theme-surface-main px-8 py-4">
<img src="static/etherealengine_logo.png" alt="iR Engine Logo" className="h-7 w-7" />
<div className="">
<Button onClick={toggleTheme} className="pointer-events-auto bg-transparent p-0">
Expand All @@ -80,7 +80,7 @@ const AdminSideBar = () => {
const relativePath = fullPathName.split('/').slice(2).join('/')

return (
<aside className="bg-theme-surface-main mx-8 h-fit max-h-[calc(100vh_-_88px_-_4rem)] overflow-y-auto overflow-x-hidden rounded-2xl px-2 py-4">
<aside className="mx-8 h-fit max-h-[calc(100vh_-_88px_-_4rem)] overflow-y-auto overflow-x-hidden rounded-2xl bg-theme-surface-main px-2 py-4">
<ul className="space-y-2">
{Object.entries(allowedRoutes)
.filter(([_, sidebarItem]) => sidebarItem.access)
Expand All @@ -89,9 +89,9 @@ const AdminSideBar = () => {
<li key={index}>
<Link to={path}>
<Button
className={`hover:bg-theme-highlight] text-theme-secondary flex w-72 items-center justify-start rounded-xl px-2 py-3 font-medium ${
className={`hover:bg-theme-highlight] flex w-72 items-center justify-start rounded-xl px-2 py-3 font-medium text-theme-secondary ${
relativePath === path
? 'bg-theme-highlight text-theme-primary font-semibold '
? 'bg-theme-highlight font-semibold text-theme-primary '
: 'bg-theme-surface-main'
}`}
startIcon={sidebarItem.icon}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function AvatarTable({ search }: { search: string }) {
title={t('admin:components.common.view')}
onClick={() => PopoverState.showPopupover(<AddEditAvatarModal avatar={row} />)}
>
<HiPencil className="text-theme-iconGreen place-self-center" />
<HiPencil className="place-self-center text-theme-iconGreen" />
</Button>
<Button
rounded="full"
Expand All @@ -131,7 +131,7 @@ export default function AvatarTable({ search }: { search: string }) {
)
}}
>
<HiTrash className="text-theme-iconRed place-self-center" />
<HiTrash className="place-self-center text-theme-iconRed" />
</Button>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default function ChannelTable({
title={t('admin:components.common.view')}
onClick={() => PopoverState.showPopupover(<AddEditChannelModal channel={row} />)}
>
<HiPencil className="text-theme-iconGreen place-self-center" />
<HiPencil className="place-self-center text-theme-iconGreen" />
</Button>
<Button
rounded="full"
Expand All @@ -118,7 +118,7 @@ export default function ChannelTable({
)
}
>
<HiTrash className="text-theme-iconRed place-self-center" />
<HiTrash className="place-self-center text-theme-iconRed" />
</Button>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function InstanceTable({ search }: { search: string }) {
{t('admin:components.instance.actions.view')}
</Button>
<Button
className="border-theme-primary h-8 w-8 justify-center border bg-transparent p-0"
className="h-8 w-8 justify-center border border-theme-primary bg-transparent p-0"
rounded="full"
onClick={() => {
PopoverState.showPopupover(
Expand All @@ -107,7 +107,7 @@ export default function InstanceTable({ search }: { search: string }) {
)
}}
>
<HiTrash className="text-theme-iconRed place-self-center" />
<HiTrash className="place-self-center text-theme-iconRed" />
</Button>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function InviteTable({
</Button>
<Button
variant="outline"
startIcon={<HiTrash className="text-theme-iconRed place-self-center" />}
startIcon={<HiTrash className="place-self-center text-theme-iconRed" />}
onClick={() => PopoverState.showPopupover(<RemoveInviteModal invites={[row]} />)}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default function LocationTable({ search }: { search: string }) {
title={t('admin:components.common.view')}
onClick={() => PopoverState.showPopupover(<AddEditLocationModal location={row} />)}
>
<HiPencil className="text-theme-iconGreen place-self-center" />
<HiPencil className="place-self-center text-theme-iconGreen" />
</Button>
<Button
rounded="full"
Expand All @@ -116,7 +116,7 @@ export default function LocationTable({ search }: { search: string }) {
)
}
>
<HiTrash className="text-theme-iconRed place-self-center" />
<HiTrash className="place-self-center text-theme-iconRed" />
</Button>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ export default function AddEditProjectModal({
projectUpdateStatus.value?.selectedSHA.length > 0 &&
projectUpdateStatus.value?.commitData.length > 0 &&
!matchesEngineVersion && (
<div className="bg-theme-bannerInformative flex items-center justify-center gap-3 rounded-lg p-4">
<div className="flex items-center justify-center gap-3 rounded-lg bg-theme-bannerInformative p-4">
<div>
<CiWarning className="h-5 w-5 bg-transparent" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default function ProjectTable() {
<Button
startIcon={<HiOutlineArrowPath />}
size="small"
className="bg-theme-blue-secondary mr-2 h-min whitespace-pre text-[#214AA6] disabled:opacity-50 dark:text-white"
className="mr-2 h-min whitespace-pre bg-theme-blue-secondary text-[#214AA6] disabled:opacity-50 dark:text-white"
disabled={project.name === 'default-project'}
onClick={() =>
PopoverState.showPopupover(
Expand All @@ -120,7 +120,7 @@ export default function ProjectTable() {
<Button
startIcon={<GrGithub />}
size="small"
className="bg-theme-blue-secondary mr-2 h-min whitespace-pre text-[#214AA6] disabled:opacity-50 dark:text-white"
className="mr-2 h-min whitespace-pre bg-theme-blue-secondary text-[#214AA6] disabled:opacity-50 dark:text-white"
disabled={!project || !project.repositoryPath || project.name === 'default-project'}
onClick={() => {
PopoverState.showPopupover(
Expand All @@ -141,7 +141,7 @@ export default function ProjectTable() {
<Button
startIcon={<HiOutlineUsers />}
size="small"
className="bg-theme-blue-secondary mr-2 h-min whitespace-pre text-[#214AA6] disabled:opacity-50 dark:text-white"
className="mr-2 h-min whitespace-pre bg-theme-blue-secondary text-[#214AA6] disabled:opacity-50 dark:text-white"
onClick={() => {
activeProjectId.set(project.id)
PopoverState.showPopupover(
Expand All @@ -154,7 +154,7 @@ export default function ProjectTable() {
<Button
startIcon={<HiOutlineCommandLine />}
size="small"
className="bg-theme-blue-secondary mr-2 h-min whitespace-pre text-[#214AA6] disabled:opacity-50 dark:text-white"
className="mr-2 h-min whitespace-pre bg-theme-blue-secondary text-[#214AA6] disabled:opacity-50 dark:text-white"
disabled={config.client.localBuildOrDev}
onClick={() => {
PopoverState.showPopupover(
Expand All @@ -172,14 +172,14 @@ export default function ProjectTable() {
<Button
startIcon={<HiOutlineFolder />}
size="small"
className="bg-theme-blue-secondary mr-2 h-min whitespace-pre text-[#214AA6] disabled:opacity-50 dark:text-white"
className="mr-2 h-min whitespace-pre bg-theme-blue-secondary text-[#214AA6] disabled:opacity-50 dark:text-white"
>
{t('admin:components.common.view')}
</Button>
<Button
startIcon={<HiOutlineTrash />}
size="small"
className="bg-theme-blue-secondary h-min whitespace-pre text-[#214AA6] disabled:opacity-50 dark:text-white"
className="h-min whitespace-pre bg-theme-blue-secondary text-[#214AA6] disabled:opacity-50 dark:text-white"
disabled={project.name === 'default-project'}
onClick={() => {
PopoverState.showPopupover(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default function UpdateEngineModal() {

{updateProjects.value && (
<>
<div className="bg-theme-bannerInformative flex items-center justify-center gap-3 rounded-lg p-4">
<div className="flex items-center justify-center gap-3 rounded-lg bg-theme-bannerInformative p-4">
<div>
<LuInfo className="h-5 w-5 bg-transparent" />
</div>
Expand All @@ -188,7 +188,7 @@ export default function UpdateEngineModal() {
{projectState.projects.value
.filter((project) => project.name !== 'default-project' && project.repositoryPath)
.map((project) => (
<div key={project.id} className="border-theme-primary bg-theme-surfaceInput border px-3.5 py-5">
<div key={project.id} className="border border-theme-primary bg-theme-surfaceInput px-3.5 py-5">
<Checkbox
label={project.name}
value={projectsToUpdate.value.has(project.name)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function RecordingsTable({ search }: { search: string }) {
<HiEye className="place-self-center" />
</Button> */}
<Button
className="border-theme-primary h-8 w-8 justify-center border bg-transparent p-0"
className="h-8 w-8 justify-center border border-theme-primary bg-transparent p-0"
rounded="full"
onClick={() => {
PopoverState.showPopupover(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ export default function ResourceTable({ search }: { search: string }) {
PopoverState.showPopupover(<AddEditResourceModal selectedResource={el} />)
}}
rounded="full"
className="border-theme-primary h-8 w-8 justify-center border bg-transparent p-0"
className="h-8 w-8 justify-center border border-theme-primary bg-transparent p-0"
>
<HiEye className="text-theme-primary place-self-center" />
<HiEye className="place-self-center text-theme-primary" />
</Button>
<Button
rounded="full"
className="border-theme-primary h-8 w-8 justify-center border bg-transparent p-0"
className="h-8 w-8 justify-center border border-theme-primary bg-transparent p-0"
onClick={() => {
PopoverState.showPopupover(
<ConfirmDialog
Expand All @@ -93,7 +93,7 @@ export default function ResourceTable({ search }: { search: string }) {
)
}}
>
<HiTrash className="text-theme-iconRed place-self-center" />
<HiTrash className="place-self-center text-theme-iconRed" />
</Button>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default function ServerTable({
)
}}
>
<HiTrash className="text-theme-iconRed place-self-center" />
<HiTrash className="place-self-center text-theme-iconRed" />
</Button>
</div>
)
Expand Down
6 changes: 3 additions & 3 deletions packages/client-core/src/admin/components/server/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ export default function Servers() {
{serverInfoQuery.data.map((info) => (
<div
key={info.id}
className={`bg-theme-surface-main flex h-16 w-44 cursor-pointer items-start justify-between rounded-2xl p-4 ${
serverType.value === info.id && 'border-b-blue-primary border-b-2'
className={`flex h-16 w-44 cursor-pointer items-start justify-between rounded-2xl bg-theme-surface-main p-4 ${
serverType.value === info.id && 'border-b-2 border-b-blue-primary'
}`}
onClick={() => serverType.set(info.id)}
>
<Text fontSize="sm">{info.label}</Text>
<Badge
className="bg-blue-primary h-6 rounded-[90px] text-white"
className="h-6 rounded-[90px] bg-blue-primary text-white"
label={`${info.pods.filter((inf) => inf.status === 'Running').length}/${info.pods.length}`}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ const AuthenticationTab = forwardRef(({ open }: { open: boolean }, ref: React.Mu
/>
</div>

<hr className="border-theme-primary my-6 border" />
<hr className="my-6 border border-theme-primary" />

<div className="grid grid-cols-3 gap-4">
{holdAuth?.discord?.value && (
Expand Down Expand Up @@ -330,7 +330,7 @@ const AuthenticationTab = forwardRef(({ open }: { open: boolean }, ref: React.Mu
)}

{(holdAuth?.discord?.value || holdAuth?.linkedin?.value || holdAuth?.facebook?.value) && (
<hr className="border-theme-primary col-span-full my-6 border" />
<hr className="col-span-full my-6 border border-theme-primary" />
)}

{holdAuth?.google?.value && (
Expand Down Expand Up @@ -419,7 +419,7 @@ const AuthenticationTab = forwardRef(({ open }: { open: boolean }, ref: React.Mu
</div>

<div className="mt-6 grid grid-cols-8 gap-6">
<Button size="small" className="text-primary bg-theme-highlight col-span-1" onClick={handleCancel} fullWidth>
<Button size="small" className="text-primary col-span-1 bg-theme-highlight" onClick={handleCancel} fullWidth>
{t('admin:components.common.reset')}
</Button>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ const AwsTab = forwardRef(({ open }: { open: boolean }, ref: React.MutableRefObj
</div>

<div className="grid grid-cols-8 gap-6">
<Button size="small" className="text-primary bg-theme-highlight col-span-1" fullWidth onClick={handleCancel}>
<Button size="small" className="text-primary col-span-1 bg-theme-highlight" fullWidth onClick={handleCancel}>
{t('admin:components.common.reset')}
</Button>
<Button size="small" variant="primary" className="col-span-1" fullWidth onClick={handleSubmit}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ const ClientTab = forwardRef(({ open }: { open: boolean }, ref: React.MutableRef
</div>

<div className="mt-6 grid grid-cols-8 gap-6">
<Button size="small" className="text-primary bg-theme-highlight col-span-1" onClick={handleCancel} fullWidth>
<Button size="small" className="text-primary col-span-1 bg-theme-highlight" onClick={handleCancel} fullWidth>
{t('admin:components.common.reset')}
</Button>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const EmailTab = forwardRef(({ open }: { open: boolean }, ref: React.MutableRefO
)}

<div className="col-span-1 grid grid-cols-4 gap-6">
<Button size="small" className="text-primary bg-theme-highlight col-span-1" fullWidth onClick={handleCancel}>
<Button size="small" className="text-primary col-span-1 bg-theme-highlight" fullWidth onClick={handleCancel}>
{t('admin:components.common.reset')}
</Button>
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const HelmTab = forwardRef(({ open }: { open: boolean }, ref: React.MutableRefOb
/>

<div className="col-span-1 mt-6 grid grid-cols-4 gap-6">
<Button size="small" className="text-primary bg-theme-highlight col-span-1" onClick={handleCancel} fullWidth>
<Button size="small" className="text-primary col-span-1 bg-theme-highlight" onClick={handleCancel} fullWidth>
{t('admin:components.common.reset')}
</Button>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const ProjectTab = forwardRef(({ open }: { open: boolean }, ref: React.MutableRe
<div className="mb-3 grid grid-cols-8 gap-2">
<Button
size="small"
className="text-primary bg-theme-highlight col-span-1"
className="text-primary col-span-1 bg-theme-highlight"
fullWidth
onClick={handleCancel}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const ServerTab = forwardRef(({ open }: { open: boolean }, ref: React.MutableRef
)}

<div className="col-span-1 grid grid-cols-4 gap-6">
<Button size="small" className="text-primary bg-theme-highlight col-span-1" fullWidth onClick={handleCancel}>
<Button size="small" className="text-primary col-span-1 bg-theme-highlight" fullWidth onClick={handleCancel}>
{t('admin:components.common.reset')}
</Button>
<Button
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/components/user/UserTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default function UserTable({
title={t('admin:components.common.view')}
onClick={() => PopoverState.showPopupover(<AddEditUserModal user={row} />)}
>
<HiPencil className="text-theme-iconGreen place-self-center" />
<HiPencil className="place-self-center text-theme-iconGreen" />
</Button>
<Button
rounded="full"
Expand All @@ -152,7 +152,7 @@ export default function UserTable({
)
}}
>
<HiTrash className="text-theme-iconRed place-self-center" />
<HiTrash className="place-self-center text-theme-iconRed" />
</Button>
</div>
)
Expand Down
Loading

0 comments on commit c28913d

Please sign in to comment.