@vitnode/core 1.2.0-canary.16 → 1.2.0-canary.17
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/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/config.js +3 -3
- package/dist/src/api/lib/check-plugin-id.js +1 -1
- package/dist/src/api/lib/plugin.js +1 -1
- package/dist/src/api/lib/route.js +1 -1
- package/dist/src/api/middlewares/global/global.js +3 -3
- package/dist/src/api/models/device.js +3 -3
- package/dist/src/api/models/session-admin.js +3 -3
- package/dist/src/api/models/session.js +3 -3
- package/dist/src/api/models/sso.js +4 -4
- package/dist/src/api/models/user/get-user-by-id.js +1 -1
- package/dist/src/api/models/user/sign-in-with-passwords.js +2 -2
- package/dist/src/api/models/user/sign-up.js +5 -5
- package/dist/src/api/models/user.js +3 -3
- package/dist/src/api/modules/admin/admin.module.js +4 -4
- package/dist/src/api/modules/admin/routes/session.route.js +2 -2
- package/dist/src/api/modules/admin/users/routes/list.route.js +4 -4
- package/dist/src/api/modules/admin/users/routes/users.route.js +4 -4
- package/dist/src/api/modules/admin/users/users.admin.module.js +3 -3
- package/dist/src/api/modules/middleware/middleware.module.js +3 -3
- package/dist/src/api/modules/middleware/route.js +3 -3
- package/dist/src/api/modules/users/avatar-color.js +1 -1
- package/dist/src/api/modules/users/routes/session.route.js +3 -3
- package/dist/src/api/modules/users/routes/sign-in.route.js +5 -5
- package/dist/src/api/modules/users/routes/sign-out.route.js +4 -4
- package/dist/src/api/modules/users/routes/sign-up.route.js +4 -4
- package/dist/src/api/modules/users/routes/test.route.js +2 -2
- package/dist/src/api/modules/users/sso/routes/callback.route.js +4 -4
- package/dist/src/api/modules/users/sso/routes/create-url.route.js +3 -3
- package/dist/src/api/modules/users/sso/sso.module.js +4 -4
- package/dist/src/api/modules/users/users.module.js +8 -8
- package/dist/src/api/plugin.js +5 -5
- package/dist/src/api/plugins/sso/discord.js +1 -1
- package/dist/src/api/plugins/sso/facebook.js +1 -1
- package/dist/src/api/plugins/sso/google.js +1 -1
- package/dist/src/app/login/page.js +1 -1
- package/dist/src/app/login/sso/[providerId]/page.js +1 -1
- package/dist/src/app/register/page.js +1 -1
- package/dist/src/app_admin/core/page.js +1 -1
- package/dist/src/app_admin/core/test/page.js +1 -1
- package/dist/src/app_admin/core/users/page.js +3 -3
- package/dist/src/components/avatar.js +1 -1
- package/dist/src/components/date-format.js +1 -1
- package/dist/src/components/form/auto-form.js +5 -5
- package/dist/src/components/form/common/desc.js +1 -1
- package/dist/src/components/form/common/label.js +1 -1
- package/dist/src/components/form/fields/checkbox.js +4 -4
- package/dist/src/components/form/fields/combobox.js +8 -8
- package/dist/src/components/form/fields/input.js +4 -4
- package/dist/src/components/form/fields/item.js +2 -2
- package/dist/src/components/form/fields/radio-group.js +5 -5
- package/dist/src/components/form/fields/select.js +5 -5
- package/dist/src/components/form/fields/switch.js +4 -4
- package/dist/src/components/form/fields/textarea.js +4 -4
- package/dist/src/components/logo-vitnode.js +1 -1
- package/dist/src/components/switchers/theme-switcher.js +1 -1
- package/dist/src/components/table/content.js +4 -4
- package/dist/src/components/table/data-table.js +4 -4
- package/dist/src/components/table/order-table-head.js +3 -3
- package/dist/src/components/table/pagination.js +4 -4
- package/dist/src/components/ui/accordion.js +1 -1
- package/dist/src/components/ui/alert-dialog.js +2 -2
- package/dist/src/components/ui/alert.js +1 -1
- package/dist/src/components/ui/badge.js +1 -1
- package/dist/src/components/ui/button.js +2 -2
- package/dist/src/components/ui/card.js +1 -1
- package/dist/src/components/ui/checkbox.js +1 -1
- package/dist/src/components/ui/command.js +2 -2
- package/dist/src/components/ui/context-menu.js +1 -1
- package/dist/src/components/ui/dialog.js +2 -2
- package/dist/src/components/ui/drawer.js +1 -1
- package/dist/src/components/ui/dropdown-menu.js +1 -1
- package/dist/src/components/ui/form.js +5 -5
- package/dist/src/components/ui/header-content.js +1 -1
- package/dist/src/components/ui/hover-card.js +1 -1
- package/dist/src/components/ui/input-otp.js +1 -1
- package/dist/src/components/ui/input.js +1 -1
- package/dist/src/components/ui/label.js +1 -1
- package/dist/src/components/ui/loader.js +1 -1
- package/dist/src/components/ui/menubar.js +1 -1
- package/dist/src/components/ui/navigation-menu.js +1 -1
- package/dist/src/components/ui/popover.js +1 -1
- package/dist/src/components/ui/progress.js +1 -1
- package/dist/src/components/ui/radio-group.js +1 -1
- package/dist/src/components/ui/select.js +1 -1
- package/dist/src/components/ui/separator.js +1 -1
- package/dist/src/components/ui/sheet.js +1 -1
- package/dist/src/components/ui/sidebar.js +8 -8
- package/dist/src/components/ui/skeleton.js +1 -1
- package/dist/src/components/ui/slider.js +1 -1
- package/dist/src/components/ui/sonner.js +1 -1
- package/dist/src/components/ui/switch.js +1 -1
- package/dist/src/components/ui/table.js +1 -1
- package/dist/src/components/ui/tabs.js +1 -1
- package/dist/src/components/ui/textarea.js +1 -1
- package/dist/src/components/ui/toggle-group.js +2 -2
- package/dist/src/components/ui/toggle.js +1 -1
- package/dist/src/components/ui/tooltip.js +1 -1
- package/dist/src/database/admins.js +3 -3
- package/dist/src/database/moderators.js +2 -2
- package/dist/src/database/sessions.js +1 -1
- package/dist/src/database/users.js +2 -2
- package/dist/src/drizzle.config.d.ts.map +1 -1
- package/dist/src/drizzle.config.js +4 -6
- package/dist/src/lib/api/get-middleware-api.js +2 -2
- package/dist/src/lib/api/get-session-admin-api.js +3 -3
- package/dist/src/lib/api/get-session-api.js +2 -2
- package/dist/src/lib/colors.test.js +1 -1
- package/dist/src/lib/fetcher/cookie-from-string-to-object.test.js +1 -1
- package/dist/src/lib/fetcher/helpers.js +1 -1
- package/dist/src/lib/fetcher/helpers.test.js +1 -1
- package/dist/src/lib/fetcher.js +2 -2
- package/dist/src/lib/helpers/auto-form.test.js +1 -1
- package/dist/src/lib/special-characters.test.js +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +7 -7
- package/dist/src/views/admin/layouts/sidebar/nav/item.js +5 -5
- package/dist/src/views/admin/layouts/sidebar/nav/nav.js +2 -2
- package/dist/src/views/admin/layouts/sidebar/sidebar.js +5 -5
- package/dist/src/views/admin/layouts/sidebar/sign-out.js +2 -2
- package/dist/src/views/admin/layouts/user-bar/client.js +3 -3
- package/dist/src/views/admin/layouts/user-bar/user-bar.js +4 -4
- package/dist/src/views/admin/sign-in/sign-in-admin-view.js +4 -4
- package/dist/src/views/admin/views/core/dashboard/dashboard-admin-view.js +4 -4
- package/dist/src/views/admin/views/core/test.js +8 -8
- package/dist/src/views/admin/views/core/users/users-admin-view.js +6 -6
- package/dist/src/views/auth/components/password-input.js +4 -4
- package/dist/src/views/auth/sign-in/form/form.js +4 -4
- package/dist/src/views/auth/sign-in/form/hooks/mutation-api.js +3 -3
- package/dist/src/views/auth/sign-in/form/hooks/use-form.js +1 -1
- package/dist/src/views/auth/sign-in/sign-in-view.js +5 -5
- package/dist/src/views/auth/sign-up/form/form.js +7 -7
- package/dist/src/views/auth/sign-up/form/hooks/mutation-api.js +2 -2
- package/dist/src/views/auth/sign-up/form/hooks/use-form.js +1 -1
- package/dist/src/views/auth/sign-up/sign-up-view.js +6 -6
- package/dist/src/views/auth/sso/buttons/client.js +2 -2
- package/dist/src/views/auth/sso/buttons/mutation-api.js +3 -3
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +3 -3
- package/dist/src/views/auth/sso/callback/callback-sso-view.js +2 -2
- package/dist/src/views/auth/sso/callback/client/client.js +4 -4
- package/dist/src/views/auth/sso/callback/client/mutation-api.js +2 -2
- package/dist/src/views/error/back-button.js +2 -2
- package/dist/src/views/error/error-view.js +4 -4
- package/dist/src/views/error/global-error-view.js +2 -2
- package/dist/src/views/layouts/provider.js +2 -2
- package/dist/src/views/layouts/root-layout.js +2 -2
- package/dist/src/views/layouts/theme/header/header.js +5 -5
- package/dist/src/views/layouts/theme/header/user/auth/auth.js +5 -5
- package/dist/src/views/layouts/theme/header/user/auth/client.js +3 -3
- package/dist/src/views/layouts/theme/header/user/auth/log-out-mutation-api.js +3 -3
- package/dist/src/views/layouts/theme/header/user/user.js +5 -5
- package/dist/src/views/layouts/theme/layout.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/drizzle.config.ts +4 -8
- package/src/database/admins.ts +0 -87
- package/src/database/languages.ts +0 -54
- package/src/database/moderators.ts +0 -42
- package/src/database/roles.ts +0 -15
- package/src/database/sessions.ts +0 -59
- package/src/database/users.ts +0 -142
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { relations } from "drizzle-orm";
|
|
2
2
|
import { index, pgTable } from "drizzle-orm/pg-core";
|
|
3
|
-
import { core_languages } from "./languages";
|
|
4
|
-
import { core_roles } from "./roles";
|
|
3
|
+
import { core_languages } from "./languages.js";
|
|
4
|
+
import { core_roles } from "./roles.js";
|
|
5
5
|
export const core_users = pgTable('core_users', (t)=>({
|
|
6
6
|
id: t.serial().primaryKey(),
|
|
7
7
|
nameCode: t.varchar({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drizzle.config.d.ts","sourceRoot":"","sources":["../../src/drizzle.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAM1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,eAAO,MAAM,0BAA0B,GAAI,+BAGxC,MAAM,GAAG;IACV,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,
|
|
1
|
+
{"version":3,"file":"drizzle.config.d.ts","sourceRoot":"","sources":["../../src/drizzle.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAM1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,eAAO,MAAM,0BAA0B,GAAI,+BAGxC,MAAM,GAAG;IACV,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,WA4CA,CAAC"}
|
|
@@ -7,7 +7,7 @@ export const defineVitNodeDrizzleConfig = ({ vitNodeApiConfig, ...args })=>{
|
|
|
7
7
|
'@vitnode/core',
|
|
8
8
|
...pluginId
|
|
9
9
|
].map((itemId)=>{
|
|
10
|
-
const pluginPath = resolve(process.cwd(), 'node_modules', itemId, 'src', 'database');
|
|
10
|
+
const pluginPath = resolve(process.cwd(), 'node_modules', itemId, 'dist', 'src', 'database');
|
|
11
11
|
// Check if the plugin path exists
|
|
12
12
|
if (!existsSync(pluginPath)) {
|
|
13
13
|
return null;
|
|
@@ -15,12 +15,10 @@ export const defineVitNodeDrizzleConfig = ({ vitNodeApiConfig, ...args })=>{
|
|
|
15
15
|
// Check if there are any .ts files in the directory
|
|
16
16
|
try {
|
|
17
17
|
const files = readdirSync(pluginPath);
|
|
18
|
-
const hasSchemaFiles = files.some((file)=>file.endsWith('.
|
|
19
|
-
if (!hasSchemaFiles)
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
18
|
+
const hasSchemaFiles = files.some((file)=>file.endsWith('.js'));
|
|
19
|
+
if (!hasSchemaFiles) return null;
|
|
22
20
|
// Return glob pattern for schema files
|
|
23
|
-
return join(pluginPath, '*.
|
|
21
|
+
return join(pluginPath, '*.js').replace(/\\/g, '/');
|
|
24
22
|
} catch {
|
|
25
23
|
return null;
|
|
26
24
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { middlewareModule } from "../../api/modules/middleware/middleware.module";
|
|
2
|
-
import { fetcher } from "../fetcher";
|
|
1
|
+
import { middlewareModule } from "../../api/modules/middleware/middleware.module.js";
|
|
2
|
+
import { fetcher } from "../fetcher.js";
|
|
3
3
|
export const getMiddlewareApi = async ()=>{
|
|
4
4
|
const res = await fetcher(middlewareModule, {
|
|
5
5
|
path: '/',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { adminModule } from "../../api/modules/admin/admin.module";
|
|
2
|
-
import { fetcher } from "../fetcher";
|
|
3
|
-
import { redirect } from "../navigation";
|
|
1
|
+
import { adminModule } from "../../api/modules/admin/admin.module.js";
|
|
2
|
+
import { fetcher } from "../fetcher.js";
|
|
3
|
+
import { redirect } from "../navigation.js";
|
|
4
4
|
export const getSessionAdminApi = async ()=>{
|
|
5
5
|
const res = await fetcher(adminModule, {
|
|
6
6
|
path: '/session',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { usersModule } from "../../api/modules/users/users.module";
|
|
2
|
-
import { fetcher } from "../fetcher";
|
|
1
|
+
import { usersModule } from "../../api/modules/users/users.module.js";
|
|
2
|
+
import { fetcher } from "../fetcher.js";
|
|
3
3
|
export const getSessionApi = async ()=>{
|
|
4
4
|
const res = await fetcher(usersModule, {
|
|
5
5
|
path: '/session',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { checkColorType, convertColor, getHSLFromString, getStringFromHSL } from "./colors";
|
|
2
|
+
import { checkColorType, convertColor, getHSLFromString, getStringFromHSL } from "./colors.js";
|
|
3
3
|
describe('convertColor', ()=>{
|
|
4
4
|
describe('hslToHex', ()=>{
|
|
5
5
|
it('should convert HSL to hex correctly', ()=>{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { cookieFromStringToObject } from "./cookie-from-string-to-object";
|
|
2
|
+
import { cookieFromStringToObject } from "./cookie-from-string-to-object.js";
|
|
3
3
|
describe('cookieFromStringToObject', ()=>{
|
|
4
4
|
it('should parse a simple cookie string', ()=>{
|
|
5
5
|
const cookies = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cookies } from "next/headers";
|
|
2
|
-
import { cookieFromStringToObject } from "./cookie-from-string-to-object";
|
|
2
|
+
import { cookieFromStringToObject } from "./cookie-from-string-to-object.js";
|
|
3
3
|
export const handleSetCookiesFetcher = async (res)=>{
|
|
4
4
|
await Promise.all(cookieFromStringToObject(res.headers.getSetCookie()).map(async (cookie)=>{
|
|
5
5
|
const key = Object.keys(cookie)[0];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { buildSearchParams } from "./helpers";
|
|
2
|
+
import { buildSearchParams } from "./helpers.js";
|
|
3
3
|
describe('buildSearchParams', ()=>{
|
|
4
4
|
it('should handle empty query object', ()=>{
|
|
5
5
|
const params = buildSearchParams({});
|
package/dist/src/lib/fetcher.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cookies, headers } from "next/headers";
|
|
2
|
-
import { CONFIG } from "./config";
|
|
3
|
-
import { buildSearchParams, handleSetCookiesFetcher } from "./fetcher/helpers";
|
|
2
|
+
import { CONFIG } from "./config.js";
|
|
3
|
+
import { buildSearchParams, handleSetCookiesFetcher } from "./fetcher/helpers.js";
|
|
4
4
|
export async function fetcher({ pluginId }, { path, method, module, args, options, allowSaveCookies = false, withPagination = false }) {
|
|
5
5
|
let currentPath = path;
|
|
6
6
|
// Replace path parameters
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { getBaseSchema, getBaseType, getDefaultValueInZodStack, getDefaultValues, getObjectFormSchema, getShapeFromSchema } from "./auto-form";
|
|
3
|
+
import { getBaseSchema, getBaseType, getDefaultValueInZodStack, getDefaultValues, getObjectFormSchema, getShapeFromSchema } from "./auto-form.js";
|
|
4
4
|
describe('auto-form helpers', ()=>{
|
|
5
5
|
describe('getShapeFromSchema', ()=>{
|
|
6
6
|
it('should get shape from ZodObject', ()=>{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { checkSpecialCharacters, removeSpecialCharacters } from "./special-characters";
|
|
2
|
+
import { checkSpecialCharacters, removeSpecialCharacters } from "./special-characters.js";
|
|
3
3
|
describe('removeSpecialCharacters', ()=>{
|
|
4
4
|
it('should remove diacritics and replace spaces with hyphens', ()=>{
|
|
5
5
|
expect(removeSpecialCharacters('héllo wörld')).toBe('hello-world');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslations } from "next-intl/server";
|
|
3
3
|
import { cookies } from "next/headers";
|
|
4
|
-
import { ThemeSwitcher } from "../../../components/switchers/theme-switcher";
|
|
5
|
-
import { SidebarProvider, SidebarTrigger } from "../../../components/ui/sidebar";
|
|
6
|
-
import { SidebarInset } from "../../../components/ui/sidebar";
|
|
7
|
-
import { getSessionAdminApi } from "../../../lib/api/get-session-admin-api";
|
|
8
|
-
import { I18nProvider } from "../../../components/i18n-provider";
|
|
9
|
-
import { SidebarAdmin } from "./sidebar/sidebar";
|
|
10
|
-
import { UserBarAdmin } from "./user-bar/user-bar";
|
|
4
|
+
import { ThemeSwitcher } from "../../../components/switchers/theme-switcher.js";
|
|
5
|
+
import { SidebarProvider, SidebarTrigger } from "../../../components/ui/sidebar.js";
|
|
6
|
+
import { SidebarInset } from "../../../components/ui/sidebar.js";
|
|
7
|
+
import { getSessionAdminApi } from "../../../lib/api/get-session-admin-api.js";
|
|
8
|
+
import { I18nProvider } from "../../../components/i18n-provider.js";
|
|
9
|
+
import { SidebarAdmin } from "./sidebar/sidebar.js";
|
|
10
|
+
import { UserBarAdmin } from "./user-bar/user-bar.js";
|
|
11
11
|
export const AdminLayout = async ({ children, vitNodeConfig })=>{
|
|
12
12
|
const t = await getTranslations();
|
|
13
13
|
const session = await getSessionAdminApi();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronRight, MenuIcon } from "lucide-react";
|
|
4
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../../components/ui/collapsible";
|
|
5
|
-
import { SidebarMenuButton } from "../../../../../components/ui/sidebar";
|
|
6
|
-
import { SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem } from "../../../../../components/ui/sidebar";
|
|
7
|
-
import { Link } from "../../../../../lib/navigation";
|
|
8
|
-
import { cn } from "../../../../../lib/utils";
|
|
4
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../../components/ui/collapsible.js";
|
|
5
|
+
import { SidebarMenuButton } from "../../../../../components/ui/sidebar.js";
|
|
6
|
+
import { SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem } from "../../../../../components/ui/sidebar.js";
|
|
7
|
+
import { Link } from "../../../../../lib/navigation.js";
|
|
8
|
+
import { cn } from "../../../../../lib/utils.js";
|
|
9
9
|
export const ItemNavAdmin = ({ href, title, icon, items = [], isOpenInNewTab })=>{
|
|
10
10
|
const content = /*#__PURE__*/ _jsxs(_Fragment, {
|
|
11
11
|
children: [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { LayoutDashboardIcon, UsersRoundIcon } from "lucide-react";
|
|
3
3
|
import { getTranslations } from "next-intl/server";
|
|
4
|
-
import { SidebarGroup, SidebarGroupLabel, SidebarMenu } from "../../../../../components/ui/sidebar";
|
|
5
|
-
import { ItemNavAdmin } from "./item";
|
|
4
|
+
import { SidebarGroup, SidebarGroupLabel, SidebarMenu } from "../../../../../components/ui/sidebar.js";
|
|
5
|
+
import { ItemNavAdmin } from "./item.js";
|
|
6
6
|
export const NavSidebarAdmin = async ({ pluginNav })=>{
|
|
7
7
|
const t = await getTranslations('admin.global.nav');
|
|
8
8
|
const rootItems = [
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { LogoVitNode } from "../../../../components/logo-vitnode";
|
|
3
|
-
import { Sidebar } from "../../../../components/ui/sidebar";
|
|
4
|
-
import { SidebarContent, SidebarHeader } from "../../../../components/ui/sidebar";
|
|
5
|
-
import { Link } from "../../../../lib/navigation";
|
|
6
|
-
import { NavSidebarAdmin } from "./nav/nav";
|
|
2
|
+
import { LogoVitNode } from "../../../../components/logo-vitnode.js";
|
|
3
|
+
import { Sidebar } from "../../../../components/ui/sidebar.js";
|
|
4
|
+
import { SidebarContent, SidebarHeader } from "../../../../components/ui/sidebar.js";
|
|
5
|
+
import { Link } from "../../../../lib/navigation.js";
|
|
6
|
+
import { NavSidebarAdmin } from "./nav/nav.js";
|
|
7
7
|
export const SidebarAdmin = ({ pluginNav })=>{
|
|
8
8
|
return /*#__PURE__*/ _jsxs(Sidebar, {
|
|
9
9
|
variant: "floating",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { DropdownMenuItem } from "../../../../components/ui/dropdown-menu";
|
|
4
|
-
import { logOutMutationApi } from "../../../layouts/theme/header/user/auth/log-out-mutation-api";
|
|
3
|
+
import { DropdownMenuItem } from "../../../../components/ui/dropdown-menu.js";
|
|
4
|
+
import { logOutMutationApi } from "../../../layouts/theme/header/user/auth/log-out-mutation-api.js";
|
|
5
5
|
export const SignOutUserFooterSidebarAdmin = ({ children })=>{
|
|
6
6
|
return /*#__PURE__*/ _jsx(DropdownMenuItem, {
|
|
7
7
|
onClick: async ()=>{
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { HomeIcon, LogOut } from "lucide-react";
|
|
4
4
|
import { useTranslations } from "next-intl";
|
|
5
|
-
import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator } from "../../../../components/ui/dropdown-menu";
|
|
6
|
-
import { Link } from "../../../../lib/navigation";
|
|
7
|
-
import { logOutMutationApi } from "../../../layouts/theme/header/user/auth/log-out-mutation-api";
|
|
5
|
+
import { DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator } from "../../../../components/ui/dropdown-menu.js";
|
|
6
|
+
import { Link } from "../../../../lib/navigation.js";
|
|
7
|
+
import { logOutMutationApi } from "../../../layouts/theme/header/user/auth/log-out-mutation-api.js";
|
|
8
8
|
export const ClientUserBarAdmin = ({ user })=>{
|
|
9
9
|
const t = useTranslations('core.global.user_bar');
|
|
10
10
|
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Avatar } from "../../../../components/avatar";
|
|
4
|
-
import { Button } from "../../../../components/ui/button";
|
|
5
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "../../../../components/ui/dropdown-menu";
|
|
6
|
-
import { ClientUserBarAdmin } from "./client";
|
|
3
|
+
import { Avatar } from "../../../../components/avatar.js";
|
|
4
|
+
import { Button } from "../../../../components/ui/button.js";
|
|
5
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "../../../../components/ui/dropdown-menu.js";
|
|
6
|
+
import { ClientUserBarAdmin } from "./client.js";
|
|
7
7
|
export const UserBarAdmin = ({ user })=>{
|
|
8
8
|
return /*#__PURE__*/ _jsxs(DropdownMenu, {
|
|
9
9
|
children: [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { I18nProvider } from "../../../components/i18n-provider";
|
|
3
|
-
import { LogoVitNode } from "../../../components/logo-vitnode";
|
|
4
|
-
import { Card } from "../../../components/ui/card";
|
|
5
|
-
import { FormSignIn } from "../../auth/sign-in/form/form";
|
|
2
|
+
import { I18nProvider } from "../../../components/i18n-provider.js";
|
|
3
|
+
import { LogoVitNode } from "../../../components/logo-vitnode.js";
|
|
4
|
+
import { Card } from "../../../components/ui/card.js";
|
|
5
|
+
import { FormSignIn } from "../../auth/sign-in/form/form.js";
|
|
6
6
|
export const SignInAdminView = ()=>{
|
|
7
7
|
return /*#__PURE__*/ _jsx(I18nProvider, {
|
|
8
8
|
namespaces: [
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { AlertTriangleIcon } from "lucide-react";
|
|
3
3
|
import { getTranslations } from "next-intl/server";
|
|
4
|
-
import { Badge } from "../../../../../components/ui/badge";
|
|
5
|
-
import { HeaderContent } from "../../../../../components/ui/header-content";
|
|
6
|
-
import { getSessionAdminApi } from "../../../../../lib/api/get-session-admin-api";
|
|
7
|
-
import { CONFIG } from "../../../../../lib/config";
|
|
4
|
+
import { Badge } from "../../../../../components/ui/badge.js";
|
|
5
|
+
import { HeaderContent } from "../../../../../components/ui/header-content.js";
|
|
6
|
+
import { getSessionAdminApi } from "../../../../../lib/api/get-session-admin-api.js";
|
|
7
|
+
import { CONFIG } from "../../../../../lib/config.js";
|
|
8
8
|
export const DashboardAdminView = async ()=>{
|
|
9
9
|
const session = await getSessionAdminApi();
|
|
10
10
|
const t = await getTranslations('admin.dashboard');
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { AutoForm } from "../../../../components/form/auto-form";
|
|
5
|
-
import { AutoFormCheckbox } from "../../../../components/form/fields/checkbox";
|
|
6
|
-
import { AutoFormCombobox } from "../../../../components/form/fields/combobox";
|
|
7
|
-
import { AutoFormInput } from "../../../../components/form/fields/input";
|
|
8
|
-
import { AutoFormRadioGroup } from "../../../../components/form/fields/radio-group";
|
|
9
|
-
import { AutoFormSelect } from "../../../../components/form/fields/select";
|
|
10
|
-
import { AutoFormSwitch } from "../../../../components/form/fields/switch";
|
|
11
|
-
import { AutoFormTextarea } from "../../../../components/form/fields/textarea";
|
|
4
|
+
import { AutoForm } from "../../../../components/form/auto-form.js";
|
|
5
|
+
import { AutoFormCheckbox } from "../../../../components/form/fields/checkbox.js";
|
|
6
|
+
import { AutoFormCombobox } from "../../../../components/form/fields/combobox.js";
|
|
7
|
+
import { AutoFormInput } from "../../../../components/form/fields/input.js";
|
|
8
|
+
import { AutoFormRadioGroup } from "../../../../components/form/fields/radio-group.js";
|
|
9
|
+
import { AutoFormSelect } from "../../../../components/form/fields/select.js";
|
|
10
|
+
import { AutoFormSwitch } from "../../../../components/form/fields/switch.js";
|
|
11
|
+
import { AutoFormTextarea } from "../../../../components/form/fields/textarea.js";
|
|
12
12
|
export const TestView = ()=>{
|
|
13
13
|
const formSchema = z.object({
|
|
14
14
|
provider: z.string().min(1, {
|
|
@@ -2,12 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { MailIcon } from "lucide-react";
|
|
3
3
|
import { getTranslations } from "next-intl/server";
|
|
4
4
|
import React from "react";
|
|
5
|
-
import { adminModule } from "../../../../../api/modules/admin/admin.module";
|
|
6
|
-
import { Avatar } from "../../../../../components/avatar";
|
|
7
|
-
import { DateFormat } from "../../../../../components/date-format";
|
|
8
|
-
import { DataTable } from "../../../../../components/table/data-table";
|
|
9
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../../../components/ui/tooltip";
|
|
10
|
-
import { fetcher } from "../../../../../lib/fetcher";
|
|
5
|
+
import { adminModule } from "../../../../../api/modules/admin/admin.module.js";
|
|
6
|
+
import { Avatar } from "../../../../../components/avatar.js";
|
|
7
|
+
import { DateFormat } from "../../../../../components/date-format.js";
|
|
8
|
+
import { DataTable } from "../../../../../components/table/data-table.js";
|
|
9
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../../../components/ui/tooltip.js";
|
|
10
|
+
import { fetcher } from "../../../../../lib/fetcher.js";
|
|
11
11
|
export const UsersAdminView = async ({ searchParams })=>{
|
|
12
12
|
const t = await getTranslations('admin.user.list');
|
|
13
13
|
const query = await searchParams;
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { CheckIcon, XIcon } from "lucide-react";
|
|
3
3
|
import { useTranslations } from "next-intl";
|
|
4
4
|
import React from "react";
|
|
5
|
-
import { AutoFormLabel } from "../../../components/form/common/label";
|
|
6
|
-
import { FormControl, FormItem, FormMessage } from "../../../components/ui/form";
|
|
7
|
-
import { Input } from "../../../components/ui/input";
|
|
8
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../components/ui/tooltip";
|
|
5
|
+
import { AutoFormLabel } from "../../../components/form/common/label.js";
|
|
6
|
+
import { FormControl, FormItem, FormMessage } from "../../../components/ui/form.js";
|
|
7
|
+
import { Input } from "../../../components/ui/input.js";
|
|
8
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../components/ui/tooltip.js";
|
|
9
9
|
export const PasswordInput = ({ value: valueFromProps, ...props })=>{
|
|
10
10
|
const t = useTranslations('core.auth.sign_up');
|
|
11
11
|
const [openTooltip, setOpenTooltip] = React.useState(false);
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { AlertCircle } from "lucide-react";
|
|
4
4
|
import { useTranslations } from "next-intl";
|
|
5
|
-
import { AutoForm } from "../../../../components/form/auto-form";
|
|
6
|
-
import { AutoFormInput } from "../../../../components/form/fields/input";
|
|
7
|
-
import { Alert, AlertDescription, AlertTitle } from "../../../../components/ui/alert";
|
|
8
|
-
import { useFormSignIn } from "./hooks/use-form";
|
|
5
|
+
import { AutoForm } from "../../../../components/form/auto-form.js";
|
|
6
|
+
import { AutoFormInput } from "../../../../components/form/fields/input.js";
|
|
7
|
+
import { Alert, AlertDescription, AlertTitle } from "../../../../components/ui/alert.js";
|
|
8
|
+
import { useFormSignIn } from "./hooks/use-form.js";
|
|
9
9
|
export const FormSignIn = ({ isAdmin })=>{
|
|
10
10
|
const t = useTranslations('core.auth.sign_in');
|
|
11
11
|
const { onSubmit, error, formSchema } = useFormSignIn({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
import { revalidatePath } from "next/cache";
|
|
3
|
-
import { usersModule } from "../../../../../api/modules/users/users.module";
|
|
4
|
-
import { fetcher } from "../../../../../lib/fetcher";
|
|
5
|
-
import { redirect } from "../../../../../lib/navigation";
|
|
3
|
+
import { usersModule } from "../../../../../api/modules/users/users.module.js";
|
|
4
|
+
import { fetcher } from "../../../../../lib/fetcher.js";
|
|
5
|
+
import { redirect } from "../../../../../lib/navigation.js";
|
|
6
6
|
export const mutationApi = async (input)=>{
|
|
7
7
|
const res = await fetcher(usersModule, {
|
|
8
8
|
path: '/sign_in',
|
|
@@ -2,7 +2,7 @@ import { useTranslations } from "next-intl";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { toast } from "sonner";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
import { mutationApi } from "./mutation-api";
|
|
5
|
+
import { mutationApi } from "./mutation-api.js";
|
|
6
6
|
export const useFormSignIn = ({ isAdmin })=>{
|
|
7
7
|
const [error, setError] = React.useState('');
|
|
8
8
|
const t = useTranslations('core.auth.sign_in');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslations } from "next-intl/server";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Card, CardDescription } from "../../../components/ui/card";
|
|
5
|
-
import { Link } from "../../../lib/navigation";
|
|
6
|
-
import { I18nProvider } from "../../../components/i18n-provider";
|
|
7
|
-
import { SSOButtons, SSOButtonsSkeleton } from "../sso/buttons/sso-buttons";
|
|
8
|
-
import { FormSignIn } from "./form/form";
|
|
4
|
+
import { Card, CardDescription } from "../../../components/ui/card.js";
|
|
5
|
+
import { Link } from "../../../lib/navigation.js";
|
|
6
|
+
import { I18nProvider } from "../../../components/i18n-provider.js";
|
|
7
|
+
import { SSOButtons, SSOButtonsSkeleton } from "../sso/buttons/sso-buttons.js";
|
|
8
|
+
import { FormSignIn } from "./form/form.js";
|
|
9
9
|
export const SignInView = async ()=>{
|
|
10
10
|
const t = await getTranslations('core.auth.sign_in');
|
|
11
11
|
const tGlobal = await getTranslations('core.global');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useTranslations } from "next-intl";
|
|
4
|
-
import { AutoForm } from "../../../../components/form/auto-form";
|
|
5
|
-
import { AutoFormCheckbox } from "../../../../components/form/fields/checkbox";
|
|
6
|
-
import { AutoFormInput } from "../../../../components/form/fields/input";
|
|
7
|
-
import { Link } from "../../../../lib/navigation";
|
|
8
|
-
import { removeSpecialCharacters } from "../../../../lib/special-characters";
|
|
9
|
-
import { PasswordInput } from "../../components/password-input";
|
|
10
|
-
import { useFormSignUp } from "./hooks/use-form";
|
|
4
|
+
import { AutoForm } from "../../../../components/form/auto-form.js";
|
|
5
|
+
import { AutoFormCheckbox } from "../../../../components/form/fields/checkbox.js";
|
|
6
|
+
import { AutoFormInput } from "../../../../components/form/fields/input.js";
|
|
7
|
+
import { Link } from "../../../../lib/navigation.js";
|
|
8
|
+
import { removeSpecialCharacters } from "../../../../lib/special-characters.js";
|
|
9
|
+
import { PasswordInput } from "../../components/password-input.js";
|
|
10
|
+
import { useFormSignUp } from "./hooks/use-form.js";
|
|
11
11
|
export const FormSignUp = ({ isEmail })=>{
|
|
12
12
|
const t = useTranslations('core.auth.sign_up');
|
|
13
13
|
const { onSubmit, formSchema } = useFormSignUp();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use server';
|
|
2
|
-
import { usersModule } from "../../../../../api/modules/users/users.module";
|
|
3
|
-
import { fetcher } from "../../../../../lib/fetcher";
|
|
2
|
+
import { usersModule } from "../../../../../api/modules/users/users.module.js";
|
|
3
|
+
import { fetcher } from "../../../../../lib/fetcher.js";
|
|
4
4
|
export const mutationApi = async (input)=>{
|
|
5
5
|
const res = await fetcher(usersModule, {
|
|
6
6
|
path: '/sign_up',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTranslations } from "next-intl";
|
|
2
2
|
import { toast } from "sonner";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
import { mutationApi } from "./mutation-api";
|
|
4
|
+
import { mutationApi } from "./mutation-api.js";
|
|
5
5
|
export const useFormSignUp = ()=>{
|
|
6
6
|
const t = useTranslations('core.auth.sign_up');
|
|
7
7
|
const tError = useTranslations('core.global.errors');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslations } from "next-intl/server";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Card, CardDescription } from "../../../components/ui/card";
|
|
5
|
-
import { getMiddlewareApi } from "../../../lib/api/get-middleware-api";
|
|
6
|
-
import { Link } from "../../../lib/navigation";
|
|
7
|
-
import { I18nProvider } from "../../../components/i18n-provider";
|
|
8
|
-
import { SSOButtons, SSOButtonsSkeleton } from "../sso/buttons/sso-buttons";
|
|
9
|
-
import { FormSignUp } from "./form/form";
|
|
4
|
+
import { Card, CardDescription } from "../../../components/ui/card.js";
|
|
5
|
+
import { getMiddlewareApi } from "../../../lib/api/get-middleware-api.js";
|
|
6
|
+
import { Link } from "../../../lib/navigation.js";
|
|
7
|
+
import { I18nProvider } from "../../../components/i18n-provider.js";
|
|
8
|
+
import { SSOButtons, SSOButtonsSkeleton } from "../sso/buttons/sso-buttons.js";
|
|
9
|
+
import { FormSignUp } from "./form/form.js";
|
|
10
10
|
export const SignUpView = async ()=>{
|
|
11
11
|
const [t, tGlobal, { isEmail }] = await Promise.all([
|
|
12
12
|
getTranslations('core.auth.sign_up'),
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useTranslations } from "next-intl";
|
|
4
4
|
import { toast } from "sonner";
|
|
5
|
-
import { Button } from "../../../../components/ui/button";
|
|
6
|
-
import { mutationApi } from "./mutation-api";
|
|
5
|
+
import { Button } from "../../../../components/ui/button.js";
|
|
6
|
+
import { mutationApi } from "./mutation-api.js";
|
|
7
7
|
export const ButtonSSOButtons = ({ children, providerId })=>{
|
|
8
8
|
const tErrors = useTranslations('core.global.errors');
|
|
9
9
|
return /*#__PURE__*/ _jsx(Button, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use server';
|
|
2
|
-
import { usersModule } from "../../../../api/modules/users/users.module";
|
|
3
|
-
import { fetcher } from "../../../../lib/fetcher";
|
|
4
|
-
import { redirect } from "../../../../lib/navigation";
|
|
2
|
+
import { usersModule } from "../../../../api/modules/users/users.module.js";
|
|
3
|
+
import { fetcher } from "../../../../lib/fetcher.js";
|
|
4
|
+
import { redirect } from "../../../../lib/navigation.js";
|
|
5
5
|
export const mutationApi = async (providerId)=>{
|
|
6
6
|
const res = await fetcher(usersModule, {
|
|
7
7
|
path: '/{providerId}',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslations } from "next-intl/server";
|
|
3
|
-
import { Skeleton } from "../../../../components/ui/skeleton";
|
|
4
|
-
import { getMiddlewareApi } from "../../../../lib/api/get-middleware-api";
|
|
5
|
-
import { ButtonSSOButtons } from "./client";
|
|
3
|
+
import { Skeleton } from "../../../../components/ui/skeleton.js";
|
|
4
|
+
import { getMiddlewareApi } from "../../../../lib/api/get-middleware-api.js";
|
|
5
|
+
import { ButtonSSOButtons } from "./client.js";
|
|
6
6
|
export const SSOButtonsSkeleton = ()=>{
|
|
7
7
|
return /*#__PURE__*/ _jsxs("div", {
|
|
8
8
|
className: "flex gap-4",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { getTranslations } from "next-intl/server";
|
|
3
|
-
import { ErrorView } from "../../../error/error-view";
|
|
4
|
-
import { ClientCallbackSSO } from "./client/client";
|
|
3
|
+
import { ErrorView } from "../../../error/error-view.js";
|
|
4
|
+
import { ClientCallbackSSO } from "./client/client.js";
|
|
5
5
|
export const CallbackSSOView = async ({ providerId, searchParams: { code, error, state } })=>{
|
|
6
6
|
const t = await getTranslations('core.auth.sso');
|
|
7
7
|
if (error === 'access_denied') {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useQuery } from "@tanstack/react-query";
|
|
4
|
-
import { Loader } from "../../../../../components/ui/loader";
|
|
5
|
-
import { useRouter } from "../../../../../lib/navigation";
|
|
6
|
-
import { ErrorView } from "../../../../error/error-view";
|
|
7
|
-
import { mutationApi } from "./mutation-api";
|
|
4
|
+
import { Loader } from "../../../../../components/ui/loader.js";
|
|
5
|
+
import { useRouter } from "../../../../../lib/navigation.js";
|
|
6
|
+
import { ErrorView } from "../../../../error/error-view.js";
|
|
7
|
+
import { mutationApi } from "./mutation-api.js";
|
|
8
8
|
export const ClientCallbackSSO = ({ providerId, code, state })=>{
|
|
9
9
|
const { replace } = useRouter();
|
|
10
10
|
const { isError } = useQuery({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
import { revalidatePath } from "next/cache";
|
|
3
|
-
import { usersModule } from "../../../../../api/modules/users/users.module";
|
|
4
|
-
import { fetcher } from "../../../../../lib/fetcher";
|
|
3
|
+
import { usersModule } from "../../../../../api/modules/users/users.module.js";
|
|
4
|
+
import { fetcher } from "../../../../../lib/fetcher.js";
|
|
5
5
|
export const mutationApi = async ({ code, providerId, state })=>{
|
|
6
6
|
const res = await fetcher(usersModule, {
|
|
7
7
|
path: '/{providerId}/callback',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Button } from "../../components/ui/button";
|
|
4
|
-
import { useRouter } from "../../lib/navigation";
|
|
3
|
+
import { Button } from "../../components/ui/button.js";
|
|
4
|
+
import { useRouter } from "../../lib/navigation.js";
|
|
5
5
|
export const BackButtonNotFound = ({ children, className })=>{
|
|
6
6
|
const { back } = useRouter();
|
|
7
7
|
return /*#__PURE__*/ _jsx(Button, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowLeft, HomeIcon } from "lucide-react";
|
|
3
3
|
import { useTranslations } from "next-intl";
|
|
4
|
-
import { buttonVariants } from "../../components/ui/button";
|
|
5
|
-
import { Link } from "../../lib/navigation";
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
7
|
-
import { BackButtonNotFound } from "./back-button";
|
|
4
|
+
import { buttonVariants } from "../../components/ui/button.js";
|
|
5
|
+
import { Link } from "../../lib/navigation.js";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
import { BackButtonNotFound } from "./back-button.js";
|
|
8
8
|
export const ErrorView = ({ code, customDescription })=>{
|
|
9
9
|
const t = useTranslations('core.global');
|
|
10
10
|
return /*#__PURE__*/ _jsx("div", {
|
|
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { ThemeProvider } from "next-themes";
|
|
3
3
|
// eslint-disable-next-line no-restricted-imports
|
|
4
4
|
import Link from "next/link";
|
|
5
|
-
import { LogoVitNode } from "../../components/logo-vitnode";
|
|
6
|
-
import { Card, CardContent } from "../../components/ui/card";
|
|
5
|
+
import { LogoVitNode } from "../../components/logo-vitnode.js";
|
|
6
|
+
import { Card, CardContent } from "../../components/ui/card.js";
|
|
7
7
|
export const GlobalErrorView = ({ className, config })=>{
|
|
8
8
|
return /*#__PURE__*/ _jsxs("html", {
|
|
9
9
|
lang: "en",
|
|
@@ -4,8 +4,8 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
|
4
4
|
import { ThemeProvider } from "next-themes";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { scan } from "react-scan";
|
|
7
|
-
import { CONFIG } from "../../lib/config";
|
|
8
|
-
import { Toaster } from "../../components/ui/sonner";
|
|
7
|
+
import { CONFIG } from "../../lib/config.js";
|
|
8
|
+
import { Toaster } from "../../components/ui/sonner.js";
|
|
9
9
|
export const RootProvider = ({ children, theme, toaster, debug })=>{
|
|
10
10
|
React.useEffect(()=>{
|
|
11
11
|
if (!debug || !CONFIG.node_development) return;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { setRequestLocale } from "next-intl/server";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { I18nProvider } from "../../components/i18n-provider";
|
|
5
|
-
import { RootProvider } from "./provider";
|
|
4
|
+
import { I18nProvider } from "../../components/i18n-provider.js";
|
|
5
|
+
import { RootProvider } from "./provider.js";
|
|
6
6
|
export const generateMetadataRootLayout = ({ metadata: { title, shortTitle } })=>{
|
|
7
7
|
return {
|
|
8
8
|
title: {
|