26 lines
595 B
Rust
26 lines
595 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::notes::Note;
|
|
|
|
use std::path::PathBuf;
|
|
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
pub struct Config {
|
|
pub templates_dir: PathBuf,
|
|
pub timer_concentrate_mins: u8,
|
|
pub timer_rest_mins: u8,
|
|
pub projects: Vec<PathBuf>,
|
|
pub notes: Vec<Note>,
|
|
}
|
|
|
|
impl Config {
|
|
pub fn new_default(templates_dir: PathBuf) -> Config {
|
|
Config {
|
|
templates_dir: templates_dir,
|
|
timer_concentrate_mins: 45,
|
|
timer_rest_mins: 15,
|
|
projects: Vec::new(),
|
|
notes: Vec::new(),
|
|
}
|
|
}
|
|
}
|