Skip to content

Commit

Permalink
fix(repo): UI issues (#2638)
Browse files Browse the repository at this point in the history
  • Loading branch information
poolsar42 authored Aug 24, 2023
1 parent c3f0924 commit 46809b3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 32 deletions.
50 changes: 25 additions & 25 deletions apps/console/app/routes/__layout/billing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -404,18 +404,7 @@ const PurchaseProModal = ({
return (
<Modal isOpen={isOpen} handleClose={() => setIsOpen(false)}>
<div className="max-sm:w-screen sm:min-w-[640px] lg:min-w-[764px] w-fit">
{!paymentData?.paymentMethodID ? (
<section className="mx-5 mt-5">
<ToastWithLink
message="Update your Payment Information to enable purchasing"
linkHref={`/billing/payment`}
type={'warning'}
linkText="Update payment information"
/>
</section>
) : null}

<div className="flex flex-row justify-between w-full pb-2 pt-5 px-5 items-center">
<div className="flex flex-row justify-between w-full pt-5 pb-3 px-5 items-center">
<Text
size="lg"
weight="semibold"
Expand All @@ -434,6 +423,17 @@ const PurchaseProModal = ({
</div>
</div>

{!paymentData?.paymentMethodID ? (
<section className="mx-5 mb-3">
<ToastWithLink
message="Update your Payment Information to enable purchasing"
linkHref={`/billing/payment`}
type={'warning'}
linkText="Update payment information"
/>
</section>
) : null}

<section className="mx-5 mb-5 border rounded-lg overflow-auto thin-scrollbar">
<div className="p-6">
<Text
Expand Down Expand Up @@ -583,16 +583,6 @@ const AssignEntitlementModal = ({
return (
<Modal isOpen={isOpen} handleClose={() => setIsOpen(false)}>
<div className="max-sm:w-screen sm:min-w-[640px] lg:min-w-[764px] w-fit">
{!paymentData?.paymentMethodID ? (
<section className="mx-5 mt-5">
<ToastWithLink
message="Update your Payment Information to enable purchasing"
linkHref={`/billing/payment`}
type={'warning'}
linkText="Update payment information"
/>
</section>
) : null}
<div
className="pb-2 pt-5 px-5
flex flex-row items-start justify-between w-full"
Expand All @@ -619,6 +609,16 @@ const AssignEntitlementModal = ({
<HiOutlineX />
</div>
</div>
{!paymentData?.paymentMethodID ? (
<section className="mx-5 mb-3">
<ToastWithLink
message="Update your Payment Information to enable purchasing"
linkHref={`/billing/payment`}
type={'warning'}
linkText="Update payment information"
/>
</section>
) : null}
<div className="mb-5 w-full">
<section className="border-t thin-scrollbar w-full my-4">
<ul>
Expand Down Expand Up @@ -838,11 +838,11 @@ const RemoveEntitelmentModal = ({
>
<Listbox.Options
className="absolute no-scrollbar w-full bg-white
rounded-lg border max-h-[200px] max-w-[66.1833px] overflow-auto"
rounded-lg border max-h-[150px] max-w-[66.1833px] overflow-auto"
>
{Array.apply(null, Array(entitlements + 1)).map(
(_, i) => {
return (
return i >= entitlementUsage ? (
<Listbox.Option
key={i}
value={i}
Expand All @@ -865,7 +865,7 @@ const RemoveEntitelmentModal = ({
)
}}
</Listbox.Option>
)
) : null
}
)}
</Listbox.Options>
Expand Down
16 changes: 11 additions & 5 deletions apps/passport/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ export const links: LinksFunction = () => [

export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper(
async ({ request, context, params }) => {
const clientId = new URL(request.url).searchParams.get('client_id')
if (
request.cf.botManagement.score <= 30 &&
!['localhost', '127.0.0.1'].includes(new URL(request.url).hostname)
) {
let ogTheme = {}
if (
params.clientId &&
!['console', 'passport'].includes(params.clientId)
(params.clientId || clientId) &&
!['console', 'passport'].includes(params.clientId!)
) {
const coreClient = getCoreClient({ context })
ogTheme = await coreClient.starbase.getOgTheme.query({
Expand All @@ -90,7 +91,7 @@ export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper(
if (context.appProps) {
appProps = context.appProps
} else {
if (!params.clientId) {
if (!params.clientId && !clientId) {
const name = 'Passport'
appProps = {
name: `Rollup - ${name}`,
Expand All @@ -103,7 +104,7 @@ export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper(
} else {
if (['console', 'passport'].includes(params.clientId!)) {
const name =
params.clientId.charAt(0).toUpperCase() + params.clientId.slice(1)
params.clientId!.charAt(0).toUpperCase() + params.clientId!.slice(1)
appProps = {
name: `Rollup - ${name}`,
iconURL: LogoIndigo,
Expand All @@ -115,7 +116,7 @@ export const loader: LoaderFunction = getRollupReqFunctionErrorWrapper(
} else {
const coreClient = getCoreClient({ context })
appProps = await coreClient.starbase.getAppPublicProps.query({
clientId: params.clientId!,
clientId: (params.clientId || clientId) as string,
})
}
}
Expand Down Expand Up @@ -269,6 +270,11 @@ export default function App() {

{browserEnv?.appProps?.iconURL ? (
<>
<link
rel="apple-touch-icon"
href={browserEnv?.appProps.iconURL}
sizes="180x180"
/>
<link rel="icon" type="image" href={browserEnv?.appProps.iconURL} />
<link
rel="shortcut icon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default function EmailOTPValidator({
</section>

<section className="flex-1">
<div className="flex flex-col items-center mt-4 mb-8">
<div className="flex flex-col items-center mt-4 mb-8 text-center">
<Text className="text-gray-500 dark:text-gray-400">
We&apos;ve sent a code to
</Text>
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/src/molecules/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const Modal = ({
<Dialog.Panel className={`${fixed ? 'pb-10' : ''}`}>
<div
className={classNames(
'border bg-white rounded-lg shadow-xl thin-scrollbar',
'border bg-white rounded-lg shadow-xl thin-scrollbar overflow-y-auto ',
{
'h-max min-w-fit w-max min-[480px]:w-[96vw] lg:w-[62vw] h-[96vh] lg:h-[76vh]':
fixed,
Expand Down

0 comments on commit 46809b3

Please sign in to comment.