From 90d32731db5fff85e1b80d1c70936efd25585c5d Mon Sep 17 00:00:00 2001 From: sawka Date: Mon, 12 Dec 2022 12:11:02 -0800 Subject: [PATCH] clean up sidebar --- src/emain.ts | 9 +++++++++ src/main.tsx | 48 ++++++++++++------------------------------------ src/sh2.less | 6 +++++- 3 files changed, 26 insertions(+), 37 deletions(-) diff --git a/src/emain.ts b/src/emain.ts index b6d12f4c..2bec25d9 100644 --- a/src/emain.ts +++ b/src/emain.ts @@ -224,6 +224,15 @@ function createMainWindow(clientData) { win.on("close", () => { MainWindow = null; }); + win.webContents.on("new-window", (e, url) => { + e.preventDefault(); + if (url.startsWith("https://docs.getprompt.dev/")) { + electron.shell.openExternal(url); + } + if (url.startsWith("https://discord.gg/")) { + electron.shell.openExternal(url); + } + }); return win; } diff --git a/src/main.tsx b/src/main.tsx index bacc25fa..a83058d8 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1396,7 +1396,7 @@ class InfoRemoteEdit extends React.Component<{}, {}> {
- add new remote '{this.remoteCName()}' + add new remote '{this.remoteCName()}' edit remote '{this.remoteCName()}' @@ -2458,40 +2458,6 @@ class MainSideBar extends React.Component<{}, {}> {
  • this.handleNewSession()}> New Session
  • -

    - Shared Sessions -

    - -

    - Direct Messages -

    -
    @@ -2500,6 +2466,17 @@ class MainSideBar extends React.Component<{}, {}> { termfocus={sw.termLineNumFocus.get()}
    +

    + this.clickRemotes()}>Links +

    +

    this.clickRemotes()}>Connections

    @@ -2642,6 +2619,5 @@ class Main extends React.Component<{}, {}> { } } - export {Main}; diff --git a/src/sh2.less b/src/sh2.less index 5b55614e..8a6c3fb2 100644 --- a/src/sh2.less +++ b/src/sh2.less @@ -17,7 +17,7 @@ @tab-black: rgb(0, 0, 0); @tab-red: rgb(205, 49, 49); -@tab-green: rgb(0, 177, 10); +@tab-green: rgb(0, 177, 10); /* #00B10A */ @tab-orange: rgb(255, 199, 6); @tab-yellow: rgb(229, 229, 16); @tab-blue: rgb(36, 114, 200); @@ -236,6 +236,10 @@ html, body, #main { font-size: 10px; } } + + li { + .mono-font(); + } } .menu-list.remotes-menu-list {