removed line.bookmarked, added screen webshare

This commit is contained in:
sawka
2023-03-24 10:46:27 -07:00
parent 5d24e75803
commit 11649f4c66
5 changed files with 28 additions and 16 deletions
+2 -7
View File
@@ -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
View File
@@ -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");
+8
View File
@@ -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
View File
@@ -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
View File
@@ -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,
};