diff --git a/web/index.html b/web/index.html index 1e75f3d7..8528f7fa 100644 --- a/web/index.html +++ b/web/index.html @@ -1,19 +1,19 @@ - - - - - - - New API - - - -
- - - + + + + + + + + New API + + + + +
+ + + + \ No newline at end of file diff --git a/web/src/App.js b/web/src/App.jsx similarity index 93% rename from web/src/App.js rename to web/src/App.jsx index 8d7e6441..fc623309 100644 --- a/web/src/App.js +++ b/web/src/App.jsx @@ -19,17 +19,17 @@ For commercial licensing, please contact support@quantumnous.com import React, { lazy, Suspense } from 'react'; import { Route, Routes, useLocation } from 'react-router-dom'; -import Loading from './components/common/ui/Loading.js'; +import Loading from './components/common/ui/Loading'; import User from './pages/User'; import { AuthRedirect, PrivateRoute, AdminRoute } from './helpers'; -import RegisterForm from './components/auth/RegisterForm.js'; -import LoginForm from './components/auth/LoginForm.js'; +import RegisterForm from './components/auth/RegisterForm'; +import LoginForm from './components/auth/LoginForm'; import NotFound from './pages/NotFound'; import Forbidden from './pages/Forbidden'; import Setting from './pages/Setting'; -import PasswordResetForm from './components/auth/PasswordResetForm.js'; -import PasswordResetConfirm from './components/auth/PasswordResetConfirm.js'; +import PasswordResetForm from './components/auth/PasswordResetForm'; +import PasswordResetConfirm from './components/auth/PasswordResetConfirm'; import Channel from './pages/Channel'; import Token from './pages/Token'; import Redemption from './pages/Redemption'; @@ -38,14 +38,14 @@ import Log from './pages/Log'; import Chat from './pages/Chat'; import Chat2Link from './pages/Chat2Link'; import Midjourney from './pages/Midjourney'; -import Pricing from './pages/Pricing/index.js'; -import Task from './pages/Task/index.js'; -import ModelPage from './pages/Model/index.js'; -import Playground from './pages/Playground/index.js'; -import OAuth2Callback from './components/auth/OAuth2Callback.js'; -import PersonalSetting from './components/settings/PersonalSetting.js'; -import Setup from './pages/Setup/index.js'; -import SetupCheck from './components/layout/SetupCheck.js'; +import Pricing from './pages/Pricing'; +import Task from './pages/Task'; +import ModelPage from './pages/Model'; +import Playground from './pages/Playground'; +import OAuth2Callback from './components/auth/OAuth2Callback'; +import PersonalSetting from './components/settings/PersonalSetting'; +import Setup from './pages/Setup'; +import SetupCheck from './components/layout/SetupCheck'; const Home = lazy(() => import('./pages/Home')); const Dashboard = lazy(() => import('./pages/Dashboard')); diff --git a/web/src/components/auth/LoginForm.js b/web/src/components/auth/LoginForm.jsx similarity index 98% rename from web/src/components/auth/LoginForm.js rename to web/src/components/auth/LoginForm.jsx index 6ed309b5..dc091f96 100644 --- a/web/src/components/auth/LoginForm.js +++ b/web/src/components/auth/LoginForm.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React, { useContext, useEffect, useState } from 'react'; import { Link, useNavigate, useSearchParams } from 'react-router-dom'; -import { UserContext } from '../../context/User/index.js'; +import { UserContext } from '../../context/User'; import { API, getLogo, @@ -32,7 +32,7 @@ import { onGitHubOAuthClicked, onOIDCClicked, onLinuxDOOAuthClicked -} from '../../helpers/index.js'; +} from '../../helpers'; import Turnstile from 'react-turnstile'; import { Button, @@ -47,10 +47,10 @@ import Text from '@douyinfe/semi-ui/lib/es/typography/text'; import TelegramLoginButton from 'react-telegram-login'; import { IconGithubLogo, IconMail, IconLock } from '@douyinfe/semi-icons'; -import OIDCIcon from '../common/logo/OIDCIcon.js'; -import WeChatIcon from '../common/logo/WeChatIcon.js'; -import LinuxDoIcon from '../common/logo/LinuxDoIcon.js'; -import TwoFAVerification from './TwoFAVerification.js'; +import OIDCIcon from '../common/logo/OIDCIcon'; +import WeChatIcon from '../common/logo/WeChatIcon'; +import LinuxDoIcon from '../common/logo/LinuxDoIcon'; +import TwoFAVerification from './TwoFAVerification'; import { useTranslation } from 'react-i18next'; const LoginForm = () => { diff --git a/web/src/components/auth/OAuth2Callback.js b/web/src/components/auth/OAuth2Callback.jsx similarity index 100% rename from web/src/components/auth/OAuth2Callback.js rename to web/src/components/auth/OAuth2Callback.jsx diff --git a/web/src/components/auth/PasswordResetConfirm.js b/web/src/components/auth/PasswordResetConfirm.jsx similarity index 100% rename from web/src/components/auth/PasswordResetConfirm.js rename to web/src/components/auth/PasswordResetConfirm.jsx diff --git a/web/src/components/auth/PasswordResetForm.js b/web/src/components/auth/PasswordResetForm.jsx similarity index 100% rename from web/src/components/auth/PasswordResetForm.js rename to web/src/components/auth/PasswordResetForm.jsx diff --git a/web/src/components/auth/RegisterForm.js b/web/src/components/auth/RegisterForm.jsx similarity index 98% rename from web/src/components/auth/RegisterForm.js rename to web/src/components/auth/RegisterForm.jsx index a216c6f3..0b95d504 100644 --- a/web/src/components/auth/RegisterForm.js +++ b/web/src/components/auth/RegisterForm.jsx @@ -28,7 +28,7 @@ import { updateAPI, getSystemName, setUserData -} from '../../helpers/index.js'; +} from '../../helpers'; import Turnstile from 'react-turnstile'; import { Button, @@ -45,12 +45,12 @@ import { onGitHubOAuthClicked, onLinuxDOOAuthClicked, onOIDCClicked, -} from '../../helpers/index.js'; -import OIDCIcon from '../common/logo/OIDCIcon.js'; -import LinuxDoIcon from '../common/logo/LinuxDoIcon.js'; -import WeChatIcon from '../common/logo/WeChatIcon.js'; +} from '../../helpers'; +import OIDCIcon from '../common/logo/OIDCIcon'; +import LinuxDoIcon from '../common/logo/LinuxDoIcon'; +import WeChatIcon from '../common/logo/WeChatIcon'; import TelegramLoginButton from 'react-telegram-login/src'; -import { UserContext } from '../../context/User/index.js'; +import { UserContext } from '../../context/User'; import { useTranslation } from 'react-i18next'; const RegisterForm = () => { diff --git a/web/src/components/auth/TwoFAVerification.js b/web/src/components/auth/TwoFAVerification.jsx similarity index 100% rename from web/src/components/auth/TwoFAVerification.js rename to web/src/components/auth/TwoFAVerification.jsx diff --git a/web/src/components/common/logo/LinuxDoIcon.js b/web/src/components/common/logo/LinuxDoIcon.jsx similarity index 100% rename from web/src/components/common/logo/LinuxDoIcon.js rename to web/src/components/common/logo/LinuxDoIcon.jsx diff --git a/web/src/components/common/logo/OIDCIcon.js b/web/src/components/common/logo/OIDCIcon.jsx similarity index 100% rename from web/src/components/common/logo/OIDCIcon.js rename to web/src/components/common/logo/OIDCIcon.jsx diff --git a/web/src/components/common/logo/WeChatIcon.js b/web/src/components/common/logo/WeChatIcon.jsx similarity index 100% rename from web/src/components/common/logo/WeChatIcon.js rename to web/src/components/common/logo/WeChatIcon.jsx diff --git a/web/src/components/common/markdown/MarkdownRenderer.js b/web/src/components/common/markdown/MarkdownRenderer.jsx similarity index 100% rename from web/src/components/common/markdown/MarkdownRenderer.js rename to web/src/components/common/markdown/MarkdownRenderer.jsx diff --git a/web/src/components/common/ui/CardPro.js b/web/src/components/common/ui/CardPro.jsx similarity index 100% rename from web/src/components/common/ui/CardPro.js rename to web/src/components/common/ui/CardPro.jsx diff --git a/web/src/components/common/ui/CardTable.js b/web/src/components/common/ui/CardTable.jsx similarity index 100% rename from web/src/components/common/ui/CardTable.js rename to web/src/components/common/ui/CardTable.jsx diff --git a/web/src/components/common/ui/CompactModeToggle.js b/web/src/components/common/ui/CompactModeToggle.jsx similarity index 100% rename from web/src/components/common/ui/CompactModeToggle.js rename to web/src/components/common/ui/CompactModeToggle.jsx diff --git a/web/src/components/common/ui/JSONEditor.js b/web/src/components/common/ui/JSONEditor.jsx similarity index 100% rename from web/src/components/common/ui/JSONEditor.js rename to web/src/components/common/ui/JSONEditor.jsx diff --git a/web/src/components/common/ui/Loading.js b/web/src/components/common/ui/Loading.jsx similarity index 100% rename from web/src/components/common/ui/Loading.js rename to web/src/components/common/ui/Loading.jsx diff --git a/web/src/components/common/ui/ScrollableContainer.js b/web/src/components/common/ui/ScrollableContainer.jsx similarity index 100% rename from web/src/components/common/ui/ScrollableContainer.js rename to web/src/components/common/ui/ScrollableContainer.jsx diff --git a/web/src/components/dashboard/index.jsx b/web/src/components/dashboard/index.jsx index b9588e8e..47731173 100644 --- a/web/src/components/dashboard/index.jsx +++ b/web/src/components/dashboard/index.jsx @@ -19,8 +19,8 @@ For commercial licensing, please contact support@quantumnous.com import React, { useContext, useEffect } from 'react'; import { getRelativeTime } from '../../helpers'; -import { UserContext } from '../../context/User/index.js'; -import { StatusContext } from '../../context/Status/index.js'; +import { UserContext } from '../../context/User'; +import { StatusContext } from '../../context/Status'; import DashboardHeader from './DashboardHeader'; import StatsCards from './StatsCards'; diff --git a/web/src/components/layout/Footer.js b/web/src/components/layout/Footer.jsx similarity index 100% rename from web/src/components/layout/Footer.js rename to web/src/components/layout/Footer.jsx diff --git a/web/src/components/layout/HeaderBar.js b/web/src/components/layout/HeaderBar.js index 4f8ea8d6..fc21dc7b 100644 --- a/web/src/components/layout/HeaderBar.js +++ b/web/src/components/layout/HeaderBar.js @@ -17,4 +17,4 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ -export { default } from './HeaderBar/index.js'; +export { default } from './HeaderBar/index'; diff --git a/web/src/components/layout/HeaderBar/ActionButtons.js b/web/src/components/layout/HeaderBar/ActionButtons.jsx similarity index 87% rename from web/src/components/layout/HeaderBar/ActionButtons.js rename to web/src/components/layout/HeaderBar/ActionButtons.jsx index 01c75d5b..5717fbff 100644 --- a/web/src/components/layout/HeaderBar/ActionButtons.js +++ b/web/src/components/layout/HeaderBar/ActionButtons.jsx @@ -18,11 +18,11 @@ For commercial licensing, please contact support@quantumnous.com */ import React from 'react'; -import NewYearButton from './NewYearButton.js'; -import NotificationButton from './NotificationButton.js'; -import ThemeToggle from './ThemeToggle.js'; -import LanguageSelector from './LanguageSelector.js'; -import UserArea from './UserArea.js'; +import NewYearButton from './NewYearButton'; +import NotificationButton from './NotificationButton'; +import ThemeToggle from './ThemeToggle'; +import LanguageSelector from './LanguageSelector'; +import UserArea from './UserArea'; const ActionButtons = ({ isNewYear, diff --git a/web/src/components/layout/HeaderBar/HeaderLogo.js b/web/src/components/layout/HeaderBar/HeaderLogo.jsx similarity index 97% rename from web/src/components/layout/HeaderBar/HeaderLogo.js rename to web/src/components/layout/HeaderBar/HeaderLogo.jsx index 06651f0d..ff66f412 100644 --- a/web/src/components/layout/HeaderBar/HeaderLogo.js +++ b/web/src/components/layout/HeaderBar/HeaderLogo.jsx @@ -20,7 +20,7 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import { Link } from 'react-router-dom'; import { Typography, Tag } from '@douyinfe/semi-ui'; -import SkeletonWrapper from './SkeletonWrapper.js'; +import SkeletonWrapper from './SkeletonWrapper'; const HeaderLogo = ({ isMobile, diff --git a/web/src/components/layout/HeaderBar/LanguageSelector.js b/web/src/components/layout/HeaderBar/LanguageSelector.jsx similarity index 100% rename from web/src/components/layout/HeaderBar/LanguageSelector.js rename to web/src/components/layout/HeaderBar/LanguageSelector.jsx diff --git a/web/src/components/layout/HeaderBar/MobileMenuButton.js b/web/src/components/layout/HeaderBar/MobileMenuButton.jsx similarity index 100% rename from web/src/components/layout/HeaderBar/MobileMenuButton.js rename to web/src/components/layout/HeaderBar/MobileMenuButton.jsx diff --git a/web/src/components/layout/HeaderBar/Navigation.js b/web/src/components/layout/HeaderBar/Navigation.jsx similarity index 97% rename from web/src/components/layout/HeaderBar/Navigation.js rename to web/src/components/layout/HeaderBar/Navigation.jsx index ef418783..f901fd57 100644 --- a/web/src/components/layout/HeaderBar/Navigation.js +++ b/web/src/components/layout/HeaderBar/Navigation.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import { Link } from 'react-router-dom'; -import SkeletonWrapper from './SkeletonWrapper.js'; +import SkeletonWrapper from './SkeletonWrapper'; const Navigation = ({ mainNavLinks, diff --git a/web/src/components/layout/HeaderBar/NewYearButton.js b/web/src/components/layout/HeaderBar/NewYearButton.jsx similarity index 100% rename from web/src/components/layout/HeaderBar/NewYearButton.js rename to web/src/components/layout/HeaderBar/NewYearButton.jsx diff --git a/web/src/components/layout/HeaderBar/NotificationButton.js b/web/src/components/layout/HeaderBar/NotificationButton.jsx similarity index 100% rename from web/src/components/layout/HeaderBar/NotificationButton.js rename to web/src/components/layout/HeaderBar/NotificationButton.jsx diff --git a/web/src/components/layout/HeaderBar/SkeletonWrapper.js b/web/src/components/layout/HeaderBar/SkeletonWrapper.jsx similarity index 100% rename from web/src/components/layout/HeaderBar/SkeletonWrapper.js rename to web/src/components/layout/HeaderBar/SkeletonWrapper.jsx diff --git a/web/src/components/layout/HeaderBar/ThemeToggle.js b/web/src/components/layout/HeaderBar/ThemeToggle.jsx similarity index 100% rename from web/src/components/layout/HeaderBar/ThemeToggle.js rename to web/src/components/layout/HeaderBar/ThemeToggle.jsx diff --git a/web/src/components/layout/HeaderBar/UserArea.js b/web/src/components/layout/HeaderBar/UserArea.jsx similarity index 98% rename from web/src/components/layout/HeaderBar/UserArea.js rename to web/src/components/layout/HeaderBar/UserArea.jsx index 9d9dc7ad..a92f480a 100644 --- a/web/src/components/layout/HeaderBar/UserArea.js +++ b/web/src/components/layout/HeaderBar/UserArea.jsx @@ -32,8 +32,8 @@ import { IconCreditCard, IconKey, } from '@douyinfe/semi-icons'; -import { stringToColor } from '../../../helpers/index.js'; -import SkeletonWrapper from './SkeletonWrapper.js'; +import { stringToColor } from '../../../helpers'; +import SkeletonWrapper from './SkeletonWrapper'; const UserArea = ({ userState, diff --git a/web/src/components/layout/HeaderBar/index.js b/web/src/components/layout/HeaderBar/index.jsx similarity index 93% rename from web/src/components/layout/HeaderBar/index.js rename to web/src/components/layout/HeaderBar/index.jsx index 2bdf0aca..0a0e8954 100644 --- a/web/src/components/layout/HeaderBar/index.js +++ b/web/src/components/layout/HeaderBar/index.jsx @@ -18,14 +18,14 @@ For commercial licensing, please contact support@quantumnous.com */ import React from 'react'; -import { useHeaderBar } from '../../../hooks/common/useHeaderBar.js'; -import { useNotifications } from '../../../hooks/common/useNotifications.js'; -import { useNavigation } from '../../../hooks/common/useNavigation.js'; -import NoticeModal from '../NoticeModal.js'; -import MobileMenuButton from './MobileMenuButton.js'; -import HeaderLogo from './HeaderLogo.js'; -import Navigation from './Navigation.js'; -import ActionButtons from './ActionButtons.js'; +import { useHeaderBar } from '../../../hooks/common/useHeaderBar'; +import { useNotifications } from '../../../hooks/common/useNotifications'; +import { useNavigation } from '../../../hooks/common/useNavigation'; +import NoticeModal from '../NoticeModal'; +import MobileMenuButton from './MobileMenuButton'; +import HeaderLogo from './HeaderLogo'; +import Navigation from './Navigation'; +import ActionButtons from './ActionButtons'; const HeaderBar = ({ onMobileMenuToggle, drawerOpen }) => { const { diff --git a/web/src/components/layout/NoticeModal.js b/web/src/components/layout/NoticeModal.jsx similarity index 99% rename from web/src/components/layout/NoticeModal.js rename to web/src/components/layout/NoticeModal.jsx index 0dae4f88..a768f39d 100644 --- a/web/src/components/layout/NoticeModal.js +++ b/web/src/components/layout/NoticeModal.jsx @@ -23,7 +23,7 @@ import { useTranslation } from 'react-i18next'; import { API, showError, getRelativeTime } from '../../helpers'; import { marked } from 'marked'; import { IllustrationNoContent, IllustrationNoContentDark } from '@douyinfe/semi-illustrations'; -import { StatusContext } from '../../context/Status/index.js'; +import { StatusContext } from '../../context/Status'; import { Bell, Megaphone } from 'lucide-react'; const NoticeModal = ({ visible, onClose, isMobile, defaultTab = 'inApp', unreadKeys = [] }) => { diff --git a/web/src/components/layout/PageLayout.js b/web/src/components/layout/PageLayout.jsx similarity index 93% rename from web/src/components/layout/PageLayout.js rename to web/src/components/layout/PageLayout.jsx index 467b8b8b..dd508068 100644 --- a/web/src/components/layout/PageLayout.js +++ b/web/src/components/layout/PageLayout.jsx @@ -17,19 +17,19 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ -import HeaderBar from './HeaderBar.js'; +import HeaderBar from './HeaderBar'; import { Layout } from '@douyinfe/semi-ui'; -import SiderBar from './SiderBar.js'; -import App from '../../App.js'; -import FooterBar from './Footer.js'; +import SiderBar from './SiderBar'; +import App from '../../App'; +import FooterBar from './Footer'; import { ToastContainer } from 'react-toastify'; import React, { useContext, useEffect, useState } from 'react'; -import { useIsMobile } from '../../hooks/common/useIsMobile.js'; -import { useSidebarCollapsed } from '../../hooks/common/useSidebarCollapsed.js'; +import { useIsMobile } from '../../hooks/common/useIsMobile'; +import { useSidebarCollapsed } from '../../hooks/common/useSidebarCollapsed'; import { useTranslation } from 'react-i18next'; -import { API, getLogo, getSystemName, showError, setStatusData } from '../../helpers/index.js'; -import { UserContext } from '../../context/User/index.js'; -import { StatusContext } from '../../context/Status/index.js'; +import { API, getLogo, getSystemName, showError, setStatusData } from '../../helpers'; +import { UserContext } from '../../context/User'; +import { StatusContext } from '../../context/Status'; import { useLocation } from 'react-router-dom'; const { Sider, Content, Header } = Layout; diff --git a/web/src/components/layout/SiderBar.js b/web/src/components/layout/SiderBar.jsx similarity index 99% rename from web/src/components/layout/SiderBar.js rename to web/src/components/layout/SiderBar.jsx index 2e8829be..86c48002 100644 --- a/web/src/components/layout/SiderBar.js +++ b/web/src/components/layout/SiderBar.jsx @@ -20,14 +20,14 @@ For commercial licensing, please contact support@quantumnous.com import React, { useEffect, useMemo, useState } from 'react'; import { Link, useLocation } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { getLucideIcon } from '../../helpers/render.js'; +import { getLucideIcon } from '../../helpers/render'; import { ChevronLeft } from 'lucide-react'; -import { useSidebarCollapsed } from '../../hooks/common/useSidebarCollapsed.js'; +import { useSidebarCollapsed } from '../../hooks/common/useSidebarCollapsed'; import { isAdmin, isRoot, showError -} from '../../helpers/index.js'; +} from '../../helpers'; import { Nav, diff --git a/web/src/components/playground/ChatArea.js b/web/src/components/playground/ChatArea.jsx similarity index 100% rename from web/src/components/playground/ChatArea.js rename to web/src/components/playground/ChatArea.jsx diff --git a/web/src/components/playground/CodeViewer.js b/web/src/components/playground/CodeViewer.jsx similarity index 100% rename from web/src/components/playground/CodeViewer.js rename to web/src/components/playground/CodeViewer.jsx diff --git a/web/src/components/playground/ConfigManager.js b/web/src/components/playground/ConfigManager.jsx similarity index 100% rename from web/src/components/playground/ConfigManager.js rename to web/src/components/playground/ConfigManager.jsx diff --git a/web/src/components/playground/CustomInputRender.js b/web/src/components/playground/CustomInputRender.jsx similarity index 100% rename from web/src/components/playground/CustomInputRender.js rename to web/src/components/playground/CustomInputRender.jsx diff --git a/web/src/components/playground/CustomRequestEditor.js b/web/src/components/playground/CustomRequestEditor.jsx similarity index 100% rename from web/src/components/playground/CustomRequestEditor.js rename to web/src/components/playground/CustomRequestEditor.jsx diff --git a/web/src/components/playground/DebugPanel.js b/web/src/components/playground/DebugPanel.jsx similarity index 100% rename from web/src/components/playground/DebugPanel.js rename to web/src/components/playground/DebugPanel.jsx diff --git a/web/src/components/playground/FloatingButtons.js b/web/src/components/playground/FloatingButtons.jsx similarity index 100% rename from web/src/components/playground/FloatingButtons.js rename to web/src/components/playground/FloatingButtons.jsx diff --git a/web/src/components/playground/ImageUrlInput.js b/web/src/components/playground/ImageUrlInput.jsx similarity index 100% rename from web/src/components/playground/ImageUrlInput.js rename to web/src/components/playground/ImageUrlInput.jsx diff --git a/web/src/components/playground/MessageActions.js b/web/src/components/playground/MessageActions.jsx similarity index 100% rename from web/src/components/playground/MessageActions.js rename to web/src/components/playground/MessageActions.jsx diff --git a/web/src/components/playground/MessageContent.js b/web/src/components/playground/MessageContent.jsx similarity index 100% rename from web/src/components/playground/MessageContent.js rename to web/src/components/playground/MessageContent.jsx diff --git a/web/src/components/playground/ParameterControl.js b/web/src/components/playground/ParameterControl.jsx similarity index 100% rename from web/src/components/playground/ParameterControl.js rename to web/src/components/playground/ParameterControl.jsx diff --git a/web/src/components/playground/SettingsPanel.js b/web/src/components/playground/SettingsPanel.jsx similarity index 100% rename from web/src/components/playground/SettingsPanel.js rename to web/src/components/playground/SettingsPanel.jsx diff --git a/web/src/components/playground/ThinkingContent.js b/web/src/components/playground/ThinkingContent.jsx similarity index 100% rename from web/src/components/playground/ThinkingContent.js rename to web/src/components/playground/ThinkingContent.jsx diff --git a/web/src/components/settings/ChannelSelectorModal.js b/web/src/components/settings/ChannelSelectorModal.jsx similarity index 99% rename from web/src/components/settings/ChannelSelectorModal.js rename to web/src/components/settings/ChannelSelectorModal.jsx index 2e3e5c20..033fe815 100644 --- a/web/src/components/settings/ChannelSelectorModal.js +++ b/web/src/components/settings/ChannelSelectorModal.jsx @@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com */ import React, { useState, useEffect, forwardRef, useImperativeHandle } from 'react'; -import { useIsMobile } from '../../hooks/common/useIsMobile.js'; +import { useIsMobile } from '../../hooks/common/useIsMobile'; import { Modal, Table, diff --git a/web/src/components/settings/ChatsSetting.js b/web/src/components/settings/ChatsSetting.jsx similarity index 99% rename from web/src/components/settings/ChatsSetting.js rename to web/src/components/settings/ChatsSetting.jsx index f1b649d6..96b6b3a9 100644 --- a/web/src/components/settings/ChatsSetting.js +++ b/web/src/components/settings/ChatsSetting.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React, { useEffect, useState } from 'react'; import { Card, Spin } from '@douyinfe/semi-ui'; -import SettingsChats from '../../pages/Setting/Chat/SettingsChats.js'; +import SettingsChats from '../../pages/Setting/Chat/SettingsChats'; import { API, showError, toBoolean } from '../../helpers'; const ChatsSetting = () => { diff --git a/web/src/components/settings/DashboardSetting.js b/web/src/components/settings/DashboardSetting.jsx similarity index 98% rename from web/src/components/settings/DashboardSetting.js rename to web/src/components/settings/DashboardSetting.jsx index 764148cc..67ffb396 100644 --- a/web/src/components/settings/DashboardSetting.js +++ b/web/src/components/settings/DashboardSetting.jsx @@ -20,11 +20,11 @@ For commercial licensing, please contact support@quantumnous.com import React, { useEffect, useState, useMemo } from 'react'; import { Card, Spin, Button, Modal } from '@douyinfe/semi-ui'; import { API, showError, showSuccess, toBoolean } from '../../helpers'; -import SettingsAPIInfo from '../../pages/Setting/Dashboard/SettingsAPIInfo.js'; -import SettingsAnnouncements from '../../pages/Setting/Dashboard/SettingsAnnouncements.js'; -import SettingsFAQ from '../../pages/Setting/Dashboard/SettingsFAQ.js'; -import SettingsUptimeKuma from '../../pages/Setting/Dashboard/SettingsUptimeKuma.js'; -import SettingsDataDashboard from '../../pages/Setting/Dashboard/SettingsDataDashboard.js'; +import SettingsAPIInfo from '../../pages/Setting/Dashboard/SettingsAPIInfo'; +import SettingsAnnouncements from '../../pages/Setting/Dashboard/SettingsAnnouncements'; +import SettingsFAQ from '../../pages/Setting/Dashboard/SettingsFAQ'; +import SettingsUptimeKuma from '../../pages/Setting/Dashboard/SettingsUptimeKuma'; +import SettingsDataDashboard from '../../pages/Setting/Dashboard/SettingsDataDashboard'; const DashboardSetting = () => { let [inputs, setInputs] = useState({ diff --git a/web/src/components/settings/DrawingSetting.js b/web/src/components/settings/DrawingSetting.jsx similarity index 99% rename from web/src/components/settings/DrawingSetting.js rename to web/src/components/settings/DrawingSetting.jsx index 789c3321..797a760b 100644 --- a/web/src/components/settings/DrawingSetting.js +++ b/web/src/components/settings/DrawingSetting.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React, { useEffect, useState } from 'react'; import { Card, Spin } from '@douyinfe/semi-ui'; -import SettingsDrawing from '../../pages/Setting/Drawing/SettingsDrawing.js'; +import SettingsDrawing from '../../pages/Setting/Drawing/SettingsDrawing'; import { API, showError, toBoolean } from '../../helpers'; const DrawingSetting = () => { diff --git a/web/src/components/settings/ModelSetting.js b/web/src/components/settings/ModelSetting.jsx similarity index 98% rename from web/src/components/settings/ModelSetting.js rename to web/src/components/settings/ModelSetting.jsx index e63905b5..c8716484 100644 --- a/web/src/components/settings/ModelSetting.js +++ b/web/src/components/settings/ModelSetting.jsx @@ -22,9 +22,9 @@ import { Card, Spin, Tabs } from '@douyinfe/semi-ui'; import { API, showError, showSuccess, toBoolean } from '../../helpers'; import { useTranslation } from 'react-i18next'; -import SettingGeminiModel from '../../pages/Setting/Model/SettingGeminiModel.js'; -import SettingClaudeModel from '../../pages/Setting/Model/SettingClaudeModel.js'; -import SettingGlobalModel from '../../pages/Setting/Model/SettingGlobalModel.js'; +import SettingGeminiModel from '../../pages/Setting/Model/SettingGeminiModel'; +import SettingClaudeModel from '../../pages/Setting/Model/SettingClaudeModel'; +import SettingGlobalModel from '../../pages/Setting/Model/SettingGlobalModel'; const ModelSetting = () => { const { t } = useTranslation(); diff --git a/web/src/components/settings/OperationSetting.js b/web/src/components/settings/OperationSetting.jsx similarity index 97% rename from web/src/components/settings/OperationSetting.js rename to web/src/components/settings/OperationSetting.jsx index 93322181..d2669c64 100644 --- a/web/src/components/settings/OperationSetting.js +++ b/web/src/components/settings/OperationSetting.jsx @@ -19,11 +19,11 @@ For commercial licensing, please contact support@quantumnous.com import React, { useEffect, useState } from 'react'; import { Card, Spin } from '@douyinfe/semi-ui'; -import SettingsGeneral from '../../pages/Setting/Operation/SettingsGeneral.js'; -import SettingsSensitiveWords from '../../pages/Setting/Operation/SettingsSensitiveWords.js'; -import SettingsLog from '../../pages/Setting/Operation/SettingsLog.js'; -import SettingsMonitoring from '../../pages/Setting/Operation/SettingsMonitoring.js'; -import SettingsCreditLimit from '../../pages/Setting/Operation/SettingsCreditLimit.js'; +import SettingsGeneral from '../../pages/Setting/Operation/SettingsGeneral'; +import SettingsSensitiveWords from '../../pages/Setting/Operation/SettingsSensitiveWords'; +import SettingsLog from '../../pages/Setting/Operation/SettingsLog'; +import SettingsMonitoring from '../../pages/Setting/Operation/SettingsMonitoring'; +import SettingsCreditLimit from '../../pages/Setting/Operation/SettingsCreditLimit'; import { API, showError, toBoolean } from '../../helpers'; const OperationSetting = () => { diff --git a/web/src/components/settings/OtherSetting.js b/web/src/components/settings/OtherSetting.jsx similarity index 99% rename from web/src/components/settings/OtherSetting.js rename to web/src/components/settings/OtherSetting.jsx index bc4164a2..18119d24 100644 --- a/web/src/components/settings/OtherSetting.js +++ b/web/src/components/settings/OtherSetting.jsx @@ -31,7 +31,7 @@ import { import { API, showError, showSuccess, timestamp2string } from '../../helpers'; import { marked } from 'marked'; import { useTranslation } from 'react-i18next'; -import { StatusContext } from '../../context/Status/index.js'; +import { StatusContext } from '../../context/Status'; import Text from '@douyinfe/semi-ui/lib/es/typography/text'; const OtherSetting = () => { diff --git a/web/src/components/settings/PaymentSetting.js b/web/src/components/settings/PaymentSetting.jsx similarity index 97% rename from web/src/components/settings/PaymentSetting.js rename to web/src/components/settings/PaymentSetting.jsx index 5f909cf0..16c29a6f 100644 --- a/web/src/components/settings/PaymentSetting.js +++ b/web/src/components/settings/PaymentSetting.jsx @@ -19,9 +19,9 @@ For commercial licensing, please contact support@quantumnous.com import React, { useEffect, useState } from 'react'; import { Card, Spin } from '@douyinfe/semi-ui'; -import SettingsGeneralPayment from '../../pages/Setting/Payment/SettingsGeneralPayment.js'; -import SettingsPaymentGateway from '../../pages/Setting/Payment/SettingsPaymentGateway.js'; -import SettingsPaymentGatewayStripe from '../../pages/Setting/Payment/SettingsPaymentGatewayStripe.js'; +import SettingsGeneralPayment from '../../pages/Setting/Payment/SettingsGeneralPayment'; +import SettingsPaymentGateway from '../../pages/Setting/Payment/SettingsPaymentGateway'; +import SettingsPaymentGatewayStripe from '../../pages/Setting/Payment/SettingsPaymentGatewayStripe'; import { API, showError, toBoolean } from '../../helpers'; import { useTranslation } from 'react-i18next'; diff --git a/web/src/components/settings/PersonalSetting.js b/web/src/components/settings/PersonalSetting.jsx similarity index 100% rename from web/src/components/settings/PersonalSetting.js rename to web/src/components/settings/PersonalSetting.jsx diff --git a/web/src/components/settings/RateLimitSetting.js b/web/src/components/settings/RateLimitSetting.jsx similarity index 96% rename from web/src/components/settings/RateLimitSetting.js rename to web/src/components/settings/RateLimitSetting.jsx index eafbfc59..be83e027 100644 --- a/web/src/components/settings/RateLimitSetting.js +++ b/web/src/components/settings/RateLimitSetting.jsx @@ -20,9 +20,9 @@ For commercial licensing, please contact support@quantumnous.com import React, { useEffect, useState } from 'react'; import { Card, Spin } from '@douyinfe/semi-ui'; -import { API, showError, toBoolean } from '../../helpers/index.js'; +import { API, showError, toBoolean } from '../../helpers'; import { useTranslation } from 'react-i18next'; -import RequestRateLimit from '../../pages/Setting/RateLimit/SettingsRequestRateLimit.js'; +import RequestRateLimit from '../../pages/Setting/RateLimit/SettingsRequestRateLimit'; const RateLimitSetting = () => { const { t } = useTranslation(); diff --git a/web/src/components/settings/RatioSetting.js b/web/src/components/settings/RatioSetting.jsx similarity index 97% rename from web/src/components/settings/RatioSetting.js rename to web/src/components/settings/RatioSetting.jsx index baa24f9c..92bfd9de 100644 --- a/web/src/components/settings/RatioSetting.js +++ b/web/src/components/settings/RatioSetting.jsx @@ -21,11 +21,11 @@ import React, { useEffect, useState } from 'react'; import { Card, Spin, Tabs } from '@douyinfe/semi-ui'; import { useTranslation } from 'react-i18next'; -import GroupRatioSettings from '../../pages/Setting/Ratio/GroupRatioSettings.js'; -import ModelRatioSettings from '../../pages/Setting/Ratio/ModelRatioSettings.js'; -import ModelSettingsVisualEditor from '../../pages/Setting/Ratio/ModelSettingsVisualEditor.js'; -import ModelRatioNotSetEditor from '../../pages/Setting/Ratio/ModelRationNotSetEditor.js'; -import UpstreamRatioSync from '../../pages/Setting/Ratio/UpstreamRatioSync.js'; +import GroupRatioSettings from '../../pages/Setting/Ratio/GroupRatioSettings'; +import ModelRatioSettings from '../../pages/Setting/Ratio/ModelRatioSettings'; +import ModelSettingsVisualEditor from '../../pages/Setting/Ratio/ModelSettingsVisualEditor'; +import ModelRatioNotSetEditor from '../../pages/Setting/Ratio/ModelRationNotSetEditor'; +import UpstreamRatioSync from '../../pages/Setting/Ratio/UpstreamRatioSync'; import { API, showError, toBoolean } from '../../helpers'; diff --git a/web/src/components/settings/SystemSetting.js b/web/src/components/settings/SystemSetting.jsx similarity index 100% rename from web/src/components/settings/SystemSetting.js rename to web/src/components/settings/SystemSetting.jsx diff --git a/web/src/components/settings/personal/cards/AccountManagement.js b/web/src/components/settings/personal/cards/AccountManagement.jsx similarity index 100% rename from web/src/components/settings/personal/cards/AccountManagement.js rename to web/src/components/settings/personal/cards/AccountManagement.jsx diff --git a/web/src/components/settings/personal/cards/ModelsList.js b/web/src/components/settings/personal/cards/ModelsList.jsx similarity index 100% rename from web/src/components/settings/personal/cards/ModelsList.js rename to web/src/components/settings/personal/cards/ModelsList.jsx diff --git a/web/src/components/settings/personal/cards/NotificationSettings.js b/web/src/components/settings/personal/cards/NotificationSettings.jsx similarity index 100% rename from web/src/components/settings/personal/cards/NotificationSettings.js rename to web/src/components/settings/personal/cards/NotificationSettings.jsx diff --git a/web/src/components/settings/personal/components/TwoFASetting.js b/web/src/components/settings/personal/components/TwoFASetting.jsx similarity index 100% rename from web/src/components/settings/personal/components/TwoFASetting.js rename to web/src/components/settings/personal/components/TwoFASetting.jsx diff --git a/web/src/components/settings/personal/components/UserInfoHeader.js b/web/src/components/settings/personal/components/UserInfoHeader.jsx similarity index 100% rename from web/src/components/settings/personal/components/UserInfoHeader.js rename to web/src/components/settings/personal/components/UserInfoHeader.jsx diff --git a/web/src/components/settings/personal/modals/AccountDeleteModal.js b/web/src/components/settings/personal/modals/AccountDeleteModal.jsx similarity index 100% rename from web/src/components/settings/personal/modals/AccountDeleteModal.js rename to web/src/components/settings/personal/modals/AccountDeleteModal.jsx diff --git a/web/src/components/settings/personal/modals/ChangePasswordModal.js b/web/src/components/settings/personal/modals/ChangePasswordModal.jsx similarity index 100% rename from web/src/components/settings/personal/modals/ChangePasswordModal.js rename to web/src/components/settings/personal/modals/ChangePasswordModal.jsx diff --git a/web/src/components/settings/personal/modals/EmailBindModal.js b/web/src/components/settings/personal/modals/EmailBindModal.jsx similarity index 100% rename from web/src/components/settings/personal/modals/EmailBindModal.js rename to web/src/components/settings/personal/modals/EmailBindModal.jsx diff --git a/web/src/components/settings/personal/modals/WeChatBindModal.js b/web/src/components/settings/personal/modals/WeChatBindModal.jsx similarity index 100% rename from web/src/components/settings/personal/modals/WeChatBindModal.js rename to web/src/components/settings/personal/modals/WeChatBindModal.jsx diff --git a/web/src/components/table/channels/ChannelsColumnDefs.js b/web/src/components/table/channels/ChannelsColumnDefs.jsx similarity index 99% rename from web/src/components/table/channels/ChannelsColumnDefs.js rename to web/src/components/table/channels/ChannelsColumnDefs.jsx index 06a23024..dee5c8e1 100644 --- a/web/src/components/table/channels/ChannelsColumnDefs.js +++ b/web/src/components/table/channels/ChannelsColumnDefs.jsx @@ -35,8 +35,8 @@ import { renderQuota, getChannelIcon, renderQuotaWithAmount -} from '../../../helpers/index.js'; -import { CHANNEL_OPTIONS } from '../../../constants/index.js'; +} from '../../../helpers'; +import { CHANNEL_OPTIONS } from '../../../constants'; import { IconTreeTriangleDown, IconMore } from '@douyinfe/semi-icons'; import { FaRandom } from 'react-icons/fa'; diff --git a/web/src/components/table/channels/ChannelsTable.jsx b/web/src/components/table/channels/ChannelsTable.jsx index 963d9356..2097ab4f 100644 --- a/web/src/components/table/channels/ChannelsTable.jsx +++ b/web/src/components/table/channels/ChannelsTable.jsx @@ -19,12 +19,12 @@ For commercial licensing, please contact support@quantumnous.com import React, { useMemo } from 'react'; import { Empty } from '@douyinfe/semi-ui'; -import CardTable from '../../common/ui/CardTable.js'; +import CardTable from '../../common/ui/CardTable'; import { IllustrationNoResult, IllustrationNoResultDark } from '@douyinfe/semi-illustrations'; -import { getChannelsColumns } from './ChannelsColumnDefs.js'; +import { getChannelsColumns } from './ChannelsColumnDefs'; const ChannelsTable = (channelsData) => { const { diff --git a/web/src/components/table/channels/ChannelsTabs.jsx b/web/src/components/table/channels/ChannelsTabs.jsx index f0448efc..daa46dc5 100644 --- a/web/src/components/table/channels/ChannelsTabs.jsx +++ b/web/src/components/table/channels/ChannelsTabs.jsx @@ -19,8 +19,8 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import { Tabs, TabPane, Tag } from '@douyinfe/semi-ui'; -import { CHANNEL_OPTIONS } from '../../../constants/index.js'; -import { getChannelIcon } from '../../../helpers/index.js'; +import { CHANNEL_OPTIONS } from '../../../constants'; +import { getChannelIcon } from '../../../helpers'; const ChannelsTabs = ({ enableTagMode, diff --git a/web/src/components/table/channels/index.jsx b/web/src/components/table/channels/index.jsx index 66e2d72d..44d1a2c5 100644 --- a/web/src/components/table/channels/index.jsx +++ b/web/src/components/table/channels/index.jsx @@ -18,19 +18,19 @@ For commercial licensing, please contact support@quantumnous.com */ import React from 'react'; -import CardPro from '../../common/ui/CardPro.js'; -import ChannelsTable from './ChannelsTable.jsx'; -import ChannelsActions from './ChannelsActions.jsx'; -import ChannelsFilters from './ChannelsFilters.jsx'; -import ChannelsTabs from './ChannelsTabs.jsx'; -import { useChannelsData } from '../../../hooks/channels/useChannelsData.js'; -import { useIsMobile } from '../../../hooks/common/useIsMobile.js'; -import BatchTagModal from './modals/BatchTagModal.jsx'; -import ModelTestModal from './modals/ModelTestModal.jsx'; -import ColumnSelectorModal from './modals/ColumnSelectorModal.jsx'; -import EditChannelModal from './modals/EditChannelModal.jsx'; -import EditTagModal from './modals/EditTagModal.jsx'; -import MultiKeyManageModal from './modals/MultiKeyManageModal.jsx'; +import CardPro from '../../common/ui/CardPro'; +import ChannelsTable from './ChannelsTable'; +import ChannelsActions from './ChannelsActions'; +import ChannelsFilters from './ChannelsFilters'; +import ChannelsTabs from './ChannelsTabs'; +import { useChannelsData } from '../../../hooks/channels/useChannelsData'; +import { useIsMobile } from '../../../hooks/common/useIsMobile'; +import BatchTagModal from './modals/BatchTagModal'; +import ModelTestModal from './modals/ModelTestModal'; +import ColumnSelectorModal from './modals/ColumnSelectorModal'; +import EditChannelModal from './modals/EditChannelModal'; +import EditTagModal from './modals/EditTagModal'; +import MultiKeyManageModal from './modals/MultiKeyManageModal'; import { createCardProPagination } from '../../../helpers/utils'; const ChannelsPage = () => { diff --git a/web/src/components/table/channels/modals/ColumnSelectorModal.jsx b/web/src/components/table/channels/modals/ColumnSelectorModal.jsx index 291992ce..07bc3b53 100644 --- a/web/src/components/table/channels/modals/ColumnSelectorModal.jsx +++ b/web/src/components/table/channels/modals/ColumnSelectorModal.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import { Modal, Button, Checkbox } from '@douyinfe/semi-ui'; -import { getChannelsColumns } from '../ChannelsColumnDefs.js'; +import { getChannelsColumns } from '../ChannelsColumnDefs'; const ColumnSelectorModal = ({ showColumnSelector, diff --git a/web/src/components/table/channels/modals/EditChannelModal.jsx b/web/src/components/table/channels/modals/EditChannelModal.jsx index dd14cb5b..23fe2c58 100644 --- a/web/src/components/table/channels/modals/EditChannelModal.jsx +++ b/web/src/components/table/channels/modals/EditChannelModal.jsx @@ -26,7 +26,7 @@ import { showSuccess, verifyJSON, } from '../../../../helpers'; -import { useIsMobile } from '../../../../hooks/common/useIsMobile.js'; +import { useIsMobile } from '../../../../hooks/common/useIsMobile'; import { CHANNEL_OPTIONS } from '../../../../constants'; import { SideSheet, @@ -1653,50 +1653,50 @@ const EditChannelModal = (props) => { /> handleInputChange('param_override', value)} - extraText={ -
- handleInputChange('param_override', JSON.stringify({ temperature: 0 }, null, 2))} - > - {t('旧格式模板')} - - handleInputChange('param_override', JSON.stringify({ - operations: [ + field='param_override' + label={t('参数覆盖')} + placeholder={ + t('此项可选,用于覆盖请求参数。不支持覆盖 stream 参数') + + '\n' + t('旧格式(直接覆盖):') + + '\n{\n "temperature": 0,\n "max_tokens": 1000\n}' + + '\n\n' + t('新格式(支持条件判断与json自定义):') + + '\n{\n "operations": [\n {\n "path": "temperature",\n "mode": "set",\n "value": 0.7,\n "conditions": [\n {\n "path": "model",\n "mode": "prefix",\n "value": "gpt"\n }\n ]\n }\n ]\n}' + } + autosize + onChange={(value) => handleInputChange('param_override', value)} + extraText={ +
+ handleInputChange('param_override', JSON.stringify({ temperature: 0 }, null, 2))} + > + {t('旧格式模板')} + + handleInputChange('param_override', JSON.stringify({ + operations: [ + { + path: "temperature", + mode: "set", + value: 0.7, + conditions: [ { - path: "temperature", - mode: "set", - value: 0.7, - conditions: [ - { - path: "model", - mode: "prefix", - value: "gpt" - } - ], - logic: "AND" + path: "model", + mode: "prefix", + value: "gpt" } - ] - }, null, 2))} - > - {t('新格式模板')} - -
- } - showClear + ], + logic: "AND" + } + ] + }, null, 2))} + > + {t('新格式模板')} +
+
+ } + showClear /> diff --git a/web/src/components/table/channels/modals/ModelSelectModal.jsx b/web/src/components/table/channels/modals/ModelSelectModal.jsx index 6deceae4..3fb82858 100644 --- a/web/src/components/table/channels/modals/ModelSelectModal.jsx +++ b/web/src/components/table/channels/modals/ModelSelectModal.jsx @@ -1,5 +1,24 @@ +/* +Copyright (C) 2025 QuantumNous + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . + +For commercial licensing, please contact support@quantumnous.com +*/ + import React, { useState, useEffect } from 'react'; -import { useIsMobile } from '../../../../hooks/common/useIsMobile.js'; +import { useIsMobile } from '../../../../hooks/common/useIsMobile'; import { Modal, Checkbox, Spin, Input, Typography, Empty, Tabs, Collapse } from '@douyinfe/semi-ui'; import { IllustrationNoResult, diff --git a/web/src/components/table/channels/modals/ModelTestModal.jsx b/web/src/components/table/channels/modals/ModelTestModal.jsx index 7e845a04..f5fef14d 100644 --- a/web/src/components/table/channels/modals/ModelTestModal.jsx +++ b/web/src/components/table/channels/modals/ModelTestModal.jsx @@ -27,8 +27,8 @@ import { Typography } from '@douyinfe/semi-ui'; import { IconSearch } from '@douyinfe/semi-icons'; -import { copy, showError, showInfo, showSuccess } from '../../../../helpers/index.js'; -import { MODEL_TABLE_PAGE_SIZE } from '../../../../constants/index.js'; +import { copy, showError, showInfo, showSuccess } from '../../../../helpers'; +import { MODEL_TABLE_PAGE_SIZE } from '../../../../constants'; const ModelTestModal = ({ showModelTestModal, diff --git a/web/src/components/table/channels/modals/MultiKeyManageModal.jsx b/web/src/components/table/channels/modals/MultiKeyManageModal.jsx index 52a8324a..0512208c 100644 --- a/web/src/components/table/channels/modals/MultiKeyManageModal.jsx +++ b/web/src/components/table/channels/modals/MultiKeyManageModal.jsx @@ -38,7 +38,7 @@ import { Card } from '@douyinfe/semi-ui'; import { IllustrationNoResult, IllustrationNoResultDark } from '@douyinfe/semi-illustrations'; -import { API, showError, showSuccess, timestamp2string } from '../../../../helpers/index.js'; +import { API, showError, showSuccess, timestamp2string } from '../../../../helpers'; const { Text } = Typography; diff --git a/web/src/components/table/mj-logs/MjLogsColumnDefs.js b/web/src/components/table/mj-logs/MjLogsColumnDefs.jsx similarity index 100% rename from web/src/components/table/mj-logs/MjLogsColumnDefs.js rename to web/src/components/table/mj-logs/MjLogsColumnDefs.jsx diff --git a/web/src/components/table/mj-logs/MjLogsTable.jsx b/web/src/components/table/mj-logs/MjLogsTable.jsx index 31a2d10e..db3483ce 100644 --- a/web/src/components/table/mj-logs/MjLogsTable.jsx +++ b/web/src/components/table/mj-logs/MjLogsTable.jsx @@ -19,12 +19,12 @@ For commercial licensing, please contact support@quantumnous.com import React, { useMemo } from 'react'; import { Empty } from '@douyinfe/semi-ui'; -import CardTable from '../../common/ui/CardTable.js'; +import CardTable from '../../common/ui/CardTable'; import { IllustrationNoResult, IllustrationNoResultDark, } from '@douyinfe/semi-illustrations'; -import { getMjLogsColumns } from './MjLogsColumnDefs.js'; +import { getMjLogsColumns } from './MjLogsColumnDefs'; const MjLogsTable = (mjLogsData) => { const { diff --git a/web/src/components/table/mj-logs/index.jsx b/web/src/components/table/mj-logs/index.jsx index 3e319975..1065e00b 100644 --- a/web/src/components/table/mj-logs/index.jsx +++ b/web/src/components/table/mj-logs/index.jsx @@ -19,14 +19,14 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import { Layout } from '@douyinfe/semi-ui'; -import CardPro from '../../common/ui/CardPro.js'; -import MjLogsTable from './MjLogsTable.jsx'; -import MjLogsActions from './MjLogsActions.jsx'; -import MjLogsFilters from './MjLogsFilters.jsx'; -import ColumnSelectorModal from './modals/ColumnSelectorModal.jsx'; -import ContentModal from './modals/ContentModal.jsx'; -import { useMjLogsData } from '../../../hooks/mj-logs/useMjLogsData.js'; -import { useIsMobile } from '../../../hooks/common/useIsMobile.js'; +import CardPro from '../../common/ui/CardPro'; +import MjLogsTable from './MjLogsTable'; +import MjLogsActions from './MjLogsActions'; +import MjLogsFilters from './MjLogsFilters'; +import ColumnSelectorModal from './modals/ColumnSelectorModal'; +import ContentModal from './modals/ContentModal'; +import { useMjLogsData } from '../../../hooks/mj-logs/useMjLogsData'; +import { useIsMobile } from '../../../hooks/common/useIsMobile'; import { createCardProPagination } from '../../../helpers/utils'; const MjLogsPage = () => { diff --git a/web/src/components/table/mj-logs/modals/ColumnSelectorModal.jsx b/web/src/components/table/mj-logs/modals/ColumnSelectorModal.jsx index d05f9cf0..f2dc1d6a 100644 --- a/web/src/components/table/mj-logs/modals/ColumnSelectorModal.jsx +++ b/web/src/components/table/mj-logs/modals/ColumnSelectorModal.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import { Modal, Button, Checkbox } from '@douyinfe/semi-ui'; -import { getMjLogsColumns } from '../MjLogsColumnDefs.js'; +import { getMjLogsColumns } from '../MjLogsColumnDefs'; const ColumnSelectorModal = ({ showColumnSelector, diff --git a/web/src/components/table/model-pricing/view/table/PricingTableColumns.js b/web/src/components/table/model-pricing/view/table/PricingTableColumns.jsx similarity index 100% rename from web/src/components/table/model-pricing/view/table/PricingTableColumns.js rename to web/src/components/table/model-pricing/view/table/PricingTableColumns.jsx diff --git a/web/src/components/table/models/ModelsActions.jsx b/web/src/components/table/models/ModelsActions.jsx index b10d0500..77dedf7e 100644 --- a/web/src/components/table/models/ModelsActions.jsx +++ b/web/src/components/table/models/ModelsActions.jsx @@ -18,13 +18,13 @@ For commercial licensing, please contact support@quantumnous.com */ import React, { useState } from 'react'; -import MissingModelsModal from './modals/MissingModelsModal.jsx'; -import PrefillGroupManagement from './modals/PrefillGroupManagement.jsx'; -import EditPrefillGroupModal from './modals/EditPrefillGroupModal.jsx'; +import MissingModelsModal from './modals/MissingModelsModal'; +import PrefillGroupManagement from './modals/PrefillGroupManagement'; +import EditPrefillGroupModal from './modals/EditPrefillGroupModal'; import { Button, Modal } from '@douyinfe/semi-ui'; import { showSuccess, showError, copy } from '../../../helpers'; import CompactModeToggle from '../../common/ui/CompactModeToggle'; -import SelectionNotification from './components/SelectionNotification.jsx'; +import SelectionNotification from './components/SelectionNotification'; const ModelsActions = ({ selectedKeys, diff --git a/web/src/components/table/models/ModelsColumnDefs.js b/web/src/components/table/models/ModelsColumnDefs.jsx similarity index 100% rename from web/src/components/table/models/ModelsColumnDefs.js rename to web/src/components/table/models/ModelsColumnDefs.jsx diff --git a/web/src/components/table/models/ModelsTable.jsx b/web/src/components/table/models/ModelsTable.jsx index 7c37079a..ed95d5ae 100644 --- a/web/src/components/table/models/ModelsTable.jsx +++ b/web/src/components/table/models/ModelsTable.jsx @@ -19,12 +19,12 @@ For commercial licensing, please contact support@quantumnous.com import React, { useMemo } from 'react'; import { Empty } from '@douyinfe/semi-ui'; -import CardTable from '../../common/ui/CardTable.js'; +import CardTable from '../../common/ui/CardTable'; import { IllustrationNoResult, IllustrationNoResultDark, } from '@douyinfe/semi-illustrations'; -import { getModelsColumns } from './ModelsColumnDefs.js'; +import { getModelsColumns } from './ModelsColumnDefs'; const ModelsTable = (modelsData) => { const { diff --git a/web/src/components/table/models/index.jsx b/web/src/components/table/models/index.jsx index 93d63470..9c1b1fcc 100644 --- a/web/src/components/table/models/index.jsx +++ b/web/src/components/table/models/index.jsx @@ -19,12 +19,12 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import CardPro from '../../common/ui/CardPro'; -import ModelsTable from './ModelsTable.jsx'; -import ModelsActions from './ModelsActions.jsx'; -import ModelsFilters from './ModelsFilters.jsx'; -import ModelsTabs from './ModelsTabs.jsx'; -import EditModelModal from './modals/EditModelModal.jsx'; -import EditVendorModal from './modals/EditVendorModal.jsx'; +import ModelsTable from './ModelsTable'; +import ModelsActions from './ModelsActions'; +import ModelsFilters from './ModelsFilters'; +import ModelsTabs from './ModelsTabs'; +import EditModelModal from './modals/EditModelModal'; +import EditVendorModal from './modals/EditVendorModal'; import { useModelsData } from '../../../hooks/models/useModelsData'; import { useIsMobile } from '../../../hooks/common/useIsMobile'; import { createCardProPagination } from '../../../helpers/utils'; diff --git a/web/src/components/table/redemptions/RedemptionsColumnDefs.js b/web/src/components/table/redemptions/RedemptionsColumnDefs.jsx similarity index 100% rename from web/src/components/table/redemptions/RedemptionsColumnDefs.js rename to web/src/components/table/redemptions/RedemptionsColumnDefs.jsx diff --git a/web/src/components/table/redemptions/RedemptionsTable.jsx b/web/src/components/table/redemptions/RedemptionsTable.jsx index 76e50532..2dd94bfb 100644 --- a/web/src/components/table/redemptions/RedemptionsTable.jsx +++ b/web/src/components/table/redemptions/RedemptionsTable.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React, { useMemo, useState } from 'react'; import { Empty } from '@douyinfe/semi-ui'; -import CardTable from '../../common/ui/CardTable.js'; +import CardTable from '../../common/ui/CardTable'; import { IllustrationNoResult, IllustrationNoResultDark diff --git a/web/src/components/table/redemptions/index.jsx b/web/src/components/table/redemptions/index.jsx index 58db6cbf..fe32966b 100644 --- a/web/src/components/table/redemptions/index.jsx +++ b/web/src/components/table/redemptions/index.jsx @@ -19,10 +19,10 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import CardPro from '../../common/ui/CardPro'; -import RedemptionsTable from './RedemptionsTable.jsx'; -import RedemptionsActions from './RedemptionsActions.jsx'; -import RedemptionsFilters from './RedemptionsFilters.jsx'; -import RedemptionsDescription from './RedemptionsDescription.jsx'; +import RedemptionsTable from './RedemptionsTable'; +import RedemptionsActions from './RedemptionsActions'; +import RedemptionsFilters from './RedemptionsFilters'; +import RedemptionsDescription from './RedemptionsDescription'; import EditRedemptionModal from './modals/EditRedemptionModal'; import { useRedemptionsData } from '../../../hooks/redemptions/useRedemptionsData'; import { useIsMobile } from '../../../hooks/common/useIsMobile'; diff --git a/web/src/components/table/redemptions/modals/EditRedemptionModal.jsx b/web/src/components/table/redemptions/modals/EditRedemptionModal.jsx index 79b834a3..dd194dfd 100644 --- a/web/src/components/table/redemptions/modals/EditRedemptionModal.jsx +++ b/web/src/components/table/redemptions/modals/EditRedemptionModal.jsx @@ -27,7 +27,7 @@ import { renderQuota, renderQuotaWithPrompt, } from '../../../../helpers'; -import { useIsMobile } from '../../../../hooks/common/useIsMobile.js'; +import { useIsMobile } from '../../../../hooks/common/useIsMobile'; import { Button, Modal, diff --git a/web/src/components/table/task-logs/TaskLogsColumnDefs.js b/web/src/components/table/task-logs/TaskLogsColumnDefs.jsx similarity index 100% rename from web/src/components/table/task-logs/TaskLogsColumnDefs.js rename to web/src/components/table/task-logs/TaskLogsColumnDefs.jsx diff --git a/web/src/components/table/task-logs/TaskLogsTable.jsx b/web/src/components/table/task-logs/TaskLogsTable.jsx index eaf73c71..33cd70b6 100644 --- a/web/src/components/table/task-logs/TaskLogsTable.jsx +++ b/web/src/components/table/task-logs/TaskLogsTable.jsx @@ -19,12 +19,12 @@ For commercial licensing, please contact support@quantumnous.com import React, { useMemo } from 'react'; import { Empty } from '@douyinfe/semi-ui'; -import CardTable from '../../common/ui/CardTable.js'; +import CardTable from '../../common/ui/CardTable'; import { IllustrationNoResult, IllustrationNoResultDark, } from '@douyinfe/semi-illustrations'; -import { getTaskLogsColumns } from './TaskLogsColumnDefs.js'; +import { getTaskLogsColumns } from './TaskLogsColumnDefs'; const TaskLogsTable = (taskLogsData) => { const { diff --git a/web/src/components/table/task-logs/index.jsx b/web/src/components/table/task-logs/index.jsx index a12dab8a..f63f6a4a 100644 --- a/web/src/components/table/task-logs/index.jsx +++ b/web/src/components/table/task-logs/index.jsx @@ -19,14 +19,14 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import { Layout } from '@douyinfe/semi-ui'; -import CardPro from '../../common/ui/CardPro.js'; -import TaskLogsTable from './TaskLogsTable.jsx'; -import TaskLogsActions from './TaskLogsActions.jsx'; -import TaskLogsFilters from './TaskLogsFilters.jsx'; -import ColumnSelectorModal from './modals/ColumnSelectorModal.jsx'; -import ContentModal from './modals/ContentModal.jsx'; -import { useTaskLogsData } from '../../../hooks/task-logs/useTaskLogsData.js'; -import { useIsMobile } from '../../../hooks/common/useIsMobile.js'; +import CardPro from '../../common/ui/CardPro'; +import TaskLogsTable from './TaskLogsTable'; +import TaskLogsActions from './TaskLogsActions'; +import TaskLogsFilters from './TaskLogsFilters'; +import ColumnSelectorModal from './modals/ColumnSelectorModal'; +import ContentModal from './modals/ContentModal'; +import { useTaskLogsData } from '../../../hooks/task-logs/useTaskLogsData'; +import { useIsMobile } from '../../../hooks/common/useIsMobile'; import { createCardProPagination } from '../../../helpers/utils'; const TaskLogsPage = () => { diff --git a/web/src/components/table/task-logs/modals/ColumnSelectorModal.jsx b/web/src/components/table/task-logs/modals/ColumnSelectorModal.jsx index 6a66304b..6da29658 100644 --- a/web/src/components/table/task-logs/modals/ColumnSelectorModal.jsx +++ b/web/src/components/table/task-logs/modals/ColumnSelectorModal.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import { Modal, Button, Checkbox } from '@douyinfe/semi-ui'; -import { getTaskLogsColumns } from '../TaskLogsColumnDefs.js'; +import { getTaskLogsColumns } from '../TaskLogsColumnDefs'; const ColumnSelectorModal = ({ showColumnSelector, diff --git a/web/src/components/table/tokens/TokensColumnDefs.js b/web/src/components/table/tokens/TokensColumnDefs.jsx similarity index 100% rename from web/src/components/table/tokens/TokensColumnDefs.js rename to web/src/components/table/tokens/TokensColumnDefs.jsx diff --git a/web/src/components/table/tokens/TokensTable.jsx b/web/src/components/table/tokens/TokensTable.jsx index 15be1c63..e360784f 100644 --- a/web/src/components/table/tokens/TokensTable.jsx +++ b/web/src/components/table/tokens/TokensTable.jsx @@ -19,12 +19,12 @@ For commercial licensing, please contact support@quantumnous.com import React, { useMemo } from 'react'; import { Empty } from '@douyinfe/semi-ui'; -import CardTable from '../../common/ui/CardTable.js'; +import CardTable from '../../common/ui/CardTable'; import { IllustrationNoResult, IllustrationNoResultDark, } from '@douyinfe/semi-illustrations'; -import { getTokensColumns } from './TokensColumnDefs.js'; +import { getTokensColumns } from './TokensColumnDefs'; const TokensTable = (tokensData) => { const { diff --git a/web/src/components/table/tokens/index.jsx b/web/src/components/table/tokens/index.jsx index 05ccf259..e7a3ae0a 100644 --- a/web/src/components/table/tokens/index.jsx +++ b/web/src/components/table/tokens/index.jsx @@ -21,10 +21,10 @@ import React, { useEffect, useRef, useState } from 'react'; import { Notification, Button, Space, Toast, Typography, Select } from '@douyinfe/semi-ui'; import { API, showError, getModelCategories, selectFilter } from '../../../helpers'; import CardPro from '../../common/ui/CardPro'; -import TokensTable from './TokensTable.jsx'; -import TokensActions from './TokensActions.jsx'; -import TokensFilters from './TokensFilters.jsx'; -import TokensDescription from './TokensDescription.jsx'; +import TokensTable from './TokensTable'; +import TokensActions from './TokensActions'; +import TokensFilters from './TokensFilters'; +import TokensDescription from './TokensDescription'; import EditTokenModal from './modals/EditTokenModal'; import { useTokensData } from '../../../hooks/tokens/useTokensData'; import { useIsMobile } from '../../../hooks/common/useIsMobile'; @@ -222,7 +222,7 @@ function TokensPage() { } // eslint-disable-next-line react-hooks/exhaustive-deps }, [modelOptions, selectedModel, tokensData.t, fluentNoticeOpen]); - + useEffect(() => { const selector = '#fluent-new-api-container'; const root = document.body || document.documentElement; diff --git a/web/src/components/table/tokens/modals/EditTokenModal.jsx b/web/src/components/table/tokens/modals/EditTokenModal.jsx index e9760edf..43a4b83a 100644 --- a/web/src/components/table/tokens/modals/EditTokenModal.jsx +++ b/web/src/components/table/tokens/modals/EditTokenModal.jsx @@ -28,7 +28,7 @@ import { getModelCategories, selectFilter, } from '../../../../helpers'; -import { useIsMobile } from '../../../../hooks/common/useIsMobile.js'; +import { useIsMobile } from '../../../../hooks/common/useIsMobile'; import { Button, SideSheet, diff --git a/web/src/components/table/usage-logs/UsageLogsColumnDefs.js b/web/src/components/table/usage-logs/UsageLogsColumnDefs.jsx similarity index 100% rename from web/src/components/table/usage-logs/UsageLogsColumnDefs.js rename to web/src/components/table/usage-logs/UsageLogsColumnDefs.jsx diff --git a/web/src/components/table/usage-logs/UsageLogsTable.jsx b/web/src/components/table/usage-logs/UsageLogsTable.jsx index 2739d3c4..9ad7b1d5 100644 --- a/web/src/components/table/usage-logs/UsageLogsTable.jsx +++ b/web/src/components/table/usage-logs/UsageLogsTable.jsx @@ -19,12 +19,12 @@ For commercial licensing, please contact support@quantumnous.com import React, { useMemo } from 'react'; import { Empty, Descriptions } from '@douyinfe/semi-ui'; -import CardTable from '../../common/ui/CardTable.js'; +import CardTable from '../../common/ui/CardTable'; import { IllustrationNoResult, IllustrationNoResultDark, } from '@douyinfe/semi-illustrations'; -import { getLogsColumns } from './UsageLogsColumnDefs.js'; +import { getLogsColumns } from './UsageLogsColumnDefs'; const LogsTable = (logsData) => { const { diff --git a/web/src/components/table/usage-logs/index.jsx b/web/src/components/table/usage-logs/index.jsx index bd550088..77a4879c 100644 --- a/web/src/components/table/usage-logs/index.jsx +++ b/web/src/components/table/usage-logs/index.jsx @@ -18,14 +18,14 @@ For commercial licensing, please contact support@quantumnous.com */ import React from 'react'; -import CardPro from '../../common/ui/CardPro.js'; -import LogsTable from './UsageLogsTable.jsx'; -import LogsActions from './UsageLogsActions.jsx'; -import LogsFilters from './UsageLogsFilters.jsx'; -import ColumnSelectorModal from './modals/ColumnSelectorModal.jsx'; -import UserInfoModal from './modals/UserInfoModal.jsx'; -import { useLogsData } from '../../../hooks/usage-logs/useUsageLogsData.js'; -import { useIsMobile } from '../../../hooks/common/useIsMobile.js'; +import CardPro from '../../common/ui/CardPro'; +import LogsTable from './UsageLogsTable'; +import LogsActions from './UsageLogsActions'; +import LogsFilters from './UsageLogsFilters'; +import ColumnSelectorModal from './modals/ColumnSelectorModal'; +import UserInfoModal from './modals/UserInfoModal'; +import { useLogsData } from '../../../hooks/usage-logs/useUsageLogsData'; +import { useIsMobile } from '../../../hooks/common/useIsMobile'; import { createCardProPagination } from '../../../helpers/utils'; const LogsPage = () => { diff --git a/web/src/components/table/usage-logs/modals/ColumnSelectorModal.jsx b/web/src/components/table/usage-logs/modals/ColumnSelectorModal.jsx index 262041fe..2295203c 100644 --- a/web/src/components/table/usage-logs/modals/ColumnSelectorModal.jsx +++ b/web/src/components/table/usage-logs/modals/ColumnSelectorModal.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import { Modal, Button, Checkbox } from '@douyinfe/semi-ui'; -import { getLogsColumns } from '../UsageLogsColumnDefs.js'; +import { getLogsColumns } from '../UsageLogsColumnDefs'; const ColumnSelectorModal = ({ showColumnSelector, diff --git a/web/src/components/table/users/UsersColumnDefs.js b/web/src/components/table/users/UsersColumnDefs.jsx similarity index 100% rename from web/src/components/table/users/UsersColumnDefs.js rename to web/src/components/table/users/UsersColumnDefs.jsx diff --git a/web/src/components/table/users/UsersTable.jsx b/web/src/components/table/users/UsersTable.jsx index cd93bf95..aa3c6979 100644 --- a/web/src/components/table/users/UsersTable.jsx +++ b/web/src/components/table/users/UsersTable.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React, { useMemo, useState } from 'react'; import { Empty } from '@douyinfe/semi-ui'; -import CardTable from '../../common/ui/CardTable.js'; +import CardTable from '../../common/ui/CardTable'; import { IllustrationNoResult, IllustrationNoResultDark diff --git a/web/src/components/table/users/index.jsx b/web/src/components/table/users/index.jsx index 99d50f50..f1ebabe1 100644 --- a/web/src/components/table/users/index.jsx +++ b/web/src/components/table/users/index.jsx @@ -19,12 +19,12 @@ For commercial licensing, please contact support@quantumnous.com import React from 'react'; import CardPro from '../../common/ui/CardPro'; -import UsersTable from './UsersTable.jsx'; -import UsersActions from './UsersActions.jsx'; -import UsersFilters from './UsersFilters.jsx'; -import UsersDescription from './UsersDescription.jsx'; -import AddUserModal from './modals/AddUserModal.jsx'; -import EditUserModal from './modals/EditUserModal.jsx'; +import UsersTable from './UsersTable'; +import UsersActions from './UsersActions'; +import UsersFilters from './UsersFilters'; +import UsersDescription from './UsersDescription'; +import AddUserModal from './modals/AddUserModal'; +import EditUserModal from './modals/EditUserModal'; import { useUsersData } from '../../../hooks/users/useUsersData'; import { useIsMobile } from '../../../hooks/common/useIsMobile'; import { createCardProPagination } from '../../../helpers/utils'; diff --git a/web/src/components/table/users/modals/AddUserModal.jsx b/web/src/components/table/users/modals/AddUserModal.jsx index caf33a64..a4265cf8 100644 --- a/web/src/components/table/users/modals/AddUserModal.jsx +++ b/web/src/components/table/users/modals/AddUserModal.jsx @@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com import React, { useState, useRef } from 'react'; import { API, showError, showSuccess } from '../../../../helpers'; -import { useIsMobile } from '../../../../hooks/common/useIsMobile.js'; +import { useIsMobile } from '../../../../hooks/common/useIsMobile'; import { Button, SideSheet, diff --git a/web/src/components/table/users/modals/EditUserModal.jsx b/web/src/components/table/users/modals/EditUserModal.jsx index a075f14b..47fbc367 100644 --- a/web/src/components/table/users/modals/EditUserModal.jsx +++ b/web/src/components/table/users/modals/EditUserModal.jsx @@ -26,7 +26,7 @@ import { renderQuota, renderQuotaWithPrompt, } from '../../../../helpers'; -import { useIsMobile } from '../../../../hooks/common/useIsMobile.js'; +import { useIsMobile } from '../../../../hooks/common/useIsMobile'; import { Button, Modal, diff --git a/web/src/components/topup/index.jsx b/web/src/components/topup/index.jsx index f96a459f..4c9a5267 100644 --- a/web/src/components/topup/index.jsx +++ b/web/src/components/topup/index.jsx @@ -34,7 +34,7 @@ import { } from '@douyinfe/semi-ui'; import { useTranslation } from 'react-i18next'; import { UserContext } from '../../context/User'; -import { StatusContext } from '../../context/Status/index.js'; +import { StatusContext } from '../../context/Status'; import RechargeCard from './RechargeCard'; import InvitationCard from './InvitationCard'; diff --git a/web/src/context/Status/index.js b/web/src/context/Status/index.jsx similarity index 100% rename from web/src/context/Status/index.js rename to web/src/context/Status/index.jsx diff --git a/web/src/context/Theme/index.js b/web/src/context/Theme/index.jsx similarity index 100% rename from web/src/context/Theme/index.js rename to web/src/context/Theme/index.jsx diff --git a/web/src/context/User/index.js b/web/src/context/User/index.jsx similarity index 100% rename from web/src/context/User/index.js rename to web/src/context/User/index.jsx diff --git a/web/src/helpers/auth.js b/web/src/helpers/auth.jsx similarity index 100% rename from web/src/helpers/auth.js rename to web/src/helpers/auth.jsx diff --git a/web/src/helpers/dashboard.js b/web/src/helpers/dashboard.jsx similarity index 100% rename from web/src/helpers/dashboard.js rename to web/src/helpers/dashboard.jsx diff --git a/web/src/helpers/render.js b/web/src/helpers/render.jsx similarity index 99% rename from web/src/helpers/render.js rename to web/src/helpers/render.jsx index f140ba4f..f7d66c79 100644 --- a/web/src/helpers/render.js +++ b/web/src/helpers/render.jsx @@ -20,7 +20,7 @@ For commercial licensing, please contact support@quantumnous.com import i18next from 'i18next'; import { Modal, Tag, Typography, Avatar } from '@douyinfe/semi-ui'; import { copy, showSuccess } from './utils'; -import { MOBILE_BREAKPOINT } from '../hooks/common/useIsMobile.js'; +import { MOBILE_BREAKPOINT } from '../hooks/common/useIsMobile'; import { visit } from 'unist-util-visit'; import * as LobeIcons from '@lobehub/icons'; import { diff --git a/web/src/helpers/utils.js b/web/src/helpers/utils.jsx similarity index 99% rename from web/src/helpers/utils.js rename to web/src/helpers/utils.jsx index d41d426e..b9d6c8d8 100644 --- a/web/src/helpers/utils.js +++ b/web/src/helpers/utils.jsx @@ -23,7 +23,7 @@ import React from 'react'; import { toast } from 'react-toastify'; import { THINK_TAG_REGEX, MESSAGE_ROLES } from '../constants/playground.constants'; import { TABLE_COMPACT_MODES_KEY } from '../constants'; -import { MOBILE_BREAKPOINT } from '../hooks/common/useIsMobile.js'; +import { MOBILE_BREAKPOINT } from '../hooks/common/useIsMobile'; const HTMLToastContent = ({ htmlContent }) => { return
; diff --git a/web/src/hooks/channels/useChannelsData.js b/web/src/hooks/channels/useChannelsData.jsx similarity index 99% rename from web/src/hooks/channels/useChannelsData.js rename to web/src/hooks/channels/useChannelsData.jsx index 8f1f8c29..5871e8ef 100644 --- a/web/src/hooks/channels/useChannelsData.js +++ b/web/src/hooks/channels/useChannelsData.jsx @@ -26,10 +26,10 @@ import { showSuccess, loadChannelModels, copy -} from '../../helpers/index.js'; -import { CHANNEL_OPTIONS, ITEMS_PER_PAGE, MODEL_TABLE_PAGE_SIZE } from '../../constants/index.js'; -import { useIsMobile } from '../common/useIsMobile.js'; -import { useTableCompactMode } from '../common/useTableCompactMode.js'; +} from '../../helpers'; +import { CHANNEL_OPTIONS, ITEMS_PER_PAGE, MODEL_TABLE_PAGE_SIZE } from '../../constants'; +import { useIsMobile } from '../common/useIsMobile'; +import { useTableCompactMode } from '../common/useTableCompactMode'; import { Modal } from '@douyinfe/semi-ui'; export const useChannelsData = () => { diff --git a/web/src/hooks/common/useHeaderBar.js b/web/src/hooks/common/useHeaderBar.js index 13b23e30..8fd435df 100644 --- a/web/src/hooks/common/useHeaderBar.js +++ b/web/src/hooks/common/useHeaderBar.js @@ -20,13 +20,13 @@ For commercial licensing, please contact support@quantumnous.com import { useState, useEffect, useContext } from 'react'; import { useNavigate, useLocation } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { UserContext } from '../../context/User/index.js'; -import { StatusContext } from '../../context/Status/index.js'; -import { useSetTheme, useTheme } from '../../context/Theme/index.js'; -import { getLogo, getSystemName, API, showSuccess } from '../../helpers/index.js'; -import { useIsMobile } from './useIsMobile.js'; -import { useSidebarCollapsed } from './useSidebarCollapsed.js'; -import { useMinimumLoadingTime } from './useMinimumLoadingTime.js'; +import { UserContext } from '../../context/User'; +import { StatusContext } from '../../context/Status'; +import { useSetTheme, useTheme } from '../../context/Theme'; +import { getLogo, getSystemName, API, showSuccess } from '../../helpers'; +import { useIsMobile } from './useIsMobile'; +import { useSidebarCollapsed } from './useSidebarCollapsed'; +import { useMinimumLoadingTime } from './useMinimumLoadingTime'; export const useHeaderBar = ({ onMobileMenuToggle, drawerOpen }) => { const { t, i18n } = useTranslation(); diff --git a/web/src/hooks/dashboard/useDashboardCharts.js b/web/src/hooks/dashboard/useDashboardCharts.jsx similarity index 100% rename from web/src/hooks/dashboard/useDashboardCharts.js rename to web/src/hooks/dashboard/useDashboardCharts.jsx diff --git a/web/src/hooks/dashboard/useDashboardStats.js b/web/src/hooks/dashboard/useDashboardStats.jsx similarity index 100% rename from web/src/hooks/dashboard/useDashboardStats.js rename to web/src/hooks/dashboard/useDashboardStats.jsx diff --git a/web/src/hooks/model-pricing/useModelPricingData.js b/web/src/hooks/model-pricing/useModelPricingData.jsx similarity index 98% rename from web/src/hooks/model-pricing/useModelPricingData.js rename to web/src/hooks/model-pricing/useModelPricingData.jsx index d209089c..d03d45cd 100644 --- a/web/src/hooks/model-pricing/useModelPricingData.js +++ b/web/src/hooks/model-pricing/useModelPricingData.jsx @@ -21,8 +21,8 @@ import { useState, useEffect, useContext, useRef, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { API, copy, showError, showInfo, showSuccess } from '../../helpers'; import { Modal } from '@douyinfe/semi-ui'; -import { UserContext } from '../../context/User/index.js'; -import { StatusContext } from '../../context/Status/index.js'; +import { UserContext } from '../../context/User'; +import { StatusContext } from '../../context/Status'; export const useModelPricingData = () => { const { t } = useTranslation(); diff --git a/web/src/hooks/models/useModelsData.js b/web/src/hooks/models/useModelsData.jsx similarity index 100% rename from web/src/hooks/models/useModelsData.js rename to web/src/hooks/models/useModelsData.jsx diff --git a/web/src/hooks/playground/useApiRequest.js b/web/src/hooks/playground/useApiRequest.jsx similarity index 100% rename from web/src/hooks/playground/useApiRequest.js rename to web/src/hooks/playground/useApiRequest.jsx diff --git a/web/src/hooks/playground/useMessageActions.js b/web/src/hooks/playground/useMessageActions.jsx similarity index 100% rename from web/src/hooks/playground/useMessageActions.js rename to web/src/hooks/playground/useMessageActions.jsx diff --git a/web/src/hooks/playground/useMessageEdit.js b/web/src/hooks/playground/useMessageEdit.jsx similarity index 100% rename from web/src/hooks/playground/useMessageEdit.js rename to web/src/hooks/playground/useMessageEdit.jsx diff --git a/web/src/hooks/redemptions/useRedemptionsData.js b/web/src/hooks/redemptions/useRedemptionsData.jsx similarity index 100% rename from web/src/hooks/redemptions/useRedemptionsData.js rename to web/src/hooks/redemptions/useRedemptionsData.jsx diff --git a/web/src/hooks/tokens/useTokensData.js b/web/src/hooks/tokens/useTokensData.jsx similarity index 100% rename from web/src/hooks/tokens/useTokensData.js rename to web/src/hooks/tokens/useTokensData.jsx diff --git a/web/src/hooks/usage-logs/useUsageLogsData.js b/web/src/hooks/usage-logs/useUsageLogsData.jsx similarity index 100% rename from web/src/hooks/usage-logs/useUsageLogsData.js rename to web/src/hooks/usage-logs/useUsageLogsData.jsx diff --git a/web/src/hooks/users/useUsersData.js b/web/src/hooks/users/useUsersData.jsx similarity index 100% rename from web/src/hooks/users/useUsersData.js rename to web/src/hooks/users/useUsersData.jsx diff --git a/web/src/index.js b/web/src/index.jsx similarity index 96% rename from web/src/index.js rename to web/src/index.jsx index 310637ea..b6132c49 100644 --- a/web/src/index.js +++ b/web/src/index.jsx @@ -25,8 +25,8 @@ import { UserProvider } from './context/User'; import 'react-toastify/dist/ReactToastify.css'; import { StatusProvider } from './context/Status'; import { ThemeProvider } from './context/Theme'; -import PageLayout from './components/layout/PageLayout.js'; -import './i18n/i18n.js'; +import PageLayout from './components/layout/PageLayout'; +import './i18n/i18n'; import './index.css'; import { LocaleProvider } from '@douyinfe/semi-ui'; import { useTranslation } from 'react-i18next'; diff --git a/web/src/pages/About/index.js b/web/src/pages/About/index.jsx similarity index 100% rename from web/src/pages/About/index.js rename to web/src/pages/About/index.jsx diff --git a/web/src/pages/Channel/index.js b/web/src/pages/Channel/index.jsx similarity index 100% rename from web/src/pages/Channel/index.js rename to web/src/pages/Channel/index.jsx diff --git a/web/src/pages/Chat/index.js b/web/src/pages/Chat/index.jsx similarity index 100% rename from web/src/pages/Chat/index.js rename to web/src/pages/Chat/index.jsx diff --git a/web/src/pages/Chat2Link/index.js b/web/src/pages/Chat2Link/index.jsx similarity index 100% rename from web/src/pages/Chat2Link/index.js rename to web/src/pages/Chat2Link/index.jsx diff --git a/web/src/pages/Dashboard/index.js b/web/src/pages/Dashboard/index.jsx similarity index 100% rename from web/src/pages/Dashboard/index.js rename to web/src/pages/Dashboard/index.jsx diff --git a/web/src/pages/Forbidden/index.js b/web/src/pages/Forbidden/index.jsx similarity index 100% rename from web/src/pages/Forbidden/index.js rename to web/src/pages/Forbidden/index.jsx diff --git a/web/src/pages/Home/index.js b/web/src/pages/Home/index.jsx similarity index 99% rename from web/src/pages/Home/index.js rename to web/src/pages/Home/index.jsx index 3d8ac68f..ca6329b1 100644 --- a/web/src/pages/Home/index.js +++ b/web/src/pages/Home/index.jsx @@ -20,7 +20,7 @@ For commercial licensing, please contact support@quantumnous.com import React, { useContext, useEffect, useState } from 'react'; import { Button, Typography, Tag, Input, ScrollList, ScrollItem } from '@douyinfe/semi-ui'; import { API, showError, copy, showSuccess } from '../../helpers'; -import { useIsMobile } from '../../hooks/common/useIsMobile.js'; +import { useIsMobile } from '../../hooks/common/useIsMobile'; import { API_ENDPOINTS } from '../../constants/common.constant'; import { StatusContext } from '../../context/Status'; import { marked } from 'marked'; diff --git a/web/src/pages/Log/index.js b/web/src/pages/Log/index.jsx similarity index 100% rename from web/src/pages/Log/index.js rename to web/src/pages/Log/index.jsx diff --git a/web/src/pages/Midjourney/index.js b/web/src/pages/Midjourney/index.jsx similarity index 100% rename from web/src/pages/Midjourney/index.js rename to web/src/pages/Midjourney/index.jsx diff --git a/web/src/pages/Model/index.js b/web/src/pages/Model/index.jsx similarity index 100% rename from web/src/pages/Model/index.js rename to web/src/pages/Model/index.jsx diff --git a/web/src/pages/NotFound/index.js b/web/src/pages/NotFound/index.jsx similarity index 100% rename from web/src/pages/NotFound/index.js rename to web/src/pages/NotFound/index.jsx diff --git a/web/src/pages/Playground/index.js b/web/src/pages/Playground/index.jsx similarity index 97% rename from web/src/pages/Playground/index.js rename to web/src/pages/Playground/index.jsx index f31cefb7..31b3a67d 100644 --- a/web/src/pages/Playground/index.js +++ b/web/src/pages/Playground/index.jsx @@ -23,22 +23,22 @@ import { useTranslation } from 'react-i18next'; import { Layout, Toast, Modal } from '@douyinfe/semi-ui'; // Context -import { UserContext } from '../../context/User/index.js'; -import { useIsMobile } from '../../hooks/common/useIsMobile.js'; +import { UserContext } from '../../context/User'; +import { useIsMobile } from '../../hooks/common/useIsMobile'; // hooks -import { usePlaygroundState } from '../../hooks/playground/usePlaygroundState.js'; -import { useMessageActions } from '../../hooks/playground/useMessageActions.js'; -import { useApiRequest } from '../../hooks/playground/useApiRequest.js'; -import { useSyncMessageAndCustomBody } from '../../hooks/playground/useSyncMessageAndCustomBody.js'; -import { useMessageEdit } from '../../hooks/playground/useMessageEdit.js'; -import { useDataLoader } from '../../hooks/playground/useDataLoader.js'; +import { usePlaygroundState } from '../../hooks/playground/usePlaygroundState'; +import { useMessageActions } from '../../hooks/playground/useMessageActions'; +import { useApiRequest } from '../../hooks/playground/useApiRequest'; +import { useSyncMessageAndCustomBody } from '../../hooks/playground/useSyncMessageAndCustomBody'; +import { useMessageEdit } from '../../hooks/playground/useMessageEdit'; +import { useDataLoader } from '../../hooks/playground/useDataLoader'; // Constants and utils import { MESSAGE_ROLES, ERROR_MESSAGES -} from '../../constants/playground.constants.js'; +} from '../../constants/playground.constants'; import { getLogo, stringToColor, @@ -55,9 +55,9 @@ import { OptimizedDebugPanel, OptimizedMessageContent, OptimizedMessageActions -} from '../../components/playground/OptimizedComponents.js'; -import ChatArea from '../../components/playground/ChatArea.js'; -import FloatingButtons from '../../components/playground/FloatingButtons.js'; +} from '../../components/playground/OptimizedComponents'; +import ChatArea from '../../components/playground/ChatArea'; +import FloatingButtons from '../../components/playground/FloatingButtons'; // 生成头像 const generateAvatarDataUrl = (username) => { diff --git a/web/src/pages/Pricing/index.js b/web/src/pages/Pricing/index.jsx similarity index 100% rename from web/src/pages/Pricing/index.js rename to web/src/pages/Pricing/index.jsx diff --git a/web/src/pages/Redemption/index.js b/web/src/pages/Redemption/index.jsx similarity index 100% rename from web/src/pages/Redemption/index.js rename to web/src/pages/Redemption/index.jsx diff --git a/web/src/pages/Setting/Chat/SettingsChats.js b/web/src/pages/Setting/Chat/SettingsChats.jsx similarity index 100% rename from web/src/pages/Setting/Chat/SettingsChats.js rename to web/src/pages/Setting/Chat/SettingsChats.jsx diff --git a/web/src/pages/Setting/Dashboard/SettingsAPIInfo.js b/web/src/pages/Setting/Dashboard/SettingsAPIInfo.jsx similarity index 100% rename from web/src/pages/Setting/Dashboard/SettingsAPIInfo.js rename to web/src/pages/Setting/Dashboard/SettingsAPIInfo.jsx diff --git a/web/src/pages/Setting/Dashboard/SettingsAnnouncements.js b/web/src/pages/Setting/Dashboard/SettingsAnnouncements.jsx similarity index 100% rename from web/src/pages/Setting/Dashboard/SettingsAnnouncements.js rename to web/src/pages/Setting/Dashboard/SettingsAnnouncements.jsx diff --git a/web/src/pages/Setting/Dashboard/SettingsDataDashboard.js b/web/src/pages/Setting/Dashboard/SettingsDataDashboard.jsx similarity index 100% rename from web/src/pages/Setting/Dashboard/SettingsDataDashboard.js rename to web/src/pages/Setting/Dashboard/SettingsDataDashboard.jsx diff --git a/web/src/pages/Setting/Dashboard/SettingsFAQ.js b/web/src/pages/Setting/Dashboard/SettingsFAQ.jsx similarity index 100% rename from web/src/pages/Setting/Dashboard/SettingsFAQ.js rename to web/src/pages/Setting/Dashboard/SettingsFAQ.jsx diff --git a/web/src/pages/Setting/Dashboard/SettingsUptimeKuma.js b/web/src/pages/Setting/Dashboard/SettingsUptimeKuma.jsx similarity index 100% rename from web/src/pages/Setting/Dashboard/SettingsUptimeKuma.js rename to web/src/pages/Setting/Dashboard/SettingsUptimeKuma.jsx diff --git a/web/src/pages/Setting/Drawing/SettingsDrawing.js b/web/src/pages/Setting/Drawing/SettingsDrawing.jsx similarity index 100% rename from web/src/pages/Setting/Drawing/SettingsDrawing.js rename to web/src/pages/Setting/Drawing/SettingsDrawing.jsx diff --git a/web/src/pages/Setting/Model/SettingClaudeModel.js b/web/src/pages/Setting/Model/SettingClaudeModel.jsx similarity index 100% rename from web/src/pages/Setting/Model/SettingClaudeModel.js rename to web/src/pages/Setting/Model/SettingClaudeModel.jsx diff --git a/web/src/pages/Setting/Model/SettingGeminiModel.js b/web/src/pages/Setting/Model/SettingGeminiModel.jsx similarity index 98% rename from web/src/pages/Setting/Model/SettingGeminiModel.js rename to web/src/pages/Setting/Model/SettingGeminiModel.jsx index 13d45083..0b9f9110 100644 --- a/web/src/pages/Setting/Model/SettingGeminiModel.js +++ b/web/src/pages/Setting/Model/SettingGeminiModel.jsx @@ -28,7 +28,7 @@ import { verifyJSON, } from '../../../helpers'; import { useTranslation } from 'react-i18next'; -import Text from '@douyinfe/semi-ui/lib/es/typography/text.js'; +import Text from '@douyinfe/semi-ui/lib/es/typography/text'; const GEMINI_SETTING_EXAMPLE = { default: 'OFF', @@ -228,7 +228,7 @@ export default function SettingGeminiModel(props) { label={t('思考预算占比')} field={'gemini.thinking_adapter_budget_tokens_percentage'} initValue={''} - extraText={t('0.002-1之间的小数')} + extraText={t('0.002-1之间的小数')} min={0.002} max={1} onChange={(value) => diff --git a/web/src/pages/Setting/Model/SettingGlobalModel.js b/web/src/pages/Setting/Model/SettingGlobalModel.jsx similarity index 100% rename from web/src/pages/Setting/Model/SettingGlobalModel.js rename to web/src/pages/Setting/Model/SettingGlobalModel.jsx diff --git a/web/src/pages/Setting/Operation/SettingsCreditLimit.js b/web/src/pages/Setting/Operation/SettingsCreditLimit.jsx similarity index 100% rename from web/src/pages/Setting/Operation/SettingsCreditLimit.js rename to web/src/pages/Setting/Operation/SettingsCreditLimit.jsx diff --git a/web/src/pages/Setting/Operation/SettingsGeneral.js b/web/src/pages/Setting/Operation/SettingsGeneral.jsx similarity index 100% rename from web/src/pages/Setting/Operation/SettingsGeneral.js rename to web/src/pages/Setting/Operation/SettingsGeneral.jsx diff --git a/web/src/pages/Setting/Operation/SettingsLog.js b/web/src/pages/Setting/Operation/SettingsLog.jsx similarity index 100% rename from web/src/pages/Setting/Operation/SettingsLog.js rename to web/src/pages/Setting/Operation/SettingsLog.jsx diff --git a/web/src/pages/Setting/Operation/SettingsMonitoring.js b/web/src/pages/Setting/Operation/SettingsMonitoring.jsx similarity index 100% rename from web/src/pages/Setting/Operation/SettingsMonitoring.js rename to web/src/pages/Setting/Operation/SettingsMonitoring.jsx diff --git a/web/src/pages/Setting/Operation/SettingsSensitiveWords.js b/web/src/pages/Setting/Operation/SettingsSensitiveWords.jsx similarity index 100% rename from web/src/pages/Setting/Operation/SettingsSensitiveWords.js rename to web/src/pages/Setting/Operation/SettingsSensitiveWords.jsx diff --git a/web/src/pages/Setting/Payment/SettingsGeneralPayment.js b/web/src/pages/Setting/Payment/SettingsGeneralPayment.jsx similarity index 100% rename from web/src/pages/Setting/Payment/SettingsGeneralPayment.js rename to web/src/pages/Setting/Payment/SettingsGeneralPayment.jsx diff --git a/web/src/pages/Setting/Payment/SettingsPaymentGateway.js b/web/src/pages/Setting/Payment/SettingsPaymentGateway.jsx similarity index 100% rename from web/src/pages/Setting/Payment/SettingsPaymentGateway.js rename to web/src/pages/Setting/Payment/SettingsPaymentGateway.jsx diff --git a/web/src/pages/Setting/Payment/SettingsPaymentGatewayStripe.js b/web/src/pages/Setting/Payment/SettingsPaymentGatewayStripe.jsx similarity index 100% rename from web/src/pages/Setting/Payment/SettingsPaymentGatewayStripe.js rename to web/src/pages/Setting/Payment/SettingsPaymentGatewayStripe.jsx diff --git a/web/src/pages/Setting/RateLimit/SettingsRequestRateLimit.js b/web/src/pages/Setting/RateLimit/SettingsRequestRateLimit.jsx similarity index 100% rename from web/src/pages/Setting/RateLimit/SettingsRequestRateLimit.js rename to web/src/pages/Setting/RateLimit/SettingsRequestRateLimit.jsx diff --git a/web/src/pages/Setting/Ratio/GroupRatioSettings.js b/web/src/pages/Setting/Ratio/GroupRatioSettings.jsx similarity index 100% rename from web/src/pages/Setting/Ratio/GroupRatioSettings.js rename to web/src/pages/Setting/Ratio/GroupRatioSettings.jsx diff --git a/web/src/pages/Setting/Ratio/ModelRatioSettings.js b/web/src/pages/Setting/Ratio/ModelRatioSettings.jsx similarity index 100% rename from web/src/pages/Setting/Ratio/ModelRatioSettings.js rename to web/src/pages/Setting/Ratio/ModelRatioSettings.jsx diff --git a/web/src/pages/Setting/Ratio/ModelRationNotSetEditor.js b/web/src/pages/Setting/Ratio/ModelRationNotSetEditor.jsx similarity index 100% rename from web/src/pages/Setting/Ratio/ModelRationNotSetEditor.js rename to web/src/pages/Setting/Ratio/ModelRationNotSetEditor.jsx diff --git a/web/src/pages/Setting/Ratio/ModelSettingsVisualEditor.js b/web/src/pages/Setting/Ratio/ModelSettingsVisualEditor.jsx similarity index 100% rename from web/src/pages/Setting/Ratio/ModelSettingsVisualEditor.js rename to web/src/pages/Setting/Ratio/ModelSettingsVisualEditor.jsx diff --git a/web/src/pages/Setting/Ratio/UpstreamRatioSync.js b/web/src/pages/Setting/Ratio/UpstreamRatioSync.jsx similarity index 99% rename from web/src/pages/Setting/Ratio/UpstreamRatioSync.js rename to web/src/pages/Setting/Ratio/UpstreamRatioSync.jsx index 8b408062..b0a90a02 100644 --- a/web/src/pages/Setting/Ratio/UpstreamRatioSync.js +++ b/web/src/pages/Setting/Ratio/UpstreamRatioSync.jsx @@ -38,7 +38,7 @@ import { CheckCircle, } from 'lucide-react'; import { API, showError, showSuccess, showWarning, stringToColor } from '../../../helpers'; -import { useIsMobile } from '../../../hooks/common/useIsMobile.js'; +import { useIsMobile } from '../../../hooks/common/useIsMobile'; import { DEFAULT_ENDPOINT } from '../../../constants'; import { useTranslation } from 'react-i18next'; import { diff --git a/web/src/pages/Setting/index.js b/web/src/pages/Setting/index.jsx similarity index 98% rename from web/src/pages/Setting/index.js rename to web/src/pages/Setting/index.jsx index 4e8bb2f6..f64d003c 100644 --- a/web/src/pages/Setting/index.js +++ b/web/src/pages/Setting/index.jsx @@ -34,17 +34,17 @@ import { CreditCard } from 'lucide-react'; -import SystemSetting from '../../components/settings/SystemSetting.js'; +import SystemSetting from '../../components/settings/SystemSetting'; import { isRoot } from '../../helpers'; import OtherSetting from '../../components/settings/OtherSetting'; -import OperationSetting from '../../components/settings/OperationSetting.js'; -import RateLimitSetting from '../../components/settings/RateLimitSetting.js'; -import ModelSetting from '../../components/settings/ModelSetting.js'; -import DashboardSetting from '../../components/settings/DashboardSetting.js'; -import RatioSetting from '../../components/settings/RatioSetting.js'; -import ChatsSetting from '../../components/settings/ChatsSetting.js'; -import DrawingSetting from '../../components/settings/DrawingSetting.js'; -import PaymentSetting from '../../components/settings/PaymentSetting.js'; +import OperationSetting from '../../components/settings/OperationSetting'; +import RateLimitSetting from '../../components/settings/RateLimitSetting'; +import ModelSetting from '../../components/settings/ModelSetting'; +import DashboardSetting from '../../components/settings/DashboardSetting'; +import RatioSetting from '../../components/settings/RatioSetting'; +import ChatsSetting from '../../components/settings/ChatsSetting'; +import DrawingSetting from '../../components/settings/DrawingSetting'; +import PaymentSetting from '../../components/settings/PaymentSetting'; const Setting = () => { const { t } = useTranslation(); diff --git a/web/src/pages/Setup/index.js b/web/src/pages/Setup/index.jsx similarity index 100% rename from web/src/pages/Setup/index.js rename to web/src/pages/Setup/index.jsx diff --git a/web/src/pages/Task/index.js b/web/src/pages/Task/index.jsx similarity index 100% rename from web/src/pages/Task/index.js rename to web/src/pages/Task/index.jsx diff --git a/web/src/pages/Token/index.js b/web/src/pages/Token/index.jsx similarity index 100% rename from web/src/pages/Token/index.js rename to web/src/pages/Token/index.jsx diff --git a/web/src/pages/User/index.js b/web/src/pages/User/index.jsx similarity index 100% rename from web/src/pages/User/index.js rename to web/src/pages/User/index.jsx