|
1 | | -import { ModalView, View } from "@slack/bolt"; |
| 1 | +import { ModalView } from "@slack/bolt"; |
2 | 2 |
|
3 | | -const requestPermissionsPrompt: View = { |
4 | | - type: 'modal', |
| 3 | +const requestPermissionsPrompt: ModalView = { |
| 4 | + callback_id: "requestPermSubmission", |
| 5 | + type: "modal", |
5 | 6 | title: { |
6 | | - type: 'plain_text', |
7 | | - text: 'Request permissions', |
| 7 | + type: "plain_text", |
| 8 | + text: "Request permissions", |
8 | 9 | emoji: true, |
9 | 10 | }, |
10 | 11 | submit: { |
11 | | - type: 'plain_text', |
12 | | - text: 'Submit request', |
| 12 | + type: "plain_text", |
| 13 | + text: "Submit request", |
| 14 | + |
13 | 15 | emoji: true, |
14 | 16 | }, |
15 | 17 | close: { |
16 | | - type: 'plain_text', |
17 | | - text: 'Cancel', |
| 18 | + type: "plain_text", |
| 19 | + text: "Cancel", |
18 | 20 | emoji: true, |
19 | 21 | }, |
20 | 22 | blocks: [ |
21 | 23 | { |
22 | | - type: 'input', |
23 | | - block_id: 'role', |
| 24 | + type: "input", |
| 25 | + block_id: "role", |
24 | 26 | element: { |
25 | | - type: 'static_select', |
| 27 | + type: "static_select", |
26 | 28 | placeholder: { |
27 | | - type: 'plain_text', |
28 | | - text: 'Select role here', |
| 29 | + type: "plain_text", |
| 30 | + text: "Select role here", |
29 | 31 | emoji: true, |
30 | 32 | }, |
31 | 33 | options: [ |
32 | 34 | { |
33 | 35 | text: { |
34 | | - type: 'plain_text', |
35 | | - text: 'Squad member', |
| 36 | + type: "plain_text", |
| 37 | + text: "Squad member", |
36 | 38 | emoji: true, |
37 | 39 | }, |
38 | | - value: 'crew.recaptime.dev', |
| 40 | + value: "crew.recaptime.dev", |
39 | 41 | }, |
40 | 42 | { |
41 | 43 | text: { |
42 | | - type: 'plain_text', |
43 | | - text: 'Hack Clubber from HQ or HCB', |
| 44 | + type: "plain_text", |
| 45 | + text: "Hack Clubber from HQ or HCB", |
44 | 46 | emoji: true, |
45 | 47 | }, |
46 | | - value: 'hackclub.com/team', |
| 48 | + value: "hackclub.com/team", |
47 | 49 | }, |
48 | 50 | { |
49 | 51 | text: { |
50 | | - type: 'plain_text', |
51 | | - text: 'Community maintainers + mods (including community mods/Hack Club Slack FD)', |
| 52 | + type: "plain_text", |
| 53 | + text: "Community maintainers + mods (including community mods/Hack Club Slack FD)", |
52 | 54 | emoji: true, |
53 | 55 | }, |
54 | | - value: 'crew.recaptime.dev/community-maintainers', |
| 56 | + value: "crew.recaptime.dev/community-maintainers", |
55 | 57 | }, |
56 | 58 | { |
57 | 59 | text: { |
58 | | - type: 'plain_text', |
59 | | - text: 'None of the above', |
| 60 | + type: "plain_text", |
| 61 | + text: "None of the above", |
60 | 62 | emoji: true, |
61 | 63 | }, |
62 | | - value: 'regular-user', |
| 64 | + value: "regular-user", |
63 | 65 | }, |
64 | 66 | ], |
65 | | - action_id: 'selector', |
| 67 | + action_id: "selector", |
66 | 68 | }, |
67 | 69 | label: { |
68 | | - type: 'plain_text', |
69 | | - text: 'Are you RecapTime.dev staff or community maintainer?', |
| 70 | + type: "plain_text", |
| 71 | + text: "Are you RecapTime.dev staff or community maintainer?", |
70 | 72 | emoji: true, |
71 | 73 | }, |
| 74 | + optional: false, |
72 | 75 | }, |
73 | 76 | { |
74 | | - type: 'context', |
| 77 | + type: "context", |
75 | 78 | elements: [ |
76 | 79 | { |
77 | | - type: 'mrkdwn', |
78 | | - text: "To unlock the rest of @recaptimebot's features, you must be a Recap Time Squad member (part of @recaptimesquad user group), Hack Club Staff (@staff) or HCB Staff (@hcbops, @hcbteam or @hcb-engineers), a community maintainer from one of our projects (or from a open-source project we recongized), or a community moderator on one of our community spaces (this includes the Fire Department (@fire-fighters) at Hack Club Slack).", |
| 80 | + type: "mrkdwn", |
| 81 | + text: "To unlock more of Recap Time Bot features, you must be a <https://crew.recaptime.dev|current squad member> or <https://wiki.recaptime.dev/handbook/access-permission-levels#eligibility|part of eligible groups>.", |
79 | 82 | }, |
80 | 83 | ], |
81 | 84 | }, |
82 | 85 | { |
83 | | - type: 'input', |
84 | | - block_id: 'codeforge_profile', |
| 86 | + type: "input", |
| 87 | + block_id: "codeforge_profile", |
85 | 88 | element: { |
86 | | - type: 'plain_text_input', |
87 | | - action_id: 'username', |
| 89 | + type: "plain_text_input", |
| 90 | + action_id: "username", |
88 | 91 | }, |
89 | 92 | label: { |
90 | | - type: 'plain_text', |
91 | | - text: 'Your GitHub, GitLab SaaS or sourcehut username', |
| 93 | + type: "plain_text", |
| 94 | + text: "Your GitHub, GitLab SaaS or sourcehut username", |
92 | 95 | emoji: true, |
93 | 96 | }, |
| 97 | + hint: { |
| 98 | + type: "plain_text", |
| 99 | + text: "https://code-forge.tld/username", |
| 100 | + }, |
| 101 | + optional: false, |
94 | 102 | }, |
95 | 103 | { |
96 | | - type: 'context', |
| 104 | + type: "context", |
97 | 105 | elements: [ |
98 | 106 | { |
99 | | - type: 'mrkdwn', |
100 | | - text: "If you don't use GitHub but using either the GitLab SaaS instance (`gitlab.com`) or sourcehut (`sr.ht`), please fill this in.", |
| 107 | + type: "mrkdwn", |
| 108 | + text: "If you self-host GitLab, sourcehut or other open-source git hosting service, please paste the full profile URL here.", |
101 | 109 | }, |
102 | 110 | ], |
103 | 111 | }, |
104 | 112 | { |
105 | | - type: 'input', |
106 | | - block_id: 'reason', |
| 113 | + type: "input", |
| 114 | + block_id: "reason", |
107 | 115 | element: { |
108 | | - type: 'plain_text_input', |
| 116 | + type: "plain_text_input", |
109 | 117 | multiline: true, |
110 | | - action_id: 'content', |
| 118 | + action_id: "content", |
111 | 119 | }, |
112 | 120 | label: { |
113 | | - type: 'plain_text', |
114 | | - text: 'Request reason', |
| 121 | + type: "plain_text", |
| 122 | + text: "Request reason", |
115 | 123 | emoji: true, |
116 | 124 | }, |
| 125 | + hint: { |
| 126 | + text: "Your reason here", |
| 127 | + type: "plain_text", |
| 128 | + }, |
| 129 | + optional: false, |
| 130 | + }, |
| 131 | + { |
| 132 | + type: "context", |
| 133 | + elements: [ |
| 134 | + { |
| 135 | + type: "mrkdwn", |
| 136 | + text: "We use this information to help use review your request and grant you access faster.", |
| 137 | + }, |
| 138 | + ], |
117 | 139 | }, |
118 | 140 | ], |
119 | 141 | }; |
|
0 commit comments