fix conflicts

This commit is contained in:
Red Adaya 2024-02-08 14:48:29 +08:00
commit a9b9ff3362
2 changed files with 17 additions and 21 deletions

View File

@ -10,7 +10,7 @@
# Wave Terminal
A open-source, cross-platform, modern terminal for seamless workflows.
A open-source, cross-platform, AI-integrated, modern terminal for seamless workflows.
Wave isn't just another terminal emulator; it's a rethink on how terminals are built. Wave combines command line with the power of the open web to help veteran CLI users and new developers alike.
@ -18,6 +18,7 @@ Wave isn't just another terminal emulator; it's a rethink on how terminals are b
* Persistent sessions that can restore state across network disconnections and reboots
* Searchable contextual command history across all remote sessions (saved locally)
* Workspaces, tabs, and command blocks to keep you organized
* AI Integration with ChatGPT (or ChatGPT compatible APIs) to help write commands and get answers inline
## Installation
@ -35,6 +36,7 @@ brew install --cask wave
* Homepage — https://www.waveterm.dev
* Download Page — https://www.waveterm.dev/download
* Documentation — https://docs.waveterm.dev/
* Blog — https://blog.waveterm.dev/
* Quick Start Guide — https://docs.waveterm.dev/quickstart/
* Discord Community — https://discord.gg/XfvZ334gwU

View File

@ -8,7 +8,7 @@ import { boundMethod } from "autobind-decorator";
import { If, For } from "tsx-control-statements/components";
import cn from "classnames";
import type { BookmarkType } from "../../types/types";
import { Model } from "../../models";
import { GlobalModel } from "../../models";
import { CmdStrCode, Markdown } from "../common/elements";
import { ReactComponent as XmarkIcon } from "../assets/icons/line/xmark.svg";
@ -25,44 +25,41 @@ type BookmarkProps = {
@mobxReact.observer
class Bookmark extends React.Component<BookmarkProps, {}> {
globalModel: Model;
constructor(props: BookmarkProps) {
super(props);
this.globalModel = Model.getInstance();
}
@boundMethod
handleDeleteClick(): void {
let { bookmark } = this.props;
let model = this.globalModel.bookmarksModel;
let model = GlobalModel.bookmarksModel;
model.handleDeleteBookmark(bookmark.bookmarkid);
}
@boundMethod
handleEditClick(): void {
let { bookmark } = this.props;
let model = this.globalModel.bookmarksModel;
let model = GlobalModel.bookmarksModel;
model.handleEditBookmark(bookmark.bookmarkid);
}
@boundMethod
handleEditCancel(): void {
let model = this.globalModel.bookmarksModel;
let model = GlobalModel.bookmarksModel;
model.cancelEdit();
return;
}
@boundMethod
handleEditUpdate(): void {
let model = this.globalModel.bookmarksModel;
let model = GlobalModel.bookmarksModel;
model.confirmEdit();
return;
}
@boundMethod
handleDescChange(e: any): void {
let model = this.globalModel.bookmarksModel;
let model = GlobalModel.bookmarksModel;
mobx.action(() => {
model.tempDesc.set(e.target.value);
})();
@ -70,7 +67,7 @@ class Bookmark extends React.Component<BookmarkProps, {}> {
@boundMethod
handleCmdChange(e: any): void {
let model = this.globalModel.bookmarksModel;
let model = GlobalModel.bookmarksModel;
mobx.action(() => {
model.tempCmd.set(e.target.value);
})();
@ -79,27 +76,27 @@ class Bookmark extends React.Component<BookmarkProps, {}> {
@boundMethod
handleClick(): void {
let { bookmark } = this.props;
let model = this.globalModel.bookmarksModel;
let model = GlobalModel.bookmarksModel;
model.selectBookmark(bookmark.bookmarkid);
}
@boundMethod
handleUse(): void {
let { bookmark } = this.props;
let model = this.globalModel.bookmarksModel;
let model = GlobalModel.bookmarksModel;
model.useBookmark(bookmark.bookmarkid);
}
@boundMethod
clickCopy(): void {
let bm = this.props.bookmark;
let model = this.globalModel.bookmarksModel;
let model = GlobalModel.bookmarksModel;
model.handleCopyBookmark(bm.bookmarkid);
}
render() {
let bm = this.props.bookmark;
let model = this.globalModel.bookmarksModel;
let model = GlobalModel.bookmarksModel;
let isSelected = model.activeBookmark.get() == bm.bookmarkid;
let markdown = bm.description ?? "";
let hasDesc = markdown != "";
@ -190,24 +187,21 @@ class Bookmark extends React.Component<BookmarkProps, {}> {
@mobxReact.observer
class BookmarksView extends React.Component<{}, {}> {
globalModel: Model;
constructor(props: {}) {
super(props);
this.globalModel = Model.getInstance();
}
@boundMethod
closeView(): void {
this.globalModel.bookmarksModel.closeView();
GlobalModel.bookmarksModel.closeView();
}
render() {
let isHidden = this.globalModel.activeMainView.get() != "bookmarks";
let isHidden = GlobalModel.activeMainView.get() != "bookmarks";
if (isHidden) {
return null;
}
let bookmarks = this.globalModel.bookmarksModel.bookmarks;
let bookmarks = GlobalModel.bookmarksModel.bookmarks;
let idx: number = 0;
let bookmark: BookmarkType = null;
return (