Skip to content

Commit ef982bb

Browse files
committed
Css update for chart
1 parent 3589317 commit ef982bb

File tree

4 files changed

+7
-48
lines changed

4 files changed

+7
-48
lines changed

src/areas/main.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import About from "../pages/about"
2727
import Dashboard from "../pages/dashboard"
2828
import Settings from "../pages/settings"
2929
import ExtraPage from "../pages/extrapages"
30-
import { Informations } from "../areas/informations"
3130
import { FooterContainer } from "./footer"
3231
import { processor, BackgroundContainer } from "../targets"
3332

@@ -46,10 +45,6 @@ const defRoutes = {
4645
component: <Settings />,
4746
path: "/settings",
4847
},
49-
INFORMATIONS: {
50-
component: <Informations />,
51-
path: "/informations",
52-
},
5348
}
5449

5550
const PANEL_HEIGHT_DEFAULT = 550

src/components/Navbar/index.js

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {
2929
useSettingsContext,
3030
useUiContext,
3131
useWsContext,
32-
useRouterContext,
3332
useUiContextFn,
3433
} from "../../contexts"
3534
import { useHttpQueue } from "../../hooks"
@@ -38,7 +37,6 @@ import { showConfirmationModal } from "../Modal"
3837
import {
3938
Server,
4039
Settings,
41-
Activity,
4240
LogOut,
4341
Trello,
4442
ChevronDown,
@@ -54,7 +52,6 @@ const defaultLinks = [
5452
icon: null,
5553
href: "/about",
5654
},
57-
{ label: "S123", icon: <Activity />, href: "/informations" },
5855
{
5956
label: "S13",
6057
icon: <Server />,
@@ -71,7 +68,6 @@ const defaultLinks = [
7168

7269
const Navbar = () => {
7370
const { connectionSettings } = useSettingsContext()
74-
const { defaultRoute, activeRoute } = useRouterContext()
7571
const { modals, uisettings } = useUiContext()
7672
const { createNewRequest } = useHttpQueue()
7773
const { Disconnect } = useWsContext()
@@ -86,23 +82,6 @@ const Navbar = () => {
8682
)
8783
const [hrefbutton, setHrefButton] = useState()
8884

89-
function onResize() {
90-
//if infopage is visible but we are not in mobile view
91-
if (
92-
document.getElementById("infopage") &&
93-
document.getElementById("infopage").clientWidth == 0
94-
) {
95-
//we should not be there so move to another page
96-
document
97-
.getElementById(
98-
defaultRoute.current == "/dashboard"
99-
? "dashboardLink"
100-
: "settingsLink"
101-
)
102-
.click()
103-
}
104-
}
105-
10685
/*
10786
auto-scroll textarea into view if mobile keyboard is blocking textarea to prevent
10887
page resize and navbar from snapping out of viewport due to using fixed heights
@@ -176,11 +155,6 @@ const Navbar = () => {
176155
<section class="navbar-section">
177156
{defaultLinks &&
178157
defaultLinks.map(({ label, icon, href, id }) => {
179-
if (
180-
href == "/informations" &&
181-
!uisettings.getValue("showinformationpage")
182-
)
183-
return
184158
return (
185159
<Link
186160
onclick={(e) => {

src/style/components/_control.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,11 @@ a label {
792792
overflow: hidden;
793793
}
794794

795+
.charts-subcontainer canvas.chart {
796+
width: 100%;
797+
display: block;
798+
}
799+
795800
.chart-legend {
796801
display: flex;
797802
flex-wrap: wrap;

src/targets/Printer3D/style/_index.scss

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,17 @@ text.scl {
2828
user-select: none;
2929
}
3030

31-
.charts-subcontainer,
3231
.charts-container {
3332
display: flex;
3433
flex-direction: column;
34+
justify-content: space-evenly;
3535
height: 100%;
36-
justify-content: space-around;
37-
}
38-
39-
.chart-legend {
40-
display: flex;
41-
flex-direction: row;
42-
flex-wrap: wrap;
43-
}
44-
.legend-name {
45-
font-size: 0.8rem;
46-
margin-right: 5px;
4736
}
4837

4938
.charts-subcontainer {
50-
justify-content: center;
39+
flex: 0 0 auto;
5140
}
5241

53-
.chart {
54-
margin-top: 10px;
55-
margin-bottom: 10px;
56-
}
5742

5843
text.posscl {
5944
font-weight: 200;

0 commit comments

Comments
 (0)