-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into rjt/ui-polish-3
- Loading branch information
Showing
27 changed files
with
129 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,19 +9,24 @@ defmodule BanchanWeb.ReportBugLive.New do | |
alias Surface.Components.Form | ||
|
||
alias BanchanWeb.Components.{Button, Layout} | ||
alias BanchanWeb.Components.Form.{QuillInput, Submit, TextInput} | ||
alias BanchanWeb.Components.Form.{Checkbox, QuillInput, Submit, TextInput} | ||
|
||
@impl true | ||
def handle_params(_params, _uri, socket) do | ||
{:noreply, assign(socket, report_url: nil)} | ||
end | ||
|
||
@impl true | ||
def handle_event("submit", %{"bug_report" => %{"title" => title, "body" => body}}, socket) do | ||
def handle_event( | ||
"submit", | ||
%{"bug_report" => %{"title" => title, "body" => body, "bug?" => bug?}}, | ||
socket | ||
) do | ||
case Reports.report_bug( | ||
socket.assigns.current_user, | ||
title, | ||
body, | ||
bug?, | ||
&Routes.denizen_show_url(Endpoint, :show, &1.handle) | ||
) do | ||
{:ok, url} -> | ||
|
@@ -48,13 +53,14 @@ defmodule BanchanWeb.ReportBugLive.New do | |
<div class="w-full bg-base-200"> | ||
<div class="w-full max-w-lg p-10 mx-auto rounded-xl md:my-10 bg-base-200"> | ||
{#if @report_url} | ||
<p>Thanks for your bug report! You can view the issue and sign up for updates <a href={@report_url} class="link link-primary">here</a>.</p> | ||
<p>Thanks for your feedback! You can view the issue and sign up for updates <a href={@report_url} class="link link-primary">here</a>.</p> | ||
<Button label="Report Another" click="reset" /> | ||
{#else} | ||
<Form class="flex flex-col gap-4" for={%{}} as={:bug_report} submit="submit"> | ||
<h1 class="text-2xl">Submit a bug report</h1> | ||
<p>Use this form to submit bug reports for Banchan Art. Please include as much context as you can.</p> | ||
<p><span class="text-error">NOTE: This report will be <span class="font-bold">publicly visible</span> on GitHub. Do NOT include anything personal or confidential</span></p> | ||
<h1 class="text-2xl">Submit feedback</h1> | ||
<p>To submit feedback for Banchan Art, you may use this form or <a href="https://github.com/BanchanArt/banchan/issues/new/choose" class="link">Github</a>. Please include as much context as you can.</p> | ||
<p>You may view existing issues using our <a href="https://github.com/BanchanArt/banchan/issues" class="link">Github issues page.</a></p> | ||
<p><span class="text-error">NOTE: This feedback will be <span class="font-bold">publicly visible</span> on GitHub. Do NOT include any personal or confidential information.</span></p> | ||
<p>If you need support for something that shouldn't be public, please contact us at <a href="mailto:[email protected]" class="link">[email protected]</a>.</p> | ||
<TextInput name={:title} label="Title" opts={required: true, maxlength: "256", minlength: "10"} /> | ||
<QuillInput | ||
|
@@ -63,6 +69,7 @@ defmodule BanchanWeb.ReportBugLive.New do | |
label="Body" | ||
opts={required: true, maxlength: "2000", minlength: "30"} | ||
/> | ||
<Checkbox name={:bug?} label="Bug Report" opts={"aria-label": "Bug Report"} /> | ||
<Submit /> | ||
</Form> | ||
{/if} | ||
|
Oops, something went wrong.