Skip to content

Commit

Permalink
Minor change on file explorer folder color and mobile.system background
Browse files Browse the repository at this point in the history
Minor change of file explorer folder color under list mode
Fixed bug in mobile interface for customized background folder
  • Loading branch information
TC pushbot 5 authored and TC pushbot 5 committed Apr 2, 2021
1 parent 60b9321 commit a6d4e75
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/web/SystemAO/file_system/file_explorer.html
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@

$("#folderList").append(`<div class="fileObject item ${currentTheme}" draggable="true" ondragstart="onFileObjectDragStart(this,event);" ondrop="dropToFolder(event)" ondragover="allowDrop(event)" fileID="${i}" filename="${filename}" filepath="${filepath}" ondblclick="openthis(this,event);" type="folder">
<span style="display:inline-block !important;word-break: break-all;" class="${textclass}">
<i class="${icon} icon" style="margin-right:12px; color:#9c9ee4;"></i> ${displayName} ${shareicon}
<i class="${icon} icon" style="margin-right:12px; color:#eab54e;"></i> ${displayName} ${shareicon}
</span></div>`);
}else if (viewMode == "grid"){
var displayName = JSON.parse(JSON.stringify(filename));
Expand Down
22 changes: 18 additions & 4 deletions src/web/mobile.system
Original file line number Diff line number Diff line change
Expand Up @@ -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]})`)
}
});
}
}

Expand Down

0 comments on commit a6d4e75

Please sign in to comment.