Skip to content

Commit

Permalink
feat: add setting for shell command
Browse files Browse the repository at this point in the history
Added setting for specifying shell command, which defaults to /bin/sh

Fixes #2
  • Loading branch information
Jeroen Nijhuis committed Feb 7, 2024
1 parent 3135df3 commit e930091
Show file tree
Hide file tree
Showing 17 changed files with 352 additions and 35 deletions.
153 changes: 123 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"@radix-icons/vue": "^1.0.0",
"@tanstack/vue-table": "^8.11.0",
"@tauri-apps/api": "1.4.0",
"@vueuse/core": "^10.7.0",
"@vee-validate/zod": "^4.12.5",
"@vueuse/core": "^10.7.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"date-fns": "^3.0.6",
Expand All @@ -32,11 +33,13 @@
"radix-vue": "^1.2.7",
"tailwind-merge": "^2.1.0",
"tailwindcss-animate": "^1.0.7",
"vee-validate": "^4.12.5",
"vite-svg-loader": "^5.1.0",
"vue": "3.4.7",
"vue-router": "^4.2.5",
"xterm": "^5.3.0",
"xterm-addon-fit": "^0.8.0"
"xterm-addon-fit": "^0.8.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@semantic-release/git": "^10.0.1",
Expand Down
1 change: 0 additions & 1 deletion src/components/settings/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ import NavigationItem from "@/components/settings/NavigationItem.vue";
<template>
<nav class="flex flex-col space-y-1">
<NavigationItem :to="{ name: 'SettingsGeneral' }" title="General" />
<NavigationItem :to="{ name: 'SettingsContexts' }" title="Contexts" />
</nav>
</template>
16 changes: 16 additions & 0 deletions src/components/ui/form/FormControl.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<script lang="ts" setup>
import { Slot } from 'radix-vue'
import { useFormField } from './useFormField'
const { error, formItemId, formDescriptionId, formMessageId } = useFormField()
</script>

<template>
<Slot
:id="formItemId"
:aria-describedby="!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`"
:aria-invalid="!!error"
>
<slot />
</Slot>
</template>
20 changes: 20 additions & 0 deletions src/components/ui/form/FormDescription.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<script lang="ts" setup>
import type { HTMLAttributes } from 'vue'
import { useFormField } from './useFormField'
import { cn } from '@/lib/utils'
const props = defineProps<{
class?: HTMLAttributes['class']
}>()
const { formDescriptionId } = useFormField()
</script>

<template>
<p
:id="formDescriptionId"
:class="cn('text-sm text-muted-foreground', props.class)"
>
<slot />
</p>
</template>
25 changes: 25 additions & 0 deletions src/components/ui/form/FormItem.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<script lang="ts">
import type { HTMLAttributes, InjectionKey } from 'vue'
export const FORM_ITEM_INJECTION_KEY
= Symbol() as InjectionKey<string>
</script>

<script lang="ts" setup>
import { provide } from 'vue'
import { useId } from 'radix-vue'
import { cn } from '@/lib/utils'
const props = defineProps<{
class?: HTMLAttributes['class']
}>()
const id = useId()
provide(FORM_ITEM_INJECTION_KEY, id)
</script>

<template>
<div :class="cn('space-y-2', props.class)">
<slot />
</div>
</template>
23 changes: 23 additions & 0 deletions src/components/ui/form/FormLabel.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script lang="ts" setup>
import type { HTMLAttributes } from 'vue'
import type { LabelProps } from 'radix-vue'
import { useFormField } from './useFormField'
import { cn } from '@/lib/utils'
import { Label } from '@/components/ui/label'
const props = defineProps<LabelProps & { class?: HTMLAttributes['class'] }>()
const { error, formItemId } = useFormField()
</script>

<template>
<Label
:class="cn(
error && 'text-destructive',
props.class,
)"
:for="formItemId"
>
<slot />
</Label>
</template>
Loading

0 comments on commit e930091

Please sign in to comment.