Skip to content

Commit 50e4c15

Browse files
committedNov 30, 2024·
fix create button hidden in CreationModal
1 parent 0c59572 commit 50e4c15

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed
 

‎lapdev-dashboard/src/cluster.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pub fn NewWorkspaceHostView(
140140
<CreationInput label="Disk (GB)".to_string() value=disk placeholder="disk in GB".to_string() />
141141
};
142142
view! {
143-
<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 />
143+
<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) />
144144
}
145145
}
146146

@@ -184,7 +184,7 @@ pub fn UpdateWorkspaceHostModal(
184184
<CreationInput label="Disk (GB)".to_string() value=disk placeholder="disk in GB".to_string() />
185185
};
186186
view! {
187-
<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 />
187+
<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) />
188188
}
189189
}
190190

@@ -1096,7 +1096,7 @@ pub fn NewMachineTypeView(
10961096
</div>
10971097
};
10981098
view! {
1099-
<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 />
1099+
<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) />
11001100
}
11011101
}
11021102

@@ -1127,7 +1127,7 @@ pub fn UpdateMachineTypeModal(
11271127
</div>
11281128
};
11291129
view! {
1130-
<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 />
1130+
<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) />
11311131
}
11321132
}
11331133

@@ -1680,6 +1680,6 @@ fn ClusterUserItemView(
16801680
</button>
16811681
</td>
16821682
</tr>
1683-
<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 />
1683+
<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) />
16841684
}
16851685
}

‎lapdev-dashboard/src/git_provider.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ pub fn UpdateScopeModal(
381381
body
382382
update_text=None
383383
updating_text=None
384-
create_button_hidden=|| false
384+
create_button_hidden=Box::new(|| false)
385385
width_class=None
386386
/>
387387
}

‎lapdev-dashboard/src/license.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ pub fn UpdateLicenseView(update_counter: RwSignal<i32>) -> impl IntoView {
117117
>
118118
Update Enterprise License
119119
</button>
120-
<CreationModal title="Update Enterprise License".to_string() modal_hidden body action update_text=None updating_text=None width_class=None create_button_hidden=|| false />
120+
<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) />
121121
}
122122
}
123123

@@ -202,6 +202,6 @@ pub fn SignLicenseView() -> impl IntoView {
202202
>
203203
Sign New License
204204
</button>
205-
<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 />
205+
<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) />
206206
}
207207
}

‎lapdev-dashboard/src/modal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub fn CreationModal<T>(
4646
body: T,
4747
update_text: Option<String>,
4848
updating_text: Option<String>,
49-
create_button_hidden: impl Fn() -> bool + 'static,
49+
create_button_hidden: Box<dyn Fn() -> bool + 'static>,
5050
width_class: Option<String>,
5151
) -> impl IntoView
5252
where

‎lapdev-dashboard/src/organization.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ fn UpdateMemberView(
881881
</div>
882882
};
883883
view! {
884-
<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 />
884+
<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) />
885885
}
886886
}
887887

@@ -1033,6 +1033,6 @@ fn InviteMemberView(invite_member_modal_hidden: RwSignal<bool>) -> impl IntoView
10331033
</div>
10341034
};
10351035
view! {
1036-
<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 />
1036+
<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) />
10371037
}
10381038
}

‎lapdev-dashboard/src/project.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub fn NewProjectView(new_project_modal_hidden: RwSignal<bool>) -> impl IntoView
7373
<MachineTypeView current_machine_type preferred_machine_type />
7474
};
7575
view! {
76-
<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 />
76+
<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) />
7777
}
7878
}
7979

‎lapdev-dashboard/src/quota.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,6 @@ fn QuotaItemView(
224224
</div>
225225
</div>
226226
</div>
227-
<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 />
227+
<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) />
228228
}
229229
}

‎lapdev-dashboard/src/ssh_key.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,6 @@ pub fn NewSshKey(update_counter: RwSignal<i32>) -> impl IntoView {
157157
>
158158
New SSH Key
159159
</button>
160-
<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 />
160+
<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) />
161161
}
162162
}

‎lapdev-dashboard/src/workspace.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ fn WorkspaceRebuildModal(
598598
body
599599
update_text=Some("Rebuild".to_string())
600600
updating_text=None
601-
create_button_hidden=|| false
601+
create_button_hidden=Box::new(|| false)
602602
width_class=None
603603
/>
604604
}
@@ -1121,7 +1121,7 @@ pub fn NewWorkspaceModal(
11211121
};
11221122

11231123
view! {
1124-
<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 />
1124+
<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) />
11251125
}
11261126
}
11271127

0 commit comments

Comments
 (0)