mirror of
https://github.com/nasa/openmct.git
synced 2025-01-30 16:13:53 +00:00
Markup / scss refactor WIP
- Added disabled property to viewControl; - Margin for elements in main panes; - Main search input styled for --major;
This commit is contained in:
parent
6708c79754
commit
5deff887fc
@ -26,13 +26,24 @@
|
|||||||
display: block;
|
display: block;
|
||||||
font-family: symbolsfont;
|
font-family: symbolsfont;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
opacity: 0.7;
|
opacity: 0.5;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 2px; // Prevents clipping
|
padding: 2px; // Prevents clipping
|
||||||
transition: width 250ms ease;
|
transition: width 250ms ease;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
box-shadow: inset rgba(black, 0.8) 0 0px 2px;
|
||||||
|
&:before {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&--major {
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
&__input {
|
&__input {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
box-shadow: none !important; // !important needed to override default for [input]
|
box-shadow: none !important; // !important needed to override default for [input]
|
||||||
@ -46,13 +57,6 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
|
||||||
box-shadow: inset rgba(black, 0.7) 0 0px 2px;
|
|
||||||
&:before {
|
|
||||||
opacity: 0.9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-active {
|
&.is-active {
|
||||||
&:before {
|
&:before {
|
||||||
padding: 2px 0px;
|
padding: 2px 0px;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<span class="c-view-control"
|
<span class="c-view-control"
|
||||||
:class="{ 'c-view-control--expanded' : expanded }"
|
:class="{
|
||||||
|
'c-view-control--expanded' : expanded,
|
||||||
|
'is-disabled' : disabled === true
|
||||||
|
}"
|
||||||
@click="toggle"></span>
|
@click="toggle"></span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -16,7 +19,7 @@
|
|||||||
width: $d;
|
width: $d;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&:before {
|
&:not(.is-disabled):before {
|
||||||
$s: .75;
|
$s: .75;
|
||||||
content: $glyph-icon-arrow-right-equilateral;
|
content: $glyph-icon-arrow-right-equilateral;
|
||||||
display: block;
|
display: block;
|
||||||
@ -38,7 +41,16 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
expanded: Boolean
|
expanded: {
|
||||||
|
type: Boolean,
|
||||||
|
value: false
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
// Provided to allow the view-control to still occupy space without displaying a control icon.
|
||||||
|
// Used as such in the tree - when a node doesn't have children, set disabled to true.
|
||||||
|
type: Boolean,
|
||||||
|
value: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggle() {
|
toggle() {
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
splitter="after"
|
splitter="after"
|
||||||
collapsable>
|
collapsable>
|
||||||
<div class="l-shell__search">
|
<div class="l-shell__search">
|
||||||
<search ref="shell-search"></search>
|
<search class="c-search--major" ref="shell-search"></search>
|
||||||
</div>
|
</div>
|
||||||
<div class="l-shell__tree">
|
<div class="l-shell__tree u-last">
|
||||||
<MctTree ref="shell-tree"></MctTree>
|
<MctTree ref="shell-tree"></MctTree>
|
||||||
</div>
|
</div>
|
||||||
</pane>
|
</pane>
|
||||||
@ -16,7 +16,6 @@
|
|||||||
<div class="l-shell__object-view">c-object-view</div>
|
<div class="l-shell__object-view">c-object-view</div>
|
||||||
<div class="l-shell__time-conductor">c-time-conductor</div>
|
<div class="l-shell__time-conductor">c-time-conductor</div>
|
||||||
</pane>
|
</pane>
|
||||||
<splitter align="vertical" target="shell-pane-main" collapse="to-right"></splitter>
|
|
||||||
<pane class="l-pane l-shell__pane-inspector"
|
<pane class="l-pane l-shell__pane-inspector"
|
||||||
splitter="before"
|
splitter="before"
|
||||||
collapsable>
|
collapsable>
|
||||||
@ -75,6 +74,11 @@
|
|||||||
&__pane-inspector {
|
&__pane-inspector {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column nowrap;
|
flex-flow: column nowrap;
|
||||||
|
|
||||||
|
// Create margin between shell elements in a pane
|
||||||
|
> [class*="l-shell__"] + [class*="l-shell__"] {
|
||||||
|
margin-top: $interiorMargin;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__pane-tree,
|
&__pane-tree,
|
||||||
@ -86,7 +90,7 @@
|
|||||||
&__pane-tree {
|
&__pane-tree {
|
||||||
$m: $interiorMargin;
|
$m: $interiorMargin;
|
||||||
background: $colorTreeBg;
|
background: $colorTreeBg;
|
||||||
padding: $m $m + ($splitterD - $splitterHandleD) $m $m;
|
padding: $m $m + ($splitterD) $m $m; // TODO: move this into pane.vue
|
||||||
width: 300px
|
width: 300px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user