Add the ability to delete files #82

Merged
savanni merged 3 commits from file-service/delete-file into main 2023-10-26 04:21:34 +00:00
2 changed files with 1 additions and 31 deletions
Showing only changes of commit d878f4e82c - Show all commits

View File

@ -137,11 +137,6 @@ impl Input {
self
}
pub fn with_value(mut self, val: &str) -> Self {
self.value = Some(val.to_owned());
self
}
pub fn with_attributes<'a>(
mut self,
values: impl IntoIterator<Item = (&'a str, &'a str)>,
@ -156,31 +151,6 @@ impl Input {
}
}
#[derive(Clone, Debug)]
pub struct Label {
target: String,
text: String,
}
impl Label {
pub fn new(target: &str, text: &str) -> Self {
Self {
target: target.to_owned(),
text: text.to_owned(),
}
}
}
impl Html for Label {
fn to_html_string(&self) -> String {
format!(
"<label for=\"{target}\">{text}</label>",
target = self.target,
text = self.text
)
}
}
#[derive(Clone, Debug)]
pub struct Button {
ty: Option<String>,

View File

@ -92,7 +92,7 @@ pub fn thumbnail(info: &FileInfo) -> Container {
format!("/{}", *info.id),
Container::default()
.with_attributes([("class", "thumbnail")])
.with_image(&format!("{}/tn", *info.id), "test data")
.with_image(format!("{}/tn", *info.id), "test data")
.to_html_string(),
),
)