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