proxmox-login: depend on js_sys on wasm32
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
parent
ffa64bead7
commit
b7a64cd4a2
@ -19,6 +19,9 @@ webauthn-rs = { workspace = true, optional = true }
|
||||
# For `Authentication::set_auth_headers`
|
||||
http = { version = "0.2.4", optional = true }
|
||||
|
||||
[target.'cfg(target_arch="wasm32")'.dependencies]
|
||||
js-sys = "0.3.55"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
webauthn = [ "dep:webauthn-rs" ]
|
||||
|
@ -7,6 +7,7 @@ Build-Depends: debhelper (>= 12),
|
||||
rustc:native <!nocheck>,
|
||||
libstd-rust-dev <!nocheck>,
|
||||
librust-base64-0.13+default-dev <!nocheck>,
|
||||
librust-js-sys-0.3+default-dev (>= 0.3.55-~~) <!nocheck>,
|
||||
librust-percent-encoding-2+default-dev (>= 2.1-~~) <!nocheck>,
|
||||
librust-serde-1+default-dev <!nocheck>,
|
||||
librust-serde-1+derive-dev <!nocheck>,
|
||||
@ -24,6 +25,7 @@ Multi-Arch: same
|
||||
Depends:
|
||||
${misc:Depends},
|
||||
librust-base64-0.13+default-dev,
|
||||
librust-js-sys-0.3+default-dev (>= 0.3.55-~~),
|
||||
librust-percent-encoding-2+default-dev (>= 2.1-~~),
|
||||
librust-serde-1+default-dev,
|
||||
librust-serde-1+derive-dev,
|
||||
|
@ -242,7 +242,7 @@ impl Authentication {
|
||||
|
||||
#[cfg(target_arch="wasm32")]
|
||||
fn epoch_i64() -> i64 {
|
||||
(js_sys::Date::now() / 1000.0) as i64;
|
||||
(js_sys::Date::now() / 1000.0) as i64
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch="wasm32"))]
|
||||
|
Loading…
x
Reference in New Issue
Block a user