mirror of
https://github.com/nasa/openmct.git
synced 2024-12-27 00:31:06 +00:00
Enhancements for better wrapping of Status Area icons
- Fixed CSS classing on collapse/expand button. - New method added for storing head props in local storage. - TODOs: - Make sure using Update hook is performant. - Tests.
This commit is contained in:
parent
9e15443977
commit
d1e85c9af0
@ -52,7 +52,7 @@
|
|||||||
@click="toggleIndicatorsMultiline"
|
@click="toggleIndicatorsMultiline"
|
||||||
></button>
|
></button>
|
||||||
<button
|
<button
|
||||||
class="l-shell__head__collapse-button c-icon-button"
|
class="l-shell__head__button"
|
||||||
:class="headExpanded ? 'icon-items-collapse' : 'icon-items-expand'"
|
:class="headExpanded ? 'icon-items-collapse' : 'icon-items-expand'"
|
||||||
:aria-label="`Show ${headExpanded ? 'icon only' : 'icon and name'}`"
|
:aria-label="`Show ${headExpanded ? 'icon only' : 'icon and name'}`"
|
||||||
:title="`Show ${headExpanded ? 'icon only' : 'icon and name'}`"
|
:title="`Show ${headExpanded ? 'icon only' : 'icon and name'}`"
|
||||||
@ -210,7 +210,7 @@ export default {
|
|||||||
data: function () {
|
data: function () {
|
||||||
let storedHeadProps = window.localStorage.getItem('openmct-shell-head');
|
let storedHeadProps = window.localStorage.getItem('openmct-shell-head');
|
||||||
let headExpanded = true;
|
let headExpanded = true;
|
||||||
let indicatorsMultiline = false;
|
let indicatorsMultiline = true;
|
||||||
if (storedHeadProps) {
|
if (storedHeadProps) {
|
||||||
headExpanded = JSON.parse(storedHeadProps).expanded;
|
headExpanded = JSON.parse(storedHeadProps).expanded;
|
||||||
indicatorsMultiline = JSON.parse(storedHeadProps).multiline;
|
indicatorsMultiline = JSON.parse(storedHeadProps).multiline;
|
||||||
@ -282,20 +282,17 @@ export default {
|
|||||||
},
|
},
|
||||||
toggleShellHead() {
|
toggleShellHead() {
|
||||||
this.headExpanded = !this.headExpanded;
|
this.headExpanded = !this.headExpanded;
|
||||||
|
this.setLocalStorage();
|
||||||
window.localStorage.setItem(
|
|
||||||
'openmct-shell-head',
|
|
||||||
JSON.stringify({
|
|
||||||
expanded: this.headExpanded
|
|
||||||
})
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
toggleIndicatorsMultiline() {
|
toggleIndicatorsMultiline() {
|
||||||
this.indicatorsMultiline = !this.indicatorsMultiline;
|
this.indicatorsMultiline = !this.indicatorsMultiline;
|
||||||
|
this.setLocalStorage();
|
||||||
|
},
|
||||||
|
setLocalStorage() {
|
||||||
window.localStorage.setItem(
|
window.localStorage.setItem(
|
||||||
'openmct-shell-head',
|
'openmct-shell-head',
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
expanded: this.headExpanded,
|
||||||
multiline: this.indicatorsMultiline
|
multiline: this.indicatorsMultiline
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user