feat: implement email and phone obfuscation with Payload inline blocks
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Has started running
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Has started running
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
This commit is contained in:
25
src/payload/blocks/Email.ts
Normal file
25
src/payload/blocks/Email.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Block } from 'payload';
|
||||
|
||||
export const Email: Block = {
|
||||
slug: 'email',
|
||||
interfaceName: 'EmailBlock',
|
||||
labels: {
|
||||
singular: 'Email (Inline)',
|
||||
plural: 'Emails (Inline)',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'email',
|
||||
type: 'text',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'label',
|
||||
type: 'text',
|
||||
required: false,
|
||||
admin: {
|
||||
placeholder: 'Optional: Custom link text',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
28
src/payload/blocks/Phone.ts
Normal file
28
src/payload/blocks/Phone.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Block } from 'payload';
|
||||
|
||||
export const Phone: Block = {
|
||||
slug: 'phone',
|
||||
interfaceName: 'PhoneBlock',
|
||||
labels: {
|
||||
singular: 'Phone (Inline)',
|
||||
plural: 'Phones (Inline)',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'phone',
|
||||
type: 'text',
|
||||
required: true,
|
||||
admin: {
|
||||
placeholder: '+49 123 456 789',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'label',
|
||||
type: 'text',
|
||||
required: false,
|
||||
admin: {
|
||||
placeholder: 'Optional: Custom link text',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -1,4 +1,6 @@
|
||||
import { AnimatedImage } from './AnimatedImage';
|
||||
import { Email } from './Email';
|
||||
import { Phone } from './Phone';
|
||||
import { Callout } from './Callout';
|
||||
import { CategoryGrid } from './CategoryGrid';
|
||||
import { ChatBubble } from './ChatBubble';
|
||||
@@ -21,6 +23,8 @@ import { homeBlocksArray } from './HomeBlocks';
|
||||
export const payloadBlocks = [
|
||||
...homeBlocksArray,
|
||||
AnimatedImage,
|
||||
Email,
|
||||
Phone,
|
||||
Callout,
|
||||
CategoryGrid,
|
||||
ChatBubble,
|
||||
|
||||
Reference in New Issue
Block a user