diff --git a/Dockerfile b/Dockerfile index 6ddc2de..1d3d637 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,12 +9,15 @@ FROM node:22-alpine AS runtime WORKDIR /app COPY --from=build /app/dist ./dist COPY --from=build /app/node_modules ./node_modules -COPY --from=build /app/data/skills ./data/skills +COPY --from=build /app/data ./data ENV HOST=0.0.0.0 ENV PORT=4321 ENV SKILLS_DIR=/app/data/skills -ENV SITE_URL=https://skills.here.run.place +ENV AGENTS_DIR=/app/data/agents +ENV OUTPUT_STYLES_DIR=/app/data/output-styles +ENV RULES_DIR=/app/data/rules +ENV SITE_URL=https://grimoi.red EXPOSE 4321 CMD ["node", "./dist/server/entry.mjs"] diff --git a/astro.config.mjs b/astro.config.mjs index b9212a3..57799db 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,7 +4,7 @@ import vue from '@astrojs/vue'; import tailwindcss from '@tailwindcss/vite'; export default defineConfig({ - site: process.env.SITE_URL || 'https://skills.here.run.place', + site: process.env.SITE_URL || 'https://grimoi.red', output: 'server', adapter: node({ mode: 'standalone' }), integrations: [vue()], diff --git a/grimoired.svg b/grimoired.svg new file mode 100644 index 0000000..bcfd27b --- /dev/null +++ b/grimoired.svg @@ -0,0 +1,18 @@ + + + + diff --git a/public/grimoired.svg b/public/grimoired.svg new file mode 100644 index 0000000..bcfd27b --- /dev/null +++ b/public/grimoired.svg @@ -0,0 +1,18 @@ + + + + diff --git a/src/components/DeleteButton.vue b/src/components/DeleteButton.vue index 45652fa..cf7d819 100644 --- a/src/components/DeleteButton.vue +++ b/src/components/DeleteButton.vue @@ -11,13 +11,13 @@ {{ deleting ? 'Deleting...' : 'Delete' }} - +
-

Delete Skill

+

Delete Resource

- This skill is owned by {{ authorName || authorEmail }}. Enter your token to delete it. + This resource is owned by {{ authorName || authorEmail }}. Enter your token to delete it.

@@ -65,8 +65,11 @@ const props = defineProps<{ authorEmail?: string; authorName?: string; authorHasToken?: boolean; + resourceType?: string; }>(); +const type = props.resourceType || 'skills'; + const deleting = ref(false); const showModal = ref(false); const token = ref(''); @@ -75,8 +78,7 @@ const tokenInput = ref(); async function handleClick() { if (props.authorEmail && props.authorHasToken) { - // Try saved token first - const saved = localStorage.getItem('skillshere-token') || ''; + const saved = localStorage.getItem('grimoired-token') || ''; if (saved) { try { const res = await fetch('/api/auth/verify', { @@ -100,7 +102,6 @@ async function handleClick() { } async function verifyAndDelete() { - // Verify token first error.value = ''; deleting.value = true; @@ -123,7 +124,7 @@ async function verifyAndDelete() { return; } - localStorage.setItem('skillshere-token', token.value); + localStorage.setItem('grimoired-token', token.value); doDelete(token.value); } @@ -142,7 +143,7 @@ async function doDelete(authToken: string) { headers['Authorization'] = `Bearer ${authToken}`; } - const res = await fetch(`/api/skills/${props.slug}`, { method: 'DELETE', headers }); + const res = await fetch(`/api/resources/${type}/${props.slug}`, { method: 'DELETE', headers }); if (res.status === 403) { const data = await res.json(); error.value = data.error || 'Permission denied'; @@ -156,7 +157,7 @@ async function doDelete(authToken: string) { } window.location.href = '/'; } catch (err) { - error.value = err instanceof Error ? err.message : 'Failed to delete skill.'; + error.value = err instanceof Error ? err.message : 'Failed to delete.'; deleting.value = false; } } diff --git a/src/components/EditGate.vue b/src/components/EditGate.vue index 642f09a..a9ec8fb 100644 --- a/src/components/EditGate.vue +++ b/src/components/EditGate.vue @@ -16,7 +16,7 @@

Author Verification

- This skill is owned by {{ authorName || authorEmail }}. Enter your token to edit. + This resource is owned by {{ authorName || authorEmail }}. Enter your token to edit.

@@ -44,7 +44,7 @@