feat: begin implementation of "sub tabs"
This commit is contained in:
1 parent
7ca78b607b
commit
3f1745a589
8 files changed
+135
-42
No files matched your search
+23
-2
@@ -2,13 +2,34 @@
|
||||
pub struct TabInfo {
|
||||
pub text: String,
|
||||
pub path: String,
|
||||
pub sub_paths: Vec<SubTabInfo>,
|
||||
}
|
||||
|
||||
impl TabInfo {
|
||||
pub fn new(text: impl Into<String>, path: impl Into<String>) -> Self {
|
||||
pub fn new(
|
||||
text: impl Into<String>,
|
||||
path: impl Into<String>,
|
||||
sub_paths: Option<Vec<SubTabInfo>>
|
||||
) -> Self {
|
||||
Self {
|
||||
text: text.into(),
|
||||
path: path.into(),
|
||||
sub_paths: sub_paths.unwrap_or_default()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SubTabInfo {
|
||||
pub text: String,
|
||||
pub path: String,
|
||||
}
|
||||
|
||||
impl SubTabInfo {
|
||||
pub fn new(text: impl Into<String>, path: impl Into<String>) -> Self {
|
||||
Self {
|
||||
text: text.into(),
|
||||
path: path.into()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user