Skip to content

Commit

Permalink
No need to wrap the entire page in the PageHeader component
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelMwangiW committed Dec 15, 2024
1 parent 17ec9e5 commit 24c9a9d
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 91 deletions.
28 changes: 13 additions & 15 deletions stubs/inertia/resources/js/Pages/API/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,19 @@ defineProps({
</script>

<template>
<PageContainer title="API Tokens">
<template #header>
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
API Tokens
</h2>
</template>
<PageHeader title="API Tokens">
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
API Tokens
</h2>
</PageHeader>

<div>
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8">
<ApiTokenManager
:tokens="tokens"
:available-permissions="availablePermissions"
:default-permissions="defaultPermissions"
/>
</div>
<div>
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8">
<ApiTokenManager
:tokens="tokens"
:available-permissions="availablePermissions"
:default-permissions="defaultPermissions"
/>
</div>
</PageContainer>
</div>
</template>
22 changes: 10 additions & 12 deletions stubs/inertia/resources/js/Pages/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@ defineOptions({
</script>

<template>
<PageContainer title="Dashboard">
<template #header>
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
Dashboard
</h2>
</template>
<PageHeader title="Dashboard">
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
Dashboard
</h2>
</PageHeader>

<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-xl sm:rounded-lg">
<Welcome />
</div>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white dark:bg-gray-800 overflow-hidden shadow-xl sm:rounded-lg">
<Welcome />
</div>
</div>
</PageContainer>
</div>
</template>
62 changes: 30 additions & 32 deletions stubs/inertia/resources/js/Pages/Profile/Show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,42 @@ defineProps({
</script>

<template>
<PageContainer title="Profile">
<template #header>
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
Profile
</h2>
</template>

<div>
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8">
<div v-if="$page.props.jetstream.canUpdateProfileInformation">
<UpdateProfileInformationForm :user="$page.props.auth.user" />

<SectionBorder />
</div>
<PageHeader title="Profile">
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
Profile
</h2>
</PageHeader>

<div>
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8">
<div v-if="$page.props.jetstream.canUpdateProfileInformation">
<UpdateProfileInformationForm :user="$page.props.auth.user" />

<SectionBorder />
</div>

<div v-if="$page.props.jetstream.canUpdatePassword">
<UpdatePasswordForm class="mt-10 sm:mt-0" />
<div v-if="$page.props.jetstream.canUpdatePassword">
<UpdatePasswordForm class="mt-10 sm:mt-0" />

<SectionBorder />
</div>
<SectionBorder />
</div>

<div v-if="$page.props.jetstream.canManageTwoFactorAuthentication">
<TwoFactorAuthenticationForm
:requires-confirmation="confirmsTwoFactorAuthentication"
class="mt-10 sm:mt-0"
/>
<div v-if="$page.props.jetstream.canManageTwoFactorAuthentication">
<TwoFactorAuthenticationForm
:requires-confirmation="confirmsTwoFactorAuthentication"
class="mt-10 sm:mt-0"
/>

<SectionBorder />
</div>
<SectionBorder />
</div>

<LogoutOtherBrowserSessionsForm :sessions="sessions" class="mt-10 sm:mt-0" />
<LogoutOtherBrowserSessionsForm :sessions="sessions" class="mt-10 sm:mt-0" />

<template v-if="$page.props.jetstream.hasAccountDeletionFeatures">
<SectionBorder />
<template v-if="$page.props.jetstream.hasAccountDeletionFeatures">
<SectionBorder />

<DeleteUserForm class="mt-10 sm:mt-0" />
</template>
</div>
<DeleteUserForm class="mt-10 sm:mt-0" />
</template>
</div>
</PageContainer>
</div>
</template>
20 changes: 9 additions & 11 deletions stubs/inertia/resources/js/Pages/Teams/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ defineOptions({
</script>

<template>
<PageContainer title="Create Team">
<template #header>
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
Create Team
</h2>
</template>
<PageHeader title="Create Team">
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
Create Team
</h2>
</PageHeader>

<div>
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8">
<CreateTeamForm />
</div>
<div>
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8">
<CreateTeamForm />
</div>
</PageContainer>
</div>
</template>
40 changes: 19 additions & 21 deletions stubs/inertia/resources/js/Pages/Teams/Show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,28 @@ defineProps({
</script>

<template>
<PageContainer title="Team Settings">
<template #header>
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
Team Settings
</h2>
</template>
<PageHeader title="Team Settings">
<h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
Team Settings
</h2>
</PageHeader>

<div>
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8">
<UpdateTeamNameForm :team="team" :permissions="permissions" />
<div>
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8">
<UpdateTeamNameForm :team="team" :permissions="permissions" />

<TeamMemberManager
class="mt-10 sm:mt-0"
:team="team"
:available-roles="availableRoles"
:user-permissions="permissions"
/>
<TeamMemberManager
class="mt-10 sm:mt-0"
:team="team"
:available-roles="availableRoles"
:user-permissions="permissions"
/>

<template v-if="permissions.canDeleteTeam && ! team.personal_team">
<SectionBorder />
<template v-if="permissions.canDeleteTeam && ! team.personal_team">
<SectionBorder />

<DeleteTeamForm class="mt-10 sm:mt-0" :team="team" />
</template>
</div>
<DeleteTeamForm class="mt-10 sm:mt-0" :team="team" />
</template>
</div>
</PageContainer>
</div>
</template>

0 comments on commit 24c9a9d

Please sign in to comment.