use tokio::runtime::Runtime;
use std::sync::{Arc};
use std::thread::JoinHandle;
-use rand::distr::Alphanumeric;
-use rand::RngExt;
use tokio::fs;
use tokio::sync::{broadcast, mpsc};
use tokio::sync::broadcast::error::SendError;
match t {
NoteType::PlainTextNote => { ".txt" }
NoteType::MDTextNote => { ".md" }
+ NoteType::File => { "" }
}
}
let tab = match model.kind {
NoteType::PlainTextNote => NoteTypeTabView::TextArea,
NoteType::MDTextNote => NoteTypeTabView::TextArea,
+ _ => NoteTypeTabView::Empty
};
self.note_type.set(tab as i64);
}
}
pub enum NoteTypeTabView {
- _Empty = 0,
+ Empty = 0,
TextArea = 1
}
#[default]
PlainTextNote = 0,
MDTextNote = 1,
+ File = 2
}
impl ActiveModelBehavior for ActiveModel {}