mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Adjust menu icons and set defaultAction flags
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
098cabe0e0
commit
3491745eb9
@ -19,8 +19,6 @@
|
|||||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from "react";
|
|
||||||
import { CreateNewFolderOutlined, NoteAdd } from "@material-ui/icons";
|
|
||||||
import { kubernetesClusterCategory } from "../../common/catalog-entities";
|
import { kubernetesClusterCategory } from "../../common/catalog-entities";
|
||||||
import { addClusterURL, preferencesURL } from "../../common/routes";
|
import { addClusterURL, preferencesURL } from "../../common/routes";
|
||||||
import { PathPicker } from "../components/path-picker";
|
import { PathPicker } from "../components/path-picker";
|
||||||
@ -51,8 +49,9 @@ export function initCatalogCategoryRegistryEntries() {
|
|||||||
if (isWindows) {
|
if (isWindows) {
|
||||||
ctx.menuItems.push(
|
ctx.menuItems.push(
|
||||||
{
|
{
|
||||||
icon: () => <CreateNewFolderOutlined fontSize="large" />,
|
icon: "create_new_folder",
|
||||||
title: "Sync kubeconfig folders(s)",
|
title: "Sync kubeconfig folders(s)",
|
||||||
|
defaultAction: true,
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
await PathPicker.pick({
|
await PathPicker.pick({
|
||||||
label: "Sync folders(s)",
|
label: "Sync folders(s)",
|
||||||
@ -64,7 +63,7 @@ export function initCatalogCategoryRegistryEntries() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: () => <NoteAdd fontSize="large" />,
|
icon: "note_add",
|
||||||
title: "Sync kubeconfig file(s)",
|
title: "Sync kubeconfig file(s)",
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
await PathPicker.pick({
|
await PathPicker.pick({
|
||||||
@ -80,8 +79,9 @@ export function initCatalogCategoryRegistryEntries() {
|
|||||||
} else {
|
} else {
|
||||||
ctx.menuItems.push(
|
ctx.menuItems.push(
|
||||||
{
|
{
|
||||||
icon: "settings",
|
icon: "create_new_folder",
|
||||||
title: "Sync kubeconfig(s)",
|
title: "Sync kubeconfig(s)",
|
||||||
|
defaultAction: true,
|
||||||
onClick: async () => {
|
onClick: async () => {
|
||||||
await PathPicker.pick({
|
await PathPicker.pick({
|
||||||
label: "Sync file(s)",
|
label: "Sync file(s)",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user