mirror of
https://github.com/euzu/tuliprox.git
synced 2026-09-29 20:42:31 +02:00
some clippy fixes
This commit is contained in:
@@ -52,7 +52,7 @@ impl ConfigFile {
|
||||
}
|
||||
Ok(None) => {
|
||||
let paths = <Arc<ArcSwap<ConfigPaths>> as Access<ConfigPaths>>::load(&app_state.app_config.paths);
|
||||
info!("Coul dnot load Api Proxy File: {:?}", &paths.api_proxy_file_path);
|
||||
info!("Could not load Api Proxy File: {:?}", &paths.api_proxy_file_path);
|
||||
}
|
||||
Err(err) => {
|
||||
error!("Failed to load api-proxy file {err}");
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use log::error;
|
||||
use yew::prelude::*;
|
||||
use web_sys::MouseEvent;
|
||||
|
||||
@@ -34,8 +35,7 @@ pub fn CustomDialog(props: &CustomDialogProps) -> Html {
|
||||
let close_on_backdrop = props.close_on_backdrop_click;
|
||||
|
||||
Callback::from(move |e: MouseEvent| {
|
||||
if close_on_backdrop && e.target() == e.current_target() {
|
||||
is_open.set(false);
|
||||
if close_on_backdrop {
|
||||
if let Some(on_close) = &on_close {
|
||||
on_close.emit(());
|
||||
}
|
||||
@@ -43,18 +43,6 @@ pub fn CustomDialog(props: &CustomDialogProps) -> Html {
|
||||
})
|
||||
};
|
||||
|
||||
// let close = {
|
||||
// let is_open = is_open.clone();
|
||||
// let on_close = props.on_close.clone();
|
||||
//
|
||||
// Callback::from(move |()| {
|
||||
// is_open.set(false);
|
||||
// if let Some(on_close) = &on_close {
|
||||
// on_close.emit(());
|
||||
// }
|
||||
// })
|
||||
// };
|
||||
|
||||
// Only render if open
|
||||
if !*is_open {
|
||||
return html! {};
|
||||
@@ -68,13 +56,3 @@ pub fn CustomDialog(props: &CustomDialogProps) -> Html {
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
// // Add a helper function to show the dialog
|
||||
// pub fn show_dialog(_dialog_ref: &NodeRef) {
|
||||
// // This is a no-op for our custom dialog as it's controlled by the open prop
|
||||
// }
|
||||
//
|
||||
// // Add a helper function to close the dialog
|
||||
// pub fn close_dialog(_dialog_ref: &NodeRef) {
|
||||
// // This is a no-op for our custom dialog as it's controlled by the open prop
|
||||
// }
|
||||
@@ -1,4 +1,3 @@
|
||||
use log::error;
|
||||
use yew::prelude::*;
|
||||
use yew_i18n::use_translation;
|
||||
use shared::model::MappingDto;
|
||||
@@ -50,8 +49,6 @@ pub fn PlaylistMappings(props: &PlaylistMappingsProps) -> Html {
|
||||
// pub templates: Option<Vec<PatternTemplate>>
|
||||
};
|
||||
|
||||
error!("{mappings:?}");
|
||||
|
||||
html! {
|
||||
<div class="tp__playlist-mappings">
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user