DSM7自定义 桌面图标
找到 /usr/syno/synoman/webman/desktop.html,修改:
<script src="/webman/zepto.min.js"></script> <script src="/webman/desktop.js"></script> <style> .sds-desktop-shortcut .sds-desktop-layout{ flex-wrap: wrap; display: flex; flex-direction: column; justify-content: flex-start; align-items: self-start; align-content: flex-start; } li.launch-icon{ position:relative!important; left:0!important; top:0!important; } li.launch-icon a{ text-decoration:none; }
其中desktop.js如下:
let icons = [ {name:"EMBY", url:"https://emy:8920",icon:"/webman/desktop/emby.png"}, {name:"Router", url:"https://router",icon:"/webman/desktop/router.png"}, {name:"Qbittorrent", url:"https://bt",icon:"/webman/desktop/qbittorrent.png"}, {name:"Vaultwarden", url:"https://vaultwarden",icon:"/webman/desktop/vaultwarden.png"}, {name:"Alist", url:"https://alist",icon:"/webman/desktop/alist.png"}, ]; let timer = setInterval(()=>{ if($(".sds-desktop-layout").html()!=null){ icons.forEach(f=>{ $(".sds-desktop-layout").append(`<li class="launch-icon icon-item" tabindex="0"><a href="${f.url}" target="_blank"><div class="image" style="background-image: url("${f.icon}");"> </div> <!----> <div elementtiming="desktop-item-title" class="text" style="color: rgb(255, 255, 255);">${f.name}</div> <!----></a></li>`); }); clearInterval(timer); } },100);