Skip to content

Commit

Permalink
fix create button hidden in CreationModal
Browse files Browse the repository at this point in the history
lyang2821 committed Nov 30, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 0c59572 commit 50e4c15
Showing 9 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions lapdev-dashboard/src/cluster.rs
Original file line number Diff line number Diff line change
@@ -140,7 +140,7 @@ pub fn NewWorkspaceHostView(
<CreationInput label="Disk (GB)".to_string() value=disk placeholder="disk in GB".to_string() />
};
view! {
<CreationModal title="Create New Workspace Host".to_string() modal_hidden=new_workspace_host_modal_hidden action body update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=|| false />
<CreationModal title="Create New Workspace Host".to_string() modal_hidden=new_workspace_host_modal_hidden action body update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=Box::new(|| false) />
}
}

@@ -184,7 +184,7 @@ pub fn UpdateWorkspaceHostModal(
<CreationInput label="Disk (GB)".to_string() value=disk placeholder="disk in GB".to_string() />
};
view! {
<CreationModal title="Update Workspace Host".to_string() modal_hidden=update_workspace_host_modal_hidden action body update_text=None updating_text=None width_class=None create_button_hidden=|| false />
<CreationModal title="Update Workspace Host".to_string() modal_hidden=update_workspace_host_modal_hidden action body update_text=None updating_text=None width_class=None create_button_hidden=Box::new(|| false) />
}
}

@@ -1096,7 +1096,7 @@ pub fn NewMachineTypeView(
</div>
};
view! {
<CreationModal title="Create New Machine Type".to_string() modal_hidden=new_machine_type_modal_hidden action body update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=|| false />
<CreationModal title="Create New Machine Type".to_string() modal_hidden=new_machine_type_modal_hidden action body update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=Box::new(|| false) />
}
}

@@ -1127,7 +1127,7 @@ pub fn UpdateMachineTypeModal(
</div>
};
view! {
<CreationModal title="Update Workspace Host".to_string() modal_hidden=update_machine_type_modal_hidden action body update_text=None updating_text=None width_class=None create_button_hidden=|| false />
<CreationModal title="Update Workspace Host".to_string() modal_hidden=update_machine_type_modal_hidden action body update_text=None updating_text=None width_class=None create_button_hidden=Box::new(|| false) />
}
}

@@ -1680,6 +1680,6 @@ fn ClusterUserItemView(
</button>
</td>
</tr>
<CreationModal title=format!("Update Cluster User") modal_hidden=update_modal_hidden action=update_action body=update_modal_body update_text=None updating_text=None width_class=None create_button_hidden=|| false />
<CreationModal title=format!("Update Cluster User") modal_hidden=update_modal_hidden action=update_action body=update_modal_body update_text=None updating_text=None width_class=None create_button_hidden=Box::new(|| false) />
}
}
2 changes: 1 addition & 1 deletion lapdev-dashboard/src/git_provider.rs
Original file line number Diff line number Diff line change
@@ -381,7 +381,7 @@ pub fn UpdateScopeModal(
body
update_text=None
updating_text=None
create_button_hidden=|| false
create_button_hidden=Box::new(|| false)
width_class=None
/>
}
4 changes: 2 additions & 2 deletions lapdev-dashboard/src/license.rs
Original file line number Diff line number Diff line change
@@ -117,7 +117,7 @@ pub fn UpdateLicenseView(update_counter: RwSignal<i32>) -> impl IntoView {
>
Update Enterprise License
</button>
<CreationModal title="Update Enterprise License".to_string() modal_hidden body action update_text=None updating_text=None width_class=None create_button_hidden=|| false />
<CreationModal title="Update Enterprise License".to_string() modal_hidden body action update_text=None updating_text=None width_class=None create_button_hidden=Box::new(|| false) />
}
}

@@ -202,6 +202,6 @@ pub fn SignLicenseView() -> impl IntoView {
>
Sign New License
</button>
<CreationModal title="Sign Enterprise License".to_string() modal_hidden body action update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=|| false />
<CreationModal title="Sign Enterprise License".to_string() modal_hidden body action update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=Box::new(|| false) />
}
}
2 changes: 1 addition & 1 deletion lapdev-dashboard/src/modal.rs
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ pub fn CreationModal<T>(
body: T,
update_text: Option<String>,
updating_text: Option<String>,
create_button_hidden: impl Fn() -> bool + 'static,
create_button_hidden: Box<dyn Fn() -> bool + 'static>,
width_class: Option<String>,
) -> impl IntoView
where
4 changes: 2 additions & 2 deletions lapdev-dashboard/src/organization.rs
Original file line number Diff line number Diff line change
@@ -881,7 +881,7 @@ fn UpdateMemberView(
</div>
};
view! {
<CreationModal title="Update Member".to_string() modal_hidden=update_modal_hidden body action=update_action update_text=None updating_text=None width_class=None create_button_hidden=|| false />
<CreationModal title="Update Member".to_string() modal_hidden=update_modal_hidden body action=update_action update_text=None updating_text=None width_class=None create_button_hidden=Box::new(|| false) />
}
}

@@ -1033,6 +1033,6 @@ fn InviteMemberView(invite_member_modal_hidden: RwSignal<bool>) -> impl IntoView
</div>
};
view! {
<CreationModal title="Invite New Member".to_string() modal_hidden=invite_member_modal_hidden action body update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=|| true />
<CreationModal title="Invite New Member".to_string() modal_hidden=invite_member_modal_hidden action body update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=Box::new(|| true) />
}
}
2 changes: 1 addition & 1 deletion lapdev-dashboard/src/project.rs
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@ pub fn NewProjectView(new_project_modal_hidden: RwSignal<bool>) -> impl IntoView
<MachineTypeView current_machine_type preferred_machine_type />
};
view! {
<CreationModal title="Create New Project".to_string() modal_hidden=new_project_modal_hidden action body update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=|| false />
<CreationModal title="Create New Project".to_string() modal_hidden=new_project_modal_hidden action body update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=Box::new(|| false) />
}
}

2 changes: 1 addition & 1 deletion lapdev-dashboard/src/quota.rs
Original file line number Diff line number Diff line change
@@ -224,6 +224,6 @@ fn QuotaItemView(
</div>
</div>
</div>
<CreationModal title=format!("Update {kind} Quota") modal_hidden=update_modal_hidden action=update_action body=update_modal_body update_text=None updating_text=None width_class=None create_button_hidden=|| false />
<CreationModal title=format!("Update {kind} Quota") modal_hidden=update_modal_hidden action=update_action body=update_modal_body update_text=None updating_text=None width_class=None create_button_hidden=Box::new(|| false) />
}
}
2 changes: 1 addition & 1 deletion lapdev-dashboard/src/ssh_key.rs
Original file line number Diff line number Diff line change
@@ -157,6 +157,6 @@ pub fn NewSshKey(update_counter: RwSignal<i32>) -> impl IntoView {
>
New SSH Key
</button>
<CreationModal title="New SSH Key".to_string() modal_hidden action body update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=|| false />
<CreationModal title="New SSH Key".to_string() modal_hidden action body update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=Box::new(|| false) />
}
}
4 changes: 2 additions & 2 deletions lapdev-dashboard/src/workspace.rs
Original file line number Diff line number Diff line change
@@ -598,7 +598,7 @@ fn WorkspaceRebuildModal(
body
update_text=Some("Rebuild".to_string())
updating_text=None
create_button_hidden=|| false
create_button_hidden=Box::new(|| false)
width_class=None
/>
}
@@ -1121,7 +1121,7 @@ pub fn NewWorkspaceModal(
};

view! {
<CreationModal title="Create New Workspace".to_string() modal_hidden action body=create_info_view update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=|| false />
<CreationModal title="Create New Workspace".to_string() modal_hidden action body=create_info_view update_text=Some("Create".to_string()) updating_text=Some("Creating".to_string()) width_class=None create_button_hidden=Box::new(|| false) />
}
}

0 comments on commit 50e4c15

Please sign in to comment.