mirror of
https://github.com/hansjone/netx.git
synced 2026-10-11 22:00:48 +08:00
fix(webcrt): blend session tab close mark into device name
Remove the boxed close control so the x sits inline with the tab label.
This commit is contained in:
parent
5fa73c9a4f
commit
2ac8d96409
2 changed files with 37 additions and 14 deletions
|
|
@ -1689,7 +1689,7 @@ pre {
|
||||||
.webcrt-tabs__item {
|
.webcrt-tabs__item {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 2px;
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
background: #cfcfcf;
|
background: #cfcfcf;
|
||||||
color: #1e293b;
|
color: #1e293b;
|
||||||
|
|
@ -1704,12 +1704,35 @@ pre {
|
||||||
}
|
}
|
||||||
|
|
||||||
.webcrt-tabs__close {
|
.webcrt-tabs__close {
|
||||||
|
appearance: none;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
display: inline;
|
||||||
|
margin: 0;
|
||||||
|
margin-left: 2px;
|
||||||
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
border-radius: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
outline: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
font: inherit;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 1em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: #475569;
|
color: inherit;
|
||||||
|
opacity: 0.45;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.webcrt-tabs__close:hover,
|
||||||
|
.webcrt-tabs__item:hover .webcrt-tabs__close {
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
|
|
||||||
|
.webcrt-tabs__close:focus-visible {
|
||||||
|
opacity: 1;
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.webcrt-actions {
|
.webcrt-actions {
|
||||||
|
|
|
||||||
|
|
@ -390,18 +390,18 @@ export function WebcrtPage() {
|
||||||
<span>
|
<span>
|
||||||
{deviceLabel(tab.target)}
|
{deviceLabel(tab.target)}
|
||||||
{tab.status === "connecting" ? ` (${t("webcrt.status.connecting")})` : ""}
|
{tab.status === "connecting" ? ` (${t("webcrt.status.connecting")})` : ""}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="webcrt-tabs__close"
|
||||||
|
aria-label={t("webcrt.disconnect")}
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
void closeTab(tab.key);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
×
|
||||||
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="webcrt-tabs__close"
|
|
||||||
aria-label={t("webcrt.disconnect")}
|
|
||||||
onClick={(e) => {
|
|
||||||
e.stopPropagation();
|
|
||||||
void closeTab(tab.key);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
×
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue