Skip to content
Merged
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
10 changes: 2 additions & 8 deletions components/DependencyTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ interface DependencyItem {
crate_name: string;
version: string;
relation: string;
license: string;
dependencies: number;
}

Expand Down Expand Up @@ -48,8 +47,7 @@ const DependencyTable: React.FC<DependencyTableProps> = ({ data }) => {
const filteredData = data?.filter(item =>
item.crate_name.toLowerCase().includes(searchQuery.toLowerCase()) ||
item.version.toLowerCase().includes(searchQuery.toLowerCase()) ||
item.relation.toLowerCase().includes(searchQuery.toLowerCase()) ||
(item.license && item.license.toLowerCase().includes(searchQuery.toLowerCase()))
item.relation.toLowerCase().includes(searchQuery.toLowerCase())
) || [];

// 排序数据
Expand Down Expand Up @@ -197,9 +195,6 @@ const DependencyTable: React.FC<DependencyTableProps> = ({ data }) => {
/>
</button>
</div>
<div className="py-3 px-4 text-left text-[#333333] font-['HarmonyOS_Sans_SC'] text-lg font-bold capitalize flex-1 flex items-center">
License
</div>
<div className="py-3 px-4 text-left text-[#333333] font-['HarmonyOS_Sans_SC'] text-lg font-bold capitalize flex-1 flex items-center">
Dependencies
<button
Expand Down Expand Up @@ -232,15 +227,14 @@ const DependencyTable: React.FC<DependencyTableProps> = ({ data }) => {
>
<div className="px-4 flex-1">
<Link
href={`/${params.nsfront}/${params.nsbehind}/${item.crate_name}/${item.version}`}
href={`/${params.nsfront}/${item.crate_name}/${item.crate_name}/${item.version}`}
className="text-[#333333] group-hover:text-white font-['HarmonyOS_Sans_SC'] text-base font-normal hover:underline"
>
{item.crate_name}
</Link>
</div>
<div className="px-4 flex-1 text-[#333333] group-hover:text-white font-['HarmonyOS_Sans_SC'] text-base font-normal">{item.version}</div>
<div className="px-4 flex-1 text-[#333333] group-hover:text-white font-['HarmonyOS_Sans_SC'] text-base font-normal">{item.relation}</div>
<div className="px-4 flex-1 text-[#333333] group-hover:text-white font-['HarmonyOS_Sans_SC'] text-base font-normal">{item.license || '-'}</div>
<div className="px-4 flex-1 text-[#333333] group-hover:text-white font-['HarmonyOS_Sans_SC'] text-base font-normal">{item.dependencies}</div>
</div>
))
Expand Down
2 changes: 1 addition & 1 deletion components/DependentTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const DependentTable: React.FC<DependentTableProps> = ({ data }) => {
>
<div className="px-4 flex-1">
<Link
href={`/${params.nsfront}/${params.nsbehind}/${item.crate_name}/${item.version}`}
href={`/${params.nsfront}/${item.crate_name}/${item.crate_name}/${item.version}`}
className="text-[#333333] group-hover:text-white font-['HarmonyOS_Sans_SC'] text-base font-normal hover:underline"
>
{item.crate_name}
Expand Down
14 changes: 7 additions & 7 deletions components/sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ export default function SignInButton() {
const handleGitHubSignIn = async () => {
try {
// 先启用代理
await fetch('/api/auth/enable-proxy', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
});
// await fetch('/api/auth/enable-proxy', {
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json',
// },
// });

console.log('已启用代理用于 GitHub 登录');
// console.log('已启用代理用于 GitHub 登录');

// 然后进行 GitHub 登录
await signIn("github");
Expand Down