add: profile and full search
This commit is contained in:
parent
b8b0ef7f21
commit
3e4ee8126a
52 changed files with 897 additions and 484 deletions
|
@ -196,6 +196,21 @@ pub struct StripeConfig {
|
|||
pub billing_portal_url: String,
|
||||
}
|
||||
|
||||
/// Manuals config (search help, etc)
|
||||
#[derive(Clone, Serialize, Deserialize, Debug)]
|
||||
pub struct ManualsConfig {
|
||||
/// The page shown for help with search syntax.
|
||||
pub search_help: String,
|
||||
}
|
||||
|
||||
impl Default for ManualsConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
search_help: "".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Configuration file
|
||||
#[derive(Clone, Serialize, Deserialize, Debug)]
|
||||
pub struct Config {
|
||||
|
@ -259,6 +274,9 @@ pub struct Config {
|
|||
pub html_footer_path: String,
|
||||
#[serde(default)]
|
||||
pub stripe: Option<StripeConfig>,
|
||||
/// The relative paths to manuals.
|
||||
#[serde(default)]
|
||||
pub manuals: ManualsConfig,
|
||||
}
|
||||
|
||||
fn default_name() -> String {
|
||||
|
@ -307,12 +325,15 @@ fn default_banned_usernames() -> Vec<String> {
|
|||
"moderator".to_string(),
|
||||
"api".to_string(),
|
||||
"communities".to_string(),
|
||||
"community".to_string(),
|
||||
"notifs".to_string(),
|
||||
"notification".to_string(),
|
||||
"post".to_string(),
|
||||
"void".to_string(),
|
||||
"anonymous".to_string(),
|
||||
"stacks".to_string(),
|
||||
"stack".to_string(),
|
||||
"search".to_string(),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -328,6 +349,10 @@ fn default_connections() -> ConnectionsConfig {
|
|||
ConnectionsConfig::default()
|
||||
}
|
||||
|
||||
fn default_manuals() -> ManualsConfig {
|
||||
ManualsConfig::default()
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
|
@ -348,6 +373,7 @@ impl Default for Config {
|
|||
connections: default_connections(),
|
||||
html_footer_path: String::new(),
|
||||
stripe: None,
|
||||
manuals: default_manuals(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue