From f1aad750f2048c1b3b44d9f4dd1443ee5f143b0a Mon Sep 17 00:00:00 2001 From: Lucas Phang Date: Wed, 12 May 2021 14:12:05 +1000 Subject: [PATCH] Add new icon to actions panel --- stylesheets/_session_left_pane.scss | 2 +- ts/components/session/ActionsPanel.tsx | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/stylesheets/_session_left_pane.scss b/stylesheets/_session_left_pane.scss index 26166af9c..3c0e0c69d 100644 --- a/stylesheets/_session_left_pane.scss +++ b/stylesheets/_session_left_pane.scss @@ -123,7 +123,7 @@ $session-compose-margin: 20px; cursor: pointer; padding: 30px; - &:last-child { + &:nth-last-child(2) { margin: auto auto 0px auto; /* Hide theme icon until light theme is ready */ } diff --git a/ts/components/session/ActionsPanel.tsx b/ts/components/session/ActionsPanel.tsx index 5ced06163..924e3ed35 100644 --- a/ts/components/session/ActionsPanel.tsx +++ b/ts/components/session/ActionsPanel.tsx @@ -43,6 +43,7 @@ export enum SectionType { Channel, Settings, Moon, + PathIndicator, } const Section = (props: { type: SectionType; avatarPath?: string }) => { @@ -66,7 +67,12 @@ const Section = (props: { type: SectionType; avatarPath?: string }) => { const newThemeObject = updatedTheme === 'dark' ? darkTheme : lightTheme; dispatch(applyTheme(newThemeObject)); - } else { + } else if (type === SectionType.PathIndicator) { + // Show Path Indicator Modal + console.log("status clicked") + // window.showPathIndicatorDialog(); + } + else { dispatch(clearSearch()); dispatch(showLeftPaneSection(type)); } @@ -102,7 +108,10 @@ const Section = (props: { type: SectionType; avatarPath?: string }) => { case SectionType.Moon: iconType = SessionIconType.Moon; break; - + // Update Icon Here + case SectionType.PathIndicator: + iconType = SessionIconType.Star; + break; default: iconType = SessionIconType.Moon; } @@ -236,6 +245,8 @@ export const ActionsPanel = () => {
+ +
);