Skip to content

Commit 672bc15

Browse files
kaplaxxk01116753
authored andcommitted
feat: rename Himarket to HiMarket and update session management
- Standardize branding from "Himarket" to "HiMarket" across frontend and admin portal - Update session loading logic in Square/HiChat to properly map API response fields - Fix session timestamp handling and product ID initialization - Improve sidebar session categorization and keyboard shortcut detection - Clean up minor code formatting and add missing newlines feat(chat): enhance sidebar UI with overflow handling and conditional rendering - Add overflow-hidden and text-nowrap classes to prevent text overflow in sidebar items - Conditionally render divider in sidebar only when not collapsed - Wrap placeholder text in div for better layout control - Add fill color to icons for consistent styling Change-Id: Ibf8f36e4a7c92a2317d9075fd5a591fa28a80cc1
1 parent 221ada8 commit 672bc15

19 files changed

Lines changed: 212 additions & 123 deletions

File tree

himarket-web/himarket-admin/bin/start.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ fi
77
sed -i "s|{{ HIMARKET_SERVER }}|${HIMARKET_SERVER}|g" /etc/nginx/default.d/proxy.conf
88

99
nginx
10-
echo "Himarket Admin started successfully"
11-
tail -f /var/log/nginx/access.log
10+
echo "HiMarket Admin started successfully"
11+
tail -f /var/log/nginx/access.log

himarket-web/himarket-admin/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/logo.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Himarket</title>
7+
<title>HiMarket</title>
88
</head>
99
<body>
1010
<div id="root"></div>

himarket-web/himarket-admin/src/components/Layout.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ const Layout: React.FC = () => {
2424
const hasToken = isAuthenticated()
2525
setIsLoggedIn(hasToken)
2626
}
27-
27+
2828
checkAuthStatus()
2929
// 监听 storage 变化(当其他标签页登录/登出时)
3030
window.addEventListener('storage', checkAuthStatus)
31-
31+
3232
return () => {
3333
window.removeEventListener('storage', checkAuthStatus)
3434
}
@@ -47,10 +47,10 @@ const Layout: React.FC = () => {
4747
{ name: 'Portal', cn: '门户', href: '/portals', icon: GlobalOutlined },
4848
{ name: 'API Products', cn: 'API产品', href: '/api-products', icon: AppstoreOutlined },
4949
{ name: 'Categories', cn: '产品类别', href: '/product-categories', icon: FolderOutlined },
50-
{
51-
name: '实例管理',
52-
cn: '实例管理',
53-
href: '/consoles',
50+
{
51+
name: '实例管理',
52+
cn: '实例管理',
53+
href: '/consoles',
5454
icon: SettingOutlined,
5555
children: [
5656
{ name: 'Nacos实例', cn: 'Nacos实例', href: '/consoles/nacos', icon: DesktopOutlined },
@@ -134,7 +134,7 @@ const Layout: React.FC = () => {
134134
className="hover:bg-gray-100"
135135
/>
136136
</div>
137-
<span className="text-2xl font-bold">Himarket</span>
137+
<span className="text-2xl font-bold">HiMarket</span>
138138
</div>
139139
{/* 顶部右侧用户信息或登录按钮 */}
140140
{isLoggedIn ? (
@@ -175,4 +175,4 @@ const Layout: React.FC = () => {
175175
)
176176
}
177177

178-
export default Layout
178+
export default Layout

himarket-web/himarket-frontend/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project Overview
66

7-
Himarket API Portal Frontend - A React-based developer portal for managing API products, MCP servers, AI agents, and AI models. The portal allows developers to browse, subscribe to, and manage various API products with OAuth/OIDC authentication.
7+
HiMarket API Portal Frontend - A React-based developer portal for managing API products, MCP servers, AI agents, and AI models. The portal allows developers to browse, subscribe to, and manage various API products with OAuth/OIDC authentication.
88

99
## Tech Stack
1010

himarket-web/himarket-frontend/IMPLEMENTATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- ✅ 更新开发环境代理配置(`vite.config.ts`
88
- ✅ API 请求拦截器自动添加 Authorization header
99

10-
### 2. Square 页面(体验中心
10+
### 2. Square 页面(HiChat
1111
- ✅ 从真实 API 获取模型列表(`GET /products?type=MODEL_API`
1212
- ✅ 添加加载状态和错误处理
1313
- ✅ 点击"立即体验"跳转到 Chat 页面并传递产品信息

himarket-web/himarket-frontend/bin/start.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ fi
77
sed -i "s|{{ HIMARKET_SERVER }}|${HIMARKET_SERVER}|g" /etc/nginx/default.d/proxy.conf
88

99
nginx
10-
echo "Himarket Frontend started successfully"
11-
tail -f /var/log/nginx/access.log
10+
echo "HiMarket Frontend started successfully"
11+
tail -f /var/log/nginx/access.log

himarket-web/himarket-frontend/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Himarket</title>
7+
<title>HiMarket</title>
88
</head>
99
<body>
1010
<div id="root"></div>

himarket-web/himarket-frontend/src/aliyunThemeToken.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export const colors = {
33
"colorPrimaryBg": "#EEF2FF",
44
"colorPrimaryBgHover": "#E0E7FF",
55
"colorPrimarySecondary": "#C7D2FE",
6+
"colorPrimaryHoverLight": "#EFF4FF",
67
"colorTextSecondaryCustom": "#A3A3A3",
78
"colorPrimaryBorderHover": "#A5B4FC",
89
"subTitle": "#737373",

himarket-web/himarket-frontend/src/components/Header.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Link, useLocation } from "react-router-dom";
22
import { useState, useEffect } from "react";
33
import { UserInfo } from "./UserInfo";
4-
import { Himarket, Logo } from "./icon";
4+
import { HiMarket, Logo } from "./icon";
55

66

77
export function Header() {
@@ -18,11 +18,11 @@ export function Header() {
1818
}, []);
1919

2020
const tabs = [
21-
{ path: "/models", label: "模型" },
22-
{ path: "/mcp", label: "MCP" },
21+
{ path: "/chat", label: "HiChat" },
2322
{ path: "/agents", label: "智能体" },
23+
{ path: "/mcp", label: "MCP" },
24+
{ path: "/models", label: "模型" },
2425
{ path: "/apis", label: "API" },
25-
{ path: "/chat", label: "体验中心" },
2626
];
2727

2828
const isActiveTab = (path: string) => {
@@ -47,7 +47,7 @@ export function Header() {
4747
{/* LOGO区域 */}
4848
<Logo className="w-6 h-6" />
4949
</div>
50-
<Himarket />
50+
<HiMarket />
5151
</Link>
5252
<div className="h-6 w-[1px] bg-gray-200 mx-5"></div>
5353
{/* Tab 区域 */}

himarket-web/himarket-frontend/src/components/Navigation.tsx

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface NavigationProps {
99

1010
export function Navigation({ loading = false }: NavigationProps) {
1111
const location = useLocation();
12-
12+
1313
const isActive = (path: string) => {
1414
if (path === '/') {
1515
return location.pathname === '/';
@@ -18,29 +18,29 @@ export function Navigation({ loading = false }: NavigationProps) {
1818
};
1919

2020
const navigationItems = [
21-
{
22-
path: '/apis',
23-
icon: <ApiOutlined />,
24-
title: 'APIs',
25-
subtitle: 'REST接口'
21+
{
22+
path: '/apis',
23+
icon: <ApiOutlined />,
24+
title: 'APIs',
25+
subtitle: 'REST接口'
2626
},
27-
{
28-
path: '/mcp',
29-
icon: <ToolOutlined />,
30-
title: 'MCP',
31-
subtitle: '工具集成'
27+
{
28+
path: '/mcp',
29+
icon: <ToolOutlined />,
30+
title: 'MCP',
31+
subtitle: '工具集成'
3232
},
33-
{
34-
path: '/models',
35-
icon: <BulbOutlined />,
36-
title: 'Model',
37-
subtitle: 'AI模型'
33+
{
34+
path: '/models',
35+
icon: <BulbOutlined />,
36+
title: 'Model',
37+
subtitle: 'AI模型'
3838
},
39-
{
40-
path: '/agents',
41-
icon: <RobotOutlined />,
42-
title: 'Agent',
43-
subtitle: '智能助手'
39+
{
40+
path: '/agents',
41+
icon: <RobotOutlined />,
42+
title: 'Agent',
43+
subtitle: '智能助手'
4444
}
4545
];
4646

@@ -65,11 +65,11 @@ export function Navigation({ loading = false }: NavigationProps) {
6565
style={{ display: "block" }}
6666
/>
6767
</div>
68-
<span className="text-xl font-bold text-gray-900">Himarket</span>
68+
<span className="text-xl font-bold text-gray-900">HiMarket</span>
6969
</Link>
7070
)}
7171
</div>
72-
72+
7373
<div className="hidden md:flex items-center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2">
7474
{loading ? (
7575
<div className="flex space-x-3">
@@ -81,12 +81,12 @@ export function Navigation({ loading = false }: NavigationProps) {
8181
) : (
8282
<div className="flex space-x-3">
8383
{navigationItems.map((item) => (
84-
<Link
84+
<Link
8585
key={item.path}
86-
to={item.path}
86+
to={item.path}
8787
className={`px-4 py-3 rounded-lg font-medium transition-all duration-200 flex flex-col items-center justify-center min-w-[100px] ${
88-
isActive(item.path)
89-
? 'bg-blue-50/80 text-blue-700 border border-blue-200/50 shadow-sm'
88+
isActive(item.path)
89+
? 'bg-blue-50/80 text-blue-700 border border-blue-200/50 shadow-sm'
9090
: 'text-gray-700 hover:text-gray-900 hover:bg-gray-50/50 border border-transparent'
9191
}`}
9292
>
@@ -106,7 +106,7 @@ export function Navigation({ loading = false }: NavigationProps) {
106106
</div>
107107
)}
108108
</div>
109-
109+
110110
<div className="flex items-center space-x-4">
111111
{loading ? (
112112
<Skeleton.Avatar size={32} active />
@@ -118,4 +118,4 @@ export function Navigation({ loading = false }: NavigationProps) {
118118
</div>
119119
</nav>
120120
);
121-
}
121+
}

0 commit comments

Comments
 (0)