MainView UI updates (history, connections, settings, bookmarks) (#339)

* slight tab update

* sidebar separator / hightlight color restored

* fix mainviews, lots of history view fixes

* more mainview changes.  update for bottom-border, fix bookmarks
This commit is contained in:
Mike Sawka 2024-02-26 15:28:59 -08:00 committed by GitHub
parent 01e4106aa7
commit b120a7952d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 252 additions and 302 deletions

View File

@ -240,21 +240,6 @@ a.a-block {
flex-direction: row;
height: 100%;
position: relative;
.history-view,
.bookmarks-view,
.plugins-view,
.connections-view {
flex-grow: 1;
display: flex;
flex-direction: column;
margin-right: 0.5em;
position: relative;
&.is-hidden {
display: none;
}
overflow: auto;
}
}
}
@ -649,27 +634,39 @@ a.a-block {
}
}
.view {
background-color: var(--session-bg-color);
.mainview {
flex-grow: 1;
display: flex;
flex-direction: column;
position: relative;
overflow: auto;
margin-bottom: 10px;
margin-right: 10px;
border-radius: 8px;
border: 1px solid rgba(241, 246, 243, 0.08);
border-radius: 0 var(--app-border-radius) var(--app-border-radius) var(--app-border-radius);
border-bottom: 1px solid var(--app-border-color);
border-right: 1px solid var(--app-border-color);
border-left: 1px solid var(--app-border-color);
background-color: black;
&.is-hidden {
display: none;
}
.header {
margin: 24px 18px;
-webkit-app-region: drag;
padding: 24px 18px;
margin: 0;
display: flex;
justify-content: space-between;
align-items: center;
.close-div {
-webkit-app-region: no-drag;
font-size: 1.5em;
}
&.bottom-border {
border-bottom: 1px solid white;
padding-bottom: 20px;
margin-bottom: 20px;
}
}
}

View File

@ -1,31 +1,4 @@
.bookmarks-view {
background-color: var(--session-bg-color);
.close-button {
position: absolute;
right: 1em;
top: 0.8em;
cursor: pointer;
width: 1.5em;
height: 1.5em;
border-radius: 50%;
svg {
width: 1.5em;
height: 1.5em;
fill: var(--app-text-color);
}
}
.header {
margin: 1.5em 1.5em 0.5em;
.bookmarks-title {
margin-bottom: 0.5em;
font-weight: bold;
font-size: 1.5em;
}
}
.icon {
width: 1em;
height: 1em;

View File

@ -10,7 +10,6 @@ import cn from "classnames";
import { GlobalModel } from "@/models";
import { CmdStrCode, Markdown } from "@/common/elements";
import { ReactComponent as XmarkIcon } from "@/assets/icons/line/xmark.svg";
import { ReactComponent as CopyIcon } from "@/assets/icons/favourites/copy.svg";
import { ReactComponent as PenIcon } from "@/assets/icons/favourites/pen.svg";
import { ReactComponent as TrashIcon } from "@/assets/icons/favourites/trash.svg";
@ -204,11 +203,11 @@ class BookmarksView extends React.Component<{}, {}> {
let idx: number = 0;
let bookmark: BookmarkType = null;
return (
<div className={cn("bookmarks-view", { "is-hidden": isHidden })}>
<div className="header">
<div className="bookmarks-title">Favorites</div>
<div className="close-button hoverEffect" title="Close (Escape)" onClick={this.closeView}>
<XmarkIcon className={"icon"} />
<div className={cn("mainview", "bookmarks-view", { "is-hidden": isHidden })}>
<div className="header bottom-border">
<div className="bookmarks-title text-primary">Favorites</div>
<div className="close-div hoverEffect" title="Close (Escape)" onClick={this.closeView}>
<i className="fa-sharp fa-solid fa-xmark"></i>
</div>
</div>
<div className="bookmarks-list">

View File

@ -1,27 +1,6 @@
@import "@/common/themes/themes.less";
.clientsettings-view {
background-color: var(--session-bg-color);
flex-grow: 1;
display: flex;
flex-direction: column;
position: relative;
overflow: auto;
margin-bottom: 10px;
margin-right: 10px;
border-radius: 8px;
border: 1px solid rgba(241, 246, 243, 0.08);
background: rgba(13, 13, 13, 0.85);
.header {
margin: 24px 18px;
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20px;
border-bottom: 1px solid white;
}
.content {
padding: 0 18px 0 30px;
}

View File

@ -148,8 +148,8 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
const curFontFamily = GlobalModel.getTermFontFamily();
return (
<div className={cn("view clientsettings-view")}>
<header className="header">
<div className={cn("mainview", "clientsettings-view")}>
<header className="header bottom-border">
<div className="clientsettings-title text-primary">Client Settings</div>
<div className="close-div hoverEffect" title="Close (Escape)" onClick={this.handleClose}>
<i className="fa-sharp fa-solid fa-xmark"></i>

View File

@ -130,8 +130,8 @@ class ConnectionsView extends React.Component<{ model: RemotesModel }, { hovered
let item: RemoteType = null;
return (
<div className={cn("view connections-view")}>
<header className="header">
<div className={cn("mainview", "connections-view")}>
<header className="header bottom-border">
<div className="connections-title text-primary">Connections</div>
<div className="close-div hoverEffect" title="Close (Escape)" onClick={this.handleClose}>
<i className="fa-sharp fa-solid fa-xmark"></i>

View File

@ -1,11 +1,16 @@
@import "@/common/themes/themes.less";
.history-view {
background-color: var(--session-bg-color);
padding-bottom: 10px;
.header {
padding: 18px 18px;
}
.icon {
width: 1.3em !important;
width: 2em !important;
height: 1.3em !important;
padding-left: 5px;
fill: var(--app-text-color);
}
@ -55,19 +60,18 @@
}
}
.header {
margin: 1.5em 1.5em 0.5em;
.history-title {
margin-bottom: 0.5em;
font-weight: bold;
font-size: 1.5em;
}
}
.history-search {
flex-grow: 1;
margin-top: 5px;
padding: 0 10px 10px 10px;
input {
border: none;
border-radius: 4px;
font-size: 1em;
padding: 0.5em 1em;
background-color: @background-session-components;
color: @base-color;
}
.main-search {
.field {
@ -169,6 +173,7 @@
margin-left: 10px;
align-items: center;
height: 32px;
flex-shrink: 0;
.is-hidden {
display: none;
@ -251,6 +256,12 @@
margin: 20px 50px 20px 20px;
}
.history-scroll-region {
flex-grow: 1;
min-height: 200px;
overflow-y: auto;
}
.history-table {
margin: 0px 10px 10px 10px;
table-layout: fixed;

View File

@ -424,14 +424,19 @@ class HistoryView extends React.Component<{}, {}> {
const width = window.innerWidth - 6 - GlobalModel.mainSidebarModel.getWidth();
return (
<div
className={cn("history-view", "view", { "is-hidden": isHidden })}
className={cn("history-view", "mainview", { "is-hidden": isHidden })}
style={{
width: `${width}px`,
}}
>
<div className="header">
<div className="history-title">History</div>
<div className="history-search">
<header key="header" className="header">
<div className="clientsettings-title text-primary">History</div>
<div className="close-div hoverEffect" title="Close (Escape)" onClick={this.clickCloseHandler}>
<i className="fa-sharp fa-solid fa-xmark"></i>
</div>
</header>
<div key="search" className="history-search">
<div className="main-search field">
<TextField
placeholder="Exact String Search"
@ -539,11 +544,7 @@ class HistoryView extends React.Component<{}, {}> {
</div>
</div>
</div>
<div className="close-div hoverEffect" title="Close (Escape)" onClick={this.clickCloseHandler}>
<XmarkIcon />
</div>
</div>
<div className={cn("control-bar", "is-top", { "is-hidden": items.length == 0 })}>
<div key="control1" className={cn("control-bar", "is-top", { "is-hidden": items.length == 0 })}>
<div className="control-checkbox" onClick={this.handleControlCheckbox} title="Toggle Selection">
<HistoryCheckbox
checked={numSelected > 0 && numSelected == items.length}
@ -581,12 +582,20 @@ class HistoryView extends React.Component<{}, {}> {
<ChevronRightIcon className="icon" />
</div>
</div>
<If condition={items.length == 0}>
<div key="no-items" className="no-items">
<div>No History Items Found</div>
</div>
</If>
<div key="hsr" className="history-scroll-region">
<table className="history-table" cellSpacing="0" cellPadding="0" border={0} ref={this.tableRef}>
<tbody>
<For index="idx" each="item" of={items}>
<tr
key={item.historyid}
className={cn("history-item", { "is-selected": hvm.selectedItems.get(item.historyid) })}
className={cn("history-item", {
"is-selected": hvm.selectedItems.get(item.historyid),
})}
>
<td className="selectbox" onClick={() => this.handleSelect(item.historyid)}>
<HistoryCheckbox checked={hvm.selectedItems.get(item.historyid)} />
@ -649,7 +658,8 @@ class HistoryView extends React.Component<{}, {}> {
</For>
</tbody>
</table>
<div className={cn("control-bar", { "is-hidden": items.length == 0 || !hasMore })}>
</div>
<div key="control2" className={cn("control-bar", { "is-hidden": items.length == 0 || !hasMore })}>
<div className="spacer" />
<div className="showing-text">
Showing {offset + 1}-{offset + items.length}
@ -668,14 +678,6 @@ class HistoryView extends React.Component<{}, {}> {
<ChevronRightIcon className="icon" />
</div>
</div>
<If condition={items.length == 0}>
<div className="no-items">
<div>No History Items Found</div>
</div>
</If>
<div className="alt-help">
<div className="help-entry">[Esc] to Close</div>
</div>
</div>
);
}

View File

@ -125,6 +125,8 @@
// sidebar colors
--sidebar-dev-bg-color: rgb(21, 23, 48);
--sidebar-settings-color: rgb(255, 255, 255);
--sidebar-separator-color: var(--app-border-color);
--sidebar-highlight-color: rgba(241, 246, 243, 0.08);
// line colors
--line-sidebar-message-color: rgb(196, 160, 0);

View File

@ -16,7 +16,7 @@
.title-bar-drag {
-webkit-app-region: drag;
height: 20px;
height: 30px;
position: absolute;
top: 0;
left: 0;
@ -126,9 +126,7 @@
border-bottom: 1px solid var(--sidebar-separator-color);
.item {
&.active {
background: var(--sidebar-separator-color);
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.4), 0px 0px 0.5px 0px rgba(0, 0, 0, 0.5),
0px 0px 0.5px 0px rgba(255, 255, 255, 0.5) inset, 0px 0.5px 0px 0px rgba(255, 255, 255, 0.2) inset;
background-color: var(--sidebar-highlight-color);
}
.index {
font-size: 10px;

View File

@ -250,12 +250,11 @@
.screen-tab {
display: flex;
flex-direction: row;
height: 3em;
min-width: 13.6em;
max-width: 13.6em;
align-items: center;
cursor: pointer;
padding: 0 8px 0 8px;
padding: 8px 8px 4px 8px; // extra 4px of tab padding to account for horizontal scrollbar (to make tab text look centered)
.front-icon {
.positional-icon-visible;
@ -306,7 +305,7 @@
cursor: pointer;
display: flex;
align-items: center;
height: 37px;
height: 100%;
.icon {
height: 2rem;
@ -318,7 +317,8 @@
.tabs-end-spacer {
flex-grow: 1;
min-width: 20px;
min-width: 30px;
-webkit-app-region: drag;
height: 100%;
}
}

View File

@ -1,18 +1,7 @@
@import "@/common/themes/themes.less";
.session-view {
flex-grow: 1;
display: flex;
flex-direction: column;
position: relative;
&.is-hidden {
display: none;
}
border-radius: 0 var(--app-border-radius) var(--app-border-radius) var(--app-border-radius);
border-bottom: 1px solid var(--app-border-color);
border-right: 1px solid var(--app-border-color);
border-left: 1px solid var(--app-border-color);
background-color: black;
overflow: hidden;
.center-message {
display: flex;

View File

@ -45,7 +45,7 @@ class WorkspaceView extends React.Component<{}, {}> {
return (
<div
className={cn("session-view", { "is-hidden": isHidden })}
className={cn("mainview", "session-view", { "is-hidden": isHidden })}
data-sessionid={session.sessionId}
style={{
width: `${width}px`,