This commit is contained in:
rustdesk 2022-01-02 14:23:32 +08:00
parent 241623c406
commit 042114ae37
3 changed files with 5 additions and 9 deletions

View File

@ -64,7 +64,7 @@ class SessionStyle: Reactor.Component {
function render() { function render() {
var sessionsStyle = getSessionsStyle(this.type); var sessionsStyle = getSessionsStyle(this.type);
return <div .sessions-style> return <div .sessions-tab style="margin-left: 0.5em">
<span class={sessionsStyle == "tile" ? "active" : "inactive"}>{svg_tile}</span> <span class={sessionsStyle == "tile" ? "active" : "inactive"}>{svg_tile}</span>
<span class={sessionsStyle != "tile" ? "active" : "inactive"}>{svg_list}</span> <span class={sessionsStyle != "tile" ? "active" : "inactive"}>{svg_list}</span>
</div>; </div>;

View File

@ -48,21 +48,17 @@ div.sessions-bar {
flow: horizontal; flow: horizontal;
} }
div.sessions-style { div.sessions-tab span {
margin-left: 0.5em;
}
div.sessions-style span {
display: inline-block; display: inline-block;
padding: 6px 12px; padding: 6px 12px;
cursor: pointer; cursor: pointer;
} }
div.sessions-style svg { div.sessions-tab svg {
size: 14px; size: 14px;
} }
div.sessions-style span.active { div.sessions-tab span.active {
cursor: default; cursor: default;
border-radius: 3px; border-radius: 3px;
background: white; background: white;

View File

@ -59,7 +59,7 @@ class RecentSessions: Reactor.Component {
<div style="width:*"> <div style="width:*">
{translate("Recent Sessions")} {translate("Recent Sessions")}
</div> </div>
<SearchBar parent={this} /> {!app.hidden && <SearchBar parent={this} />}
{!app.hidden && <SessionStyle />} {!app.hidden && <SessionStyle />}
</div> </div>
{!app.hidden && <SessionList @{this.sessionList} style={sessionsStyle} sessions={sessions} />} {!app.hidden && <SessionList @{this.sessionList} style={sessionsStyle} sessions={sessions} />}