Commit Graph

45 Commits

Author SHA1 Message Date
Apple\Apple
e85f687c6b feat: add notice modal component with empty state support
This commit introduces the following changes:

- Create a reusable NoticeModal component to handle system announcements
- Extract notice functionality from Home and HeaderBar components
- Add loading and empty states using Semi UI illustrations
- Implement "close for today" feature with localStorage
- Support both light and dark mode for empty state illustrations
- Add proper error handling and loading states
- Improve code reusability and maintainability

Breaking changes: None
Related components: HeaderBar.js, Home/index.js, NoticeModal.js
2025-05-26 23:06:55 +08:00
Apple\Apple
c6d7cc7c25 🐛fix(sidebar): Ensure sidebar displays correctly on desktop devices
When resizing from medium screens to desktop view in the console section,
the sidebar previously failed to appear automatically. This commit fixes
the issue by simplifying the logic to always show the sidebar when in
desktop mode and in console pages, regardless of previous screen size.
2025-05-20 12:59:47 +08:00
Apple\Apple
a726818c17 🐛fix(HeaderBar): Prevent flicker when unauthenticated users click Console link
Previously, when an unauthenticated user clicked the "Console" navigation
link, the application would first attempt to navigate to '/console'.
This would then trigger a redirect to '/login', causing a brief flicker
between the two pages.

This commit modifies the `renderNavLinks` function in `HeaderBar.js`
to proactively check the user's authentication status. If the user is
not logged in and clicks the "Console" link, the navigation target
is directly set to '/login', avoiding the intermediate redirect and
eliminating the flickering effect.
2025-05-20 02:23:06 +08:00
Apple\Apple
4640d0a4aa ♻️Refactor: Decouple sidebar visibility from HeaderBar nav clicks
The `handleNavLinkClick` function in `HeaderBar.js` was previously
forcing the sidebar to be visible for all non-'home' navigation links
on non-mobile devices. This interfered with the intended logic in
`StyleContext` which controls sidebar visibility based on the current
route.

This commit modifies `handleNavLinkClick` to:
- Only apply specific style dispatches (setting inner padding and sider
  to false) for the 'home' link, which may have unique layout requirements.
- Remove the logic that unconditionally set sidebar visibility and inner
  padding for other navigation links.
- Continue to close the mobile menu загрязнения (`setMobileMenuOpen(false)`) on any nav link click.

This change ensures that `StyleContext` is the single source of truth
for determining sidebar visibility based on the route, resolving an
issue where clicking a non-console link Pferde (e.g., 'Pricing', 'About')
would incorrectly display the sidebar, especially when the link was
clicked Pferde a second time while already on that page.
2025-05-20 01:58:44 +08:00
Apple\Apple
55a49baed7 feat(ui): Add control for the HeaderBar menu in the console routing under the Sidebar 2025-05-20 01:22:01 +08:00
Apple\Apple
bcbb9bb16a feat: Add the /console/* route 2025-05-20 01:11:37 +08:00
Apple\Apple
305d7528da feat(ui): Add a frosted glass effect with Gaussian blur to the HeaderBar 2025-05-20 00:56:45 +08:00
Apple\Apple
c04a816e59 ♻️refactor: Home Page and Footer 2025-05-20 00:23:47 +08:00
Apple\Apple
1242f35177 feat(ui): Add a skeleton screen placeholder for the Logo and systemName in the HeaderBar during loading 2025-05-18 22:01:50 +08:00
Apple\Apple
9247661849 feat(ui): Add a dropdown menu item for the user avatar in the HeaderBar 2025-05-18 21:54:10 +08:00
Apple\Apple
16570909be 🎨style: Modify the transition shadow effect of the headerBar 2025-05-18 21:43:07 +08:00
Apple\Apple
1ea0dd8f06 ♻️refactor: HeaderBar 2025-05-18 21:33:08 +08:00
QuentinHsu
6b79b89dc0 style(web): format code 2025-04-04 17:37:27 +08:00
1808837298@qq.com
d9cf0885f1 refactor: Enhance UI layout and styling with responsive design improvements 2025-03-10 03:25:02 +08:00
1808837298@qq.com
00c2d6c102 feat: Introduce configurable docs link and remove hardcoded chat links
- Added a new GeneralSetting struct to manage configurable docs link
- Removed hardcoded ChatLink and ChatLink2 variables across multiple files
- Updated frontend components to dynamically render docs link from status
- Simplified chat and link-related logic in various components
- Added a warning modal for quota per unit setting in operation settings
2025-03-09 18:31:16 +08:00
1808837298@qq.com
eb163d9c94 feat: Add self-use mode and demo site mode indicators to HeaderBar 2025-03-02 00:46:54 +08:00
CalciumIon
d75ecfc63e chore: update language in index.html to Chinese 2024-12-28 20:43:26 +08:00
CalciumIon
fd86de19b5 feat: Enhance HeaderBar to support language change messaging
- Added functionality to post a message to the iframe when the language is changed.
- This update improves localization support by ensuring that the iframe content updates according to the selected language.
2024-12-16 21:05:02 +08:00
CalciumIon
c8f437c13a Merge remote-tracking branch 'guoruqiang/main' into pr482-merge
# Conflicts:
#	README.md
#	web/src/components/HeaderBar.js
#	web/src/components/SiderBar.js
2024-12-16 20:56:53 +08:00
CalciumIon
41a7cee98e feat: Refactor App and ChannelsTable components for improved i18n support
- Removed redundant user and status loading logic from the App component, centralizing it in the PageLayout component for better maintainability.
- Enhanced the ChannelsTable component by integrating translation functions for various UI elements, ensuring consistent localization of titles and modal messages.
- Updated the English locale file with new translation keys for sub-channel modifications, improving the overall localization coverage.
- Streamlined the code structure in multiple components to enhance readability and performance.
2024-12-14 14:09:30 +08:00
CalciumIon
a485db5065 fix: Refine sider visibility logic in HeaderBar component
- Updated the click handler in HeaderBar to correctly toggle the visibility of the sider based on the current item selection.
- Ensured that the sider is hidden when navigating to the home item and displayed conditionally for other items, improving the user interface responsiveness.
2024-12-13 19:28:09 +08:00
CalciumIon
221d7b5c99 feat: Integrate i18n support and enhance UI text localization
- Added internationalization (i18n) support across various components, enabling dynamic language switching and improved user experience.
- Updated multiple components to utilize translation functions for labels, buttons, and messages, ensuring consistent language display.
- Enhanced the user interface by refining text elements in the ChannelsTable, LogsTable, and various settings pages, improving clarity and accessibility.
- Adjusted CSS styles for better responsiveness and layout consistency across different screen sizes.
2024-12-13 19:03:14 +08:00
CalciumIon
d241e4fe29 fix: Update label truncation logic in Playground and adjust sider visibility in HeaderBar
- Modified the group label truncation in the Playground component to shorten labels exceeding 16 characters for better mobile display.
- Corrected the conditional rendering logic in the HeaderBar to toggle the sider visibility based on its current state, enhancing user interface responsiveness.
2024-12-12 20:39:49 +08:00
CalciumIon
e17f36e7b7 fix: Correct inner padding and sider visibility logic in HeaderBar, PageLayout, and SiderBar components
- Updated the click handler in HeaderBar to toggle inner padding and sider visibility correctly based on the selected item.
- Adjusted the conditional rendering of SiderBar in PageLayout to ensure it displays when the sider is shown.
- Refined the inner padding logic in SiderBar to maintain consistent behavior when selecting items.
- Introduced a new function in Style context to manage sider visibility based on the current pathname, enhancing responsiveness to navigation changes.
2024-12-12 20:31:40 +08:00
CalciumIon
f0d9c89659 feat: Add pricing link to HeaderBar component
- Introduced a new '定价' (Pricing) item in the HeaderBar navigation for better accessibility to pricing information.
- Updated routing to include the new '/pricing' path.
- Adjusted user display in the HeaderBar for mobile responsiveness, hiding the username on smaller screens for a cleaner interface.
2024-12-11 23:13:46 +08:00
CalciumIon
28fa77cc92 feat: Refactor style management for inner padding in layout components
- Updated HeaderBar, PageLayout, and SiderBar components to manage inner padding state based on selected items.
- Replaced `isChatPage` state with `shouldInnerPadding` in Style context for better clarity and functionality.
- Enhanced user experience by dynamically adjusting content padding based on navigation selections.
2024-12-11 23:08:52 +08:00
CalciumIon
64e085dc4c feat: 首页优化 2024-12-11 17:19:03 +08:00
CalciumIon
3622c664b6 feat: 侧边栏移动端优化 2024-12-11 16:11:27 +08:00
1808837298@qq.com
9a4ca1e210 feat: playground 2024-09-26 00:59:09 +08:00
GuoRuqiang
574d7a0914 使用postMessage向iframe传参theme-mode,实现切换子页面主题的功能
子页面的js示例
```
<script>
    // 接收父页面的主题模式
    window.addEventListener('message', function(event) {
        if (event.data.themeMode) {
            var theme = event.data.themeMode;
            // 测试是否正确接受到theme-mode的值
            // console.log('Received theme mode from parent:', theme);
            applyTheme(theme);
        }
    });

    // 定义一个函数来应用主题
    function applyTheme(theme) {
        var body = document.body;
        if (theme === 'dark') {
            body.classList.add("dark-mode");
            document.getElementById("darkModeToggle").checked = true;
        } else {
            body.classList.remove("dark-mode");
            document.getElementById("darkModeToggle").checked = false;
        }
    }
</script>
```
2024-09-22 14:09:03 +00:00
1808837298@qq.com
ed972eef06 feat: pricing page support multi groups #487 2024-09-22 17:44:57 +08:00
GuoRuqiang
bab718e9bc 聊天按钮适配移动端 2024-09-20 04:45:33 +00:00
GuoRuqiang
016e071d50 update HeaderBar 2024-09-18 10:29:25 +00:00
CalciumIon
feb1d76942 feat: 优化界面显示 2024-09-17 19:55:18 +08:00
kahosan
e9abe5b705 refactor: dark mode 2024-04-16 17:11:39 +08:00
CaIon
962dc984f4 chore: lint fix 2024-03-23 21:24:39 +08:00
CaIon
d34b55c154 chore: reformat code 2024-03-15 16:05:33 +08:00
CaIon
d6d91e4340 feat: Happy New Year 2024-02-01 21:47:28 +08:00
CaIon
e485bc7613 chore: remove unused import 2024-01-21 17:02:35 +08:00
CaIon
1a8a24698f Happy New Year 2023-12-27 18:04:02 +08:00
CaIon
4c7384411d 钱包页面完善 2023-11-08 00:40:12 +08:00
CaIon
83050646f9 登录页完善 2023-11-07 23:32:43 +08:00
CaIon
db358facc0 修复移动端显示bug 2023-10-31 01:19:19 +08:00
CaIon
114353647f 修改logo 2023-10-31 00:41:01 +08:00
CaIon
e3b7f8bff9 更换前端组件库 2023-10-31 00:03:22 +08:00