Skip to content

Commit 2e56085

Browse files
committed
1.3.9.05
【优化】 - 移除部分死代码 - 文档/注释语法错误
1 parent fccbc3a commit 2e56085

21 files changed

Lines changed: 47 additions & 118 deletions

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ npm run lint
9191

9292
### 代码格式化
9393

94-
我们使用 `EditorConfig` 进行一致的格式化,请确保你的编辑器安装了相应插件以自动应用格式规则。
94+
我们使用 `EditorConfig` 进行统一格式化,请确保你的编辑器安装了相应插件以自动应用格式规则。
9595

9696
## 提交 issue
9797

@@ -104,7 +104,7 @@ npm run lint
104104

105105
### [enhancement]
106106

107-
- 清晰的增强描述,杜绝抽象概念
107+
- 清晰地描述增强点,杜绝抽象概念
108108
- 建议的实现逻辑
109109

110110
### [feature]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
## 主要功能
2626

27-
- 📁 **仓库浏览**:直观的文件结构导航,同时提供首页文件和文件夹排除选项.
27+
- 📁 **仓库浏览**:直观的文件结构导航,同时提供首页文件与文件夹排除选项.
2828
- 🔎 **文件搜索**:支持基于自建索引和 Github API 的快速文件搜索,可按分支、路径前缀和扩展名过滤.
2929
- 📄 **文件预览**:多种文件格式预览,目前支持 `Markdown``PDF``图片`.
3030
- ⬇️ **文件下载**:可下载单个文件或整个文件夹.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export { default as ScrollToTopFab } from './ScrollToTopFab';
2-
export { default as SearchDrawer } from './SearchDrawer';
1+
export {};

src/components/preview/image/ImagePreviewContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ const ImagePreviewContent: React.FC<ImagePreviewContentProps> = ({
270270
>
271271
{({ zoomIn, zoomOut, resetTransform }) => (
272272
<>
273-
{/* 图片内容 */}
273+
{/* 图片展示 */}
274274
<TransformComponent
275275
wrapperStyle={{
276276
width: '100%',

src/components/preview/image/hooks/useKeyboardNavigation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface UseKeyboardNavigationOptions {
1212
/**
1313
* 键盘导航 Hook
1414
*
15-
* 处理键盘左右箭头切换图片
15+
* 处理键盘左右方向键切换图片
1616
*/
1717
export function useKeyboardNavigation({
1818
loading,

src/components/preview/image/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export interface ImagePreviewContentProps {
174174
onPrevious?: (() => void) | undefined;
175175
/** 切换到下一张图片的回调 */
176176
onNext?: (() => void) | undefined;
177-
/** 初始宽高比(用于占位与渐进过渡) */
177+
/** 初始宽高比(用于占位和渐进式过渡) */
178178
initialAspectRatio?: number | null;
179179
/** 宽高比变更时回调 */
180180
onAspectRatioChange?: (aspectRatio: number) => void;

src/components/preview/markdown/styles/markdownStyles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export const createMarkdownStyles = (theme: Theme, latexCount: number, isSmallSc
232232
fontFamily: MONO_FONT,
233233
fontSize: { xs: "0.8125rem", sm: "0.875rem" },
234234
lineHeight: 1.55,
235-
backgroundColor: codeSurfaceColor, // 行间代码块背景色
235+
backgroundColor: codeSurfaceColor, // 代码块背景色
236236
borderRadius: "inherit",
237237
border: `1px solid ${codeBorderColor}`,
238238
padding: theme.spacing(1.5, 1.75),

src/components/preview/markdown/utils/imageUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export const handleImageError = (
200200
const directSrc = tryDirectImageLoad(imgSrc);
201201
if (typeof directSrc === "string" && directSrc.length > 0) {
202202
logger.info("尝试使用直接URL加载:", directSrc);
203-
// 设置新的超时计时器
203+
// 设置新的超时定时器
204204
const newTimerId = window.setTimeout(() => {
205205
if (!imageState.loadedImages.has(directSrc)) {
206206
imageState.failedImages.add(imgSrc);

src/components/preview/text/TextPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const TextPreviewContent: React.FC<TextPreviewContentProps> = memo(
6363

6464
const charCount = useMemo(() => (typeof content === "string" ? content.length : 0), [content]);
6565

66-
// 计算实际字节大小(UTF-8编码
66+
// 计算实际字节大小(UTF-8 编码
6767
const byteSize = useMemo(() => {
6868
if (typeof content !== "string") {
6969
return 0;

src/components/ui/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
export { default as BranchSwitcher } from './BranchSwitcher';
2-
export { default as CustomSnackbar } from './CustomSnackbar';
3-
export { default as DynamicIcon } from './DynamicIcon';
4-
export { default as EmptyState } from './EmptyState';
5-
export { default as ErrorDisplay } from './ErrorDisplay';
6-
export { default as FaviconManager } from './DynamicIcon';
7-
export { default as LoadingSpinner } from './LoadingSpinner';
82
export * from './skeletons';

0 commit comments

Comments
 (0)