Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance(workspace): add cmd to show info of each vault #3467

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/plugin-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
{
"view": "dendron.treeView",
"contents": "Open a Dendron note to see the tree view."
"contents": "First open a Dendron note to see the tree view."
}
],
"viewsContainers": {
Expand Down Expand Up @@ -599,6 +599,10 @@
{
"command": "dendron.dev.validateEngine",
"title": "Dendron:Dev: Validate Engine"
},
{
"command": "dendron.showInfo",
"title": "Dendron:: Show Info"
}
],
"menus": {
Expand Down
23 changes: 23 additions & 0 deletions packages/plugin-core/src/commands/ShowInfo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { DENDRON_COMMANDS } from "../constants";
import { BasicCommand } from "./base";

type CommandOpts = {};

type CommandInput = {};

type CommandOutput = void;

export class ShowInfo extends BasicCommand<CommandOpts, CommandOutput> {
key = DENDRON_COMMANDS.SHOW_INFO.key;
async gatherInputs(): Promise<CommandInput | undefined> {
return {};
}
async execute() {
console.log("new command being executed");
// env.openExternal(
// Uri.parse(
// "https://www.dendron.so/notes/f9540bb6-7a5a-46db-ae7c-e1a606f28c73.html"
// )
// );
}
}
2 changes: 2 additions & 0 deletions packages/plugin-core/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ import { VaultRemoveCommand } from "./VaultRemoveCommand";
import { RenameNoteCommand } from "./RenameNoteCommand";
import { CreateNoteCommand } from "./CreateNoteCommand";
import { MergeNoteCommand } from "./MergeNoteCommand";
import { ShowInfo } from "./ShowInfo";

/**
* Note: this does not contain commands that have parametered constructors, as
Expand Down Expand Up @@ -177,6 +178,7 @@ const ALL_COMMANDS = [
ValidateEngineCommand,
MergeNoteCommand,
CreateNoteCommand,
ShowInfo,
] as CodeCommandConstructor[];

export { ALL_COMMANDS };
4 changes: 4 additions & 0 deletions packages/plugin-core/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,10 @@ export const DENDRON_COMMANDS: { [key: string]: CommandEntry } = {
title: `${CMD_PREFIX}Dev: Validate Engine`,
when: `${DendronContext.PLUGIN_ACTIVE} && shellExecutionSupported`,
},
SHOW_INFO: {
key: "dendron.showInfo",
title: `${CMD_PREFIX}: Show Info`,
},
};

export const DENDRON_CHANNEL_NAME = "Dendron";
Expand Down