@vitnode/blog 1.2.0-canary.20 → 1.2.0-canary.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/api/modules/categories/categories.module.js +1 -1
- package/dist/src/api/modules/categories/routes/create.route.js +1 -1
- package/dist/src/api/modules/categories/routes/delete.route.js +1 -1
- package/dist/src/api/modules/categories/routes/edit.route.js +1 -1
- package/dist/src/api/modules/categories/routes/get.route.js +1 -1
- package/dist/src/api/modules/posts/posts.module.js +1 -1
- package/dist/src/api/modules/posts/routes/create.route.js +1 -1
- package/dist/src/api/modules/posts/routes/delete.route.js +1 -1
- package/dist/src/api/modules/posts/routes/edit.route.js +1 -1
- package/dist/src/api/modules/posts/routes/get.route.js +1 -1
- package/dist/src/app_admin/blog/posts/page.d.ts +5 -0
- package/dist/src/app_admin/blog/posts/page.d.ts.map +1 -0
- package/dist/src/app_admin/blog/posts/page.js +1 -0
- package/dist/src/config.api.js +1 -1
- package/dist/src/config.d.ts +1 -3
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/const.d.ts +4 -0
- package/dist/src/const.d.ts.map +1 -0
- package/dist/src/const.js +1 -0
- package/dist/src/views/admin/posts/posts-admin-view.d.ts +4 -0
- package/dist/src/views/admin/posts/posts-admin-view.d.ts.map +1 -0
- package/dist/src/views/admin/posts/posts-admin-view.js +1 -0
- package/dist/src/views/admin/posts/row-actions/delete/delete-action.d.ts +5 -0
- package/dist/src/views/admin/posts/row-actions/delete/delete-action.d.ts.map +1 -0
- package/dist/src/views/admin/posts/row-actions/delete/delete-action.js +1 -0
- package/dist/src/views/admin/posts/row-actions/delete/mutation-api.d.ts +4 -0
- package/dist/src/views/admin/posts/row-actions/delete/mutation-api.d.ts.map +1 -0
- package/dist/src/views/admin/posts/row-actions/delete/mutation-api.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/app_admin/blog/posts/page.tsx +34 -0
- package/src/locales/en.json +15 -0
- package/dist/src/plugin.d.ts +0 -2
- package/dist/src/plugin.d.ts.map +0 -1
- package/dist/src/plugin.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitnode/blog",
|
|
3
|
-
"version": "1.2.0-canary.
|
|
3
|
+
"version": "1.2.0-canary.21",
|
|
4
4
|
"description": "Blog plugin for VitNode, providing a blogging platform with Next.js and Hono.js.",
|
|
5
5
|
"author": "VitNode Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"react-hook-form": "^7.57.0",
|
|
40
40
|
"sonner": "^2.0.5",
|
|
41
41
|
"zod": "^3.25.56",
|
|
42
|
-
"@vitnode/core": "1.2.0-canary.
|
|
42
|
+
"@vitnode/core": "1.2.0-canary.21"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@swc/cli": "0.6.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"eslint": "^9.25.1",
|
|
51
51
|
"tsc-alias": "^1.8.15",
|
|
52
52
|
"typescript": "^5.8.3",
|
|
53
|
-
"@vitnode/eslint-config": "1.2.0-canary.
|
|
53
|
+
"@vitnode/eslint-config": "1.2.0-canary.21"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build:plugins": "tsc && swc src -d dist --config-file .swcrc && tsc-alias -p tsconfig.json",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Metadata } from 'next';
|
|
2
|
+
|
|
3
|
+
import { I18nProvider } from '@vitnode/core/components/i18n-provider';
|
|
4
|
+
import { HeaderContent } from '@vitnode/core/components/ui/header-content';
|
|
5
|
+
import { getTranslations } from 'next-intl/server';
|
|
6
|
+
|
|
7
|
+
import { PostsAdminView } from '@/views/admin/posts/posts-admin-view';
|
|
8
|
+
|
|
9
|
+
export const generateMetadata = async (): Promise<Metadata> => {
|
|
10
|
+
const t = await getTranslations('@vitnode/blog.admin.nav');
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
title: t('posts'),
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default async function PostsPage(
|
|
18
|
+
params: React.ComponentProps<typeof PostsAdminView>,
|
|
19
|
+
) {
|
|
20
|
+
const [t, tNav] = await Promise.all([
|
|
21
|
+
getTranslations('@vitnode/blog.admin.posts'),
|
|
22
|
+
getTranslations('@vitnode/blog.admin.nav'),
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<I18nProvider namespaces={['@vitnode/blog.admin.posts']}>
|
|
27
|
+
<div className="container mx-auto p-4">
|
|
28
|
+
<HeaderContent desc={t('desc')} h1={tNav('posts')} />
|
|
29
|
+
|
|
30
|
+
<PostsAdminView {...params} />
|
|
31
|
+
</div>
|
|
32
|
+
</I18nProvider>
|
|
33
|
+
);
|
|
34
|
+
}
|
package/src/locales/en.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"title": "Blog",
|
|
4
4
|
"admin": {
|
|
5
5
|
"nav": {
|
|
6
|
+
"posts": "Posts",
|
|
6
7
|
"categories": "Categories"
|
|
7
8
|
},
|
|
8
9
|
"categories": {
|
|
@@ -32,6 +33,20 @@
|
|
|
32
33
|
"title": "Edit Category",
|
|
33
34
|
"submit": "Save Changes"
|
|
34
35
|
}
|
|
36
|
+
},
|
|
37
|
+
"posts": {
|
|
38
|
+
"desc": "Write and manage your blog posts.",
|
|
39
|
+
"table": {
|
|
40
|
+
"title": "Title",
|
|
41
|
+
"category": "Category",
|
|
42
|
+
"updated_at": "Updated At"
|
|
43
|
+
},
|
|
44
|
+
"delete": {
|
|
45
|
+
"title": "Delete Post",
|
|
46
|
+
"desc": "Are you sure you want to delete <title></title> post? This action cannot be undone.",
|
|
47
|
+
"confirm": "Yes, delete this post",
|
|
48
|
+
"success": "Post has been deleted successfully."
|
|
49
|
+
}
|
|
35
50
|
}
|
|
36
51
|
}
|
|
37
52
|
}
|
package/dist/src/plugin.d.ts
DELETED
package/dist/src/plugin.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,6EAatB,CAAC"}
|
package/dist/src/plugin.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as _jsx}from"react/jsx-runtime";import{buildPlugin}from"@vitnode/core/lib/plugin";import{ListIcon}from"lucide-react";import{CONFIG_PLUGIN}from"./config.js";export const blogPlugin=()=>{return buildPlugin({...CONFIG_PLUGIN,admin:{nav:[{id:"categories",href:"/admin/blog/categories",icon:_jsx(ListIcon,{})}]}})};
|