|
112 | 112 | :on-press #(hide-sheet-and-dispatch [:communities/share-community-pressed id])})
|
113 | 113 |
|
114 | 114 | (defn leave-community
|
115 |
| - [id] |
| 115 | + [id color] |
116 | 116 | {:icon :i/log-out
|
117 | 117 | :label (i18n/label :t/leave-community)
|
118 | 118 | :accessibility-label :leave-community
|
119 | 119 | :danger? true
|
120 | 120 | :on-press #(rf/dispatch [:show-bottom-sheet
|
121 |
| - {:content (fn [] [leave-menu/leave-sheet id])}])}) |
| 121 | + {:content (fn [] [leave-menu/leave-sheet id color])}])}) |
122 | 122 |
|
123 | 123 | (defn cancel-request-to-join
|
124 | 124 | [id request-id]
|
|
152 | 152 | (not-joined-options id token-gated? pending?)))
|
153 | 153 |
|
154 | 154 | (defn joined-options
|
155 |
| - [id token-gated? muted? muted-till] |
| 155 | + [id token-gated? muted? muted-till color] |
156 | 156 | [[(view-members id)
|
157 | 157 | (view-rules id)
|
158 | 158 | (when token-gated? (view-token-gating id))
|
|
164 | 164 | (invite-contacts id)
|
165 | 165 | (show-qr id)
|
166 | 166 | (share-community id)]
|
167 |
| - [(assoc (leave-community id) :add-divider? true)]]) |
| 167 | + [(assoc (leave-community id color) :add-divider? true)]]) |
168 | 168 |
|
169 | 169 | (defn owner-options
|
170 | 170 | [id token-gated? muted? muted-till]
|
|
181 | 181 | (defn get-context-drawers
|
182 | 182 | [{:keys [id]}]
|
183 | 183 | (let [{:keys [token-permissions admin joined
|
184 |
| - muted banList muted-till]} (rf/sub [:communities/community id]) |
185 |
| - request-id (rf/sub [:communities/my-pending-request-to-join id])] |
| 184 | + muted banList muted-till color]} (rf/sub [:communities/community id]) |
| 185 | + request-id (rf/sub [:communities/my-pending-request-to-join id])] |
186 | 186 | (cond
|
187 | 187 | admin (owner-options id token-permissions muted muted-till)
|
188 |
| - joined (joined-options id token-permissions muted muted-till) |
| 188 | + joined (joined-options id token-permissions muted muted-till color) |
189 | 189 | request-id (join-request-sent-options id token-permissions request-id)
|
190 | 190 | banList (banned-options id token-permissions)
|
191 | 191 | :else (not-joined-options id token-permissions request-id))))
|
|
0 commit comments