applied patch

This commit is contained in:
Lewis Larsen 2022-11-02 09:37:51 +00:00
parent aa145a7b33
commit f09acf1e8d
11 changed files with 117 additions and 110 deletions

View File

@ -256,15 +256,15 @@ impl App {
<path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/> <path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/>
<path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/> <path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/>
</svg> </svg>
// show user id {
{if let Some((user_id, _)) = &self.user_info { html! { if let Some((user_id, _)) = &self.user_info {
html! {
<span class="ms-2"> <span class="ms-2">
{user_id} {user_id}
</span> </span>
} }
} else { html!{} } } else { html!{} }
} }
// end show user id
</a> </a>
{if let Some((user_id, _)) = &self.user_info { html! { {if let Some((user_id, _)) = &self.user_info { html! {
<ul <ul

View File

@ -220,8 +220,13 @@ impl Component for ChangePasswordForm {
type Field = yew_form::Field<FormModel>; type Field = yew_form::Field<FormModel>;
html! { html! {
<> <>
<div class="mb-2 mt-2"><h5 class="fw-bold">{"Change password"}</h5></div> <div class="mb-2 mt-2">
{ if let Some(e) = &self.common.error { <h5 class="fw-bold">
{"Change password"}
</h5>
</div>
{
if let Some(e) = &self.common.error {
html! { html! {
<div class="alert alert-danger mt-3 mb-3"> <div class="alert alert-danger mt-3 mb-3">
{e.to_string() } {e.to_string() }

View File

@ -132,7 +132,7 @@ impl Component for CreateGroupForm {
disabled=self.common.is_task_running() disabled=self.common.is_task_running()
onclick=self.common.callback(|e: MouseEvent| {e.prevent_default(); Msg::SubmitForm})> onclick=self.common.callback(|e: MouseEvent| {e.prevent_default(); Msg::SubmitForm})>
<i class="bi-save me-2"></i> <i class="bi-save me-2"></i>
{"Save changes"} {"Submit"}
</button> </button>
</div> </div>
</form> </form>

View File

@ -19,10 +19,10 @@ use yew_router::{
#[derive(GraphQLQuery)] #[derive(GraphQLQuery)]
#[graphql( #[graphql(
schema_path = "../schema.graphql", schema_path = "../schema.graphql",
query_path = "queries/create_user.graphql", query_path = "queries/create_user.graphql",
response_derives = "Debug", response_derives = "Debug",
custom_scalars_module = "crate::infra::graphql" custom_scalars_module = "crate::infra::graphql"
)] )]
pub struct CreateUser; pub struct CreateUser;
@ -347,11 +347,12 @@ impl Component for CreateUserForm {
type="submit" type="submit"
onclick=self.common.callback(|e: MouseEvent| {e.prevent_default(); Msg::SubmitForm})> onclick=self.common.callback(|e: MouseEvent| {e.prevent_default(); Msg::SubmitForm})>
<i class="bi-save me-2"></i> <i class="bi-save me-2"></i>
{"Save changes"} {"Submit"}
</button> </button>
</div> </div>
</form> </form>
{ if let Some(e) = &self.common.error { {
if let Some(e) = &self.common.error {
html! { html! {
<div class="alert alert-danger"> <div class="alert alert-danger">
{e.to_string() } {e.to_string() }

View File

@ -145,7 +145,7 @@ impl GroupDetails {
{if g.users.is_empty() { {if g.users.is_empty() {
html! { html! {
<tr key="EmptyRow"> <tr key="EmptyRow">
<td>{"There are currently no users in this group."}</td> <td>{"There are no users in this group."}</td>
<td/> <td/>
</tr> </tr>
} }

View File

@ -52,11 +52,11 @@ pub struct UserModel {
/// The GraphQL query sent to the server to update the user details. /// The GraphQL query sent to the server to update the user details.
#[derive(GraphQLQuery)] #[derive(GraphQLQuery)]
#[graphql( #[graphql(
schema_path = "../schema.graphql", schema_path = "../schema.graphql",
query_path = "queries/update_user.graphql", query_path = "queries/update_user.graphql",
response_derives = "Debug", response_derives = "Debug",
variables_derives = "Clone,PartialEq,Eq", variables_derives = "Clone,PartialEq,Eq",
custom_scalars_module = "crate::infra::graphql" custom_scalars_module = "crate::infra::graphql"
)] )]
pub struct UpdateUser; pub struct UpdateUser;
@ -319,7 +319,8 @@ impl Component for UserDetailsForm {
</button> </button>
</div> </div>
</form> </form>
{ if let Some(e) = &self.common.error { {
if let Some(e) = &self.common.error {
html! { html! {
<div class="alert alert-danger"> <div class="alert alert-danger">
{e.to_string() } {e.to_string() }