Compare commits

..

16 Commits

Author SHA1 Message Date
sawka 7ba50e83f2 create an in-memory self-signed tls cert on the golang side and trust it on the electron side. enables http/2 protocol for increased throughput (simultaneous connections) 2024-05-03 21:49:25 -07:00
Evan Simkowitz 46b9c22f10 Remove barriers to supporting multiple windows (#647) 2024-05-03 13:41:53 -07:00
Evan Simkowitz 9b1f5a2abd Ensure the auto update checker runs every hour (#645)
The hour long interval that I set was being subjected to background
throttling and wasn't reliably getting invoked. I am shortening the
inteval to 10 mins and adding a check within it to see if an hour has
passed since the last update check. I am also running the same logic
every time the main window is activated. This should ensure that the
auto update check happens more reliably and not just on first launch.
2024-05-02 18:02:47 -07:00
Evan Simkowitz 67544c9a0f Fix Build Helper for Yarn Modern (#646)
I am removing the Yarn cache from our Build Helper. The
actions/node-setup cache option is not compatible with Yarn Modern. With
Yarn Modern, the `yarn install` command that sets up our
project-specific yarn config will also install all the module
dependencies, meaning we don't need a separate call to resolve these.
Altogether, even without the cache, it only takes 21s for Yarn Modern to
install and resolve dependencies.
2024-05-02 17:53:47 -07:00
Mike Sawka 9a825761da merge v0.7.4 and v0.7.5 changes back into main (#644) 2024-05-02 16:17:38 -07:00
orliesaurus 5afe233381 Introduce corepack dependency (#643)
This Pull Request introduces the corepack dependency, necessary for the
Testdriver infrastructure to run.

## Rationale:

Corepack enables faster installations and is required for `yarn`
By default, corepack is not installed on the testdriver infrastructure,
necessitating this addition.

## Benefits:

Allows better handling of `yarn` installation.

## Testing:
Local testing has confirmed successful corepack installation and
functionality within the testdriver infrastructure.
2024-05-02 16:08:31 -07:00
dependabot[bot] 4c0c4f422a Bump ejs from 3.1.9 to 3.1.10 in the npm_and_yarn group across 1 directory (#642)
Bumps the npm_and_yarn group with 1 update in the / directory:
[ejs](https://github.com/mde/ejs).

Updates `ejs` from 3.1.9 to 3.1.10
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/mde/ejs/releases">ejs's
releases</a>.</em></p>
<blockquote>
<h2>v3.1.10</h2>
<p>Version 3.1.10</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mde/ejs/commit/d3f807dea9ce904e20a47a661f2310ce9134dc2a"><code>d3f807d</code></a>
Version 3.1.10</li>
<li><a
href="https://github.com/mde/ejs/commit/9ee26dde5d7015d9c0e2ff87314cabeac5247c02"><code>9ee26dd</code></a>
Mocha TDD</li>
<li><a
href="https://github.com/mde/ejs/commit/e469741dca7df2eb400199e1cdb74621e3f89aa5"><code>e469741</code></a>
Basic pollution protection</li>
<li><a
href="https://github.com/mde/ejs/commit/715e9507fa3e6122dc6430fe0f25a6e6ded300c1"><code>715e950</code></a>
Merge pull request <a
href="https://redirect.github.com/mde/ejs/issues/756">#756</a> from
Jeffrey-mu/main</li>
<li><a
href="https://github.com/mde/ejs/commit/cabe3146ad964a1e98db7742abf435906ca79406"><code>cabe314</code></a>
Include advanced usage examples</li>
<li><a
href="https://github.com/mde/ejs/commit/29b076cdbbf3eb1b4323b33299ab6d79391b2c33"><code>29b076c</code></a>
Added header</li>
<li><a
href="https://github.com/mde/ejs/commit/11503c79af882e3635b513d57c7f1813792eb127"><code>11503c7</code></a>
Merge branch 'main' of github.com:mde/ejs into main</li>
<li><a
href="https://github.com/mde/ejs/commit/7690404e2fc1688756938e4d2fc19e0fac77d736"><code>7690404</code></a>
Added security banner to README</li>
<li><a
href="https://github.com/mde/ejs/commit/f47d7aedd51a983e4f73045f962b1209096b5800"><code>f47d7ae</code></a>
Update SECURITY.md</li>
<li><a
href="https://github.com/mde/ejs/commit/828cea1687e3db459ab09d2f405d2444c7580b90"><code>828cea1</code></a>
Update SECURITY.md</li>
<li>Additional commits viewable in <a
href="https://github.com/mde/ejs/compare/v3.1.9...v3.1.10">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ejs&package-manager=npm_and_yarn&previous-version=3.1.9&new-version=3.1.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/wavetermdev/waveterm/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-02 14:40:36 -07:00
Evan Simkowitz 07b29277e9 Update build documentation to reflect that Corepack is needed (#641) 2024-05-02 14:35:10 -07:00
Sylvie Crowe 167277ec11 Rename Waveshell First Pass (#632)
This begins the process of renaming mshell to waveshell everywhere by
making the most simple changes. There will need to be additional changes
in the future, but the hope is to merge simple changes in now to reduce
the number of future merge conflicts.
2024-05-02 14:16:00 -07:00
Evan Simkowitz cd855762cd Migrate package manager to Yarn Modern (#628)
We were using Yarn Classic. While this is not deprecated, Yarn is moving
in a different direction with Yarn Modern (read more
[here](https://yarnpkg.com/migration/overview)) and we should align with
that. The migration mainly requires rebuilding our lockfile. We will
still use `node_modules` for now, though in the future we may want to
adopt the new [Plug'n'Play model](https://yarnpkg.com/features/pnp).
2024-05-02 14:13:32 -07:00
Ian Jennings 397d4d7369 Update TestDriver to v2.11.2 (#640) 2024-05-02 12:54:45 -07:00
Evan Simkowitz ea0cf62b67 Replace classnames with clsx (#634)
[`clsx`](https://www.npmjs.com/package/clsx) is a drop-in replacement
for `classnames` that is a quarter of the size and is faster.
2024-05-02 11:40:44 -07:00
Evan Simkowitz e973a6ff8f Add link to full license report (#638) 2024-05-02 11:30:20 -07:00
dependabot[bot] 34392ab65d Bump ejs from 3.1.9 to 3.1.10 in the npm_and_yarn group across 1 directory (#637)
Bumps the npm_and_yarn group with 1 update in the / directory:
[ejs](https://github.com/mde/ejs).

Updates `ejs` from 3.1.9 to 3.1.10
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/mde/ejs/releases">ejs's
releases</a>.</em></p>
<blockquote>
<h2>v3.1.10</h2>
<p>Version 3.1.10</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mde/ejs/commit/d3f807dea9ce904e20a47a661f2310ce9134dc2a"><code>d3f807d</code></a>
Version 3.1.10</li>
<li><a
href="https://github.com/mde/ejs/commit/9ee26dde5d7015d9c0e2ff87314cabeac5247c02"><code>9ee26dd</code></a>
Mocha TDD</li>
<li><a
href="https://github.com/mde/ejs/commit/e469741dca7df2eb400199e1cdb74621e3f89aa5"><code>e469741</code></a>
Basic pollution protection</li>
<li><a
href="https://github.com/mde/ejs/commit/715e9507fa3e6122dc6430fe0f25a6e6ded300c1"><code>715e950</code></a>
Merge pull request <a
href="https://redirect.github.com/mde/ejs/issues/756">#756</a> from
Jeffrey-mu/main</li>
<li><a
href="https://github.com/mde/ejs/commit/cabe3146ad964a1e98db7742abf435906ca79406"><code>cabe314</code></a>
Include advanced usage examples</li>
<li><a
href="https://github.com/mde/ejs/commit/29b076cdbbf3eb1b4323b33299ab6d79391b2c33"><code>29b076c</code></a>
Added header</li>
<li><a
href="https://github.com/mde/ejs/commit/11503c79af882e3635b513d57c7f1813792eb127"><code>11503c7</code></a>
Merge branch 'main' of github.com:mde/ejs into main</li>
<li><a
href="https://github.com/mde/ejs/commit/7690404e2fc1688756938e4d2fc19e0fac77d736"><code>7690404</code></a>
Added security banner to README</li>
<li><a
href="https://github.com/mde/ejs/commit/f47d7aedd51a983e4f73045f962b1209096b5800"><code>f47d7ae</code></a>
Update SECURITY.md</li>
<li><a
href="https://github.com/mde/ejs/commit/828cea1687e3db459ab09d2f405d2444c7580b90"><code>828cea1</code></a>
Update SECURITY.md</li>
<li>Additional commits viewable in <a
href="https://github.com/mde/ejs/compare/v3.1.9...v3.1.10">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ejs&package-manager=npm_and_yarn&previous-version=3.1.9&new-version=3.1.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/wavetermdev/waveterm/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-02 10:58:48 -07:00
Evan Simkowitz 7e350fce97 Fix RotateIcon so it actually binds a ref for SyncSpin to use (#635)
RotateIcon wasn't actually binding the ref that it was passing to SyncSpin, meaning it wasn't actually syncing properly. This fixes that, along with making SyncSpin compatible with more than just div types
2024-05-01 20:28:44 -07:00
Evan Simkowitz 53ec767bc7 Make icons functional components (#629)
They are very simple, self-contained components, making them good
candidates to be converted to functional components
2024-05-01 20:14:44 -07:00
74 changed files with 13850 additions and 10268 deletions
+4 -3
View File
@@ -45,14 +45,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{env.NODE_VERSION}}
cache: "yarn"
- name: Install yarn
run: |
corepack enable
yarn install
- name: Set Version
id: set-version
run: |
VERSION=$(node -e 'console.log(require("./version.js"))')
echo "WAVETERM_VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
- name: Install Yarn Dependencies
run: yarn --frozen-lockfile
- name: Build ${{ matrix.platform }}/${{ matrix.arch }}
run: scripthaus run ${{ matrix.scripthaus }}
env:
+61 -60
View File
@@ -1,65 +1,66 @@
name: TestDriver.ai Regression Testing
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 0 21 * * *
workflow_dispatch: null
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 0 21 * * *
workflow_dispatch: null
permissions:
contents: read # To allow the action to read repository contents
pull-requests: write # To allow the action to create/update pull request comments
contents: read # To allow the action to read repository contents
pull-requests: write # To allow the action to create/update pull request comments
jobs:
test:
name: TestDriver
runs-on: ubuntu-latest
steps:
- uses: dashcamio/testdriver@main
id: testdriver
with:
version: v2.10.2
prerun: |
rm ~/Desktop/WITH-LOVE-FROM-AMERICA.txt
cd ~/actions-runner/_work/testdriver/testdriver/
brew install go
brew tap scripthaus-dev/scripthaus
brew install scripthaus
npm install -g yarn
scripthaus run build-backend
echo "Yarn"
yarn
echo "Rebuild"
scripthaus run electron-rebuild
echo "Webpack"
scripthaus run webpack-build
echo "Starting Electron"
scripthaus run electron 1>/dev/null 2>&1 &
echo "Electron Done"
exit
prompt: |
1. wait 10 seconds
1. click "Continue"
1. click "Create new tab"
1. validate that overlapping text does not appear in the application
1. focus the Wave input with the keyboard shorcut Command + I
1. type 'ls' into the input
1. press return
1. validate Wave shows the result of 'ls'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: peter-evans/create-or-update-comment@v4
if: ${{always()}}
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
## TestDriver Summary
${{ steps.testdriver.outputs.markdown }}
${{ steps.testdriver.outputs.summary }}
reactions: |
+1
-1
test:
name: TestDriver
runs-on: ubuntu-latest
steps:
- uses: dashcamio/testdriver@main
id: testdriver
with:
version: v2.10.2
prerun: |
rm ~/Desktop/WITH-LOVE-FROM-AMERICA.txt
cd ~/actions-runner/_work/testdriver/testdriver/
brew install go
brew tap scripthaus-dev/scripthaus
brew install corepack
brew install scripthaus
corepack enable
yarn install
scripthaus run build-backend
echo "Yarn"
yarn
echo "Rebuild"
scripthaus run electron-rebuild
echo "Webpack"
scripthaus run webpack-build
echo "Starting Electron"
scripthaus run electron 1>/dev/null 2>&1 &
echo "Electron Done"
exit
prompt: |
1. wait 10 seconds
1. click "Get Started"
1. validate that overlapping text does not appear in the application
1. focus the Wave input with the keyboard shorcut Command + I
1. type 'ls' into the input
1. press return
1. validate Wave shows the result of 'ls'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: peter-evans/create-or-update-comment@v4
if: ${{always()}}
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
## TestDriver Summary
${{ steps.testdriver.outputs.markdown }}
${{ steps.testdriver.outputs.summary }}
reactions: |
+1
-1
+9
View File
@@ -22,3 +22,12 @@ test/
.vscode/
make/
waveterm-builds.zip
# Yarn Modern
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
+2 -1
View File
@@ -3,7 +3,8 @@ cd ~/actions-runner/_work/testdriver/testdriver/
brew install go
brew tap scripthaus-dev/scripthaus
brew install scripthaus
npm install -g yarn
corepack enable
yarn install
scripthaus run build-backend
echo "Yarn"
yarn
+1
View File
@@ -0,0 +1 @@
nodeLinker: node-modules
+19 -11
View File
@@ -11,35 +11,43 @@ If you install the production version of Wave, you'll see a semi-transparent gra
Download and install Go (must be at least go 1.18):
```
```sh
brew install go
```
Download and install ScriptHaus (to run the build commands):
```
```sh
brew tap scripthaus-dev/scripthaus
brew install scripthaus
```
You also need a relatively modern nodejs with npm and yarn installed.
- Node can be installed from [https://nodejs.org](https://nodejs.org).
- npm can install yarn using:
Node can be installed from [https://nodejs.org](https://nodejs.org).
```
npm install -g yarn
We use Yarn Modern to manage our packages. The recommended way to install Yarn Modern is using Corepack, a new utility shipped by NodeJS that lets you manage your package manager versioning as you would any packages.
If you installed NodeJS from the official feed (via the website or using NVM), this should come preinstalled. If you use Homebrew or some other feed, you may need to manually install Corepack using `npm install -g corepack`.
For more information on Corepack, check out [this link](https://yarnpkg.com/corepack).
Once you've verified that you have Corepack installed, run the following script to set up Yarn for the repository:
```sh
corepack enable
yarn install
```
## Clone the Repo
```
```sh
git clone git@github.com:wavetermdev/waveterm.git
```
## Building WaveShell / WaveSrv
```
```sh
scripthaus run build-backend
```
@@ -49,7 +57,7 @@ This builds the Golang backends for Wave. The binaries will put in waveshell/bin
Install modules (we use yarn):
```
```sh
yarn
```
@@ -57,7 +65,7 @@ yarn
We use webpack to build both the React and Electron App Wrapper code. They are both run together using:
```
```sh
scripthaus run webpack-watch
```
@@ -65,7 +73,7 @@ scripthaus run webpack-watch
Now that webpack is running (and watching for file changes) we can finally run the WaveTerm Dev Client! To start the client run:
```
```sh
scripthaus run electron
```
+1 -1
View File
@@ -1,5 +1,5 @@
# Open-Source Acknowledgements
We make use of many amazing open-source projects to build Wave Terminal. We automatically generate license reports via FOSSA to comply with the license distribution requirements of our dependencies. Below is a summary of the licenses used by our product. Clicking on the image will take you to the full report on FOSSA's website.
We make use of many amazing open-source projects to build Wave Terminal. We automatically generate license reports via FOSSA to comply with the license distribution requirements of our dependencies. Below is a summary of the licenses used by our product. For a full report, see [here](https://app.fossa.com/reports/24d13570-624b-4450-8c22-756e513060c9?full=true) (the page may take 20-30s to load).
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwavetermdev%2Fwaveterm.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwavetermdev%2Fwaveterm?ref=badge_large)
+3 -3
View File
@@ -26,7 +26,7 @@
"@tanstack/react-table": "^8.10.3",
"autobind-decorator": "^2.4.0",
"base64-js": "^1.5.1",
"classnames": "^2.3.1",
"clsx": "^2.1.1",
"dayjs": "^1.11.3",
"dompurify": "^3.0.2",
"electron-squirrel-startup": "^1.0.0",
@@ -70,7 +70,6 @@
"@babel/preset-typescript": "^7.17.12",
"@electron/rebuild": "^3.6.0",
"@svgr/webpack": "^8.1.0",
"@types/classnames": "^2.3.1",
"@types/electron": "^1.6.10",
"@types/node": "^20.11.0",
"@types/papaparse": "^5.3.10",
@@ -107,5 +106,6 @@
},
"scripts": {
"postinstall": "electron-builder install-app-deps"
}
},
"packageManager": "yarn@4.1.1"
}
-12
View File
@@ -115,15 +115,3 @@ scripthaus run fullbuild-waveshell
echo building wavesrv
scripthaus run build-wavesrv
```
```bash
# @scripthaus command generate-license-disclaimers
DISCLAIMER_DIR="./acknowledgements"
DISCLAIMER_OUTPUT_DIR="$DISCLAIMER_DIR/disclaimers"
if [ -d "$DISCLAIMER_OUTPUT_DIR" ]; then
rm -rf "$DISCLAIMER_OUTPUT_DIR"
fi
mkdir "$DISCLAIMER_OUTPUT_DIR"
go run github.com/google/go-licenses@latest report ./wavesrv/... ./waveshell/... --template "$DISCLAIMER_DIR/go_licenses_report.tpl" --ignore github.com/wavetermdev/waveterm > "$DISCLAIMER_OUTPUT_DIR/backend.md"
yarn licenses generate-disclaimer > "$DISCLAIMER_OUTPUT_DIR/frontend.md"
```
+2 -2
View File
@@ -4,7 +4,7 @@
import * as React from "react";
import * as mobxReact from "mobx-react";
import * as mobx from "mobx";
import cn from "classnames";
import { clsx } from "clsx";
import { boundMethod } from "autobind-decorator";
import { If } from "tsx-control-statements/components";
@@ -133,7 +133,7 @@ class App extends React.Component<{}, {}> {
const rightSidebarCollapsed = GlobalModel.rightSidebarModel.getCollapsed();
const activeMainView = GlobalModel.activeMainView.get();
const lightDarkClass = GlobalModel.isDarkTheme.get() ? "is-dark" : "is-light";
const mainClassName = cn(
const mainClassName = clsx(
"platform-" + platform,
{
"mainsidebar-collapsed": mainSidebarCollapsed,
+2 -2
View File
@@ -21,9 +21,9 @@ export const NoStrPos = -1;
export const RemotePtyRows = 8;
export const RemotePtyTotalRows = 25;
export const RemotePtyCols = 80;
export const ProdServerEndpoint = "http://127.0.0.1:1619";
export const ProdServerEndpoint = "https://127.0.0.1:1619";
export const ProdServerWsEndpoint = "ws://127.0.0.1:1623";
export const DevServerEndpoint = "http://127.0.0.1:8090";
export const DevServerEndpoint = "https://127.0.0.1:8090";
export const DevServerWsEndpoint = "ws://127.0.0.1:8091";
export const DefaultTermFontSize = 13;
export const DefaultTermFontFamily = "Hack";
+5 -5
View File
@@ -6,7 +6,7 @@ import * as mobxReact from "mobx-react";
import * as mobx from "mobx";
import { boundMethod } from "autobind-decorator";
import { If, For } from "tsx-control-statements/components";
import cn from "classnames";
import { clsx } from "clsx";
import { GlobalModel } from "@/models";
import { CmdStrCode, Markdown } from "@/common/elements";
@@ -152,11 +152,11 @@ class Bookmark extends React.Component<BookmarkProps, {}> {
return (
<div
data-bookmarkid={bm.bookmarkid}
className={cn("bookmark focus-parent is-editing", {
className={clsx("bookmark focus-parent is-editing", {
"pending-delete": model.pendingDelete.get() == bm.bookmarkid,
})}
>
<div className={cn("focus-indicator", { active: isSelected })} />
<div className={clsx("focus-indicator", { active: isSelected })} />
<div className="bookmark-edit">
<div className="field">
<label className="label">Description (markdown)</label>
@@ -198,12 +198,12 @@ class Bookmark extends React.Component<BookmarkProps, {}> {
}
return (
<div
className={cn("bookmark focus-parent", {
className={clsx("bookmark focus-parent", {
"pending-delete": model.pendingDelete.get() == bm.bookmarkid,
})}
onClick={this.handleClick}
>
<div className={cn("focus-indicator", { active: isSelected })} />
<div className={clsx("focus-indicator", { active: isSelected })} />
<div className="bookmark-id-div">{bm.bookmarkid.substr(0, 8)}</div>
<div className="bookmark-content">
<If condition={hasDesc}>
+2 -2
View File
@@ -1,6 +1,6 @@
import * as React from "react";
import { boundMethod } from "autobind-decorator";
import cn from "classnames";
import { clsx } from "clsx";
import "./button.less";
@@ -35,7 +35,7 @@ class Button extends React.Component<ButtonProps> {
return (
<button
className={cn("wave-button", { disabled }, { "term-inline": termInline }, className)}
className={clsx("wave-button", { disabled }, { "term-inline": termInline }, className)}
onClick={this.handleClick}
disabled={disabled}
style={style}
+2 -2
View File
@@ -3,7 +3,7 @@
import * as React from "react";
import * as mobx from "mobx";
import cn from "classnames";
import { clsx } from "clsx";
import "./checkbox.less";
@@ -49,7 +49,7 @@ class Checkbox extends React.Component<
const checkboxId = id || this.generatedId;
return (
<div className={cn("checkbox", className)}>
<div className={clsx("checkbox", className)}>
<input
type="checkbox"
id={checkboxId}
+2 -2
View File
@@ -3,7 +3,7 @@
import * as React from "react";
import { boundMethod } from "autobind-decorator";
import cn from "classnames";
import { clsx } from "clsx";
import { If } from "tsx-control-statements/components";
import { ReactComponent as CheckIcon } from "@/assets/icons/line/check.svg";
@@ -41,7 +41,7 @@ class CmdStrCode extends React.Component<
render() {
let { isCopied, cmdstr, fontSize, limitHeight } = this.props;
return (
<div className={cn("cmdstr-code", { "is-large": fontSize == "large" }, { "limit-height": limitHeight })}>
<div className={clsx("cmdstr-code", { "is-large": fontSize == "large" }, { "limit-height": limitHeight })}>
<If condition={isCopied}>
<div key="copied" className="copied-indicator">
<div>copied</div>
+5 -5
View File
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef, createRef } from "react";
import * as mobx from "mobx";
import ReactDOM from "react-dom";
import dayjs from "dayjs";
import cn from "classnames";
import { clsx } from "clsx";
import { Button } from "@/elements";
import { If } from "tsx-control-statements/components";
import { GlobalModel } from "@/models";
@@ -102,7 +102,7 @@ const DatePicker: React.FC<DatePickerProps> = ({ selectedDate, format = "MM/DD/Y
return (
<div className="day-picker-header">
<div
className={cn({ fade: showYearAccordion })}
className={clsx({ fade: showYearAccordion })}
onClick={() => {
if (!showYearAccordion) {
setExpandedYear(selDate.year()); // Set expandedYear when opening accordion
@@ -111,7 +111,7 @@ const DatePicker: React.FC<DatePickerProps> = ({ selectedDate, format = "MM/DD/Y
}}
>
{selDate.format("MMMM YYYY")}
<span className={cn("dropdown-arrow", { fade: showYearAccordion })}></span>
<span className={clsx("dropdown-arrow", { fade: showYearAccordion })}></span>
</div>
<If condition={!showYearAccordion}>
<div className="arrows">
@@ -250,14 +250,14 @@ const DatePicker: React.FC<DatePickerProps> = ({ selectedDate, format = "MM/DD/Y
</div>
<If condition={expandedYear === year}>
<div
className={cn("month-container", {
className={clsx("month-container", {
expanded: expandedYear === year,
})}
>
{Array.from({ length: 12 }, (_, i) => i + 1).map((month) => (
<div
key={month}
className={cn("month", {
className={clsx("month", {
selected: year === currentYear && month === selDate.month() + 1,
})}
onClick={() => handleMonthYearSelect(month, year)}
+7 -7
View File
@@ -4,7 +4,7 @@
import * as React from "react";
import * as mobxReact from "mobx-react";
import { boundMethod } from "autobind-decorator";
import cn from "classnames";
import { clsx } from "clsx";
import { If } from "tsx-control-statements/components";
import ReactDOM from "react-dom";
import { v4 as uuidv4 } from "uuid";
@@ -239,11 +239,11 @@ class Dropdown extends React.Component<DropdownProps, DropdownState> {
const dropdownMenu = isOpen
? ReactDOM.createPortal(
<div className={cn("wave-dropdown-menu")} ref={this.menuRef} style={this.calculatePosition()}>
<div className={clsx("wave-dropdown-menu")} ref={this.menuRef} style={this.calculatePosition()}>
{options.map((option, index) => (
<div
key={option.value}
className={cn("wave-dropdown-item unselectable", {
className={clsx("wave-dropdown-item unselectable", {
"wave-dropdown-item-highlighted": index === highlightedIndex,
})}
onClick={(e) => this.handleSelect(option, e)}
@@ -265,7 +265,7 @@ class Dropdown extends React.Component<DropdownProps, DropdownState> {
}
return (
<div
className={cn("wave-dropdown", className, {
className={clsx("wave-dropdown", className, {
"wave-dropdown-error": isError,
"no-label": !label,
})}
@@ -279,7 +279,7 @@ class Dropdown extends React.Component<DropdownProps, DropdownState> {
{decoration?.startDecoration && <>{decoration.startDecoration}</>}
<If condition={label}>
<div
className={cn("wave-dropdown-label unselectable", {
className={clsx("wave-dropdown-label unselectable", {
float: shouldLabelFloat,
"offset-left": decoration?.startDecoration,
})}
@@ -288,14 +288,14 @@ class Dropdown extends React.Component<DropdownProps, DropdownState> {
</div>
</If>
<div
className={cn("wave-dropdown-display unselectable truncate", {
className={clsx("wave-dropdown-display unselectable truncate", {
"offset-left": decoration?.startDecoration,
})}
style={selectedOptionLabelStyle}
>
{selectedOptionLabel}
</div>
<div className={cn("wave-dropdown-arrow", { "wave-dropdown-arrow-rotate": isOpen })}>
<div className={clsx("wave-dropdown-arrow", { "wave-dropdown-arrow-rotate": isOpen })}>
<i className="fa-sharp fa-solid fa-chevron-down"></i>
</div>
{dropdownMenu}
@@ -5,7 +5,7 @@ import * as React from "react";
import * as mobxReact from "mobx-react";
import * as mobx from "mobx";
import { boundMethod } from "autobind-decorator";
import cn from "classnames";
import { clsx } from "clsx";
import { If } from "tsx-control-statements/components";
import { checkKeyPressed, adaptFromReactOrNativeKeyEvent } from "@/util/keyutil";
import { GlobalModel } from "@/models";
@@ -121,7 +121,7 @@ class InlineSettingsTextEdit extends React.Component<
render() {
if (this.isEditing.get()) {
return (
<div className={cn("settings-input inline-edit", "edit-active")}>
<div className={clsx("settings-input inline-edit", "edit-active")}>
<div className="field has-addons">
<div className="control">
<input
@@ -163,7 +163,7 @@ class InlineSettingsTextEdit extends React.Component<
);
} else {
return (
<div onClick={this.clickEdit} className={cn("settings-input inline-edit", "edit-not-active")}>
<div onClick={this.clickEdit} className={clsx("settings-input inline-edit", "edit-not-active")}>
{this.props.text}
<If condition={this.props.showIcon}>
<i className="fa-sharp fa-solid fa-pen" />
+2 -2
View File
@@ -3,7 +3,7 @@
import * as React from "react";
import * as mobxReact from "mobx-react";
import cn from "classnames";
import { clsx } from "clsx";
import "./inputdecoration.less";
@@ -18,7 +18,7 @@ class InputDecoration extends React.Component<InputDecorationProps, {}> {
const { children, position = "end" } = this.props;
return (
<div
className={cn("wave-input-decoration", {
className={clsx("wave-input-decoration", {
"start-position": position === "start",
"end-position": position === "end",
})}
+2 -2
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import * as React from "react";
import cn from "classnames";
import { clsx } from "clsx";
import { ButtonProps } from "./button";
interface LinkButtonProps extends ButtonProps {
@@ -16,7 +16,7 @@ class LinkButton extends React.Component<LinkButtonProps> {
const { leftIcon, rightIcon, children, className, ...rest } = this.props;
return (
<a {...rest} className={cn(`wave-button link-button`, className)}>
<a {...rest} className={clsx(`wave-button link-button`, className)}>
{leftIcon && <span className="icon-left">{leftIcon}</span>}
{children}
{rightIcon && <span className="icon-right">{rightIcon}</span>}

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