mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
0f7acdaaab
commit
b0e673e3b0
@ -4,7 +4,7 @@ import { hotbarStore } from "../../../common/hotbar-store";
|
|||||||
import { CommandOverlay } from "../command-palette";
|
import { CommandOverlay } from "../command-palette";
|
||||||
import { Input, InputValidator } from "../input";
|
import { Input, InputValidator } from "../input";
|
||||||
|
|
||||||
const uniqueWorkspaceName: InputValidator = {
|
const uniqueHotbarName: InputValidator = {
|
||||||
condition: ({ required }) => required,
|
condition: ({ required }) => required,
|
||||||
message: () => `Hotbar with this name already exists`,
|
message: () => `Hotbar with this name already exists`,
|
||||||
validate: value => !hotbarStore.getByName(value),
|
validate: value => !hotbarStore.getByName(value),
|
||||||
@ -35,7 +35,7 @@ export class HotbarAddCommand extends React.Component {
|
|||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
theme="round-black"
|
theme="round-black"
|
||||||
data-test-id="command-palette-hotbar-add-name"
|
data-test-id="command-palette-hotbar-add-name"
|
||||||
validators={[uniqueWorkspaceName]}
|
validators={[uniqueHotbarName]}
|
||||||
onSubmit={(v) => this.onSubmit(v)}
|
onSubmit={(v) => this.onSubmit(v)}
|
||||||
dirty={true}
|
dirty={true}
|
||||||
showValidationLine={true} />
|
showValidationLine={true} />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user