From d4b91eea0398aed08f17846f97180e3f03805f38 Mon Sep 17 00:00:00 2001 From: filesite Date: Wed, 10 Jul 2024 11:25:27 +0800 Subject: [PATCH] ui improve for default page --- themes/beauty/views/site/index.php | 25 ++++++------------------- www/js/beauty.js | 2 +- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index b9b39d8..1011432 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -58,6 +58,7 @@ if (!empty($breadcrumbs)) { echo << 当前位置: + 首页 / eof; foreach ($breadcrumbs as $bread) { @@ -87,25 +88,11 @@ eof; //如果没有选中任何目录,则把所有目录显示出来 if (empty($selectedId) && !empty($viewData['menus'])) { - foreach ($viewData['menus'] as $index => $dir) { - echo << - -eof; - - $title = !empty($dir['title']) ? $dir['title'] : $dir['directory']; - echo << - - folder - {$title} - - - - -eof; - } - }else if (empty($category['directories']) && empty($category['files'])) { + $category = array( + 'directories' => $viewData['menus'], + 'files' => $viewData['scanResults'], + ); + }else if (!empty($selectedId) && empty($category['directories']) && empty($category['files'])) { echo <<此目录下没有图片和视频哦,复制照片目录或文件到目录里刷新网页即可。 eof; diff --git a/www/js/beauty.js b/www/js/beauty.js index 35d5c07..2422697 100644 --- a/www/js/beauty.js +++ b/www/js/beauty.js @@ -125,7 +125,7 @@ if ($('#image_site').get(0)) { if (data.code == 1 && data.url) { $(el).find('.im_img_title').before(''); }else { - console.error('目录封面图获取失败:%s', data.msg); + console.warn('目录 %s 里没有任何图片', id); } }).fail(function(jqXHR, textStatus, errorThrown) { console.error('获取封面图失败,错误信息:' + errorThrown);