|
| 1 | +/* eslint-disable node/prefer-global/process */ |
| 2 | +import type { GlobalConfig } from "payload"; |
| 3 | + |
| 4 | +export const Portal: GlobalConfig = { |
| 5 | + slug: "portal", |
| 6 | + access: { |
| 7 | + read: () => true, |
| 8 | + // update: ({ req }) => req.user?.roles?.some(role => role.admin === true || role.name === 'owner'), |
| 9 | + }, |
| 10 | + versions: { |
| 11 | + drafts: true, |
| 12 | + }, |
| 13 | + admin: { |
| 14 | + livePreview: { |
| 15 | + url: process.env.NODE_ENV === "development" ? process.env.CUHACKING_2025_PORTAL_LOCAL_URL : process.env.CUHACKING_2025_PORTAL_PUBLIC_URL, |
| 16 | + breakpoints: [ |
| 17 | + { |
| 18 | + label: "Mobile", |
| 19 | + name: "mobile", |
| 20 | + width: 320, |
| 21 | + height: 568, |
| 22 | + }, |
| 23 | + ], |
| 24 | + }, |
| 25 | + hooks: { |
| 26 | + afterChange: [], |
| 27 | + }, |
| 28 | + }, |
| 29 | + fields: [ |
| 30 | + { |
| 31 | + type: "collapsible", |
| 32 | + label: "Dashboard", |
| 33 | + fields: [ |
| 34 | + { |
| 35 | + name: "cards", |
| 36 | + type: "array", |
| 37 | + fields: [ |
| 38 | + { |
| 39 | + name: "title", |
| 40 | + type: "text", |
| 41 | + label: "Title", |
| 42 | + }, |
| 43 | + ], |
| 44 | + defaultValue: [ |
| 45 | + { title: "Welcome" }, |
| 46 | + { title: "Hackathon Countdown" }, |
| 47 | + { title: "Money Raised" }, |
| 48 | + { title: "Registrations" }, |
| 49 | + { title: "Sponsors - Coming Soon!!" }, |
| 50 | + { title: "Schedule - Coming Soon!!" }, |
| 51 | + { title: "Challenges - Coming Soon!!" }, |
| 52 | + { title: "More Features!! Maybe you'll add them!" }, |
| 53 | + { title: "Star our GitHub" }, |
| 54 | + ], |
| 55 | + }, |
| 56 | + ], |
| 57 | + }, |
| 58 | + { |
| 59 | + name: "login", |
| 60 | + type: "text", |
| 61 | + label: "Login", |
| 62 | + }, |
| 63 | + { |
| 64 | + name: "terms", |
| 65 | + type: "group", |
| 66 | + label: "Terms & Conditions", |
| 67 | + fields: [ |
| 68 | + { |
| 69 | + name: "title", |
| 70 | + type: "text", |
| 71 | + label: "Title", |
| 72 | + defaultValue: "Legalities", |
| 73 | + }, |
| 74 | + { |
| 75 | + name: "description", |
| 76 | + type: "text", |
| 77 | + label: "Description", |
| 78 | + defaultValue: "YO! Before we get into it, read these please.", |
| 79 | + }, |
| 80 | + { |
| 81 | + name: "accordion", |
| 82 | + type: "array", |
| 83 | + fields: [ |
| 84 | + { |
| 85 | + name: "title", |
| 86 | + type: "text", |
| 87 | + label: "Title", |
| 88 | + }, |
| 89 | + { |
| 90 | + name: "text", |
| 91 | + type: "text", |
| 92 | + label: "Text", |
| 93 | + }, |
| 94 | + { |
| 95 | + name: "checkbox", |
| 96 | + type: "checkbox", |
| 97 | + }, |
| 98 | + { |
| 99 | + name: "checkboxLabel", |
| 100 | + type: "text", |
| 101 | + }, |
| 102 | + ], |
| 103 | + defaultValue: [ |
| 104 | + { |
| 105 | + title: "MLH Code of Conduct", |
| 106 | + text: |
| 107 | + "TL;DR. Be respectful. Harassment and abuse are never tolerated. If you are in a situation that makes you uncomfortable at " + |
| 108 | + "an MLH Member Event, if the event itself creates an unsafe or inappropriate environment, or if interacting with an MLH " + |
| 109 | + "representative or event organizer makes you uncomfortable, please report it using the procedures included in this document.\n\n" + |
| 110 | + "Major League Hacking (MLH) stands for inclusivity. We believe that every single person has the right to hack in a safe and " + |
| 111 | + "welcoming environment.", |
| 112 | + checkbox: false, |
| 113 | + checkboxLabel: "I have read MLH Code of Conduct *", |
| 114 | + }, |
| 115 | + { |
| 116 | + title: "MLH Terms & Conditions", |
| 117 | + text: "", |
| 118 | + checkbox: false, |
| 119 | + checkboxLabel: "I have read MLH Terms & Conditions", |
| 120 | + }, |
| 121 | + { |
| 122 | + title: "MLH Privacy Policy", |
| 123 | + text: "", |
| 124 | + checkbox: false, |
| 125 | + checkboxLabel: "I have read MLH Privacy Policy", |
| 126 | + }, |
| 127 | + { |
| 128 | + title: "cuHacking Terms & Conditions", |
| 129 | + text: "", |
| 130 | + checkbox: false, |
| 131 | + checkboxLabel: "I have read cuHacking Terms & Conditions", |
| 132 | + }, |
| 133 | + ], |
| 134 | + }, |
| 135 | + ], |
| 136 | + }, |
| 137 | + { |
| 138 | + name: "profile", |
| 139 | + type: "text", |
| 140 | + label: "Profile", |
| 141 | + }, |
| 142 | + { |
| 143 | + name: "registration", |
| 144 | + type: "text", |
| 145 | + label: "Registration", |
| 146 | + }, |
| 147 | + ], |
| 148 | +}; |
0 commit comments