Add cookbook empty scan buttons
This commit is contained in:
parent
8180e9cdb1
commit
be4c4f2926
2 changed files with 9 additions and 2 deletions
|
|
@ -592,7 +592,11 @@ export async function _hwfitFetch(fresh = false, opts = {}) {
|
||||||
if (!allowNetwork) {
|
if (!allowNetwork) {
|
||||||
_hwfitCache = null;
|
_hwfitCache = null;
|
||||||
_hwfitRenderHw(hw, null);
|
_hwfitRenderHw(hw, null);
|
||||||
list.innerHTML = '<div class="hwfit-loading" style="flex-direction:column;gap:6px;text-align:center;"><div>No cached scan yet</div><div style="font-size:11px;opacity:0.55;max-width:420px;line-height:1.4;">Press Scan to test hardware and rank models for this server.</div></div>';
|
list.innerHTML = '<div class="hwfit-loading" style="flex-direction:column;gap:8px;text-align:center;"><div>No cached scan yet</div><div style="font-size:11px;opacity:0.55;max-width:420px;line-height:1.4;">Test hardware and rank models for this server.</div><button type="button" class="hwfit-gpu-btn hwfit-empty-scan-btn" style="height:26px;padding:3px 10px;">Scan</button></div>';
|
||||||
|
list.querySelector('.hwfit-empty-scan-btn')?.addEventListener('click', () => {
|
||||||
|
_resetGpuToggleState();
|
||||||
|
_hwfitFetch(true);
|
||||||
|
});
|
||||||
try { wp.destroy(); } catch {}
|
try { wp.destroy(); } catch {}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3743,7 +3743,10 @@ export async function _fetchCachedModels(fresh = false, opts = {}) {
|
||||||
}
|
}
|
||||||
if (!allowNetwork) {
|
if (!allowNetwork) {
|
||||||
_dlWp.destroy();
|
_dlWp.destroy();
|
||||||
list.innerHTML = '<div class="hwfit-loading" style="flex-direction:column;gap:6px;text-align:center;"><div>No cached model scan yet</div><div style="font-size:11px;opacity:0.55;max-width:420px;line-height:1.4;">Press Scan to check this server\'s model cache.</div></div>';
|
list.innerHTML = '<div class="hwfit-loading" style="flex-direction:column;gap:8px;text-align:center;"><div>No cached model scan yet</div><div style="font-size:11px;opacity:0.55;max-width:420px;line-height:1.4;">Check this server\'s model cache.</div><button type="button" class="hwfit-gpu-btn serve-empty-scan-btn" style="height:26px;padding:3px 10px;">Scan</button></div>';
|
||||||
|
list.querySelector('.serve-empty-scan-btn')?.addEventListener('click', () => {
|
||||||
|
_fetchCachedModels(true);
|
||||||
|
});
|
||||||
const tagContainer = document.getElementById('serve-tags');
|
const tagContainer = document.getElementById('serve-tags');
|
||||||
if (tagContainer) tagContainer.innerHTML = '';
|
if (tagContainer) tagContainer.innerHTML = '';
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue