aboutsummaryrefslogtreecommitdiffstats
path: root/packages/renderer/src/components/sidebar
diff options
context:
space:
mode:
Diffstat (limited to 'packages/renderer/src/components/sidebar')
-rw-r--r--packages/renderer/src/components/sidebar/ServiceIcon.tsx7
-rw-r--r--packages/renderer/src/components/sidebar/ServiceSwitcher.tsx15
-rw-r--r--packages/renderer/src/components/sidebar/Sidebar.tsx2
3 files changed, 8 insertions, 16 deletions
diff --git a/packages/renderer/src/components/sidebar/ServiceIcon.tsx b/packages/renderer/src/components/sidebar/ServiceIcon.tsx
index 1017be9..7a6d58a 100644
--- a/packages/renderer/src/components/sidebar/ServiceIcon.tsx
+++ b/packages/renderer/src/components/sidebar/ServiceIcon.tsx
@@ -20,7 +20,7 @@
20 20
21import IconWarning from '@mui/icons-material/Warning'; 21import IconWarning from '@mui/icons-material/Warning';
22import Badge from '@mui/material/Badge'; 22import Badge from '@mui/material/Badge';
23import { styled, useTheme } from '@mui/material/styles'; 23import { styled } from '@mui/material/styles';
24import { observer } from 'mobx-react-lite'; 24import { observer } from 'mobx-react-lite';
25import React, { useEffect, useState } from 'react'; 25import React, { useEffect, useState } from 'react';
26 26
@@ -89,7 +89,6 @@ const ServiceIconErrorBadge = styled(ServiceIconBadgeBase, {
89})); 89}));
90 90
91function ServiceIcon({ service }: { service: Service }): JSX.Element { 91function ServiceIcon({ service }: { service: Service }): JSX.Element {
92 const { direction } = useTheme();
93 const { 92 const {
94 settings: { name }, 93 settings: { name },
95 directMessageCount, 94 directMessageCount,
@@ -114,7 +113,7 @@ function ServiceIcon({ service }: { service: Service }): JSX.Element {
114 badgeContent={hasError ? <IconWarning fontSize="small" /> : 0} 113 badgeContent={hasError ? <IconWarning fontSize="small" /> : 0}
115 anchorOrigin={{ 114 anchorOrigin={{
116 vertical: 'bottom', 115 vertical: 'bottom',
117 horizontal: direction === 'ltr' ? 'right' : 'left', 116 horizontal: 'right',
118 }} 117 }}
119 > 118 >
120 <ServiceIconBadge 119 <ServiceIconBadge
@@ -125,7 +124,7 @@ function ServiceIcon({ service }: { service: Service }): JSX.Element {
125 color="error" 124 color="error"
126 anchorOrigin={{ 125 anchorOrigin={{
127 vertical: 'top', 126 vertical: 'top',
128 horizontal: direction === 'ltr' ? 'right' : 'left', 127 horizontal: 'right',
129 }} 128 }}
130 > 129 >
131 <ServiceIconRoot hasError={hasError}> 130 <ServiceIconRoot hasError={hasError}>
diff --git a/packages/renderer/src/components/sidebar/ServiceSwitcher.tsx b/packages/renderer/src/components/sidebar/ServiceSwitcher.tsx
index 60b8b98..0ebd359 100644
--- a/packages/renderer/src/components/sidebar/ServiceSwitcher.tsx
+++ b/packages/renderer/src/components/sidebar/ServiceSwitcher.tsx
@@ -34,20 +34,13 @@ import ServiceIcon from './ServiceIcon';
34const ServiceSwitcherRoot = styled(Tabs, { 34const ServiceSwitcherRoot = styled(Tabs, {
35 name: 'ServiceSwitcher', 35 name: 'ServiceSwitcher',
36 slot: 'Root', 36 slot: 'Root',
37})(({ theme }) => ({ 37})({
38 // Move the indicator to the outer side of the window. 38 // Move the indicator to the outer side of the window.
39 '.MuiTabs-indicator': { 39 '.MuiTabs-indicator': {
40 ...(theme.direction === 'ltr' 40 left: 0,
41 ? { 41 right: 'auto',
42 left: 0,
43 right: 'auto',
44 }
45 : {
46 left: 'auto',
47 right: 0,
48 }),
49 }, 42 },
50})); 43});
51 44
52const ServiceSwitcherTab = styled(Tab, { 45const ServiceSwitcherTab = styled(Tab, {
53 name: 'ServiceSwitcher', 46 name: 'ServiceSwitcher',
diff --git a/packages/renderer/src/components/sidebar/Sidebar.tsx b/packages/renderer/src/components/sidebar/Sidebar.tsx
index 6c2f219..fc57302 100644
--- a/packages/renderer/src/components/sidebar/Sidebar.tsx
+++ b/packages/renderer/src/components/sidebar/Sidebar.tsx
@@ -48,7 +48,7 @@ export default function Sidebar(): JSX.Element {
48 position: 'absolute', 48 position: 'absolute',
49 top: '-20px', 49 top: '-20px',
50 bottom: '-20px', 50 bottom: '-20px',
51 [theme.direction === 'ltr' ? 'right' : 'left']: '-20px', 51 right: '-20px',
52 zIndex: 100, 52 zIndex: 100,
53 width: '20px', 53 width: '20px',
54 boxShadow: theme.shadows[4], 54 boxShadow: theme.shadows[4],