|
208 | 208 | </div> |
209 | 209 | </.link> |
210 | 210 | <%= if @current_user do %> |
211 | | - <%= if main_contract_form = Map.get(assigns, :main_contract_form) do %> |
| 211 | + <div class="flex items-center gap-x-4"> |
212 | 212 | <div> |
213 | 213 | <.button |
214 | | - phx-click="open_main_contract_form" |
| 214 | + variant="secondary" |
| 215 | + navigate={~p"/docs"} |
215 | 216 | class="h-9 w-9 rounded-md flex items-center justify-center relative" |
216 | 217 | > |
217 | | - <.icon name="tabler-user-dollar" class="h-6 w-6 shrink-0" /> |
| 218 | + <.icon name="tabler-help" class="h-6 w-6 shrink-0" /> |
218 | 219 | </.button> |
219 | | - <.drawer |
220 | | - show={@main_contract_form_open?} |
221 | | - direction="right" |
222 | | - on_cancel="close_main_contract_form" |
223 | | - > |
224 | | - <.drawer_header> |
225 | | - <.drawer_title>Create new contract</.drawer_title> |
226 | | - <.drawer_description> |
227 | | - Engage a developer for ongoing work |
228 | | - </.drawer_description> |
229 | | - </.drawer_header> |
230 | | - <.drawer_content class="mt-4"> |
231 | | - <AlgoraWeb.Forms.ContractForm.contract_form form={main_contract_form} /> |
232 | | - </.drawer_content> |
233 | | - </.drawer> |
234 | 220 | </div> |
235 | | - <% end %> |
236 | | - <%= if main_bounty_form = Map.get(assigns, :main_bounty_form) do %> |
237 | | - <div> |
238 | | - <.button |
239 | | - phx-click="open_main_bounty_form" |
240 | | - class="h-9 w-9 rounded-md flex items-center justify-center relative" |
241 | | - > |
242 | | - <.icon name="tabler-diamond" class="h-6 w-6 shrink-0" /> |
243 | | - <.icon |
244 | | - name="tabler-plus" |
245 | | - class="h-[0.8rem] w-[0.8rem] shrink-0 absolute bottom-[0.2rem] right-[0.2rem]" |
246 | | - /> |
247 | | - </.button> |
248 | | - <.drawer |
249 | | - show={@main_bounty_form_open?} |
250 | | - direction="right" |
251 | | - on_cancel="close_main_bounty_form" |
252 | | - > |
253 | | - <.drawer_header> |
254 | | - <.drawer_title>Create new bounty</.drawer_title> |
255 | | - <.drawer_description> |
256 | | - Create and fund a bounty for an issue |
257 | | - </.drawer_description> |
258 | | - </.drawer_header> |
259 | | - <.drawer_content class="mt-4"> |
260 | | - <AlgoraWeb.Forms.BountyForm.bounty_form form={main_bounty_form} /> |
261 | | - </.drawer_content> |
262 | | - </.drawer> |
263 | | - </div> |
264 | | - <% end %> |
265 | | - <%!-- {live_render(@socket, AlgoraWeb.Activity.UserNavTimelineLive, |
| 221 | + <%= if main_contract_form = Map.get(assigns, :main_contract_form) do %> |
| 222 | + <div> |
| 223 | + <.button |
| 224 | + phx-click="open_main_contract_form" |
| 225 | + class="h-9 w-9 rounded-md flex items-center justify-center relative" |
| 226 | + > |
| 227 | + <.icon name="tabler-user-dollar" class="h-6 w-6 shrink-0" /> |
| 228 | + </.button> |
| 229 | + <.drawer |
| 230 | + show={@main_contract_form_open?} |
| 231 | + direction="right" |
| 232 | + on_cancel="close_main_contract_form" |
| 233 | + > |
| 234 | + <.drawer_header> |
| 235 | + <.drawer_title>Create new contract</.drawer_title> |
| 236 | + <.drawer_description> |
| 237 | + Engage a developer for ongoing work |
| 238 | + </.drawer_description> |
| 239 | + </.drawer_header> |
| 240 | + <.drawer_content class="mt-4"> |
| 241 | + <AlgoraWeb.Forms.ContractForm.contract_form form={main_contract_form} /> |
| 242 | + </.drawer_content> |
| 243 | + </.drawer> |
| 244 | + </div> |
| 245 | + <% end %> |
| 246 | + <%= if main_bounty_form = Map.get(assigns, :main_bounty_form) do %> |
| 247 | + <div> |
| 248 | + <.button |
| 249 | + phx-click="open_main_bounty_form" |
| 250 | + class="h-9 w-9 rounded-md flex items-center justify-center relative" |
| 251 | + > |
| 252 | + <.icon name="tabler-diamond" class="h-6 w-6 shrink-0" /> |
| 253 | + <.icon |
| 254 | + name="tabler-plus" |
| 255 | + class="h-[0.8rem] w-[0.8rem] shrink-0 absolute bottom-[0.2rem] right-[0.2rem]" |
| 256 | + /> |
| 257 | + </.button> |
| 258 | + <.drawer |
| 259 | + show={@main_bounty_form_open?} |
| 260 | + direction="right" |
| 261 | + on_cancel="close_main_bounty_form" |
| 262 | + > |
| 263 | + <.drawer_header> |
| 264 | + <.drawer_title>Create new bounty</.drawer_title> |
| 265 | + <.drawer_description> |
| 266 | + Create and fund a bounty for an issue |
| 267 | + </.drawer_description> |
| 268 | + </.drawer_header> |
| 269 | + <.drawer_content class="mt-4"> |
| 270 | + <AlgoraWeb.Forms.BountyForm.bounty_form form={main_bounty_form} /> |
| 271 | + </.drawer_content> |
| 272 | + </.drawer> |
| 273 | + </div> |
| 274 | + <% end %> |
| 275 | + <%!-- {live_render(@socket, AlgoraWeb.Activity.UserNavTimelineLive, |
266 | 276 | id: "activity-timeline", |
267 | 277 | session: %{}, |
268 | 278 | sticky: true, |
269 | 279 | assigns: %{current_user: @current_user} |
270 | 280 | )} --%> |
271 | | - <.context_selector |
272 | | - current_user={@current_user} |
273 | | - current_context={@current_context} |
274 | | - all_contexts={@all_contexts} |
275 | | - /> |
| 281 | + <.context_selector |
| 282 | + current_user={@current_user} |
| 283 | + current_context={@current_context} |
| 284 | + all_contexts={@all_contexts} |
| 285 | + /> |
| 286 | + </div> |
276 | 287 | <% else %> |
277 | 288 | <.link |
278 | 289 | navigate="/auth/login" |
|
0 commit comments