Skip to content

Commit b35d73c

Browse files
author
Adelino Ngomacha
committed
feat: add cli form page
1 parent 14c5154 commit b35d73c

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<script setup lang="ts">
2+
3+
</script>
4+
5+
<template>
6+
<form>
7+
<div class="space-y-12">
8+
<div class="border-b border-gray-900/10 pb-12">
9+
<div class="grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6">
10+
<div class="sm:col-span-full">
11+
<label for="default-config" class="block text-sm font-medium leading-6 text-gray-900">Deploy</label>
12+
<div class="mt-2">
13+
<!-- Enabled: "bg-indigo-600", Not Enabled: "bg-gray-200" -->
14+
<button
15+
type="button"
16+
class="relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent bg-indigo-600 transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2"
17+
role="switch" aria-checked="false"
18+
>
19+
<span class="sr-only">Deploy</span>
20+
<!-- Enabled: "translate-x-5", Not Enabled: "translate-x-0" -->
21+
<span
22+
aria-hidden="true"
23+
class="pointer-events-none inline-block h-5 w-5 translate-x-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
24+
/>
25+
</button>
26+
</div>
27+
</div>
28+
<div class="sm:col-span-3">
29+
<label for="name" class="block text-sm font-medium leading-6 text-gray-900">Name</label>
30+
<div class="mt-2">
31+
<input id="name" type="text" name="name" placeholder="My Custom CLI" value="My Custom CLI" class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6">
32+
</div>
33+
</div>
34+
<div class="sm:col-span-full">
35+
<label for="description" class="block text-sm font-medium leading-6 text-gray-900">Description</label>
36+
<div class="mt-2">
37+
<textarea id="description" name="description" rows="3" class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6">My Custom CLI</textarea>
38+
</div>
39+
</div>
40+
<div class="sm:col-span-3">
41+
<label for="command" class="block text-sm font-medium leading-6 text-gray-900">Command</label>
42+
<div class="mt-2">
43+
<input id="command" type="text" name="command" placeholder="my-custom-cli" value="my-custom-cli" class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6">
44+
</div>
45+
</div>
46+
</div>
47+
</div>
48+
</div>
49+
50+
<div class="mt-6 flex items-center justify-end gap-x-6">
51+
<button type="button" class="text-sm font-semibold leading-6 text-gray-900">
52+
Cancel
53+
</button>
54+
<Button
55+
type="submit"
56+
class="rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
57+
>
58+
Save
59+
</Button>
60+
</div>
61+
</form>
62+
</template>
63+
64+
<style scoped>
65+
66+
</style>

libs/components/Dashboard/Settings/SettingsFormManager.vue

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import AIForm from './Forms/AIForm.vue'
33
import AnalyticsForm from './Forms/AnalyticsForm.vue'
44
import AppForm from './Forms/AppForm.vue'
55
import CacheForm from './Forms/CacheForm.vue'
6+
import CliForm from './Forms/CLIForm.vue'
67
78
const props = defineProps({
89
name: String,
@@ -116,6 +117,7 @@ const pageTitle = computed < String > (() => options.find(option => option.key =
116117
<template v-else-if="name === 'analytics'"><AnalyticsForm /></template>
117118
<template v-else-if="name === 'app'"><AppForm /></template>
118119
<template v-else-if="name === 'cache'"><CacheForm /></template>
120+
<template v-else-if="name === 'cli'"><CliForm /></template>
119121
<template v-else>
120122
<div class="text-center">
121123
<div class="i-heroicons-cog-8-tooth text-gray-400 w-12 h-12 dark:text-gray-200 transition-all duration-150 ease-in-out" />

libs/components/Dashboard/SettingsSidebar.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<li>
5454
<RouterLink to="cli" class="sidebar-links group flex items-center justify-between">
5555
<div class="flex items-center gap-x-2">
56-
<div class="i-heroicons-square-3-stack-3d text-gray-500 w-5 h-5 dark:text-gray-200 group-hover:text-gray-700 transition duration-150 ease-in-out" />
56+
<div class="i-heroicons-command-line text-gray-500 w-5 h-5 dark:text-gray-200 group-hover:text-gray-700 transition duration-150 ease-in-out" />
5757
CLI
5858
</div>
5959
<div class="i-heroicons-chevron-right text-gray-500 w-5 h-5 dark:text-gray-200 group-hover:text-gray-700 transition duration-150 ease-in-out self-end" />

0 commit comments

Comments
 (0)