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 {
position: relative;
top: 1px;
margin-right: 3px;
&.error {
color: @term-red;
@ -1169,6 +1168,6 @@
color: @term-green;
}
&.output {
color: @text-primary;
color: @term-white;
}
}

View File

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

View File

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

View File

@ -4056,7 +4056,7 @@ class Model {
this.inputModel.setOpenAICmdInfoChat(update.openaicmdinfochat);
}
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);
}