Skip to content
Closed

5-11 #4770

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added web/public/logo-c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 16 additions & 25 deletions web/src/components/auth/LoginForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,12 @@ const LoginForm = () => {
<div className='w-full max-w-md'>
<div className='flex items-center justify-center mb-6 gap-2'>
<img src={logo} alt='Logo' className='h-10 rounded-full' />
<Title heading={3} className='!text-gray-800'>
<Title heading={3} className='text-semi-color-text-0'>
{systemName}
</Title>
</div>

<Card className='border-0 !rounded-2xl overflow-hidden'>
<Card className='!rounded-2xl shadow-lg overflow-hidden'>
<div className='flex justify-center pt-6 pb-2'>
<Title heading={3} className='text-gray-800 dark:text-gray-200'>
{t('登 录')}
Expand All @@ -522,7 +522,7 @@ const LoginForm = () => {
{status.wechat_login && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={
<Icon svg={<WeChatIcon />} style={{ color: '#07C160' }} />
Expand All @@ -537,7 +537,7 @@ const LoginForm = () => {
{status.github_oauth && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={<IconGithubLogo size='large' />}
onClick={handleGitHubClick}
Expand All @@ -551,7 +551,7 @@ const LoginForm = () => {
{status.discord_oauth && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={
<SiDiscord
Expand All @@ -572,7 +572,7 @@ const LoginForm = () => {
{status.oidc_enabled && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={<OIDCIcon style={{ color: '#1877F2' }} />}
onClick={handleOIDCClick}
Expand All @@ -585,7 +585,7 @@ const LoginForm = () => {
{status.linuxdo_oauth && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={
<LinuxDoIcon
Expand All @@ -608,7 +608,7 @@ const LoginForm = () => {
<Button
key={provider.slug}
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={getOAuthProviderIcon(provider.icon || '', 20)}
onClick={() => handleCustomOAuthClick(provider)}
Expand All @@ -632,7 +632,7 @@ const LoginForm = () => {
{status.passkey_login && passkeySupported && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={<IconKey size='large' />}
onClick={handlePasskeyLogin}
Expand All @@ -649,7 +649,7 @@ const LoginForm = () => {
<Button
theme='solid'
type='primary'
className='w-full h-12 flex items-center justify-center bg-black text-white !rounded-full hover:bg-gray-800 transition-colors'
className='w-full h-12 flex items-center justify-center bg-black text-white !rounded-xl hover:bg-gray-800 transition-colors'
icon={<IconMail size='large' />}
onClick={handleEmailLoginClick}
loading={emailLoginLoading}
Expand Down Expand Up @@ -725,7 +725,7 @@ const LoginForm = () => {
<Title heading={3}>{systemName}</Title>
</div>

<Card className='border-0 !rounded-2xl overflow-hidden'>
<Card className='!rounded-2xl shadow-lg overflow-hidden'>
<div className='flex justify-center pt-6 pb-2'>
<Title heading={3} className='text-gray-800 dark:text-gray-200'>
{t('登 录')}
Expand All @@ -736,7 +736,7 @@ const LoginForm = () => {
<Button
theme='outline'
type='tertiary'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors mb-4'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors mb-4'
icon={<IconKey size='large' />}
onClick={handlePasskeyLogin}
loading={passkeyLoading}
Expand Down Expand Up @@ -805,7 +805,7 @@ const LoginForm = () => {
<div className='space-y-2 pt-2'>
<Button
theme='solid'
className='w-full !rounded-full'
className='w-full !rounded-xl'
type='primary'
htmlType='submit'
onClick={handleSubmit}
Expand All @@ -820,7 +820,7 @@ const LoginForm = () => {
<Button
theme='borderless'
type='tertiary'
className='w-full !rounded-full'
className='w-full !rounded-xl'
onClick={handleResetPasswordClick}
loading={resetPasswordLoading}
>
Expand All @@ -839,7 +839,7 @@ const LoginForm = () => {
<Button
theme='outline'
type='tertiary'
className='w-full !rounded-full'
className='w-full !rounded-xl'
onClick={handleOtherLoginOptionsClick}
loading={otherLoginOptionsLoading}
>
Expand Down Expand Up @@ -947,16 +947,7 @@ const LoginForm = () => {
};

return (
<div className='relative overflow-hidden bg-gray-100 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'>
{/* 背景模糊晕染球 */}
<div
className='blur-ball blur-ball-indigo'
style={{ top: '-80px', right: '-80px', transform: 'none' }}
/>
<div
className='blur-ball blur-ball-teal'
style={{ top: '50%', left: '-120px' }}
/>
<div className='relative overflow-hidden bg-transparent flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'>
<div className='w-full max-w-sm mt-[60px]'>
{showEmailLogin ||
!hasOAuthLoginOptions
Expand Down
37 changes: 14 additions & 23 deletions web/src/components/auth/RegisterForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,12 @@ const RegisterForm = () => {
<div className='w-full max-w-md'>
<div className='flex items-center justify-center mb-6 gap-2'>
<img src={logo} alt='Logo' className='h-10 rounded-full' />
<Title heading={3} className='!text-gray-800'>
<Title heading={3} className='text-semi-color-text-0'>
{systemName}
</Title>
</div>

<Card className='border-0 !rounded-2xl overflow-hidden'>
<Card className='!rounded-2xl shadow-lg overflow-hidden'>
<div className='flex justify-center pt-6 pb-2'>
<Title heading={3} className='text-gray-800 dark:text-gray-200'>
{t('注 册')}
Expand All @@ -413,7 +413,7 @@ const RegisterForm = () => {
{status.wechat_login && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={
<Icon svg={<WeChatIcon />} style={{ color: '#07C160' }} />
Expand All @@ -428,7 +428,7 @@ const RegisterForm = () => {
{status.github_oauth && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={<IconGithubLogo size='large' />}
onClick={handleGitHubClick}
Expand All @@ -442,7 +442,7 @@ const RegisterForm = () => {
{status.discord_oauth && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={
<SiDiscord
Expand All @@ -463,7 +463,7 @@ const RegisterForm = () => {
{status.oidc_enabled && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={<OIDCIcon style={{ color: '#1877F2' }} />}
onClick={handleOIDCClick}
Expand All @@ -476,7 +476,7 @@ const RegisterForm = () => {
{status.linuxdo_oauth && (
<Button
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={
<LinuxDoIcon
Expand All @@ -499,7 +499,7 @@ const RegisterForm = () => {
<Button
key={provider.slug}
theme='outline'
className='w-full h-12 flex items-center justify-center !rounded-full border border-gray-200 hover:bg-gray-50 transition-colors'
className='w-full h-12 flex items-center justify-center !rounded-xl border border-gray-200 hover:bg-gray-50 transition-colors'
type='tertiary'
icon={getOAuthProviderIcon(provider.icon || '', 20)}
onClick={() => handleCustomOAuthClick(provider)}
Expand Down Expand Up @@ -527,7 +527,7 @@ const RegisterForm = () => {
<Button
theme='solid'
type='primary'
className='w-full h-12 flex items-center justify-center bg-black text-white !rounded-full hover:bg-gray-800 transition-colors'
className='w-full h-12 flex items-center justify-center bg-black text-white !rounded-xl hover:bg-gray-800 transition-colors'
icon={<IconMail size='large' />}
onClick={handleEmailRegisterClick}
loading={emailRegisterLoading}
Expand Down Expand Up @@ -560,12 +560,12 @@ const RegisterForm = () => {
<div className='w-full max-w-md'>
<div className='flex items-center justify-center mb-6 gap-2'>
<img src={logo} alt='Logo' className='h-10 rounded-full' />
<Title heading={3} className='!text-gray-800'>
<Title heading={3} className='text-semi-color-text-0'>
{systemName}
</Title>
</div>

<Card className='border-0 !rounded-2xl overflow-hidden'>
<Card className='!rounded-2xl shadow-lg overflow-hidden'>
<div className='flex justify-center pt-6 pb-2'>
<Title heading={3} className='text-gray-800 dark:text-gray-200'>
{t('注 册')}
Expand Down Expand Up @@ -678,7 +678,7 @@ const RegisterForm = () => {
<div className='space-y-2 pt-2'>
<Button
theme='solid'
className='w-full !rounded-full'
className='w-full !rounded-xl'
type='primary'
htmlType='submit'
onClick={handleSubmit}
Expand All @@ -702,7 +702,7 @@ const RegisterForm = () => {
<Button
theme='outline'
type='tertiary'
className='w-full !rounded-full'
className='w-full !rounded-xl'
onClick={handleOtherRegisterOptionsClick}
loading={otherRegisterOptionsLoading}
>
Expand Down Expand Up @@ -770,16 +770,7 @@ const RegisterForm = () => {
};

return (
<div className='relative overflow-hidden bg-gray-100 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'>
{/* 背景模糊晕染球 */}
<div
className='blur-ball blur-ball-indigo'
style={{ top: '-80px', right: '-80px', transform: 'none' }}
/>
<div
className='blur-ball blur-ball-teal'
style={{ top: '50%', left: '-120px' }}
/>
<div className='relative overflow-hidden bg-transparent flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'>
<div className='w-full max-w-sm mt-[60px]'>
{showEmailRegister ||
!hasOAuthRegisterOptions
Expand Down
8 changes: 4 additions & 4 deletions web/src/components/dashboard/DashboardHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ const DashboardHeader = ({
loading,
t,
}) => {
const ICON_BUTTON_CLASS = 'text-white hover:bg-opacity-80 !rounded-full';
const ICON_BUTTON_CLASS = 'text-semi-color-text-1 hover:bg-semi-color-fill-1 !rounded-lg';

return (
<div className='flex items-center justify-between mb-4'>
<h2
className='text-2xl font-semibold text-gray-800 transition-opacity duration-1000 ease-in-out'
className='text-2xl font-semibold text-semi-color-text-0 transition-opacity duration-1000 ease-in-out'
style={{ opacity: greetingVisible ? 1 : 0 }}
>
{getGreeting}
Expand All @@ -44,14 +44,14 @@ const DashboardHeader = ({
type='tertiary'
icon={<Search size={16} />}
onClick={showSearchModal}
className={`bg-green-500 hover:bg-green-600 ${ICON_BUTTON_CLASS}`}
className={`bg-semi-color-fill-0 hover:bg-semi-color-fill-1 ${ICON_BUTTON_CLASS}`}
/>
<Button
type='tertiary'
icon={<RefreshCw size={16} />}
onClick={refresh}
loading={loading}
className={`bg-blue-500 hover:bg-blue-600 ${ICON_BUTTON_CLASS}`}
className={`bg-semi-color-fill-0 hover:bg-semi-color-fill-1 ${ICON_BUTTON_CLASS}`}
/>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/dashboard/StatsCards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const StatsCards = ({
<Card
key={idx}
{...CARD_PROPS}
className={`${group.color} border-0 !rounded-2xl w-full`}
className='!rounded-2xl border-0 w-full'
title={group.title}
>
<div className='space-y-4'>
Expand All @@ -58,7 +58,7 @@ const StatsCards = ({
{item.icon}
</Avatar>
<div>
<div className='text-xs text-gray-500'>{item.title}</div>
<div className='text-xs text-semi-color-text-2'>{item.title}</div>
<div className='text-lg font-semibold'>
<Skeleton
loading={loading}
Expand Down
22 changes: 6 additions & 16 deletions web/src/components/layout/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,9 @@ const FooterBar = () => {
<span className='!text-semi-color-text-1'>
{t('设计与开发由')}{' '}
</span>
<a
href='https://github.com/QuantumNous/new-api'
target='_blank'
rel='noopener noreferrer'
className='!text-semi-color-primary font-medium'
>
New API
</a>
<span className='!text-semi-color-text-1 font-medium'>
New
</span>
Comment on lines +202 to +204

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for other references to the GitHub repository for attribution/source availability

# Search for GitHub URLs to the project repository
rg -n --type=js --type=jsx --type=ts --type=tsx -C2 'github\.com/QuantumNous/new-api'

# Also check for any other footer or attribution links
rg -n --type=js --type=jsx --type=ts --type=tsx -C2 'GitHub|Source Code|Repository' -g '**/Footer*' -g '**/About*'

Repository: QuantumNous/new-api

Length of output: 119


🏁 Script executed:

# Search for GitHub repository links without specifying jsx type
rg -n 'github\.com/QuantumNous/new-api' --type js

Repository: QuantumNous/new-api

Length of output: 511


🏁 Script executed:

# Also search more broadly for the GitHub link
rg -n 'github.com/QuantumNous'

Repository: QuantumNous/new-api

Length of output: 50376


🏁 Script executed:

# Examine the specific lines in Footer.jsx
sed -n '195,210p' web/src/components/layout/Footer.jsx

Repository: QuantumNous/new-api

Length of output: 477


🏁 Script executed:

# Also check around line 229-231
sed -n '220,240p' web/src/components/layout/Footer.jsx

Repository: QuantumNous/new-api

Length of output: 754


🌐 Web query:

AGPL-3.0 license attribution requirements source code availability

💡 Result:

AGPL-3.0 attribution requirements (what you must keep/show) 1) Keep license/copyright/warranty notices intact, and provide the license text - When conveying copies, you must “keep intact all notices” and ensure the work “carry prominent notices stating that it is released under this License and any conditions added under section 7” (i.e., you can’t strip out the AGPL notices). [1][2] 2) If you modify and convey: mark that you modified + the relevant date - For conveying modified source versions under section 5, you must include prominent notices stating that you modified the work and giving a relevant date. [1][2] 3) If the program has interactive user interfaces: show “Appropriate Legal Notices” - AGPL-3.0 requires “Appropriate Legal Notices” when the program has interactive user interfaces. [3] AGPL-3.0 source-code availability requirements (the “Corresponding Source” obligation) A) If you convey/distribute object code (distributed software) - When conveying object code, you must provide the “Corresponding Source” (including the scripts and source needed to generate/install the object code) under the AGPL’s conveying terms. [4][5] B) If you run a modified AGPL program over a network (SaaS/web app use) - Unlike GPL, AGPL section 13 adds a network-interaction requirement: if you modify the Program and users interact with it remotely over a computer network, you must “prominently offer” those users an opportunity to receive the Corresponding Source “by providing access … from a network server at no charge.” [1][2][5] - The license gives an example approach: a web app interface could display a “Source” link to an archive of the code. [1][2] Bottom line - “Attribution” under AGPL-3.0 is primarily about preserving required prominent legal/copyright/license notices, and adding “modified” notices + date when you convey modified versions. [1][2] - “Source code availability” under AGPL-3.0 is primarily about providing “Corresponding Source”: via the conveying rules when distributing, and via a network-offer mechanism when running modified versions for remote users (SaaS). [4][5]

Citations:


Incomplete text: "New" should be "New API" or similar.

The text "设计与开发由 New" (Designed and developed by New) is grammatically incomplete and unclear. "New" alone is not a recognizable entity name—it should likely be "New API" or the actual project/organization name. This affects both line ranges (202-204 and 229-231).

Update the span text to reflect the complete project identifier.

Also applies to: 229-231

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/src/components/layout/Footer.jsx` around lines 202 - 204, Replace the
incomplete "New" label in Footer.jsx with the full project identifier (e.g.,
"New API" or the actual organization name) wherever it appears; locate the span
elements with class '!text-semi-color-text-1 font-medium' (used around lines
showing "New") and update their inner text to the complete name so both
occurrences (the standalone label and the "设计与开发由 New" phrase) read correctly
and consistently.

</div>
</div>
</footer>
Expand All @@ -231,14 +226,9 @@ const FooterBar = () => {
<span className='!text-semi-color-text-1'>
{t('设计与开发由')}{' '}
</span>
<a
href='https://github.com/QuantumNous/new-api'
target='_blank'
rel='noopener noreferrer'
className='!text-semi-color-primary font-medium'
>
New API
</a>
<span className='!text-semi-color-text-1 font-medium'>
New
</span>
</div>
</div>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/layout/headerbar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const HeaderBar = ({ onMobileMenuToggle, drawerOpen }) => {
const { mainNavLinks } = useNavigation(t, docsLink, headerNavModules);

return (
<header className='text-semi-color-text-0 sticky top-0 z-50 transition-colors duration-300 bg-white/75 dark:bg-zinc-900/75 backdrop-blur-lg'>
<header className='text-semi-color-text-0 sticky top-0 z-50 transition-colors duration-300 bg-transparent'>
<NoticeModal
visible={noticeVisible}
onClose={handleNoticeClose}
Expand Down
2 changes: 1 addition & 1 deletion web/src/constants/dashboard.constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const FORM_FIELD_PROPS = {
size: 'large',
};

export const ICON_BUTTON_CLASS = 'text-white hover:bg-opacity-80 !rounded-full';
export const ICON_BUTTON_CLASS = 'text-semi-color-text-1 hover:bg-semi-color-fill-1 !rounded-lg';
export const FLEX_CENTER_GAP2 = 'flex items-center gap-2';

export const ILLUSTRATION_SIZE = { width: 96, height: 96 };
Expand Down
Loading
Loading