mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix: sidebar logo.
This commit is contained in:
@@ -28,7 +28,10 @@ export default function DashboardViewsTabs({
|
||||
const [currentView, setCurrentView] = useState(initialViewSlug || 0);
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof currentViewSlug !== 'undefined' && currentViewSlug !== currentView) {
|
||||
if (
|
||||
typeof currentViewSlug !== 'undefined' &&
|
||||
currentViewSlug !== currentView
|
||||
) {
|
||||
setCurrentView(currentViewSlug || 0);
|
||||
}
|
||||
}, [currentView, setCurrentView, currentViewSlug]);
|
||||
@@ -52,37 +55,39 @@ export default function DashboardViewsTabs({
|
||||
// Handle tabs change.
|
||||
const handleTabsChange = (viewSlug) => {
|
||||
setCurrentView(viewSlug);
|
||||
triggerOnChange(viewSlug)
|
||||
triggerOnChange(viewSlug);
|
||||
};
|
||||
|
||||
return (
|
||||
<Tabs
|
||||
id="navbar"
|
||||
large={true}
|
||||
selectedTabId={currentView}
|
||||
className="tabs--dashboard-views"
|
||||
onChange={handleTabsChange}
|
||||
animate={false}
|
||||
>
|
||||
{allTab && <Tab id={0} title={defaultTabText} />}
|
||||
<div class="dashboard__views-tabs">
|
||||
<Tabs
|
||||
id="navbar"
|
||||
large={true}
|
||||
selectedTabId={currentView}
|
||||
className="tabs--dashboard-views"
|
||||
onChange={handleTabsChange}
|
||||
animate={false}
|
||||
>
|
||||
{allTab && <Tab id={0} title={defaultTabText} />}
|
||||
|
||||
{tabs.map((tab) => (
|
||||
<Tab id={tab.slug} title={tab.name} />
|
||||
))}
|
||||
<If condition={newViewTab}>
|
||||
<Tooltip
|
||||
content={<T id={'create_a_new_view'} />}
|
||||
position={Position.RIGHT}
|
||||
>
|
||||
<Button
|
||||
className="button--new-view"
|
||||
icon={<Icon icon="plus" />}
|
||||
onClick={handleClickNewView}
|
||||
minimal={true}
|
||||
/>
|
||||
</Tooltip>
|
||||
</If>
|
||||
</Tabs>
|
||||
{tabs.map((tab) => (
|
||||
<Tab id={tab.slug} title={tab.name} />
|
||||
))}
|
||||
<If condition={newViewTab}>
|
||||
<Tooltip
|
||||
content={<T id={'create_a_new_view'} />}
|
||||
position={Position.RIGHT}
|
||||
>
|
||||
<Button
|
||||
className="button--new-view"
|
||||
icon={<Icon icon="plus" />}
|
||||
onClick={handleClickNewView}
|
||||
minimal={true}
|
||||
/>
|
||||
</Tooltip>
|
||||
</If>
|
||||
</Tabs>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ function SidebarHead({
|
||||
<div className="sidebar__head-logo">
|
||||
<Icon
|
||||
icon={'mini-bigcapital'}
|
||||
width={140}
|
||||
width={28}
|
||||
height={28}
|
||||
className="bigcapital--alt"
|
||||
/>
|
||||
|
||||
@@ -161,10 +161,10 @@ export default {
|
||||
},
|
||||
'mini-bigcapital': {
|
||||
path: [
|
||||
'M56,3.16,61.33,8.5,31.94,37.9l-5.35-5.35Z',
|
||||
'M29.53,6.94l5.35,5.34L5.49,41.67.14,36.33l15.8-15.8Z',
|
||||
'M57 3.16L62.33 8.5L32.94 37.9L27.59 32.55L57 3.16Z',
|
||||
'M30.53 6.94L35.88 12.28L6.49 41.67L1.14 36.33L16.94 20.53L30.53 6.94Z',
|
||||
],
|
||||
viewBox: '0 0 309.09 42.89',
|
||||
viewBox: '0 0 63 43',
|
||||
},
|
||||
eye: {
|
||||
path: [
|
||||
|
||||
@@ -456,16 +456,18 @@ $dashboard-views-bar-height: 44px;
|
||||
}
|
||||
|
||||
.tabs--dashboard-views {
|
||||
user-select: none;
|
||||
|
||||
.#{$ns}-tab {
|
||||
color: #646a7d;
|
||||
font-size: 14px;
|
||||
line-height: $dashboard-views-bar-height;
|
||||
line-height: $dashboard-views-bar-height - 2px;
|
||||
font-weight: 400;
|
||||
padding: 0;
|
||||
margin-right: 0;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
padding-top: 2px;
|
||||
|
||||
&[aria-selected='true'] {
|
||||
color: #0052cc;
|
||||
|
||||
Reference in New Issue
Block a user