add re_start

This commit is contained in:
shadowcz007
2024-05-11 23:58:05 +08:00
parent 1c767b538d
commit c0de178c7d
2 changed files with 23 additions and 9 deletions
+15 -2
View File
@@ -824,7 +824,6 @@ function createModelsModal (models) {
const title = document.createElement('p')
title.innerText='Models';
title.style=`font-size: 18px;
@@ -841,7 +840,15 @@ function createModelsModal (models) {
headTitleElement.appendChild(left_d)
headTitleElement.appendChild(n_gpu_div)
headTitleElement.appendChild(n_gpu_div)
//重启
const reStart = document.createElement('small')
reStart.textContent = '重启'
reStart.style.padding = '4px'
headTitleElement.appendChild(reStart)
if (localStorage.getItem('_mixlab_auto_llama_open')) {
linkIcon.style.backgroundColor = '#66ff6c'
@@ -860,6 +867,12 @@ function createModelsModal (models) {
}
})
reStart.addEventListener('click', e => {
e.stopPropagation()
fetch('mixlab/re_start')
})
n_gpu.addEventListener('click', e => {
e.stopPropagation()
localStorage.setItem('_mixlab_llama_n_gpu', n_gpu.value)