add re_start
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user