Move projectDiagnostics to it's own file and remove unused code

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Nate Butler 2022-04-28 14:52:12 -04:00
parent 772f4579fc
commit 6fc68a8ddd
3 changed files with 17 additions and 13 deletions

View file

@ -321,7 +321,6 @@ pub struct ProjectDiagnostics {
#[serde(flatten)]
pub container: ContainerStyle,
pub empty_message: TextStyle,
pub status_bar_item: ContainedText,
pub tab_icon_width: f32,
pub tab_icon_spacing: f32,
pub tab_summary_spacing: f32,

View file

@ -8,6 +8,7 @@ import projectPanel from "./projectPanel";
import search from "./search";
import selectorModal from "./selectorModal";
import workspace from "./workspace";
import projectDiagnostics from "./projectDiagnostics";
export const panel = {
padding: { top: 12, left: 12, bottom: 12, right: 12 },
@ -18,18 +19,7 @@ export default function app(theme: Theme): Object {
selector: selectorModal(theme),
workspace: workspace(theme),
editor: editor(theme),
projectDiagnostics: {
tabIconSpacing: 4,
tabIconWidth: 13,
tabSummarySpacing: 10,
emptyMessage: text(theme, "sans", "primary", { size: "lg" }),
statusBarItem: {
...text(theme, "sans", "muted"),
margin: {
right: 10,
},
},
},
projectDiagnostics: projectDiagnostics(theme),
commandPalette: commandPalette(theme),
projectPanel: projectPanel(theme),
chatPanel: chatPanel(theme),

View file

@ -0,0 +1,15 @@
import Theme from "../themes/theme";
import {
backgroundColor,
text,
} from "./components";
export default function projectDiagnostics(theme: Theme) {
return {
background: backgroundColor(theme, 500),
tabIconSpacing: 4,
tabIconWidth: 13,
tabSummarySpacing: 10,
emptyMessage: text(theme, "sans", "secondary", { size: "md" }),
}
}