Compare commits
No commits in common. "d826afbe15c85c2cb94b0320042c2531c7d6e811" and "2c1190d8fbb71b4482f2fed2274e5c691802210b" have entirely different histories.
d826afbe15
...
2c1190d8fb
@ -37,7 +37,7 @@ governor = { version = "0.8", optional = true }
|
||||
md-5 = { version = "0.10", optional = true }
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
web-sys = { version = "0.3", features = ["Document", "Window", "Storage", "Element", "HtmlElement", "DomTokenList", "MediaQueryList", "HtmlImageElement", "MouseEvent", "KeyboardEvent", "Node", "EventTarget", "Navigator"] }
|
||||
web-sys = { version = "0.3", features = ["Document", "Window", "Storage", "Element", "DomTokenList", "MediaQueryList", "HtmlImageElement", "MouseEvent", "KeyboardEvent", "Node", "EventTarget", "Navigator"] }
|
||||
wasm-bindgen = "0.2"
|
||||
wasm-bindgen-futures = "0.4"
|
||||
js-sys = "0.3"
|
||||
|
||||
@ -31,8 +31,6 @@ pub fn ImageViewer(
|
||||
// 打开灯箱时聚焦关闭按钮,并监听 Escape 键关闭。
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
{
|
||||
use wasm_bindgen::{closure::Closure, JsCast};
|
||||
|
||||
use_effect(move || {
|
||||
if !is_open() {
|
||||
return;
|
||||
@ -45,7 +43,6 @@ pub fn ImageViewer(
|
||||
.and_then(|w| w.document())
|
||||
.and_then(|d| d.query_selector(".image-viewer-close").ok())
|
||||
.flatten()
|
||||
.and_then(|e| e.dyn_into::<web_sys::HtmlElement>().ok())
|
||||
{
|
||||
let _ = btn.focus();
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
use std::sync::LazyLock;
|
||||
use std::time::Duration;
|
||||
|
||||
use deadpool_postgres::{Manager, ManagerConfig, Pool, RecyclingMethod, Runtime};
|
||||
use deadpool_postgres::{Manager, ManagerConfig, Pool, RecyclingMethod};
|
||||
use tokio_postgres::NoTls;
|
||||
|
||||
/// 全局数据库连接池,基于 `DATABASE_URL` 环境变量延迟初始化。
|
||||
@ -35,7 +35,6 @@ pub static DB_POOL: LazyLock<Pool> = LazyLock::new(|| {
|
||||
.wait_timeout(Some(Duration::from_secs(10)))
|
||||
.create_timeout(Some(Duration::from_secs(10)))
|
||||
.recycle_timeout(Some(Duration::from_secs(5)))
|
||||
.runtime(Runtime::Tokio1)
|
||||
.build()
|
||||
.expect("Failed to create database connection pool")
|
||||
});
|
||||
|
||||
@ -20,6 +20,7 @@ mod db;
|
||||
#[cfg(feature = "server")]
|
||||
mod highlight;
|
||||
mod hooks;
|
||||
#[cfg(feature = "server")]
|
||||
mod models;
|
||||
mod pages;
|
||||
mod router;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user