mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-02-02 10:54:15 -05:00
Release 0.11.0
This commit is contained in:
parent
24020805bc
commit
0103524d27
7 changed files with 31 additions and 21 deletions
|
@ -3,7 +3,7 @@
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased]
|
## [0.11.0] - 2024-07-27
|
||||||
|
|
||||||
### New Functions 🚀
|
### New Functions 🚀
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "leptos-use"
|
name = "leptos-use"
|
||||||
version = "0.10.10"
|
version = "0.11.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Marc-Stefan Cassola"]
|
authors = ["Marc-Stefan Cassola"]
|
||||||
categories = ["gui", "web-programming"]
|
categories = ["gui", "web-programming"]
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<a href="https://crates.io/crates/leptos-use"><img src="https://img.shields.io/crates/v/leptos-use.svg?label=&color=%232C1275" alt="Crates.io"/></a>
|
<a href="https://crates.io/crates/leptos-use"><img src="https://img.shields.io/crates/v/leptos-use.svg?label=&color=%232C1275" alt="Crates.io"/></a>
|
||||||
<a href="https://leptos-use.rs/server_side_rendering.html"><img src="https://img.shields.io/badge/-SSR-%236a214b" alt="SSR"></a>
|
<a href="https://leptos-use.rs/server_side_rendering.html"><img src="https://img.shields.io/badge/-SSR-%236a214b" alt="SSR"></a>
|
||||||
<a href="https://leptos-use.rs"><img src="https://img.shields.io/badge/-docs%20%26%20demos-%239A233F" alt="Docs & Demos"></a>
|
<a href="https://leptos-use.rs"><img src="https://img.shields.io/badge/-docs%20%26%20demos-%239A233F" alt="Docs & Demos"></a>
|
||||||
<a href="https://leptos-use.rs"><img src="https://img.shields.io/badge/-77%20functions-%23EF3939" alt="77 Functions" /></a>
|
<a href="https://leptos-use.rs"><img src="https://img.shields.io/badge/-79%20functions-%23EF3939" alt="79 Functions" /></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
@ -92,4 +92,4 @@ This will create the function file in the src directory, scaffold an example dir
|
||||||
| <= 0.3 | 0.3 |
|
| <= 0.3 | 0.3 |
|
||||||
| 0.4, 0.5, 0.6 | 0.4 |
|
| 0.4, 0.5, 0.6 | 0.4 |
|
||||||
| 0.7, 0.8, 0.9 | 0.5 |
|
| 0.7, 0.8, 0.9 | 0.5 |
|
||||||
| 0.10 | 0.6 |
|
| 0.10, 0.11 | 0.6 |
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
<a href="https://crates.io/crates/leptos-use"><img src="https://img.shields.io/crates/v/leptos-use.svg?label=&color=%232C1275" alt="Crates.io"/></a>
|
<a href="https://crates.io/crates/leptos-use"><img src="https://img.shields.io/crates/v/leptos-use.svg?label=&color=%232C1275" alt="Crates.io"/></a>
|
||||||
<a href="https://leptos-use.rs/server_side_rendering.html"><img src="https://img.shields.io/badge/-SSR-%236a214b" alt="SSR"></a>
|
<a href="https://leptos-use.rs/server_side_rendering.html"><img src="https://img.shields.io/badge/-SSR-%236a214b" alt="SSR"></a>
|
||||||
<a href="./get_started.html"><img src="https://img.shields.io/badge/-docs%20%26%20demos-%239A233F" alt="Docs & Demos"></a>
|
<a href="./get_started.html"><img src="https://img.shields.io/badge/-docs%20%26%20demos-%239A233F" alt="Docs & Demos"></a>
|
||||||
<a href="./functions.html"><img src="https://img.shields.io/badge/-77%20functions-%23EF3939" alt="77 Functions" /></a>
|
<a href="./functions.html"><img src="https://img.shields.io/badge/-79%20functions-%23EF3939" alt="79 Functions" /></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
|
@ -8,6 +8,7 @@ crate-type = ["cdylib", "rlib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
axum = { version = "0.7", optional = true }
|
axum = { version = "0.7", optional = true }
|
||||||
|
codee = "0.1"
|
||||||
console_error_panic_hook = "0.1"
|
console_error_panic_hook = "0.1"
|
||||||
console_log = "1"
|
console_log = "1"
|
||||||
cfg-if = "1"
|
cfg-if = "1"
|
||||||
|
|
|
@ -4,7 +4,7 @@ use leptos::*;
|
||||||
use leptos_meta::*;
|
use leptos_meta::*;
|
||||||
use leptos_router::*;
|
use leptos_router::*;
|
||||||
use leptos_use::storage::{use_local_storage, use_local_storage_with_options, UseStorageOptions};
|
use leptos_use::storage::{use_local_storage, use_local_storage_with_options, UseStorageOptions};
|
||||||
use leptos_use::utils::FromToStringCodec;
|
use codee::string::FromToStringCodec;
|
||||||
use leptos_use::{
|
use leptos_use::{
|
||||||
use_color_mode_with_options, use_cookie_with_options, use_debounce_fn, use_event_listener,
|
use_color_mode_with_options, use_cookie_with_options, use_debounce_fn, use_event_listener,
|
||||||
use_interval, use_intl_number_format, use_preferred_dark, use_timestamp, use_window, ColorMode,
|
use_interval, use_intl_number_format, use_preferred_dark, use_timestamp, use_window, ColorMode,
|
||||||
|
@ -78,7 +78,7 @@ fn HomePage() -> impl IntoView {
|
||||||
|
|
||||||
let (test_cookie, _) = use_cookie_with_options::<String, FromToStringCodec>(
|
let (test_cookie, _) = use_cookie_with_options::<String, FromToStringCodec>(
|
||||||
"test-cookie",
|
"test-cookie",
|
||||||
UseCookieOptions::<String, _>::default()
|
UseCookieOptions::<String, _, _>::default()
|
||||||
.max_age(3000)
|
.max_age(3000)
|
||||||
.default_value(Some("Bogus string".to_owned())),
|
.default_value(Some("Bogus string".to_owned())),
|
||||||
);
|
);
|
||||||
|
|
|
@ -359,6 +359,8 @@ where
|
||||||
#[cfg(feature = "ssr")]
|
#[cfg(feature = "ssr")]
|
||||||
{
|
{
|
||||||
if !readonly {
|
if !readonly {
|
||||||
|
let cookie_name = cookie_name.to_owned();
|
||||||
|
|
||||||
create_isomorphic_effect(move |_| {
|
create_isomorphic_effect(move |_| {
|
||||||
let value = cookie
|
let value = cookie
|
||||||
.with(|cookie| {
|
.with(|cookie| {
|
||||||
|
@ -369,20 +371,27 @@ where
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.flatten();
|
.flatten();
|
||||||
jar.update_value(|jar| {
|
|
||||||
write_server_cookie(
|
jar.update_value({
|
||||||
cookie_name,
|
let domain = domain.clone();
|
||||||
value,
|
let path = path.clone();
|
||||||
jar,
|
let ssr_set_cookie = Rc::clone(&ssr_set_cookie);
|
||||||
max_age,
|
|
||||||
expires,
|
|jar| {
|
||||||
domain,
|
write_server_cookie(
|
||||||
path,
|
&cookie_name,
|
||||||
same_site,
|
value,
|
||||||
secure,
|
jar,
|
||||||
http_only,
|
max_age,
|
||||||
ssr_set_cookie,
|
expires,
|
||||||
)
|
domain,
|
||||||
|
path,
|
||||||
|
same_site,
|
||||||
|
secure,
|
||||||
|
http_only,
|
||||||
|
ssr_set_cookie,
|
||||||
|
)
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue