Skip to content

Commit

Permalink
Standardizing titles
Browse files Browse the repository at this point in the history
  • Loading branch information
Corb3nik committed Oct 9, 2024
1 parent ba3045e commit 3eacb69
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .vitepress/sidebars/guides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ export const guidesSidebar: DefaultTheme.SidebarItem[] = [
text: "Frontend",
items: [
{
text: "Plugin Page",
text: "Creating a Page",
link: "/guides/components/page",
},
{
text: "Plugin Commands",
text: "Creating a Command",
link: "/guides/components/command",
},
{
text: "Plugin Context Menus",
text: "Customizing Context Menus",
link: "/guides/components/menu",
},
],
Expand All @@ -40,7 +40,7 @@ export const guidesSidebar: DefaultTheme.SidebarItem[] = [
text: "Backend",
items: [
{
text: "Send a Request",
text: "Sending HTTP Requests",
link: "/guides/components/request",
},
],
Expand Down
6 changes: 3 additions & 3 deletions src/guides/components/command.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Creating a Command & Shortcut
# Creating a Command

Commands are used to register actions to expose functionality, bind actions to the user-interface and implement business logic.

### To register a command:
### Registering a Command

```ts
sdk.commands.register("hello", {
Expand All @@ -24,7 +24,7 @@ The optional `when` property defines a conditional that must be met for the comm
_For example, to explicity set the command to be available at all times, `when: () => true` can be used._
:::

### To add a command to the commandPalette:
### Adding a command to the command palette

```ts
sdk.commandPalette.register("hello");
Expand Down
2 changes: 1 addition & 1 deletion src/guides/components/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The context menu is the list of actions/options that appears when right-clicking

Used to register right-click context menu actions/options and create a plugin specific settings page, allowing quick access to your plugin functionality.

### To register an entry to the context menu:
### Registering an entry to the context menu

```ts
sdk.menu.registerItem({
Expand Down
24 changes: 12 additions & 12 deletions src/guides/components/page.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Creating a Plugin Page
# Creating a Page

Plugin pages provide a graphical user interface in the Caido application. There are multiple SDK objects and methods available to assist you in customization.

## navigation

Used to create pages in the application and navigate to them.

### To add a page:
### Adding a page

```ts
sdk.navigation.addPage("/my-plugin-page", {
Expand All @@ -23,7 +23,7 @@ The `topbar` property is optional and appears to the right of the Caido logo in
The inclusion of a topbar will remove the Browser button, >\_Commands button, Forwarding/Queuing button, Project Dropdown Menu and Account Menu from the top-right corner of the Caido UI in your plugin page.
:::

### To navigate to a page:
### Navigating to a Page

```ts
sdk.navigation.goTo("/my-plugin-page");
Expand Down Expand Up @@ -51,7 +51,7 @@ The `icon` property is optional and adds a [FontAwesome](https://fontawesome.com

Used to create visual elements. Content options for each element are also provided. These elements provide a way to sectionalize the user-interface of your plugin.

### To create a button:
### Creating a Button

```ts
const deleteButton = sdk.ui.button({
Expand All @@ -70,7 +70,7 @@ All button properties are optional and include:
- `trailingIcon` - Addsan icon at the trailing side of the button.
- `size` - Specifies the button size and can have a value of `"small"`, `"medium"` or `"large"`.

### To create a card:
### Creating a Card

```ts
const card = sdk.ui.card({
Expand Down Expand Up @@ -146,7 +146,7 @@ The `init` function contains the `createPage(sdk)` function to register the page

<img alt="Add page SKD." src="/_images/add_page_sdk.png" center/>

### To create a well:
### Creating a Well

```ts
const well = sdk.ui.well({
Expand All @@ -160,14 +160,14 @@ A **well** is a layout component. Wells are similar to cards in that they consis

All properties are optional. The value of each property is a defined HTML element.

### To create a request editor:
### Creating a Request Editor

```ts
const reqEditor = sdk.ui.httpRequestEditor();
const reqEditorPane = reqEditor.getElement();
```

### To create a response editor:
### Creating a Response Editor

```ts
const respEditor = sdk.ui.httpResponseEditor();
Expand Down Expand Up @@ -210,7 +210,7 @@ const createPage = (sdk: CaidoSDK) => {

const bodyContainer = document.createElement("div");
bodyContainer.appendChild(bodyText);

const editorsContainer = document.createElement("div");
editorsContainer.classList.add("editors-container");

Expand All @@ -219,7 +219,7 @@ const createPage = (sdk: CaidoSDK) => {

editorsContainer.appendChild(reqEditorPane);
editorsContainer.appendChild(respEditorPane);

bodyContainer.appendChild(editorsContainer);

const bar = document.createElement("p");
Expand Down Expand Up @@ -286,7 +286,7 @@ To view the CSS rules of the editors shown below, expand the following:

Used to interact with text within the application environment, allowing text selection, replacement, read permission designations, focusing and editor related messaging.

### To interact with text within the Caido user-interface:
### Interacting with Text Within Editors

```ts
let currentSelection = sdk.window.getActiveEditor()?.getSelectedText();
Expand All @@ -302,7 +302,7 @@ sdk.window

This takes the value of the current highlight-selected text and replaces it with the arguement value.

### To display a Toast message:
### Displaying a Toast Message

```ts
sdk.window.showToast("Message to display.", {
Expand Down
4 changes: 2 additions & 2 deletions src/guides/components/request.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sending HTTP Requests in Plugins
# Sending HTTP Requests

Requests can be interacted with and sent in both Workflows and plugins.

Expand All @@ -25,7 +25,7 @@ Although, Caido will automatically create a valid request based on the URL suppl
- `setRaw()` - Sets the request to raw bytes.
- `setTls()` - Specifies/overwrites if HTTPS is to be used or not.

### To create and send a request in a plugin:
### Creating and Sending a Request

In the backend index.ts file, you will first need to import the `RequestSpec`, `SDK` and `DefineAPI` type aliases.

Expand Down

0 comments on commit 3eacb69

Please sign in to comment.