From ff80904592a2ff569913f511b8a68557ba829962 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Tue, 17 Nov 2020 07:57:19 +0300 Subject: [PATCH] Show not yet enabled workspaces in list Signed-off-by: Alex Andreev --- src/renderer/components/+workspaces/workspaces.scss | 5 +++++ src/renderer/components/+workspaces/workspaces.tsx | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/+workspaces/workspaces.scss b/src/renderer/components/+workspaces/workspaces.scss index 95c036c304..b797213c1d 100644 --- a/src/renderer/components/+workspaces/workspaces.scss +++ b/src/renderer/components/+workspaces/workspaces.scss @@ -10,5 +10,10 @@ > .description { flex: 1; } + + &:not(.enabled) { + pointer-events: none; + opacity: 0.5; + } } } \ No newline at end of file diff --git a/src/renderer/components/+workspaces/workspaces.tsx b/src/renderer/components/+workspaces/workspaces.tsx index 8bddf48c24..42523401de 100644 --- a/src/renderer/components/+workspaces/workspaces.tsx +++ b/src/renderer/components/+workspaces/workspaces.tsx @@ -20,7 +20,7 @@ export class Workspaces extends React.Component { @computed get workspaces(): Workspace[] { const currentWorkspaces: Map = new Map() - workspaceStore.enabledWorkspacesList.forEach((w) => { + workspaceStore.workspacesList.forEach((w) => { currentWorkspaces.set(w.id, w) }) const allWorkspaces = new Map([ @@ -115,7 +115,7 @@ export class Workspaces extends React.Component { Workspaces
- {this.workspaces.map(({ id: workspaceId, name, description, ownerRef }) => { + {this.workspaces.map(({ id: workspaceId, name, description, ownerRef, enabled }) => { const isActive = workspaceStore.currentWorkspaceId === workspaceId; const isDefault = workspaceStore.isDefault(workspaceId); const isEditing = this.editingWorkspaces.has(workspaceId); @@ -131,7 +131,7 @@ export class Workspaces extends React.Component { validate: value => !workspaceStore.getByName(value.trim()) } return ( -
+
{!isEditing && (