blob: 3c8e03b9faa728e27f935b1a2cc7398b17138a54 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
use crate::prelude::*;
#[wasm_bindgen]
extern "C" {
#[wasm_bindgen]
static TELETERM_CONFIG: JsValue;
}
#[derive(Clone, Debug, serde::Deserialize)]
pub(crate) struct Config {
pub(crate) username: Option<String>,
pub(crate) public_address: String,
pub(crate) allowed_login_methods:
std::collections::HashSet<crate::protocol::AuthType>,
pub(crate) oauth_login_urls:
std::collections::HashMap<crate::protocol::AuthType, String>,
}
impl Config {
pub(crate) fn load() -> Self {
TELETERM_CONFIG.into_serde().unwrap()
}
}
|