Skip to content

Commit

Permalink
Release version 0.23.1
Browse files Browse the repository at this point in the history
  • Loading branch information
photino committed May 23, 2024
1 parent 2981971 commit 9736f13
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 43 deletions.
8 changes: 4 additions & 4 deletions examples/actix-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ features = ["derive"]

[dependencies.zino]
path = "../../zino"
version = "0.22.0"
version = "0.22.1"
features = [
"actix",
"i18n",
Expand All @@ -30,7 +30,7 @@ features = [

[dependencies.zino-core]
path = "../../zino-core"
version = "0.23.0"
version = "0.23.1"
features = [
"cookie",
"env-filter",
Expand All @@ -40,8 +40,8 @@ features = [

[dependencies.zino-derive]
path = "../../zino-derive"
version = "0.20.0"
version = "0.20.1"

[dependencies.zino-model]
path = "../../zino-model"
version = "0.20.0"
version = "0.20.1"
8 changes: 4 additions & 4 deletions examples/axum-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ features = ["derive"]

[dependencies.zino]
path = "../../zino"
version = "0.22.0"
version = "0.22.1"
features = [
"axum",
"i18n",
Expand All @@ -29,7 +29,7 @@ features = [

[dependencies.zino-core]
path = "../../zino-core"
version = "0.23.0"
version = "0.23.1"
features = [
"cookie",
"env-filter",
Expand All @@ -40,8 +40,8 @@ features = [

[dependencies.zino-derive]
path = "../../zino-derive"
version = "0.20.0"
version = "0.20.1"

[dependencies.zino-model]
path = "../../zino-model"
version = "0.20.0"
version = "0.20.1"
8 changes: 4 additions & 4 deletions examples/dioxus-desktop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ features = ["derive"]

[dependencies.zino]
path = "../../zino"
version = "0.22.0"
version = "0.22.1"
features = ["dioxus-desktop", "orm"]

[dependencies.zino-core]
path = "../../zino-core"
version = "0.23.0"
version = "0.23.1"
features = ["env-filter", "orm-sqlite", "tls-rustls"]

[dependencies.zino-model]
path = "../../zino-model"
version = "0.20.0"
version = "0.20.1"

[dependencies.zino-dioxus]
path = "../../zino-dioxus"
version = "0.6.0"
version = "0.6.1"
2 changes: 1 addition & 1 deletion examples/minimal-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ publish = false

[dependencies.zino]
path = "../../zino"
version = "0.22.0"
version = "0.22.1"
features = ["axum"]

8 changes: 4 additions & 4 deletions examples/ntex-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ features = ["derive"]

[dependencies.zino]
path = "../../zino"
version = "0.22.0"
version = "0.22.1"
features = [
"i18n",
"jwt",
Expand All @@ -29,7 +29,7 @@ features = [

[dependencies.zino-core]
path = "../../zino-core"
version = "0.23.0"
version = "0.23.1"
features = [
"cookie",
"env-filter",
Expand All @@ -39,8 +39,8 @@ features = [

[dependencies.zino-derive]
path = "../../zino-derive"
version = "0.20.0"
version = "0.20.1"

[dependencies.zino-model]
path = "../../zino-model"
version = "0.20.0"
version = "0.20.1"
2 changes: 1 addition & 1 deletion zino-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zino-core"
description = "Core types and traits for zino."
version = "0.23.0"
version = "0.23.1"
rust-version = "1.75"
edition = "2021"
license = "MIT"
Expand Down
15 changes: 1 addition & 14 deletions zino-core/src/accessor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,7 @@
//!
//! # Examples
//!
//! ```toml
//! # config/config.dev.toml
//!
//! [[accessor]]
//! scheme = "oss"
//! name = "aliyun"
//! bucket = "test"
//! endpoint = "https://oss-cn-hangzhou.aliyuncs.com"
//! access-key-id = "LTAI8t7BtpEvPPcN9oy56CiS"
//! access-key-secret = "L0fQXrptbHgivJ6reF7gSkruS89I4n"
//!
//! ```
//!
//! ```rust,ignore
//! ```rust
//! use zino_core::{accessor::GloabalAccessor, error::Error, file::NamedFile};
//!
//! async fn upload_file(file: NamedFile) -> Result<(), Error> {
Expand Down
4 changes: 2 additions & 2 deletions zino-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zino-derive"
description = "Derived traits for zino."
version = "0.20.0"
version = "0.20.1"
rust-version = "1.75"
edition = "2021"
license = "MIT"
Expand All @@ -21,5 +21,5 @@ syn = "2.0.65"

[dependencies.zino-core]
path = "../zino-core"
version = "0.23.0"
version = "0.23.1"
features = ["orm"]
4 changes: 2 additions & 2 deletions zino-dioxus/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zino-dioxus"
description = "Dioxus components for zino."
version = "0.6.0"
version = "0.6.1"
rust-version = "1.75"
edition = "2021"
license = "MIT"
Expand Down Expand Up @@ -44,4 +44,4 @@ features = [

[dependencies.zino-core]
path = "../zino-core"
version = "0.23.0"
version = "0.23.1"
14 changes: 12 additions & 2 deletions zino-dioxus/src/form/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use zino_core::{file::NamedFile, SharedString};

/// A custom file upload input.
pub fn FileUpload(props: FileUploadProps) -> Element {
let has_name = props.children.is_some();
let mut file_names = use_signal(Vec::new);
let has_name = props.children.is_some() || !file_names().is_empty();
rsx! {
div {
class: props.class,
Expand All @@ -24,6 +25,7 @@ pub fn FileUpload(props: FileUploadProps) -> Element {
if let Some(handler) = props.on_change.as_ref() {
if let Some(file_engine) = event.files() {
let mut files = Vec::new();
file_names.write().clear();
for file in file_engine.files() {
if let Some(bytes) = file_engine.read_file(&file).await {
let file_path = Path::new(&file);
Expand All @@ -32,6 +34,9 @@ pub fn FileUpload(props: FileUploadProps) -> Element {
.map(|f| f.to_string_lossy())
{
let mut file = NamedFile::new(file_name);
if let Some(file_name) = file.file_name() {
file_names.write().push(file_name.to_owned());
}
file.set_bytes(bytes);
files.push(file);
}
Expand Down Expand Up @@ -60,11 +65,16 @@ pub fn FileUpload(props: FileUploadProps) -> Element {
{ props.label }
}
}
if has_name {
if props.children.is_some() {
span {
class: "file-name",
{ props.children }
}
} else if !file_names().is_empty() {
span {
class: "file-name",
{ file_names().join(", ") }
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion zino-extra/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ optional = true

[dependencies.zino-core]
path = "../zino-core"
version = "0.23.0"
version = "0.23.1"
6 changes: 3 additions & 3 deletions zino-model/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zino-model"
description = "Domain models for zino."
version = "0.20.0"
version = "0.20.1"
rust-version = "1.75"
edition = "2021"
license = "MIT"
Expand Down Expand Up @@ -49,7 +49,7 @@ features = ["derive"]

[dependencies.zino-core]
path = "../zino-core"
version = "0.23.0"
version = "0.23.1"
features = [
"jwt",
"orm",
Expand All @@ -58,4 +58,4 @@ features = [

[dependencies.zino-derive]
path = "../zino-derive"
version = "0.20.0"
version = "0.20.1"
2 changes: 1 addition & 1 deletion zino/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zino"
description = "Next-generation framework for composable applications in Rust."
version = "0.22.0"
version = "0.22.1"
rust-version = "1.75"
edition = "2021"
license = "MIT"
Expand Down

0 comments on commit 9736f13

Please sign in to comment.