chore: optimize file tree actions

This commit is contained in:
EnixCoda 2021-06-09 23:32:32 +08:00
parent d80e645b46
commit 473573796e
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD
2 changed files with 32 additions and 17 deletions

View file

@ -62,7 +62,7 @@ export function Node({
<NodeItemIcon node={node} open={expanded} loading={loading} />
{renderLabelText(node)}
</div>
{renderActions && <div>{renderActions(node)}</div>}
{renderActions && <div className={'actions'}>{renderActions(node)}</div>}
</a>
)
}

View file

@ -718,28 +718,43 @@ $minimal-z-index: max($github-header-z-index, $github-pull-request-float-header-
}
}
.node-item-comment {
display: inline-block;
width: 48px;
padding: 0 4px;
color: var(--gitako-text-tertiary);
.actions {
z-index: 1; // prevent being covered by next .node-item
padding-right: 8px;
.octicon-wrapper {
margin: 0; // make it closer to the comment amount label
.node-item-comment {
display: inline-block;
width: 48px;
padding: 0 4px;
color: var(--gitako-text-tertiary);
.octicon-wrapper {
margin: 0; // make it closer to the comment amount label
}
}
.go-to-button,
.find-in-folder-button {
@include icon-button();
width: 28px;
height: 28px;
border-radius: 28px;
white-space: nowrap;
.octicon-wrapper {
margin-right: 0;
}
}
}
.go-to-button,
.find-in-folder-button {
@include icon-button();
width: 28px;
height: 28px;
border-radius: 28px;
white-space: nowrap;
.octicon-wrapper {
margin-right: 0;
&.compact {
.go-to-button,
.find-in-folder-button {
border-radius: 4px;
width: 20px;
height: 20px;
}
}
&:not(:hover) {
.go-to-button,
.find-in-folder-button {