Compare commits

..

2 Commits

Author SHA1 Message Date
Red Adaya 5ccb1cb2ac fix wrong colors 2024-02-23 10:54:33 +08:00
Red Adaya 6e3ab22a07 initial implementation for lines.less 2024-02-22 22:17:53 +08:00
69 changed files with 1040 additions and 1131 deletions
+61 -29
View File
@@ -5,30 +5,65 @@ env:
GO_VERSION: "1.21.5"
NODE_VERSION: "21.5.0"
jobs:
runbuild:
strategy:
matrix:
include:
- platform: "darwin"
arch: "x64"
runner: "macos-latest"
scripthaus: "build-package"
- platform: "darwin"
arch: "arm64"
runner: "macos-latest-xlarge"
scripthaus: "build-package"
- platform: "linux"
arch: "x64"
runner: "ubuntu-latest"
scripthaus: "build-package-linux"
runs-on: ${{ matrix.runner }}
runbuild-darwin-x64:
name: "Build MacOS x64"
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{env.GO_VERSION}}
cache-dependency-path: |
wavesrv/go.sum
waveshell/go.sum
- run: brew tap scripthaus-dev/scripthaus
- run: brew install scripthaus
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
cache: "yarn"
- run: yarn --frozen-lockfile
- run: scripthaus run build-package
- uses: actions/upload-artifact@v4
with:
name: waveterm-build-darwin-x64
path: out/make/zip/darwin/x64/*.zip
retention-days: 2
runbuild-darwin-arm64:
name: "Build MacOS arm64"
runs-on: macos-latest-xlarge
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{env.GO_VERSION}}
cache-dependency-path: |
wavesrv/go.sum
waveshell/go.sum
- run: brew tap scripthaus-dev/scripthaus
- run: brew install scripthaus
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
cache: "yarn"
- run: yarn --frozen-lockfile
- run: scripthaus run build-package
- uses: actions/upload-artifact@v4
with:
name: waveterm-build-darwin-arm64
path: out/make/zip/darwin/arm64/*.zip
retention-days: 2
runbuild-linux:
name: "Build Linux x64"
runs-on: ubuntu-latest
needs: [runbuild-darwin-x64, runbuild-darwin-arm64]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: scripthaus-dev/scripthaus
path: scripthaus
- uses: actions/setup-go@v5
- uses: actions/setup-go@v4
with:
go-version: ${{env.GO_VERSION}}
cache-dependency-path: |
@@ -45,24 +80,21 @@ jobs:
node-version: ${{env.NODE_VERSION}}
cache: "yarn"
- run: yarn --frozen-lockfile
- run: ./scripthaus/scripthaus run ${{ matrix.scripthaus }}
- uses: actions/upload-artifact@v4
with:
name: waveterm-build-${{ matrix.platform }}-${{ matrix.arch }}
path: out/make/zip/${{ matrix.platform }}/${{ matrix.arch }}/*.zip
retention-days: 2
upload:
name: "Upload Builds"
runs-on: ubuntu-latest
needs: [runbuild]
steps:
- run: ./scripthaus/scripthaus run build-package-linux
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: buildtemp
- run: |
mv out/make/zip/linux/x64/Wave-linux-x64-$WAVETERM_VERSION.zip buildtemp/waveterm-linux-x64-v$WAVETERM_VERSION.zip
- run: (cd buildtemp; zip ../waveterm-builds.zip *)
- run: aws s3 cp waveterm-builds.zip s3://waveterm-github-artifacts/
env:
AWS_ACCESS_KEY_ID: "${{ secrets.S3_USERID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.S3_SECRETKEY }}"
AWS_DEFAULT_REGION: us-west-2
- uses: actions/upload-artifact@v4
with:
name: waveterm-builds
path: buildtemp
retention-days: 2
+56 -55
View File
@@ -12,69 +12,70 @@
name: "CodeQL"
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "36 5 * * 5"
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '36 5 * * 5'
jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["go", "javascript-typescript"]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
strategy:
fail-fast: false
matrix:
language: [ 'go', 'javascript-typescript' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
+3 -3
View File
@@ -1,8 +1,8 @@
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./assets/waveterm-logo-horizontal-dark.png">
<source media="(prefers-color-scheme: light)" srcset="./assets/waveterm-logo-horizontal-light.png">
<img alt="Wave Terminal Logo" src="./assets/waveterm-logo-horizontal-light.png" width="240" height="80" style="max-width: 100%;">
<source media="(prefers-color-scheme: dark)" srcset="./assets/wave-logo_horizontal-coloronblack.svg">
<source media="(prefers-color-scheme: light)" srcset="./assets/wave-logo_horizontal-coloronwhite.svg">
<img alt="Wave Terminal Logo" src="./assets/wave-logo_horizontal-coloronwhite.svg" width="352" height="59" style="max-width: 100%;">
</picture>
<br/>
</p>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

-1
View File
@@ -1,4 +1,3 @@
github.com/aws/aws-sdk-go-v2/service/s3 v1.27.11 h1:3/gm/JTX9bX8CpzTgIlrtYpB3EVBDxyg/GY/QdcIEZw=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+16 -34
View File
@@ -1,13 +1,14 @@
@import "./common/themes/themes.less";
@import "@/common/themes/themes.less";
@font-face {
font-family: "Martian Mono";
src: url("./assets/fonts/MartianMono-VariableFont_wdth,wght.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
:root {
--fa-style-family: "Font Awesome 6 Sharp";
// these variables are overridden by user settings
--termfontfamily: "JetBrains Mono", monospace;
--termfontsize: 12px;
--termlineheight: 15px;
--termpad: 7px; // padding value (scaled to termfontsize)
}
html,
@@ -17,14 +18,12 @@ body {
font-size: 12px;
font-weight: 300;
line-height: 1.5;
background-color: black;
color: @base-color;
background: @base-background-transparent;
color: var(--base-color);
}
body {
&.is-dev .sidebar {
// background-color: @base-background-dev;
}
body.is-dev {
background-color: @base-background-dev;
}
textarea {
@@ -34,7 +33,7 @@ textarea {
font-weight: 300;
line-height: 1.5;
background: @base-background;
color: @base-color;
color: var(--base-color);
}
// typography
@@ -99,12 +98,12 @@ body a {
}
body code {
font-family: var(--termfontfamily);
font-family: @terminal-font;
background-color: transparent;
}
svg.icon {
fill: @base-color;
fill: var(--base-color);
width: 100%;
height: 100%;
display: inline-block;
@@ -197,11 +196,6 @@ svg.icon {
position: absolute;
top: 0;
left: 0;
background-color: @base-background;
border-top: 1px solid @thin-border-color;
border-right: 1px solid @thin-border-color;
border-left: 1px solid @thin-border-color;
border-radius: 10px 10px 0 0;
}
input[type="checkbox"] {
@@ -238,7 +232,6 @@ a.a-block {
display: flex;
flex-direction: row;
height: 100%;
position: relative;
.history-view,
.bookmarks-view,
@@ -254,17 +247,6 @@ a.a-block {
}
overflow: auto;
}
.main-content-bottom-color {
position: absolute;
width: 100%;
left: 0;
right: 0;
bottom: 0;
height: 30%;
pointer-events: none;
background-color: @main-content-bottom-background;
}
}
}
@@ -330,7 +312,7 @@ a.a-block {
}
.mono {
font-family: var(--termfontfamily);
font-family: @terminal-font;
}
}
+4 -9
View File
@@ -20,6 +20,9 @@ import { MainSideBar } from "./sidebar/sidebar";
import { DisconnectedModal, ClientStopModal } from "./common/modals";
import { ModalsProvider } from "./common/modals/provider";
import { ErrorBoundary } from "./common/error/errorboundary";
import "@/common/themes/fonts.less";
import "@/common/themes/themes.less";
import "./app.less";
dayjs.extend(localizedFormat);
@@ -105,17 +108,9 @@ class App extends React.Component<{}, {}> {
if (dcWait) {
setTimeout(() => this.updateDcWait(false), 0);
}
// used to force a full reload of the application
let renderVersion = GlobalModel.renderVersion.get();
return (
<div
key={"version-" + renderVersion}
id="main"
className={"platform-" + platform}
onContextMenu={this.handleContextMenu}
>
<div id="main" className={"platform-" + platform} onContextMenu={this.handleContextMenu}>
<div ref={this.mainContentRef} className="main-content">
<div className="main-content-bottom-color" />
<MainSideBar parentRef={this.mainContentRef} clientData={clientData} />
<ErrorBoundary>
<PluginsView />
-2
View File
@@ -16,8 +16,6 @@ export const LineContainer_Sidebar = "sidebar";
export const ConfirmKey_HideShellPrompt = "hideshellprompt";
export const DefaultTermFontFamily = "JetBrains Mono";
export const NoStrPos = -1;
export const RemotePtyRows = 8;
+2 -2
View File
@@ -14,7 +14,7 @@
svg {
width: 1.5em;
height: 1.5em;
fill: @base-color;
fill: var(--base-color);
}
}
@@ -31,7 +31,7 @@
.icon {
width: 1em;
height: 1em;
fill: @base-color;
fill: var(--base-color);
}
.bookmarks-list {
+1 -1
View File
@@ -160,7 +160,7 @@ class Bookmark extends React.Component<BookmarkProps, {}> {
<div className="bookmark-id-div">{bm.bookmarkid.substr(0, 8)}</div>
<div className="bookmark-content">
<If condition={hasDesc}>
<Markdown text={markdown} extraClassName="bottom-margin" />
<Markdown text={markdown} />
</If>
<CmdStrCode
cmdstr={bm.cmdstr}
@@ -26,10 +26,6 @@
padding: 0 18px 0 30px;
}
.wave-dropdown {
width: 200px;
}
// just marked these as important since we're keeping the
// settings-field styles below this intact until we figure out what do with them
.settings-field {
+10 -27
View File
@@ -15,6 +15,9 @@ import "./clientsettings.less";
@mobxReact.observer
class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hoveredItemId: string }> {
fontSizeDropdownActive: OV<boolean> = mobx.observable.box(false, {
name: "clientSettings-fontSizeDropdownActive",
});
errorMessage: OV<string> = mobx.observable.box(null, { name: "ClientSettings-errorMessage" });
@boundMethod
@@ -27,7 +30,8 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
@boundMethod
handleChangeFontSize(fontSize: string): void {
const newFontSize = Number(fontSize);
if (GlobalModel.getTermFontSize() == newFontSize) {
this.fontSizeDropdownActive.set(false);
if (GlobalModel.termFontSize.get() == newFontSize) {
return;
}
const prtn = GlobalCommandRunner.setTermFontSize(newFontSize, false);
@@ -35,12 +39,10 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
}
@boundMethod
handleChangeFontFamily(fontFamily: string): void {
if (GlobalModel.getTermFontFamily() == fontFamily) {
return;
}
const prtn = GlobalCommandRunner.setTermFontFamily(fontFamily, false);
commandRtnHandler(prtn, this.errorMessage);
togglefontSizeDropdown(): void {
mobx.action(() => {
this.fontSizeDropdownActive.set(!this.fontSizeDropdownActive.get());
})();
}
@boundMethod
@@ -73,13 +75,6 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
return availableFontSizes;
}
getFontFamilies(): DropdownItem[] {
const availableFontFamilies: DropdownItem[] = [];
availableFontFamilies.push({ label: "JetBrains Mono", value: "JetBrains Mono" });
availableFontFamilies.push({ label: "Hack", value: "Hack" });
return availableFontFamilies;
}
@boundMethod
inlineUpdateOpenAIModel(newModel: string): void {
const prtn = GlobalCommandRunner.setClientOpenAISettings({ model: newModel });
@@ -144,8 +139,7 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
const maxTokensStr = String(
openAIOpts.maxtokens == null || openAIOpts.maxtokens == 0 ? 1000 : openAIOpts.maxtokens
);
const curFontSize = GlobalModel.getTermFontSize();
const curFontFamily = GlobalModel.getTermFontFamily();
const curFontSize = GlobalModel.termFontSize.get();
return (
<div className={cn("view clientsettings-view")}>
@@ -167,17 +161,6 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
/>
</div>
</div>
<div className="settings-field">
<div className="settings-label">Term Font Family</div>
<div className="settings-input">
<Dropdown
className="font-size-dropdown"
options={this.getFontFamilies()}
defaultValue={curFontFamily}
onChange={this.handleChangeFontFamily}
/>
</div>
</div>
<div className="settings-field">
<div className="settings-label">Client ID</div>
<div className="settings-input">{cdata.clientid}</div>
+3 -6
View File
@@ -2,25 +2,22 @@
.markdown {
color: @term-white;
margin-bottom: 10px;
font-family: @markdown-font;
font-size: 14px;
overflow-wrap: break-word;
&.bottom-margin {
margin-bottom: 10px;
}
code {
background-color: @markdown-highlight;
color: @term-white;
font-family: var(--termfontfamily);
font-family: @terminal-font;
border-radius: 4px;
}
code.inline {
padding-top: 0;
padding-bottom: 0;
font-family: var(--termfontfamily);
font-family: @terminal-font;
}
.title {
+1 -1
View File
@@ -17,7 +17,7 @@
i {
display: inline;
font-size: 13px;
fill: @base-color;
fill: var(--base-color);
padding-top: 0.2em;
}
}

Some files were not shown because too many files have changed in this diff Show More