Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
249 commits
Select commit Hold shift + click to select a range
40eb2f5
feat: add actions to the table
Aug 11, 2026
f90e31d
feat: added adding id to function object
Aug 11, 2026
9e25961
feat: added auth
Aug 12, 2026
532a23c
ref
Aug 12, 2026
2d67edf
ref
Aug 12, 2026
bda1821
ref
Aug 12, 2026
8edaec0
ref
Aug 12, 2026
deb9934
ref
Aug 12, 2026
b1fddb0
ref
Aug 12, 2026
2566035
feat: add create authenticate dep
Aug 13, 2026
346d61f
ref
Aug 13, 2026
3b27cb1
ref
Aug 13, 2026
b53c12d
ref
Aug 13, 2026
35b0a94
ref
Aug 13, 2026
8b73ef8
ref
Aug 13, 2026
60318ed
ref
Aug 13, 2026
22c3710
ref
Aug 13, 2026
52da6c8
ref
Aug 13, 2026
51bad2d
ref
Aug 13, 2026
654c591
ref
Aug 13, 2026
5becdb1
ref
Aug 13, 2026
3a8d221
ref
Aug 13, 2026
48f003b
ref
Aug 13, 2026
c7a4124
ref
Aug 13, 2026
c399aa9
ref
Aug 13, 2026
0a6dbeb
feat: add use login form
Aug 13, 2026
61c4b2d
ref
Aug 13, 2026
a8e1d30
ref
Aug 13, 2026
5db4425
ref
Aug 13, 2026
413b15e
ref
Aug 13, 2026
c56a815
ref
Aug 13, 2026
9e67a45
ref
Aug 13, 2026
8381a03
ref
Aug 13, 2026
bd3f766
ref
Aug 13, 2026
a09bbef
ref
Aug 13, 2026
cfcf7b7
ref
Aug 13, 2026
2526ed4
ref
Aug 13, 2026
04bf60e
ref
Aug 13, 2026
83f0607
ref
Aug 13, 2026
6510791
ref
Aug 14, 2026
ff5a725
ref
Aug 14, 2026
6d8c999
ref
Aug 14, 2026
cbaf23d
ref
Aug 14, 2026
b9fd956
ref
Aug 14, 2026
5ef0d1f
ref
Aug 14, 2026
edc1edf
feat: login form
Aug 14, 2026
de2531d
ref
Aug 14, 2026
4b2ab8f
ref
Aug 14, 2026
73ccef7
ref
Aug 14, 2026
7da6d14
ref
Aug 14, 2026
6fb62be
ref
Aug 14, 2026
a740b47
ref
Aug 14, 2026
6b45d35
ref
Aug 14, 2026
f142cad
feat: added refresh
Aug 15, 2026
05a5c92
feat: added refresh to all components
Aug 15, 2026
ba04a70
ref
Aug 15, 2026
861a5e0
feat: added style to table responce
Aug 15, 2026
7e5d622
ref
Aug 15, 2026
5ddd608
ref
Aug 15, 2026
fe64dfb
ref
Aug 15, 2026
8737752
ref
Aug 15, 2026
eb7f052
ref
Aug 15, 2026
e5a6652
ref
Aug 15, 2026
cdab93c
feat: page view
Aug 15, 2026
d3afba2
feat: add iconify
Aug 15, 2026
7b8c284
feat: add iconify
Aug 15, 2026
21ce80c
ref
Aug 15, 2026
569dcde
ref
Aug 15, 2026
68b9675
feat: add breadcrumb
Aug 15, 2026
d91e6bc
ref
Aug 15, 2026
0b5d4cb
ref
Aug 15, 2026
db81062
ref
Aug 15, 2026
080ff9b
ref
Aug 15, 2026
5f9d4d2
ref
Aug 15, 2026
5d04fa9
ref
Aug 15, 2026
7d52f69
ref
Aug 15, 2026
d3915dd
ref
Aug 15, 2026
6ad2008
feat: top panel
Aug 15, 2026
a63a3f1
ref
Aug 15, 2026
69c0689
ref
Aug 15, 2026
79072ca
feat: use logo
Aug 15, 2026
42e313e
ref
Aug 15, 2026
0a593f9
feat: logo
Aug 15, 2026
217adbb
ref
Aug 15, 2026
6c0942d
feat: buttons section
Aug 15, 2026
51f79f4
ref
Aug 15, 2026
d4531ae
ref
Aug 15, 2026
bc56c90
ref
Aug 15, 2026
6e6dee6
ref
Aug 15, 2026
d1c01e8
ref
Aug 15, 2026
e284f25
ref
Aug 15, 2026
d980eff
ref
Aug 15, 2026
3e41e51
ref
Aug 15, 2026
feeeb9c
ref
Aug 15, 2026
808c862
ref
Aug 15, 2026
8ad17c5
ref
Aug 15, 2026
ba427dc
fix: fix typing
Aug 15, 2026
ae5627c
ref
Aug 15, 2026
edccc53
ref
Aug 15, 2026
cc30fd6
ref
Aug 15, 2026
33c7a61
ref
Aug 15, 2026
87be810
ref
Aug 15, 2026
733553c
ref
Aug 15, 2026
72f71ba
ref
Aug 15, 2026
9f0082e
feat: use themes in login view
Aug 15, 2026
5b9eca5
ref
Aug 15, 2026
9eebe94
ref
Aug 15, 2026
30d3698
ref
Aug 15, 2026
f6fe030
feat: use files for components
Aug 15, 2026
610d53c
ref
Aug 15, 2026
0d0525d
ref
Aug 15, 2026
9aa6597
ref
Aug 15, 2026
2d52548
ref
Aug 15, 2026
3b0463b
ref
Aug 15, 2026
f1a8782
ref
Aug 15, 2026
4f86daf
ref
Aug 15, 2026
ddf70b8
ref
Aug 15, 2026
097961a
ref
Aug 15, 2026
1ae01fc
ref
Aug 15, 2026
982611f
ref
Aug 15, 2026
9517a17
ref
Aug 15, 2026
0e58425
ref
Aug 15, 2026
1df1b37
ref
Aug 15, 2026
364ed19
ref
Aug 15, 2026
1364846
ref
Aug 15, 2026
3c733e9
ref
Aug 15, 2026
13edfdd
ref
Aug 15, 2026
538ca92
feat: stats value
Aug 15, 2026
c892da7
ref
Aug 15, 2026
b277db8
feat: sync schemas
Aug 15, 2026
756edae
feat: added spinner
Aug 15, 2026
eaf464d
ref
Aug 15, 2026
8b900f5
ref
Aug 15, 2026
c3e9c48
feat: loading states in stats
Aug 15, 2026
a963acb
feat: add refresh
Aug 15, 2026
da064f9
feat: add tanstack table
Aug 16, 2026
4399ab4
feat: add table features
Aug 16, 2026
16b94ad
feat: add table composables
Aug 16, 2026
c316816
ref
Aug 16, 2026
d5841e0
ref
Aug 16, 2026
6357bd7
ref
Aug 16, 2026
96a56a5
feat: add columns definitions
Aug 16, 2026
2767938
ref
Aug 16, 2026
0cf1ea5
ref
Aug 16, 2026
ab42043
ref
Aug 16, 2026
267514b
ref
Aug 16, 2026
87fb803
ref
Aug 16, 2026
b0d5891
ref
Aug 16, 2026
20371eb
ref
Aug 16, 2026
61d137c
ref
Aug 16, 2026
4431cfb
ref
Aug 16, 2026
6caf635
ref
Aug 16, 2026
7e37930
ref
Aug 16, 2026
c9d432c
ref
Aug 16, 2026
8bf146e
ref
Aug 16, 2026
bd3d8c4
ref
Aug 16, 2026
ca904d6
ref
Aug 16, 2026
66cd057
ref
Aug 16, 2026
8542786
feat: added dropdown menue
Aug 16, 2026
63237a0
ref
Aug 16, 2026
12befbc
feat: added actions
Aug 16, 2026
219e311
ref
Aug 16, 2026
43818eb
ref
Aug 16, 2026
2c9f5a0
ref
Aug 16, 2026
9dd9042
feat: added pagination
Aug 16, 2026
04a64de
feat: query params
Aug 16, 2026
cb06238
ref
Aug 16, 2026
d3aeec0
ref
Aug 16, 2026
7fe4b0a
feat: added pagination
Aug 16, 2026
3502fff
ref
Aug 16, 2026
48d18e5
feat: search
Aug 16, 2026
5accc4f
ref
Aug 16, 2026
5490d78
feat: add hide / show columns
Aug 16, 2026
83fd16c
feat: alight search and columns
Aug 16, 2026
37d58f7
ref
Aug 16, 2026
74268e5
ref
Aug 16, 2026
27dfdd9
feat: added check box
Aug 16, 2026
a81633a
ref
Aug 16, 2026
3646ea8
ref
Aug 16, 2026
98fee15
ref
Aug 16, 2026
751d869
ref
Aug 16, 2026
934d0a4
ref
Aug 17, 2026
019d51b
ref
Aug 17, 2026
d5842ba
ref
Aug 17, 2026
d29f183
ref
Aug 17, 2026
c887a7f
feat: add icons and colors to table headers
Aug 17, 2026
257be99
Add labels, icons and colors to all headers
Aug 17, 2026
4ae1df4
feat: added selection
Aug 17, 2026
8650b4b
feat: added showing selected items
Aug 17, 2026
f45615f
fix: fix columns menue
Aug 17, 2026
1e86020
ref
Aug 17, 2026
39aeae2
feat: added tabs
Aug 17, 2026
819f4e0
ref
Aug 17, 2026
5718d66
ref
Aug 17, 2026
f5774f3
feat: add openadmin markdown composable
Aug 17, 2026
30983cb
ref: ref styles
Aug 17, 2026
90e4916
feat: add style for markdown
Aug 17, 2026
45dae6d
ref
Aug 17, 2026
1404227
feat: added marked and dompurify
Aug 17, 2026
cb74417
feat: add markdown
Aug 17, 2026
bd9daab
ref
Aug 17, 2026
959cc3f
feat: center markdown
Aug 17, 2026
ff05b77
ref
Aug 17, 2026
1636c7a
ref
Aug 17, 2026
620ac32
ref
Aug 17, 2026
a1abacd
ref
Aug 17, 2026
47a5a0c
ref
Aug 17, 2026
3da5e81
ref
Aug 18, 2026
55c3d60
ref
Aug 18, 2026
70877b4
ref
Aug 18, 2026
3b0097c
feat: add column styles
Aug 18, 2026
cdc266e
feat: make max lenfth for lins and files
Aug 18, 2026
3805dbe
feat: add kdb
Aug 18, 2026
27f1b30
feat: handle null as value in table
Aug 18, 2026
897eab2
ref
Aug 18, 2026
99be68e
ref
Aug 18, 2026
0a17514
feat: add resizable
Aug 18, 2026
14ed329
feat: resize and change columns order
Aug 18, 2026
ec2ff22
ref
Aug 18, 2026
3601571
ref
Aug 18, 2026
8335009
ref
Aug 18, 2026
95e5541
ref
Aug 18, 2026
9ff4125
ref
Aug 18, 2026
c17a043
Merge pull request #28 from openadmin-team/feat/tables-update
mymyka Aug 19, 2026
d10bbe4
ref
Aug 19, 2026
7f4595f
ref
Aug 19, 2026
fb4eb36
ref
Aug 19, 2026
3e4954c
ref
Aug 19, 2026
8bc61ec
ref
Aug 19, 2026
542b509
ref
Aug 19, 2026
933a408
feat: added values config
Aug 19, 2026
b29ffad
feat: new badges
Aug 19, 2026
8ccf20e
feat: init docs
Aug 22, 2026
2d9248e
feat: add run dev docs
Aug 22, 2026
4393b68
ref
Aug 22, 2026
ae37e39
ref
Aug 22, 2026
8b0fcda
ref
Aug 22, 2026
5aa248b
feat: added content
Aug 22, 2026
03cb1f9
ref
Aug 22, 2026
30ddebd
ref
Aug 22, 2026
e3b6e67
ref
Aug 22, 2026
8dd1e4f
Merge pull request #29 from openadmin-team/feat/new-docs
mymyka Aug 22, 2026
f8a4d7c
ref
Aug 22, 2026
7461fd5
ref
Aug 22, 2026
1fab544
feat: add publish docs to github pages
Aug 22, 2026
91aadfe
ref
Aug 22, 2026
0a60e45
ref
Aug 22, 2026
9340582
ref
Aug 22, 2026
70e432e
ref
Aug 22, 2026
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
19 changes: 19 additions & 0 deletions .claude/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "client-dev",
"runtimeExecutable": "bun",
"runtimeArgs": ["run", "--cwd", "client", "dev"],
"port": 5173,
"autoPort": true
},
{
"name": "docs-dev",
"runtimeExecutable": "bun",
"runtimeArgs": ["run", "--cwd", "docs", "dev"],
"port": 5174,
"autoPort": true
}
]
}
46 changes: 46 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Docs

on:
push:
branches:
- prod
paths:
- "docs/**"
- ".github/workflows/docs.yml"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
name: "📖 Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: cd docs && bun install --frozen-lockfile
- name: Build docs
run: cd docs && bun run build
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: docs/config/.vitepress/dist

deploy:
name: "🚀 Deploy"
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v4
id: deployment
23 changes: 21 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#
# Fix
#

fix/license:
@ uv run reuse download --all
@ uv run reuse annotate --license AGPL-3.0-or-later --copyright "OpenAdmin" --recursive --skip-unrecognised openadmin/
Expand All @@ -15,6 +19,10 @@ fix/lint:

fix: fix/license fix/format fix/lint

#
# Check
#

check/format:
@ cd client && bun run check:format
@ uv run ruff format --check .
Expand All @@ -24,6 +32,7 @@ check/lint:
@ uv run ruff check .

check/typing:
@ cd client && bun run check:types
@ uv run pyright .

check/cves:
Expand All @@ -46,6 +55,16 @@ check/test:

check: check/format check/lint check/typing check/cves check/security check/unused check/spell check/license check/test

dev/run:
#
# Dev
#

dev/client:
@ cd client && bun run dev

dev/docs:
@ cd docs && bun run dev

dev/example:
@ cd client && bun run build
@ PYTHONPATH=. uv run fastapi dev examples/main.py --host 0.0.0.0 --port $${PORT:-8000} --reload
@ PYTHONPATH=. uv run fastapi dev examples/main.py --host 0.0.0.0 --port $${PORT:-8000} --reload
1 change: 1 addition & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ path = [
"**/__pycache__",
"docs/**",
"client/**",
".claude/*"
]
SPDX-FileCopyrightText = "OpenAdmin"
SPDX-License-Identifier = "AGPL-3.0-or-later"
11 changes: 11 additions & 0 deletions client/.claude/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "client-dev",
"runtimeExecutable": "npm",
"runtimeArgs": ["run", "dev", "--", "--port", "5183", "--strictPort"],
"port": 5183
}
]
}
163 changes: 155 additions & 8 deletions client/bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"typescript": true,
"tailwind": {
"config": "",
"css": "src/style.css",
"css": "src/styles/style.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
Expand Down
18 changes: 15 additions & 3 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,38 @@
"fix": "bun run fix:format && bun run fix:lint",
"check:format": "biome format .",
"check:lint": "biome lint .",
"check": "bun run check:format && bun run check:lint"
"check:types": "vue-tsc -b",
"check": "bun run check:format && bun run check:lint && bun run check:types"
},
"dependencies": {
"@lucide/vue": "^1.30.0",
"@fontsource/geist": "^5.3.0",
"@fontsource/geist-mono": "^5.3.0",
"@lucide/vue": "^1.32.0",
"@tailwindcss/vite": "^4.3.3",
"@tanstack/vue-form": "^1.33.5",
"@tanstack/vue-query": "^5.101.4",
"@tanstack/vue-table": "^9.1.2",
"@unovis/vue": "^1.6.7",
"@vueuse/core": "^14.4.0",
"@vueuse/integrations": "^14.4.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"reka-ui": "^2.10.1",
"dompurify": "^3.4.13",
"marked": "^18.0.9",
"reka-ui": "^2.10.3",
"sortablejs": "^1.15.7",
"tailwind-merge": "^3.6.0",
"tailwindcss": "^4.3.3",
"vue": "^3.5.40",
"vue-router": "^5.2.0",
"vue-sonner": "^2.0.9",
"zod": "^4.4.3"
},
"devDependencies": {
"@biomejs/biome": "^2.5.7",
"@iconify/vue": "^5.0.1",
"@types/node": "^26.2.0",
"@types/sortablejs": "^1.15.9",
"@vitejs/plugin-vue": "^6.0.8",
"@vue/tsconfig": "^0.9.1",
"tw-animate-css": "^1.4.0",
Expand Down
14 changes: 6 additions & 8 deletions client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ SPDX-FileCopyrightText: 2026 OpenAdmin

SPDX-License-Identifier: AGPL-3.0-or-later
-->

<script setup lang="ts">
import { useOpenAdminSpec } from "@/composables/openadmin-spec"

const { data, isLoading, error } = useOpenAdminSpec()
import "vue-sonner/style.css"
import { Toaster } from "@/components/ui/sonner"
</script>

<template>
<h1>Hello</h1>
{{ isLoading }}
{{ JSON.stringify(data) }}
{{ error?.message }}
<main>
<RouterView />
<Toaster />
</main>
</template>
Binary file added client/src/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions client/src/components/dashboard/Sidebar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!--
SPDX-FileCopyrightText: 2026 OpenAdmin

SPDX-License-Identifier: AGPL-3.0-or-later
-->

<script setup lang="ts">
import { RouterLink, useRoute } from "vue-router"
import {
Sidebar,
SidebarContent,
SidebarGroup,
SidebarGroupContent,
SidebarGroupLabel,
SidebarHeader,
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
SidebarRail,
} from "@/components/ui/sidebar"
import { useSpec } from "@/composables/openadmin-spec"
import { Icon } from "@iconify/vue"
import logo from "@/assets/images/logo.png"

const { data: spec } = useSpec()
const route = useRoute()
</script>

<template>
<Sidebar collapsible="icon">
<SidebarHeader>
<div class="flex items-center gap-2 px-2 py-1.5 group-data-[collapsible=icon]:p-0!">
<img :src="logo" alt="Logo" class="shrink-0 rounded-md object-contain size-7">
<div class="flex flex-col overflow-hidden group-data-[collapsible=icon]:hidden">
<span class="truncate text-sm font-semibold">{{ spec?.name ?? "Admin" }}</span>
<span v-if="spec?.description" class="text-muted-foreground truncate text-xs">
{{ spec.description }}
</span>
</div>
</div>
</SidebarHeader>
<SidebarContent>
<SidebarGroup v-for="section in spec?.sections ?? []" :key="section.id">
<SidebarGroupLabel>{{ section.name }}</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
<SidebarMenuItem v-for="page in section.pages" :key="page.id">
<SidebarMenuButton
as-child
:is-active="route.params.sectionId === section.id && route.params.pageId === page.id"
:tooltip="page.name"
>
<RouterLink
:to="{ name: 'page', params: { sectionId: section.id, pageId: page.id } }"
>
<Icon v-if="page.icon" :icon="`lucide:${page.icon}`" />
<span>{{ page.name }}</span>
</RouterLink>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>
</SidebarContent>
<SidebarRail />
</Sidebar>
</template>
24 changes: 24 additions & 0 deletions client/src/components/dashboard/ThemeToggle.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
SPDX-FileCopyrightText: 2026 OpenAdmin

SPDX-License-Identifier: AGPL-3.0-or-later
-->

<script setup lang="ts">
import { MoonIcon, SunIcon } from "@lucide/vue"
import { Button } from "@/components/ui/button"
import { isDark, toggleDark } from "@/composables/theme"
</script>

<template>
<Button
type="button"
variant="ghost"
size="icon"
:aria-label="isDark ? 'Switch to light theme' : 'Switch to dark theme'"
@click="toggleDark()"
>
<SunIcon v-if="isDark" />
<MoonIcon v-else />
</Button>
</template>
53 changes: 53 additions & 0 deletions client/src/components/dashboard/TopPanel.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!--
SPDX-FileCopyrightText: 2026 OpenAdmin

SPDX-License-Identifier: AGPL-3.0-or-later
-->

<script setup lang="ts">
import { Icon } from "@iconify/vue"
import { computed } from "vue"
import { useRoute } from "vue-router"
import ThemeToggle from "@/components/dashboard/ThemeToggle.vue"
import {
Breadcrumb,
BreadcrumbItem,
BreadcrumbList,
BreadcrumbPage,
BreadcrumbSeparator,
} from "@/components/ui/breadcrumb"
import { Separator } from "@/components/ui/separator"
import { SidebarTrigger } from "@/components/ui/sidebar"
import { usePageSpec } from "@/composables/openadmin-page"
import { useSectionSpec } from "@/composables/openadmin-section"

const route = useRoute()

const sectionId = computed(() => route.params.sectionId as string)
const pageId = computed(() => route.params.pageId as string)

const { data: section } = useSectionSpec({ sectionId })
const { page } = usePageSpec({ sectionId, pageId })
</script>

<template>
<header class="flex h-14 shrink-0 items-center gap-2 border-b px-4">
<SidebarTrigger />
<Separator orientation="vertical" class="mr-2 h-4" />
<Breadcrumb v-if="section && page">
<BreadcrumbList>
<BreadcrumbItem>
<span class="text-muted-foreground">{{ section.name }}</span>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage class="flex items-center gap-1.5">
<Icon v-if="page.icon" :icon="`lucide:${page.icon}`" />
{{ page.name }}
</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
<ThemeToggle class="ml-auto" />
</header>
</template>
31 changes: 31 additions & 0 deletions client/src/components/page/Action.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
SPDX-FileCopyrightText: 2026 OpenAdmin

SPDX-License-Identifier: AGPL-3.0-or-later
-->

<script setup lang="ts">
import { useColor } from "@/composables/colors"
import { Button } from "@/components/ui/button"
import { Icon } from "@iconify/vue"
import { useAction } from "@/composables/openadmin-action"

const props = defineProps<{
sectionId: string
pageId: string
actionId: string
}>()
const { action } = useAction({
sectionId: props.sectionId,
pageId: props.pageId,
actionId: props.actionId,
})
const { style } = useColor(() => action.value?.color || "slate")
</script>

<template>
<Button v-if="action" size="sm" variant="outline">
<Icon v-if="action.icon" :icon="`lucide:${action.icon}`" :class="style.text" />
{{ action.name }}
</Button>
</template>
Loading
Loading