mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Show not yet enabled workspaces in list
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
d73cdcac6f
commit
ff80904592
@ -10,5 +10,10 @@
|
||||
> .description {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
&:not(.enabled) {
|
||||
pointer-events: none;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -20,7 +20,7 @@ export class Workspaces extends React.Component {
|
||||
|
||||
@computed get workspaces(): Workspace[] {
|
||||
const currentWorkspaces: Map<WorkspaceId, Workspace> = 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 {
|
||||
<Trans>Workspaces</Trans>
|
||||
</h2>
|
||||
<div className="items flex column gaps">
|
||||
{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 (
|
||||
<div key={workspaceId} className={className}>
|
||||
<div key={workspaceId} className={cssNames(className, {enabled: enabled || isEditing})}>
|
||||
{!isEditing && (
|
||||
<Fragment>
|
||||
<span className="name flex gaps align-center">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user