-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01ffa30
commit dde96dd
Showing
48 changed files
with
840 additions
and
1,272 deletions.
There are no files selected for viewing
12 changes: 0 additions & 12 deletions
12
...src/app/(payload)/admin/(dashboard)/collections/[collection]/(document)/[id]/api/page.tsx
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...dev/src/app/(payload)/admin/(dashboard)/collections/[collection]/(document)/[id]/page.tsx
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
...d)/admin/(dashboard)/collections/[collection]/(document)/[id]/versions/[version]/page.tsx
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...pp/(payload)/admin/(dashboard)/collections/[collection]/(document)/[id]/versions/page.tsx
This file was deleted.
Oops, something went wrong.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...s/[collection]/(document)/create/page.tsx → ...tions/[collection]/[...segments]/page.tsx
This file contains 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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
// import { CollectionList } from '@payloadcms/next/pages/CollectionList' | ||
import { CollectionEdit } from '@payloadcms/next/pages/CollectionEdit' | ||
import { Document } from '@payloadcms/next/pages/Document' | ||
import config from 'payload-config' | ||
|
||
export default ({ params, searchParams }) => | ||
CollectionEdit({ | ||
collectionSlug: params.collection, | ||
Document({ | ||
params, | ||
searchParams, | ||
config, | ||
}) |
6 changes: 3 additions & 3 deletions
6
...(dashboard)/globals/[global]/api/page.tsx → ...globals/[global]/[[...segments]]/page.tsx
This file contains 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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */ | ||
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */ | ||
import { APIView } from '@payloadcms/next/pages/API' | ||
import { Document } from '@payloadcms/next/pages/Document' | ||
import config from 'payload-config' | ||
|
||
export default ({ params, searchParams }) => | ||
APIView({ | ||
globalSlug: params.global, | ||
Document({ | ||
config, | ||
params, | ||
searchParams, | ||
}) |
11 changes: 0 additions & 11 deletions
11
packages/dev/src/app/(payload)/admin/(dashboard)/globals/[global]/page.tsx
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react' | ||
|
||
export const CustomView: React.FC = async (props) => { | ||
return <div>CustomView</div> | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/dev/src/collections/Pages.ts → packages/dev/src/collections/Pages/index.ts
This file contains 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 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 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 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 was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { AdminViewComponent } from 'payload/config' | ||
import { SanitizedCollectionConfig, SanitizedGlobalConfig } from 'payload/types' | ||
|
||
export const getCustomViewByKey = ( | ||
views: | ||
| SanitizedCollectionConfig['admin']['components']['views'] | ||
| SanitizedGlobalConfig['admin']['components']['views'], | ||
customViewKey: string, | ||
): AdminViewComponent => { | ||
return typeof views?.Edit === 'function' | ||
? views?.Edit | ||
: typeof views?.Edit === 'object' && | ||
views?.Edit?.[customViewKey] && | ||
typeof views?.Edit?.[customViewKey] === 'function' | ||
? views?.Edit?.[customViewKey] | ||
: views?.Edit?.[customViewKey] | ||
? typeof views?.Edit?.[customViewKey] === 'object' && | ||
'Component' in views?.Edit?.[customViewKey] && | ||
typeof views?.Edit?.[customViewKey].Component === 'function' && | ||
views?.Edit?.[customViewKey].Component | ||
: null | ||
} |
Oops, something went wrong.