This commit is contained in:
Amarsh Anand 2023-10-04 10:49:17 -07:00
parent 2f43a1096e
commit 9f284083bb
6 changed files with 33 additions and 10 deletions

View File

@ -257,6 +257,23 @@ class InfoMessage extends React.Component<{ width: number; children: React.React
}
}
function LinkRenderer(props: any): any {
let newUrl = "https://extern?" + encodeURIComponent(props.href);
return (
<a href={newUrl} target="_blank">
{props.children}
</a>
);
}
function HeaderRenderer(props: any, hnum: number): any {
return <div className={cn("title", "is-" + hnum)}>{props.children}</div>;
}
function CodeRenderer(props: any): any {
return <code className={cn({ inline: props.inline })}>{props.children}</code>;
}
@mobxReact.observer
class Markdown extends React.Component<{ text: string; style?: any; extraClassName?: string }, {}> {
render() {

View File

@ -11,7 +11,7 @@ let VERSION = __PROMPT_VERSION__;
// @ts-ignore
let BUILD = __PROMPT_BUILD__;
loadFonts();
//loadFonts();
document.addEventListener("DOMContentLoaded", () => {
let reactElem = React.createElement(Main, null, null);

View File

@ -164,7 +164,10 @@ class MainSideBar extends React.Component<{}, {}> {
<span className="hotkey">^</span>
<span className="index">{index + 1}</span>
<span className="truncate sessionName">{session.name.get()}</span>
<ActionsIcon className="icon hoverEffect" onClick={(e) => this.openSessionSettings(e, session)} />
<ActionsIcon
className="icon hoverEffect actions"
onClick={(e) => this.openSessionSettings(e, session)}
/>
</div>
);
});

View File

@ -102,10 +102,6 @@
display: inline-block;
vertical-align: middle;
border-radius: 50%;
visibility: hidden;
}
&:hover .icon {
visibility: visible;
}
.hotkey {
float: right;
@ -116,15 +112,24 @@
&:hover .hotkey {
visibility: visible;
}
.actions {
visibility: hidden;
}
&:hover .actions {
visibility: visible;
}
.add_workspace {
float: right;
width: 20px;
height: 20px;
width: 1.5rem;
height: 1.5rem;
padding: 2px;
margin-right: 6px;
border-radius: 50%;
transition: transform 0.3s ease-in-out;
vertical-align: middle;
svg {
fill: @base-color;
}
}
}

View File

@ -5,7 +5,6 @@
<base href="../" />
<script charset="UTF-8" src="dist-dev/prompt.js"></script>
<link rel="stylesheet" href="static/bulma-0.9.4.min.css" />
<link rel="stylesheet" href="static/xterm.css" />
<link rel="stylesheet" href="dist-dev/prompt.css" />
</head>
<body>

View File

@ -5,7 +5,6 @@
<base href="../" />
<script charset="UTF-8" src="dist/prompt.js"></script>
<link rel="stylesheet" href="static/bulma-0.9.4.min.css" />
<link rel="stylesheet" href="static/xterm.css" />
<link rel="stylesheet" href="dist/prompt.css" />
</head>
<body>