diff --git a/index.jsx b/index.jsx index 31c3ffba..17e10240 100644 --- a/index.jsx +++ b/index.jsx @@ -28,9 +28,9 @@ import * as Specter from "./lib/components/data/specter.jsx"; import * as Graph from "./lib/components/data/graph.jsx"; import * as DataWidgetLoader from "./lib/components/data/data-widget-loader.jsx"; import * as DataWidget from "./lib/components/data/data-widget.jsx"; +import * as SideIcon from "./lib/components/side-icon.jsx"; import * as Utils from "./lib/utils"; import * as Settings from "./lib/settings"; -import * as SideIcon from "./lib/components/side-icon.jsx"; const refreshFrequency = false; @@ -125,12 +125,12 @@ function render({ output, error }) { SIPDisabled={SIPDisabled} >
+ - diff --git a/lib/components/side-icon.jsx b/lib/components/side-icon.jsx index 45f39bf4..33ac7def 100644 --- a/lib/components/side-icon.jsx +++ b/lib/components/side-icon.jsx @@ -1,18 +1,26 @@ import * as Uebersicht from "uebersicht"; +import { useSimpleBarContext } from "./simple-bar-context.jsx"; const { React } = Uebersicht; export { sideIconStyles as styles } from "../../lib/styles/components/side-icon"; -export const Component = () => ( -
- - - -
-); + +export function Component() { + const { settings } = useSimpleBarContext(); + const { sideDecoration } = settings.global; + + if (!sideDecoration) return null; + + return ( +
+ + + +
+ ); +} diff --git a/lib/settings.js b/lib/settings.js index d677cdf4..20691f1b 100644 --- a/lib/settings.js +++ b/lib/settings.js @@ -37,6 +37,7 @@ export const data = { noBarBg: { label: "No bar background", type: "checkbox" }, noColorInData: { label: "No colors in data", type: "checkbox" }, bottomBar: { label: "Bottom bar", type: "checkbox" }, + sideDecoration: { label: "Side decoration (Apple logo)", type: "checkbox" }, inlineSpacesOptions: { label: "Inline spaces options", type: "checkbox" }, disableNotifications: { label: "Disable notifications", type: "checkbox" }, compactMode: { label: "Compact mode", type: "checkbox" }, @@ -518,6 +519,7 @@ export const defaultSettings = { noBarBg: false, noColorInData: false, bottomBar: false, + sideDecoration: false, inlineSpacesOptions: false, disableNotifications: false, compactMode: false, diff --git a/lib/styles/components/side-icon.js b/lib/styles/components/side-icon.js index b2abe104..e1cf230f 100644 --- a/lib/styles/components/side-icon.js +++ b/lib/styles/components/side-icon.js @@ -1,13 +1,14 @@ export const sideIconStyles = /* css */ ` .side-icon { - margin: auto; -} - -.icon-container { display: flex; align-items: center; - justify-content: center; - margin: 0 10px 0 5px; + margin: 0 5px; color: #fff; } -`; \ No newline at end of file + +.side-icon__svg { + width: 14px; + height: 14px; + fill: currentColor; +} +`;