refactor: 整体重构 (#1381)
* feat: pnpm new * Refactor build and release workflows, update dependencies Switch build scripts and workflows from npm to pnpm, update build and artifact paths, and simplify release workflow by removing version detection and changelog steps. Add new dependencies (silk-wasm, express, ws, node-pty-prebuilt-multiarch), update exports in package.json files, and add vite config for napcat-framework. Also, rename manifest.json for framework package and fix static asset copying in shell build config.
This commit is contained in:
1 parent
c3d1892545
commit
ed19c52f25
778 files changed
+2356
-26391
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import clsx from 'clsx';
|
||||
|
||||
export interface IconWrapperProps {
|
||||
children?: React.ReactNode
|
||||
className?: string
|
||||
}
|
||||
|
||||
const IconWrapper = ({ children, className }: IconWrapperProps) => (
|
||||
<div
|
||||
className={clsx(
|
||||
className,
|
||||
'flex items-center rounded-small justify-center w-7 h-7'
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
export default IconWrapper;
|
||||
@@ -0,0 +1,10 @@
|
||||
import { ChevronRightIcon } from '../icons';
|
||||
|
||||
const ItemCounter = ({ number }: { number: number }) => (
|
||||
<div className='flex items-center gap-1 text-default-400'>
|
||||
<span className='text-small'>{number}</span>
|
||||
<ChevronRightIcon className='text-xl' />
|
||||
</div>
|
||||
);
|
||||
|
||||
export default ItemCounter;
|
||||
@@ -0,0 +1,40 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import { getReleaseTime } from '@/utils/time';
|
||||
|
||||
import type { GithubRelease as GithubReleaseType } from '@/types/github';
|
||||
|
||||
export interface GithubReleaseProps {
|
||||
releaseData: GithubReleaseType
|
||||
}
|
||||
const GithubRelease: React.FC<GithubReleaseProps> = (props) => {
|
||||
const { releaseData } = props;
|
||||
const [releaseTime, setReleaseTime] = useState<string | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (releaseData) {
|
||||
const timer = setInterval(() => {
|
||||
const time = getReleaseTime(releaseData.published_at);
|
||||
|
||||
setReleaseTime(time);
|
||||
}, 1000);
|
||||
|
||||
return () => clearInterval(timer);
|
||||
}
|
||||
}, [releaseData]);
|
||||
|
||||
return (
|
||||
<div className='flex flex-col gap-1'>
|
||||
<span>Releases</span>
|
||||
<div className='px-2 py-1 rounded-small bg-default-100 bg-opacity-50 backdrop-blur-sm group-data-[hover=true]:bg-default-200'>
|
||||
<span className='text-tiny text-default-600'>{releaseData.name}</span>
|
||||
<div className='flex gap-2 text-tiny'>
|
||||
<span className='text-default-500'>{releaseTime}</span>
|
||||
<span className='text-success'>Latest</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default GithubRelease;
|
||||
Reference in new issue
Block a user