From a6d4e75380d9a2d5df062be787e1117c1b6bfff4 Mon Sep 17 00:00:00 2001 From: TC pushbot 5 Date: Fri, 2 Apr 2021 15:37:02 +0800 Subject: [PATCH] Minor change on file explorer folder color and mobile.system background Minor change of file explorer folder color under list mode Fixed bug in mobile interface for customized background folder --- .../SystemAO/file_system/file_explorer.html | 2 +- src/web/mobile.system | 22 +++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/web/SystemAO/file_system/file_explorer.html b/src/web/SystemAO/file_system/file_explorer.html index 00ebf1d4..beb73b69 100644 --- a/src/web/SystemAO/file_system/file_explorer.html +++ b/src/web/SystemAO/file_system/file_explorer.html @@ -1561,7 +1561,7 @@ $("#folderList").append(`
- ${displayName} ${shareicon} + ${displayName} ${shareicon}
`); }else if (viewMode == "grid"){ var displayName = JSON.parse(JSON.stringify(filename)); diff --git a/src/web/mobile.system b/src/web/mobile.system index 25a9ce5e..a3204cac 100644 --- a/src/web/mobile.system +++ b/src/web/mobile.system @@ -303,11 +303,25 @@ function changeDesktopTheme(themename){ //Match the given theme to the themename - for (var i =0; i < desktopThemeList.length ; i++){ - if (desktopThemeList[i].Theme == themename){ - var targetImage = desktopThemeList[i].Bglist[0]; - $("#backdrop").css("background-image", `url(img/desktop/bg/${themename}/${targetImage})`) + if (themename.includes(":/") == false){ + //This is a path + for (var i =0; i < desktopThemeList.length ; i++){ + if (desktopThemeList[i].Theme == themename){ + var targetImage = desktopThemeList[i].Bglist[0]; + $("#backdrop").css("background-image", `url(img/desktop/bg/${themename}/${targetImage})`) + } } + }else{ + //This is a path (user defined background folder) + $.get("system/desktop/theme?load=" + themename, function(data){ + if (data.error !== undefined){ + //The folder is gone. Use default instead + console.log(data.error); + changeDesktopTheme("default"); + }else{ + $("#backdrop").css("background-image", `url(media/?file=${data[0]})`) + } + }); } }