forked from baron/baron-sso
네이버 웍스 연동기능 개선
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import { createRequire } from "node:module";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig, type UserConfig } from "vite";
|
||||
import { type UserConfig, defineConfig } from "vite";
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const commonWorkspaceDir = path.resolve(
|
||||
path.dirname(fileURLToPath(import.meta.url)),
|
||||
"..",
|
||||
);
|
||||
const appWorkspaceDir = path.resolve(process.cwd());
|
||||
const reactPackageDir = path.dirname(require.resolve("react/package.json"));
|
||||
const reactDomPackageDir = path.dirname(
|
||||
require.resolve("react-dom/package.json"),
|
||||
@@ -23,6 +29,11 @@ export const commonViteConfig: UserConfig = {
|
||||
build: {
|
||||
emptyOutDir: true,
|
||||
},
|
||||
server: {
|
||||
fs: {
|
||||
allow: [appWorkspaceDir, commonWorkspaceDir, "/workspace/common"],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export function hostFromUrl(value: string | undefined) {
|
||||
@@ -37,7 +48,7 @@ export function hostFromUrl(value: string | undefined) {
|
||||
export function getAllowedHosts(
|
||||
defaultHosts: string[],
|
||||
envUrl?: string,
|
||||
envAllowedHosts?: string
|
||||
envAllowedHosts?: string,
|
||||
) {
|
||||
return Array.from(
|
||||
new Set(
|
||||
@@ -48,8 +59,8 @@ export function getAllowedHosts(
|
||||
.split(",")
|
||||
.map((host) => host.trim())
|
||||
.filter(Boolean),
|
||||
].filter((host): host is string => Boolean(host))
|
||||
)
|
||||
].filter((host): host is string => Boolean(host)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
export const shellLayoutClasses = {
|
||||
root: "grid min-h-screen bg-background text-foreground md:grid-cols-[240px,1fr]",
|
||||
root: "grid min-h-screen grid-cols-[240px,minmax(0,1fr)] bg-background text-foreground",
|
||||
aside:
|
||||
"flex flex-col justify-between border-b border-border bg-card md:sticky md:top-0 md:h-screen md:border-b-0 md:border-r md:bg-card md:backdrop-blur",
|
||||
"sticky top-0 flex h-screen flex-col justify-between border-r border-border bg-card backdrop-blur",
|
||||
asideStatic:
|
||||
"border-b border-border bg-card md:sticky md:top-0 md:h-screen md:border-b-0 md:border-r md:bg-card md:backdrop-blur",
|
||||
"sticky top-0 h-screen border-r border-border bg-card backdrop-blur",
|
||||
brandSection:
|
||||
"flex items-center justify-between px-5 py-4 md:block md:space-y-6 md:py-6",
|
||||
brandWrap: "flex items-center gap-3 md:flex-col md:items-start",
|
||||
@@ -24,7 +24,8 @@ export const shellLayoutClasses = {
|
||||
"hidden space-y-2 px-5 pb-6 pt-2 text-xs text-[var(--color-muted)] md:block",
|
||||
logoutButton:
|
||||
"flex w-full items-center gap-3 rounded-xl px-3 py-3 text-sm text-muted-foreground transition hover:bg-destructive/10 hover:text-destructive",
|
||||
header: "sticky top-0 z-20 border-b border-border bg-background/90 backdrop-blur",
|
||||
header:
|
||||
"sticky top-0 z-20 border-b border-border bg-background/90 backdrop-blur",
|
||||
headerElevated:
|
||||
"sticky top-0 z-50 border-b border-border bg-background/90 backdrop-blur",
|
||||
headerInner: "flex items-center justify-between px-5 py-4 md:px-8",
|
||||
|
||||
Reference in New Issue
Block a user