adding basis for song_editor
This commit is contained in:
parent
a36a1d59c6
commit
09b62afc91
2 changed files with 5 additions and 2 deletions
30
src/ui/song_editor.rs
Normal file
30
src/ui/song_editor.rs
Normal file
|
@ -0,0 +1,30 @@
|
|||
use cosmic::{Element, Task};
|
||||
|
||||
use crate::core::songs::Song;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SongEditor {
|
||||
song: Option<Song>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Message {
|
||||
ChangeSong(Song),
|
||||
UpdateSong(Song),
|
||||
}
|
||||
|
||||
impl SongEditor {
|
||||
pub fn new() -> Self {
|
||||
Self { song: None }
|
||||
}
|
||||
pub fn update(&self, message: Message) -> Task<Message> {
|
||||
match message {
|
||||
Message::ChangeSong(song) => todo!(),
|
||||
Message::UpdateSong(song) => todo!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn view(&self) -> Element<Message> {
|
||||
todo!()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue