- Styling and markup for mission status control panel.
- Tweaks and additions to some common style elements.
This commit is contained in:
Charles Hacskaylo 2024-01-26 13:36:47 -08:00 committed by Mazzella, Jesse D. (ARC-TI)[KBR Wyle Services, LLC]
parent c24f310126
commit 10750f3f75
4 changed files with 110 additions and 18 deletions

View File

@ -1,17 +1,25 @@
<template> <template>
<div class="control-panel"> <div class="c-user-control-panel__component">
<div class="header"> <div class="c-user-control-panel__header">
<span>CONTROL PANEL</span> <div class="c-user-control-panel__title">Mission Status</div>
<button class="close-btn" @click.stop="onDismiss">X</button> <button
aria-label="Close"
class="c-icon-button c-icon-button--sm t-close-btn icon-x"
@click.stop="onDismiss"
></button>
</div> </div>
<div v-for="status in missionStatuses" :key="status" class="status-item"> <div class="c-ucp-mission-status">
<label :for="status">{{ status }}</label> <template v-for="status in missionStatuses" :key="status">
<button class="status-btn go">GO</button> <label class="c-ucp-mission-status__label" :for="status">{{ status }}</label>
<select :id="status.label"> <div class="c-ucp-mission-status__widget --is-no-go">NO GO</div>
<option v-for="option in missionStatusOptions" :key="option.key"> <div class="c-ucp-mission-status__select">
{{ option.label }} <select :id="status.label">
</option> <option v-for="option in missionStatusOptions" :key="option.key">
</select> {{ option.label }}
</option>
</select>
</div>
</template>
</div> </div>
</div> </div>
</template> </template>

View File

@ -1,3 +1,25 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
* Open MCT is licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
* Open MCT includes source code licensed under additional open source
* licenses. See the Open Source Licenses file (LICENSES.md) included with
* this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information.
*****************************************************************************/
.c-indicator { .c-indicator {
&:before { &:before {
// Indicator icon // Indicator icon
@ -21,7 +43,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: $interiorMarginLg; padding: $interiorMarginLg;
min-width: 350px; min-width: max-content;
max-width: 35%; max-width: 35%;
> * + * { > * + * {
@ -30,7 +52,7 @@
*:before { *:before {
font-size: 0.8em; font-size: 0.8em;
margin-right: $interiorMarginSm; margin-right: $interiorMarginSm; // WTF - this is BAD!
} }
&__section { &__section {
@ -43,6 +65,32 @@
} }
} }
&__header {
align-items: center;
display: flex;
column-gap: $interiorMargin;
text-transform: uppercase;
> * { flex: 0 0 auto; }
[class*='title'] {
flex: 1 1 auto;
}
}
.t-close-btn {
&:before {
margin-right: 0;
}
}
&__component {
// General classes for new control panel component
display: flex;
flex-direction: column;
gap: $interiorMargin;
}
&__top { &__top {
text-transform: uppercase; text-transform: uppercase;
} }
@ -70,7 +118,7 @@
} }
} }
/****** Admin interface */ /*************************************************** ADMIN INTERFACE */
&__content { &__content {
$m: $interiorMargin; $m: $interiorMargin;
display: grid; display: grid;
@ -109,3 +157,34 @@
} }
} }
} }
/**************** STYLES FOR THE MISSION STATUS USER CONTROL PANEL */
.c-ucp-mission-status {
$bg: rgba(black, 0.7);
display: grid;
grid-template-columns: max-content max-content 1fr;
align-items: center;
grid-column-gap: $interiorMarginLg;
grid-row-gap: $interiorMargin;
&__widget {
border-radius: $basicCr;
background: $bg;
border: 1px solid transparent;
padding: $interiorMarginSm $interiorMarginLg;
text-align: center;
&.--is-go {
$c: #2C7527;
background: $c;
color: white;
}
&.--is-no-go {
$c: #FBC147;
background: $bg;
border: 1px solid $c;
color: $c;
}
}
}

View File

@ -222,6 +222,10 @@ button {
font-size: 1.1em; font-size: 1.1em;
} }
} }
&--sm {
padding: $interiorMarginSm $interiorMargin;
}
} }
.c-list-button { .c-list-button {

View File

@ -98,6 +98,7 @@ body.desktop {
} }
div, div,
ul,
span { span {
// Firefox // Firefox
scrollbar-color: $scrollbarThumbColor $scrollbarTrackColorBg; scrollbar-color: $scrollbarThumbColor $scrollbarTrackColorBg;