mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
feat(web): add restart notice to LLM Provider settings
This commit is contained in:
@@ -5181,6 +5181,14 @@ function loadInferenceSettings() {
|
||||
title.textContent = I18n.t('cfg.group.llm');
|
||||
group.appendChild(title);
|
||||
|
||||
var notice = document.createElement('div');
|
||||
notice.className = 'config-notice';
|
||||
notice.id = 'llm-restart-notice';
|
||||
var restartNoticeEl = document.getElementById('config-restart-notice');
|
||||
notice.style.display = (restartNoticeEl && restartNoticeEl.style.display !== 'none') ? 'flex' : 'none';
|
||||
notice.innerHTML = '<span>\u26A0</span><span>' + escapeHtml(I18n.t('config.restartNotice')) + '</span>';
|
||||
group.appendChild(notice);
|
||||
|
||||
var backendRow = document.createElement('div');
|
||||
backendRow.className = 'settings-row';
|
||||
backendRow.innerHTML =
|
||||
@@ -6338,6 +6346,8 @@ function setActiveProvider(id) {
|
||||
loadInferenceSettings();
|
||||
scrollToProviders();
|
||||
document.getElementById('config-restart-notice').style.display = 'flex';
|
||||
var llmNotice = document.getElementById('llm-restart-notice');
|
||||
if (llmNotice) llmNotice.style.display = 'flex';
|
||||
showToast(I18n.t('config.providerActivated', { name: id }));
|
||||
})
|
||||
.catch((e) => showToast(I18n.t('error.unknown') + ': ' + e.message, 'error'));
|
||||
@@ -6563,6 +6573,8 @@ document.getElementById('save-provider-btn').addEventListener('click', () => {
|
||||
scrollToProviders();
|
||||
if (isActive) {
|
||||
document.getElementById('config-restart-notice').style.display = 'flex';
|
||||
var llmNotice = document.getElementById('llm-restart-notice');
|
||||
if (llmNotice) llmNotice.style.display = 'flex';
|
||||
}
|
||||
showToast(I18n.t('config.providerConfigured', { name: id }));
|
||||
})
|
||||
@@ -6616,6 +6628,8 @@ document.getElementById('save-provider-btn').addEventListener('click', () => {
|
||||
scrollToProviders();
|
||||
if (isActive) {
|
||||
document.getElementById('config-restart-notice').style.display = 'flex';
|
||||
var llmNotice = document.getElementById('llm-restart-notice');
|
||||
if (llmNotice) llmNotice.style.display = 'flex';
|
||||
}
|
||||
showToast(I18n.t('config.providerUpdated', { name }));
|
||||
}).catch((e) => {
|
||||
|
||||
@@ -2801,10 +2801,22 @@ body {
|
||||
padding: var(--space-4);
|
||||
}
|
||||
|
||||
#settings-inference > .extensions-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.extensions-section {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
#providers-section {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.extensions-section h3 {
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 600;
|
||||
@@ -5484,6 +5496,8 @@ body.theme-transition *:not(svg):not(path):not(line):not(circle):not(rect) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
min-height: 420px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.provider-card {
|
||||
|
||||
Reference in New Issue
Block a user