offline libs
This commit is contained in:
@@ -526,7 +526,7 @@
|
||||
}
|
||||
async function generateRtConfig(){ const values=collectRtConfigChanges(); try{ const res=await fetch('/api/rtorrent-config/generate',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({values})}); const j=await res.json(); if(!j.ok) throw new Error(j.error||'Generate failed'); if($('rtConfigOutput')) $('rtConfigOutput').value=j.config_text||''; toast('Config generated','success'); }catch(e){ toast(e.message,'danger'); } }
|
||||
|
||||
function bootstrapThemeUrl(theme){ return theme && theme !== "default" ? `https://cdn.jsdelivr.net/npm/bootswatch@5.3.3/dist/${encodeURIComponent(theme)}/bootstrap.min.css` : "https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"; }
|
||||
function bootstrapThemeUrl(theme){ /* Notatka: motywy korzystają z mapy URL wygenerowanej przez backend, więc działają także offline. */ const key=theme||"default"; return window.PYTORRENT?.bootstrapThemeUrls?.[key] || window.PYTORRENT?.bootstrapThemeUrls?.default || ""; }
|
||||
function applyBootstrapTheme(theme){ bootstrapTheme = theme || "default"; const link=$("bootstrapThemeStylesheet"); if(link) link.href = bootstrapThemeUrl(bootstrapTheme); if($("bootstrapThemeSelect")) $("bootstrapThemeSelect").value = bootstrapTheme; }
|
||||
function applyFontFamily(font){ fontFamily = font || "default"; document.documentElement.dataset.appFont = fontFamily; if($("fontFamilySelect")) $("fontFamilySelect").value = fontFamily; }
|
||||
async function saveAppearancePreferences(){ applyBootstrapTheme($("bootstrapThemeSelect")?.value || "default"); applyFontFamily($("fontFamilySelect")?.value || "default"); try{ await post("/api/preferences",{bootstrap_theme:bootstrapTheme,font_family:fontFamily}); toast("Appearance preferences saved","success"); }catch(e){ toast(e.message,"danger"); } }
|
||||
|
||||
@@ -750,6 +750,7 @@ body.mobile-mode .table-wrap,
|
||||
body.mobile-mode .details {
|
||||
display: none !important;
|
||||
}
|
||||
/* Notatka: scalone reguły listy mobilnej eliminują powtórzone selektory CSS. */
|
||||
body.mobile-mode #mobileList {
|
||||
display: block !important;
|
||||
min-height: 0;
|
||||
@@ -757,6 +758,7 @@ body.mobile-mode #mobileList {
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding-top: 5.2rem !important;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
body.mobile-mode .content {
|
||||
@@ -1374,9 +1376,6 @@ body.mobile-mode .mobile-card {
|
||||
body.mobile-mode .mobile-filter-bar {
|
||||
display: block !important;
|
||||
}
|
||||
body.mobile-mode #mobileList {
|
||||
padding-top: 5.2rem !important;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
#mobileFilterBar {
|
||||
display: block !important;
|
||||
|
||||
Reference in New Issue
Block a user