Tweak the color of the output status indicator, adjust the placement of the tab end-icons a bit (#236)

* Tweak the color of the output status indicator, adjust the placement of the tab end-icons a bit

* adjust the margins a bit more

* a few more slight adjustments to even out the spacing

* save work

* fix nullref, some smaller tweaks to the front icon

* made the tab slightly smaller so that the ratios made more sense

* remove unnecessary width

* format fix
This commit is contained in:
Evan Simkowitz 2024-01-17 20:25:57 -05:00 committed by GitHub
parent 7b9287316d
commit 5216f58e2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 32 additions and 21 deletions

View File

@ -1160,7 +1160,6 @@
.status-indicator { .status-indicator {
position: relative; position: relative;
top: 1px; top: 1px;
margin-right: 3px;
&.error { &.error {
color: @term-red; color: @term-red;
@ -1169,6 +1168,6 @@
color: @term-green; color: @term-green;
} }
&.output { &.output {
color: @text-primary; color: @term-white;
} }
} }

View File

@ -124,9 +124,11 @@ class ScreenTab extends React.Component<
{screen.name.get()} {screen.name.get()}
</div> </div>
<div className="end-icon"> <div className="end-icon">
<StatusIndicator level={statusIndicatorLevel} /> <div className="end-icon-inner">
{tabIndex} <StatusIndicator level={statusIndicatorLevel}/>
{settings} {tabIndex}
{settings}
</div>
</div> </div>
</Reorder.Item> </Reorder.Item>
); );

View File

@ -6,6 +6,7 @@
&:first-child { &:first-child {
border-radius: 8px 0px 0px 0px; border-radius: 8px 0px 0px 0px;
padding-left: 5px;
} }
&.color-green, &.color-green,
@ -261,21 +262,21 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
height: 3em; height: 3em;
min-width: 14em; min-width: 13.6em;
max-width: 14em; max-width: 13.6em;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
padding: 0 8px 0 8px;
.front-icon { .front-icon {
margin: 0 12px; margin-right: 5px;
.svg-icon svg { .svg-icon svg {
width: 14px; width: 14px;
height: 14px; height: 14px;
} }
.fa-icon { .fa-icon {
font-size: 16px; font-size: 16px;
} }
} }
.tab-name { .tab-name {
@ -293,23 +294,32 @@
} }
} }
// Only one of these will be visible at a time
.end-icon { .end-icon {
margin: 0 6px; // This makes the calculations below easier since we don't need to account for the right margin on the parent tab.
.icon { margin: 0 -8px 0 0;
margin: 0; .end-icon-inner {
padding: 0 6px; & > div {
width: 0; text-align: center;
border-radius: 50%; align-items: center;
& > * {
margin: auto auto;
}
width: 20px;
}
} }
.status-indicator { .status-indicator {
display: block; display: block;
// The status indicator is a little shorter than the text; this raises it up a bit so it's more centered vertically
padding-bottom: 1px;
margin-top: -1px;
} }
.tab-gear { .tab-gear {
display: none; display: none;
// Account for the fact that the ellipsis icon is a little taller than the other icons .icon {
margin-bottom: -2px; border-radius: 50%;
}
} }
.tab-index { .tab-index {
display: none; display: none;
font-size: 0.9em; font-size: 0.9em;

View File

@ -4056,7 +4056,7 @@ class Model {
this.inputModel.setOpenAICmdInfoChat(update.openaicmdinfochat); this.inputModel.setOpenAICmdInfoChat(update.openaicmdinfochat);
} }
if ("screenstatusindicator" in update) { if ("screenstatusindicator" in update) {
this.getScreenById_single(update.screenstatusindicator.screenid).setStatusIndicator(update.screenstatusindicator.status); this.getScreenById_single(update.screenstatusindicator.screenid)?.setStatusIndicator(update.screenstatusindicator.status);
} }
// console.log("run-update>", Date.now(), interactive, update); // console.log("run-update>", Date.now(), interactive, update);
} }