Skip to content

Commit

Permalink
Merge pull request #14 from NiceGuyIT/feature/cross-platform-scripting
Browse files Browse the repository at this point in the history
[Feature] Add cross site scripting
  • Loading branch information
wh1te909 authored Feb 22, 2024
2 parents 1b4fa84 + fe8d884 commit 5832a42
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/scripts/ScriptFormModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ const lang = computed(() => {
else if (script.shell === "powershell") return "powershell";
else if (script.shell === "python") return "python";
else if (script.shell === "shell") return "shell";
else if (script.shell === "nushell") return "nushell";
else if (script.shell === "deno") return "typescript";
else return "";
});
Expand Down
30 changes: 30 additions & 0 deletions src/components/scripts/ScriptManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,20 @@
>
<q-tooltip> Shell </q-tooltip>
</q-icon>
<q-icon
v-else-if="props.node.shell === 'nushell'"
name="mdi-code-greater-than"
color="primary"
>
<q-tooltip> Nushell </q-tooltip>
</q-icon>
<q-icon
v-else-if="props.node.shell === 'deno'"
name="mdi-language-typescript"
color="primary"
>
<q-tooltip> Deno </q-tooltip>
</q-icon>

<!-- is community script icon -->
<img
Expand Down Expand Up @@ -471,6 +485,22 @@
>
<q-tooltip> Shell </q-tooltip>
</q-icon>
<q-icon
v-else-if="props.row.shell === 'nushell'"
size="sm"
name="mdi-code-greater-than"
color="primary"
>
<q-tooltip> Nushell </q-tooltip>
</q-icon>
<q-icon
v-else-if="props.row.shell === 'deno'"
size="sm"
name="mdi-language-typescript"
color="primary"
>
<q-tooltip> Deno </q-tooltip>
</q-icon>
</q-td>
<!-- supported platforms -->
<q-td key="supported_platforms" :props="props">
Expand Down
16 changes: 16 additions & 0 deletions src/components/scripts/ScriptSnippets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,22 @@
>
<q-tooltip> Shell </q-tooltip>
</q-icon>
<q-icon
v-else-if="props.row.shell === 'nushell'"
name="mdi-nushell"
color="primary"
size="sm"
>
<q-tooltip> Nushell </q-tooltip>
</q-icon>
<q-icon
v-else-if="props.row.shell === 'deno'"
name="mdi-typescript"
color="primary"
size="sm"
>
<q-tooltip> Deno </q-tooltip>
</q-icon>
</q-td>
<!-- name -->
<q-td>{{ props.row.name }}</q-td>
Expand Down
2 changes: 2 additions & 0 deletions src/composables/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,6 @@ export const shellOptions = [
{ label: "Batch", value: "cmd" },
{ label: "Python", value: "python" },
{ label: "Shell", value: "shell" },
{ label: "Nushell", value: "nushell" },
{ label: "Deno", value: "deno" },
];
2 changes: 1 addition & 1 deletion src/types/scripts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AgentPlatformType } from "@/types/agents";

export type ScriptShellType = "powershell" | "cmd" | "shell" | "python";
export type ScriptShellType = "powershell" | "cmd" | "shell" | "python" | "nushell" | "deno";

export interface Script {
id?: number;
Expand Down

0 comments on commit 5832a42

Please sign in to comment.