mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
removed line.bookmarked, added screen webshare
This commit is contained in:
+2
-7
@@ -527,13 +527,8 @@ class LineCmd extends React.Component<{screen : LineContainerModel, line : LineT
|
||||
<div key="pin" title="Pin" className={cn("line-icon", {"active": line.pinned})} onClick={this.clickPin} style={{display: "none"}}>
|
||||
<i className="fa-sharp fa-solid fa-thumbtack"/>
|
||||
</div>
|
||||
<div key="bookmark" title="Bookmark" className={cn("line-icon", "line-bookmark", {"active": line.bookmarked})} onClick={this.clickBookmark}>
|
||||
<If condition={!line.bookmarked}>
|
||||
<i className="fa-sharp fa-regular fa-bookmark"/>
|
||||
</If>
|
||||
<If condition={line.bookmarked}>
|
||||
<i className="fa-sharp fa-solid fa-bookmark"/>
|
||||
</If>
|
||||
<div key="bookmark" title="Bookmark" className={cn("line-icon", "line-bookmark")} onClick={this.clickBookmark}>
|
||||
<i className="fa-sharp fa-regular fa-bookmark"/>
|
||||
</div>
|
||||
</div>
|
||||
<If condition={rendererPlugin == null && !isNoneRenderer}>
|
||||
|
||||
+6
-4
@@ -2102,16 +2102,18 @@ class BookmarksModel {
|
||||
tempDesc : OV<string> = mobx.observable.box("", {name: "bookmarkEdit-tempDesc"});
|
||||
tempCmd : OV<string> = mobx.observable.box("", {name: "bookmarkEdit-tempCmd"});
|
||||
|
||||
showBookmarksView(bmArr : BookmarkType[]) : void {
|
||||
showBookmarksView(bmArr : BookmarkType[], selectedBookmarkId : string) : void {
|
||||
bmArr = bmArr ?? [];
|
||||
mobx.action(() => {
|
||||
this.reset();
|
||||
GlobalModel.activeMainView.set("bookmarks");
|
||||
this.bookmarks.replace(bmArr);
|
||||
if (bmArr.length > 0) {
|
||||
if (selectedBookmarkId != null) {
|
||||
this.selectBookmark(selectedBookmarkId);
|
||||
}
|
||||
if (this.activeBookmark.get() == null && bmArr.length > 0) {
|
||||
this.activeBookmark.set(bmArr[0].bookmarkid);
|
||||
}
|
||||
|
||||
})();
|
||||
}
|
||||
|
||||
@@ -2788,7 +2790,7 @@ class Model {
|
||||
}
|
||||
if ("mainview" in update) {
|
||||
if (update.mainview == "bookmarks") {
|
||||
this.bookmarksModel.showBookmarksView(update.bookmarks);
|
||||
this.bookmarksModel.showBookmarksView(update.bookmarks, update.selectedbookmark);
|
||||
}
|
||||
else if (update.mainview == "session") {
|
||||
this.activeMainView.set("session");
|
||||
|
||||
@@ -107,6 +107,14 @@ class ScreenSettingsModal extends React.Component<{sessionId : string, screenId
|
||||
</div>
|
||||
</header>
|
||||
<div className="inner-content">
|
||||
<div className="settings-field">
|
||||
<div className="settings-label">
|
||||
Screen Id
|
||||
</div>
|
||||
<div className="settings-input">
|
||||
{screen.screenId}
|
||||
</div>
|
||||
</div>
|
||||
<div className="settings-field">
|
||||
<div className="settings-label">
|
||||
Name
|
||||
|
||||
+3
-3
@@ -1244,9 +1244,9 @@ body::-webkit-scrollbar {
|
||||
padding: 3px;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.line-icon.line-bookmark.active {
|
||||
cursor: auto;
|
||||
|
||||
.line-bookmark:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.line-icon + .line-icon {
|
||||
|
||||
+9
-2
@@ -1,7 +1,7 @@
|
||||
import * as React from "react";
|
||||
import * as mobx from "mobx";
|
||||
|
||||
type ShareModeType = "local" | "private" | "view" | "shared";
|
||||
type ShareModeType = "local" | "web";
|
||||
type FocusTypeStrs = "input"|"cmd"|"cmd-fg";
|
||||
type HistoryTypeStrs = "global" | "session" | "screen";
|
||||
|
||||
@@ -37,7 +37,6 @@ type LineType = {
|
||||
contentheight? : number,
|
||||
star? : number,
|
||||
archived? : boolean,
|
||||
bookmarked? : boolean,
|
||||
pinned? : boolean,
|
||||
ephemeral? : boolean,
|
||||
remove? : boolean,
|
||||
@@ -48,11 +47,18 @@ type ScreenOptsType = {
|
||||
pterm? : string,
|
||||
}
|
||||
|
||||
type WebShareOpts = {
|
||||
sharename : string,
|
||||
viewkey : string,
|
||||
};
|
||||
|
||||
type ScreenDataType = {
|
||||
sessionid : string,
|
||||
screenid : string,
|
||||
screenidx : number,
|
||||
name : string,
|
||||
sharemode : ShareModeType,
|
||||
webshareopts? : WebShareOpts,
|
||||
archived? : boolean,
|
||||
screenopts : ScreenOptsType,
|
||||
curremote : RemotePtrType,
|
||||
@@ -262,6 +268,7 @@ type ModelUpdateType = {
|
||||
connect? : boolean,
|
||||
mainview? : string,
|
||||
bookmarks? : BookmarkType[],
|
||||
selectedbookmark? : string,
|
||||
clientdata? : ClientDataType,
|
||||
historyviewdata? : HistoryViewDataType,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user