-
-
Notifications
You must be signed in to change notification settings - Fork 50
fix(ui): align Repository & Self-Host typography and layout with Dashboard #477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xavieralves16
wants to merge
7
commits into
raghavyuva:master
Choose a base branch
from
xavieralves16:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+46
−66
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0bec1c1
Corrections in self host page
xavieralves16 5c8e204
Correction of typography in repositories
xavieralves16 20bbc6f
fix(ui): remove nested heading, use plain text in DahboardUtilityHead…
xavieralves16 a41774e
Merge branch 'master' into master
zhravan c3a0b3b
Update page.tsx
xavieralves16 89b25f8
Update list-repositories.tsx
xavieralves16 12a8526
Update repository-card.tsx
xavieralves16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,9 @@ import { FeatureNames } from '@/types/feature-flags'; | |
import DisabledFeature from '@/components/features/disabled-feature'; | ||
import { ResourceGuard, AnyPermissionGuard } from '@/components/rbac/PermissionGuard'; | ||
import PageLayout from '@/components/layout/page-layout'; | ||
import { TypographyH2 } from '@/components/ui/typography'; | ||
import { TypographyMuted } from '@/components/ui/typography'; | ||
|
||
|
||
import { TypographyH2, TypographyMuted } from '@/components/ui/typography'; | ||
|
||
function page() { | ||
const { t } = useTranslation(); | ||
|
@@ -50,10 +51,7 @@ function page() { | |
|
||
const renderContent = () => { | ||
return ( | ||
<AnyPermissionGuard | ||
permissions={['deploy:create']} | ||
loadingFallback={null} | ||
> | ||
<AnyPermissionGuard permissions={['deploy:create']} loadingFallback={null}> | ||
{inGitHubFlow && ( | ||
<GitHubAppSetup GetGithubConnectors={GetGithubConnectors} /> | ||
)} | ||
|
@@ -72,13 +70,14 @@ function page() { | |
}; | ||
|
||
return ( | ||
<ResourceGuard | ||
resource="deploy" | ||
<ResourceGuard | ||
resource="deploy" | ||
action="read" | ||
loadingFallback={<Skeleton />} | ||
fallback={ | ||
<div className="flex h-full items-center justify-center"> | ||
<div className="text-center"> | ||
{/* Consistent access denied message */} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1: Comment can be removed |
||
<TypographyH2>{t('selfHost.page.accessDenied.title')}</TypographyH2> | ||
<TypographyMuted>{t('selfHost.page.accessDenied.description')}</TypographyMuted> | ||
</div> | ||
|
@@ -87,7 +86,7 @@ function page() { | |
> | ||
<PageLayout maxWidth="6xl" padding="md" spacing="lg"> | ||
{renderContent()} | ||
|
||
{showApplications && ( | ||
<> | ||
<DahboardUtilityHeader<Application> | ||
|
@@ -96,13 +95,11 @@ function page() { | |
sortConfig={sortConfig} | ||
onSortChange={onSortChange} | ||
sortOptions={sortOptions} | ||
/* (changed) pass plain string, no nested heading */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1: Comment can be removed |
||
label={t('selfHost.page.title')} | ||
className="mt-5 mb-5 justify-between items-center" | ||
className="mt-5 mb-2 flex flex-col sm:flex-row sm:justify-between sm:items-center gap-2" | ||
children={ | ||
<AnyPermissionGuard | ||
permissions={['deploy:create']} | ||
loadingFallback={null} | ||
> | ||
<AnyPermissionGuard permissions={['deploy:create']} loadingFallback={null}> | ||
<Button | ||
className="mb-4 w-max flex justify-self-end mt-4" | ||
onClick={() => { | ||
|
@@ -114,6 +111,10 @@ function page() { | |
</AnyPermissionGuard> | ||
} | ||
/> | ||
<TypographyMuted className="mb-5"> | ||
{t('selfHost.page.description')} | ||
</TypographyMuted> | ||
|
||
{isLoading || isLoadingApplications ? ( | ||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8"> | ||
<AppItemSkeleton /> | ||
|
@@ -123,7 +124,10 @@ function page() { | |
) : ( | ||
<> | ||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8"> | ||
{applications && applications.map((app: any) => <AppItem key={app.id} {...app} />)} | ||
{applications && | ||
applications.map((app: any) => ( | ||
<AppItem key={app.id} {...app} /> | ||
))} | ||
</div> | ||
|
||
{totalPages > 1 && ( | ||
|
@@ -145,3 +149,4 @@ function page() { | |
} | ||
|
||
export default page; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove this comment