aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DashboardView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-08-27 12:14:02 -0400
committerbobzel <zzzman@gmail.com>2023-08-27 12:14:02 -0400
commit2bf684f3f7960b92fb052d746cb25c11b603b190 (patch)
tree742aff58e4f0879574bc5cd1ce3935208c30209e /src/client/views/DashboardView.tsx
parent68ddebab45946697270c5f291ff9fdd044b6e83d (diff)
parentbf1777b93be0707e17e3b3c0ca6c965facebfe14 (diff)
Merge branch 'master' into secondpropertiesmenu-emily
Diffstat (limited to 'src/client/views/DashboardView.tsx')
-rw-r--r--src/client/views/DashboardView.tsx25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/client/views/DashboardView.tsx b/src/client/views/DashboardView.tsx
index acf5b654d..5d7fc8835 100644
--- a/src/client/views/DashboardView.tsx
+++ b/src/client/views/DashboardView.tsx
@@ -47,12 +47,12 @@ export class DashboardView extends React.Component {
@action abortCreateNewDashboard = () => {
this.newDashboardName = undefined;
};
- @action setNewDashboardName(name: string) {
+ @action setNewDashboardName = (name: string) => {
this.newDashboardName = name;
- }
- @action setNewDashboardColor(color: string) {
+ };
+ @action setNewDashboardColor = (color: string) => {
this.newDashboardColor = color;
- }
+ };
@action
selectDashboardGroup = (group: DashboardGroup) => {
@@ -108,7 +108,14 @@ export class DashboardView extends React.Component {
}}>
<div className="header">Create New Dashboard</div>
<EditableText formLabel="Title" placeholder={placeholder} type={Type.SEC} color={StrCast(Doc.UserDoc().userColor)} setVal={val => this.setNewDashboardName(val as string)} fillWidth />
- <ColorPicker formLabel="Background" colorPickerType="github" type={Type.TERT} selectedColor={this.newDashboardColor} setSelectedColor={this.setNewDashboardColor} />
+ <ColorPicker
+ formLabel="Background" //
+ colorPickerType="github"
+ type={Type.TERT}
+ selectedColor={this.newDashboardColor}
+ setFinalColor={this.setNewDashboardColor}
+ setSelectedColor={this.setNewDashboardColor}
+ />
<div className="button-bar">
<Button text="Cancel" color={StrCast(Doc.UserDoc().userColor)} onClick={this.abortCreateNewDashboard} />
<Button type={Type.TERT} text="Create" color={StrCast(Doc.UserDoc().userVariantColor)} onClick={() => this.createNewDashboard(this.newDashboardName!, this.newDashboardColor)} />
@@ -169,7 +176,7 @@ export class DashboardView extends React.Component {
</div>
<div className="all-dashboards">
{this.getDashboards(this.selectedDashboardGroup).map(dashboard => {
- const href = ImageCast(dashboard.thumb)?.url.href;
+ const href = ImageCast(dashboard.thumb)?.url?.href;
const shared = Object.keys(dashboard[DocAcl])
.filter(key => key !== `acl-${Doc.CurrentUserEmailNormalized}` && !['acl-Me', 'acl-Guest'].includes(key))
.some(key => dashboard[DocAcl][key] !== AclPrivate);
@@ -438,12 +445,12 @@ export class DashboardView extends React.Component {
title: 'My Trails',
_layout_showTitle: 'title',
_height: 100,
- treeViewHideTitle: true,
+ treeView_HideTitle: true,
_layout_fitWidth: true,
_gridGap: 5,
_forceActive: true,
childDragAction: 'embed',
- treeViewTruncateTitleWidth: 150,
+ treeView_TruncateTitleWidth: 150,
ignoreClick: true,
layout_headerButton: myTrailsBtn,
contextMenuIcons: new List<string>(['plus']),
@@ -455,7 +462,7 @@ export class DashboardView extends React.Component {
isSystem: true,
layout_explainer: 'All of the trails that you have created will appear here.',
};
- const myTrails = DocUtils.AssignScripts(Docs.Create.TreeDocument([], reqdOpts), { treeViewChildDoubleClick: 'openPresentation(documentView.rootDoc)' });
+ const myTrails = DocUtils.AssignScripts(Docs.Create.TreeDocument([], reqdOpts), { treeView_ChildDoubleClick: 'openPresentation(documentView.rootDoc)' });
dashboardDoc.myTrails = new PrefetchProxy(myTrails);
const contextMenuScripts = [reqdBtnScript.onClick];