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