mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-10 19:58:00 +01:00
move logo to sidebar, main-content fills vertical space
This commit is contained in:
parent
4e7929ee63
commit
5b98728fc6
@ -52,7 +52,7 @@ if (isDev) {
|
||||
}
|
||||
let app = electron.app;
|
||||
app.setName((isDev ? "Prompt (Dev)" : "Prompt"));
|
||||
const DevLocalServerPath = "/Users/mike/prompt/local-server";
|
||||
const DevLocalServerPath = "/Users/mike/prompt-dev/local-server";
|
||||
let localServerProc = null;
|
||||
let localServerShouldRestart = false;
|
||||
|
||||
@ -76,6 +76,9 @@ function getAppBasePath() {
|
||||
}
|
||||
|
||||
function getBaseHostPort() {
|
||||
if (isDev) {
|
||||
return "http://localhost:8090";
|
||||
}
|
||||
return "http://localhost:8080";
|
||||
}
|
||||
|
||||
|
14
src/main.tsx
14
src/main.tsx
@ -2484,12 +2484,16 @@ class MainSideBar extends React.Component<{}, {}> {
|
||||
sessionList.push(session);
|
||||
}
|
||||
}
|
||||
let isCollapsed = this.collapsed.get();
|
||||
return (
|
||||
<div className={cn("main-sidebar", {"collapsed": this.collapsed.get()})}>
|
||||
<div className={cn("main-sidebar", {"collapsed": isCollapsed})}>
|
||||
<h1 className={cn("title", "prompt-logo-small", {"collapsed": isCollapsed})}>
|
||||
{(isCollapsed ? "[p]" : "[prompt]")}
|
||||
</h1>
|
||||
<div className="collapse-container">
|
||||
<div className="arrow-container" onClick={this.toggleCollapsed}>
|
||||
<If condition={!this.collapsed.get()}><i className="fa fa-arrow-left"/></If>
|
||||
<If condition={this.collapsed.get()}><i className="fa fa-arrow-right"/></If>
|
||||
<If condition={!isCollapsed}><i className="fa fa-arrow-left"/></If>
|
||||
<If condition={isCollapsed}><i className="fa fa-arrow-right"/></If>
|
||||
</div>
|
||||
</div>
|
||||
<div className="menu">
|
||||
@ -2660,10 +2664,6 @@ class Main extends React.Component<{}, {}> {
|
||||
render() {
|
||||
return (
|
||||
<div id="main">
|
||||
<h1 className="title prompt-logo-small">
|
||||
[prompt]
|
||||
<span className="title-cursor">█</span>
|
||||
</h1>
|
||||
<div className="main-content">
|
||||
<MainSideBar/>
|
||||
<SessionView/>
|
||||
|
@ -1579,10 +1579,16 @@ class Model {
|
||||
}
|
||||
|
||||
getBaseHostPort() : string {
|
||||
if (this.isDev) {
|
||||
return "http://localhost:8090";
|
||||
}
|
||||
return "http://localhost:8080";
|
||||
}
|
||||
|
||||
getBaseWsHostPort() : string {
|
||||
if (this.isDev) {
|
||||
return "ws://localhost:8091";
|
||||
}
|
||||
return "ws://localhost:8081";
|
||||
}
|
||||
|
||||
|
14
src/sh2.less
14
src/sh2.less
@ -49,7 +49,7 @@ html, body, #main {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
background-color: black;
|
||||
height: calc(100% - 45px);
|
||||
height: 100%;
|
||||
|
||||
.session-view {
|
||||
flex-grow: 1;
|
||||
@ -171,7 +171,7 @@ html, body, #main {
|
||||
}
|
||||
|
||||
.title.prompt-logo-small {
|
||||
padding-left: 10px;
|
||||
padding-left: 5px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
margin-bottom: 0;
|
||||
@ -180,6 +180,12 @@ html, body, #main {
|
||||
color: rgb(0, 177, 10);
|
||||
position: relative;
|
||||
border-bottom: 2px solid #ddd;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
||||
&.collapsed {
|
||||
padding-left: 1px;
|
||||
}
|
||||
|
||||
.title-cursor {
|
||||
position: relative;
|
||||
@ -352,7 +358,7 @@ html, body, #main {
|
||||
}
|
||||
|
||||
&.collapsed {
|
||||
width: 50px;
|
||||
width: 55px;
|
||||
|
||||
.collapse-container {
|
||||
right: 12px;
|
||||
@ -366,7 +372,7 @@ html, body, #main {
|
||||
.collapse-container {
|
||||
position: absolute;
|
||||
right: 3px;
|
||||
top: -4px;
|
||||
top: 42px;
|
||||
|
||||
.arrow-container {
|
||||
color: #777;
|
||||
|
Loading…
Reference in New Issue
Block a user