配置文件修改

main
jiangxucong 2 months ago
parent 431a474860
commit cbb15e4aeb

@ -32,7 +32,7 @@ FROM base AS builder
ARG USE_CN_MIRROR ARG USE_CN_MIRROR
ENV NEXT_PUBLIC_SERVICE_MODE="server" \ ENV NEXT_PUBLIC_SERVICE_MODE="server" \
APP_URL="http://192.168.15.199:3010" \ APP_URL="http://192.168.15.199:3210" \
DATABASE_DRIVER="node" \ DATABASE_DRIVER="node" \
DATABASE_URL="postgres://postgres:uWNZugjBqixf8dxC@localhost:5432/lobechat" \ DATABASE_URL="postgres://postgres:uWNZugjBqixf8dxC@localhost:5432/lobechat" \
KEY_VAULTS_SECRET="Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=" KEY_VAULTS_SECRET="Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ="
@ -114,11 +114,11 @@ ENV NODE_ENV="production" \
# set hostname to localhost # set hostname to localhost
ENV HOSTNAME="192.168.15.199" \ ENV HOSTNAME="192.168.15.199" \
PORT="3010" PORT="3210"
# General Variables # General Variables
ENV ACCESS_CODE="" \ ENV ACCESS_CODE="" \
APP_URL="http://192.168.15.199:3010" \ APP_URL="http://192.168.15.199:3210" \
API_KEY_SELECT_MODE="" \ API_KEY_SELECT_MODE="" \
DEFAULT_AGENT_CONFIG="" \ DEFAULT_AGENT_CONFIG="" \
SYSTEM_AGENT="" \ SYSTEM_AGENT="" \
@ -131,9 +131,9 @@ ENV KEY_VAULTS_SECRET="Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=" \
DATABASE_URL="postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat" DATABASE_URL="postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobechat"
# Next Auth # Next Auth
ENV NEXT_AUTH_SECRET="NX2kaPE923dt6BL2U8e9oSre5RfoT7hg" \ ENV NEXT_AUTH_SECRET="BIoLJoshK5E0R4BxLl4tkDedzIZkdyam/MB+vThTAT0=" \
NEXT_AUTH_SSO_PROVIDERS="casdoor" \ NEXT_AUTH_SSO_PROVIDERS="casdoor" \
NEXTAUTH_URL="http://192.168.15.199:3010/api/auth" NEXTAUTH_URL="http://192.168.15.199:3210/api/auth"
# S3 # S3
ENV NEXT_PUBLIC_S3_DOMAIN="" \ ENV NEXT_PUBLIC_S3_DOMAIN="" \

@ -38,7 +38,7 @@
"db:push-test": "NODE_ENV=test drizzle-kit push", "db:push-test": "NODE_ENV=test drizzle-kit push",
"db:studio": "drizzle-kit studio", "db:studio": "drizzle-kit studio",
"db:z-pull": "drizzle-kit introspect", "db:z-pull": "drizzle-kit introspect",
"dev": "next dev -p 3011", "dev": "next dev -p 3210",
"docs:i18n": "lobe-i18n md && npm run lint:mdx", "docs:i18n": "lobe-i18n md && npm run lint:mdx",
"docs:seo": "lobe-seo && npm run lint:mdx", "docs:seo": "lobe-seo && npm run lint:mdx",
"i18n": "npm run workflow:i18n && lobe-i18n", "i18n": "npm run workflow:i18n && lobe-i18n",
@ -304,7 +304,7 @@
"vitest": "~1.2.2", "vitest": "~1.2.2",
"vitest-canvas-mock": "^0.3.3" "vitest-canvas-mock": "^0.3.3"
}, },
"packageManager": "pnpm@9.11.0", "packageManager": "pnpm@9.15.0",
"publishConfig": { "publishConfig": {
"access": "public", "access": "public",
"registry": "https://registry.npmjs.org" "registry": "https://registry.npmjs.org"

@ -38,15 +38,15 @@ export interface TopActionProps {
tab?: SidebarTabKey; tab?: SidebarTabKey;
} }
const getUserId = (s: { user?: { id?: any } }) => s.user?.id; // const getUserId = (s: { user?: { id?: any } }) => s.user?.id;
const TopActions = memo<TopActionProps>(() => { const TopActions = memo<TopActionProps>(() => {
const { t } = useTranslation('common'); const { t } = useTranslation('common');
const switchBackToChat = useGlobalStore((s) => s.switchBackToChat); const switchBackToChat = useGlobalStore((s) => s.switchBackToChat);
const { showMarket, enableKnowledgeBase } = useServerConfigStore(featureFlagsSelectors); const { showMarket, enableKnowledgeBase } = useServerConfigStore(featureFlagsSelectors);
const { styles, cx } = useStyles() const { styles, cx } = useStyles()
const [value, setValue] = useState("chat") const [value, setValue] = useState("chat")
const userId = getUserId(useUserStore.getState()) // const userId = getUserId(useUserStore.getState())
console.log(userId,'3837373266262266') // console.log(userId,'3837373266262266')
return ( return (
<div style={{ textAlign: 'center', width: '100%'}}> <div style={{ textAlign: 'center', width: '100%'}}>
<Link <Link

@ -0,0 +1,53 @@
import { ActionIcon } from '@lobehub/ui';
import { Tooltip } from 'antd';
import { LucideX } from 'lucide-react';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Flexbox } from 'react-layout-kit';
import UserAvatar from '@/features/User/UserAvatar';
import UserPanel from '@/features/User/UserPanel';
import { useUserStore } from '@/store/user';
import { preferenceSelectors } from '@/store/user/selectors';
const Avatar = memo(() => {
const { t } = useTranslation('common');
const hideSettingsMoveGuide = useUserStore(preferenceSelectors.hideSettingsMoveGuide);
const updateGuideState = useUserStore((s) => s.updateGuideState);
const content = (
<UserPanel>
<UserAvatar clickable />
</UserPanel>
);
return hideSettingsMoveGuide ? (
content
) : (
<Tooltip
color={'blue'}
open
placement={'right'}
prefixCls={'guide'}
title={
<Flexbox align={'center'} gap={8} horizontal>
<div style={{ lineHeight: '22px' }}>{t('userPanel.moveGuide')}</div>
<ActionIcon
icon={LucideX}
onClick={() => {
updateGuideState({ moveSettingsToAvatar: true });
}}
role={'close-guide'}
size={'small'}
style={{ color: 'inherit' }}
/>
</Flexbox>
}
>
{content}
</Tooltip>
);
});
Avatar.displayName = 'Avatar';
export default Avatar;

@ -95,7 +95,7 @@ const Layout = memo<LayoutProps>(({ children, nav }) => {
<Divider className={cx(styles.dividerCen)} type="vertical" /> <Divider className={cx(styles.dividerCen)} type="vertical" />
<span className={cx(styles.leftTitle)}>{title[pathName]}</span> <span className={cx(styles.leftTitle)}>{title[pathName]}</span>
</div> </div>
<div className={cx(styles.ledDiv)} style={{ height: '42px', lineHeight: "42px", textAlign: 'right' }}> <div className={cx(styles.ledDiv)} style={{ height: '60px',lineHeight: '60px', verticalAlign: 'middle'}}>
<Avatar /> <Avatar />
</div> </div>
</div> </div>

@ -63,7 +63,7 @@ const UserAvatar = forwardRef<HTMLDivElement, UserAvatarProps>(
className={cx(clickable && styles.clickable, className)} className={cx(clickable && styles.clickable, className)}
ref={ref} ref={ref}
size={size} size={size}
style={{ flex: 'none', ...style }} style={{ flex: 'none',...style }}
unoptimized unoptimized
{...rest} {...rest}
/> />

@ -46,7 +46,7 @@ const PanelContent = memo<{ closePopover: () => void }>(({ closePopover }) => {
}; };
return ( return (
<Flexbox gap={2} style={{ minWidth: 300 }}> <Flexbox gap={2} style={{minWidth: 300}}>
{!enableAuth ? ( {!enableAuth ? (
<> <>
<UserInfo /> <UserInfo />

@ -6,7 +6,7 @@ const UpgradeBadge = memo(({ children, showBadge }: PropsWithChildren<{ showBadg
if (!showBadge) return children; if (!showBadge) return children;
return ( return (
<Flexbox> <Flexbox style={{position: 'absolute',right: 20,marginTop: 10}}>
<ConfigProvider theme={{ components: { Badge: { dotSize: 8 } } }}> <ConfigProvider theme={{ components: { Badge: { dotSize: 8 } } }}>
<Badge dot offset={[-4, 4]}> <Badge dot offset={[-4, 4]}>
{children} {children}

@ -27,7 +27,7 @@ const UserPanel = memo<PropsWithChildren>(({ children }) => {
content={<PanelContent closePopover={() => setOpen(false)} />} content={<PanelContent closePopover={() => setOpen(false)} />}
onOpenChange={setOpen} onOpenChange={setOpen}
open={open} open={open}
overlayInnerStyle={{ padding: 0 }} overlayInnerStyle={{ padding: 0, position: 'fixed',right: 18 }}
placement={'topRight'} placement={'topRight'}
rootClassName={styles.popover} rootClassName={styles.popover}
trigger={['click']} trigger={['click']}

Loading…
Cancel
Save