Clean up unused code
This commit is contained in:
parent
152ac6927f
commit
95a0827517
2 changed files with 2 additions and 51 deletions
|
@ -18,16 +18,6 @@ use vscode::VsCodeThemeConverter;
|
||||||
use crate::theme_printer::ThemeFamilyPrinter;
|
use crate::theme_printer::ThemeFamilyPrinter;
|
||||||
use crate::vscode::VsCodeTheme;
|
use crate::vscode::VsCodeTheme;
|
||||||
|
|
||||||
pub(crate) fn new_theme_family(name: String, author: String) -> ThemeFamily {
|
|
||||||
ThemeFamily {
|
|
||||||
id: uuid::Uuid::new_v4().to_string(),
|
|
||||||
name: name.into(),
|
|
||||||
author: author.into(),
|
|
||||||
themes: Vec::new(),
|
|
||||||
scales: default_color_scales(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
struct FamilyMetadata {
|
struct FamilyMetadata {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
use std::path::{Path, PathBuf};
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use gpui::{Hsla, Refineable, Rgba};
|
use gpui::{Hsla, Refineable, Rgba};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use theme::{
|
use theme::{
|
||||||
default_color_scales, Appearance, ColorScales, GitStatusColors, PlayerColors, StatusColors,
|
Appearance, GitStatusColors, PlayerColors, StatusColors, SyntaxTheme, SystemColors,
|
||||||
SyntaxTheme, SystemColors, ThemeColors, ThemeColorsRefinement, ThemeFamily, ThemeStyles,
|
ThemeColors, ThemeColorsRefinement, ThemeStyles, ThemeVariant,
|
||||||
ThemeVariant,
|
|
||||||
};
|
};
|
||||||
use uuid::Uuid;
|
|
||||||
|
|
||||||
use crate::ThemeMetadata;
|
use crate::ThemeMetadata;
|
||||||
|
|
||||||
|
@ -34,41 +30,6 @@ pub struct VsCodeColors {
|
||||||
editor: String,
|
editor: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn new_theme_family_from_vsc(path: &Path) -> Result<ThemeFamily> {
|
|
||||||
todo!()
|
|
||||||
|
|
||||||
// let path_str = path.to_str().unwrap();
|
|
||||||
// let family_name = path_str.split('/').last().unwrap();
|
|
||||||
|
|
||||||
// let mut json_files: Vec<String> = Vec::new();
|
|
||||||
|
|
||||||
// if path.is_dir() {
|
|
||||||
// for entry in std::fs::read_dir(path).unwrap() {
|
|
||||||
// let entry = entry.unwrap();
|
|
||||||
// let path = entry.path();
|
|
||||||
// if path.is_file() {
|
|
||||||
// if let Some(extension) = path.extension() {
|
|
||||||
// if extension == "json" {
|
|
||||||
// json_files.push(path.file_name().unwrap().to_str().unwrap().to_string());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// anyhow::bail!("Path is not a directory");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// let mut theme_family = ThemeFamily {
|
|
||||||
// id: uuid::Uuid::new_v4().to_string(),
|
|
||||||
// name: family_name.into(),
|
|
||||||
// author: "New Theme Family".into(),
|
|
||||||
// themes: Vec::new(),
|
|
||||||
// scales: default_color_scales(),
|
|
||||||
// };
|
|
||||||
|
|
||||||
// Ok(theme_family)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn try_parse_color(color: &str) -> Result<Hsla> {
|
fn try_parse_color(color: &str) -> Result<Hsla> {
|
||||||
Ok(Rgba::try_from(color)?.into())
|
Ok(Rgba::try_from(color)?.into())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue