From 93b419a137305ffa0b6b7ef632f464638a815ce6 Mon Sep 17 00:00:00 2001 From: an-lee Date: Tue, 25 Jun 2024 20:44:47 +0800 Subject: [PATCH] fix locale & videos component --- enjoy/src/i18n/en.json | 3 +- enjoy/src/i18n/zh-CN.json | 3 +- .../components/videos/videos-component.tsx | 34 ++++++++++++------- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/enjoy/src/i18n/en.json b/enjoy/src/i18n/en.json index 5693a9ae..d0ed3095 100644 --- a/enjoy/src/i18n/en.json +++ b/enjoy/src/i18n/en.json @@ -622,5 +622,6 @@ "all": "All", "allLanguages": "All languages", "search": "Search", - "noData": "No data" + "noData": "No data", + "selectedFiles": "Selected files" } diff --git a/enjoy/src/i18n/zh-CN.json b/enjoy/src/i18n/zh-CN.json index bb881930..d8c25059 100644 --- a/enjoy/src/i18n/zh-CN.json +++ b/enjoy/src/i18n/zh-CN.json @@ -622,5 +622,6 @@ "all": "全部", "allLanguages": "全部语言", "search": "搜索", - "noData": "没有数据" + "noData": "没有数据", + "selectedFiles": "已选中文件" } diff --git a/enjoy/src/renderer/components/videos/videos-component.tsx b/enjoy/src/renderer/components/videos/videos-component.tsx index 82285fe3..f9762a6e 100644 --- a/enjoy/src/renderer/components/videos/videos-component.tsx +++ b/enjoy/src/renderer/components/videos/videos-component.tsx @@ -212,20 +212,28 @@ export const VideosComponent = () => { /> - -
- {videos.map((video) => ( - - ))} + {videos.length === 0 ? ( +
+ {t("noData")}
- - - setEditing(video)} - onDelete={(video) => setDeleting(video)} - /> - + ) : ( + <> + +
+ {videos.map((video) => ( + + ))} +
+
+ + setEditing(video)} + onDelete={(video) => setDeleting(video)} + /> + + + )}