Renovate mitigation panels and messages
This commit is contained in:
@@ -112,33 +112,37 @@
|
||||
<div id="ai-response-shell-{{ person.id }}" style="display: block; margin-bottom: 0.9rem;">
|
||||
<div class="ai-response-capsule" style="margin-bottom: 0.5rem; border: 1px solid rgba(0, 0, 0, 0.16); border-radius: 8px; padding: 0.5rem 0.6rem;">
|
||||
<div class="is-flex is-justify-content-space-between is-align-items-center" style="margin-bottom: 0.4rem;">
|
||||
<div class="tabs is-small is-toggle is-toggle-rounded" style="margin-bottom: 0;">
|
||||
<div class="tags" style="margin-bottom: 0.25rem;">
|
||||
<span class="tag is-info is-light is-small">Mitigation</span>
|
||||
<span class="tag is-warning is-light is-small">AI Output</span>
|
||||
</div>
|
||||
<div class="tabs is-small is-toggle is-toggle-rounded ai-top-tabs" style="margin-bottom: 0;">
|
||||
<ul>
|
||||
<li id="ai-tab-{{ person.id }}-plan_board" class="is-active">
|
||||
<li id="ai-tab-{{ person.id }}-plan_board" class="is-active ai-top-tab-mitigation">
|
||||
<a onclick="giaWorkspaceOpenTab('{{ person.id }}', 'plan_board', false); return false;">Plan</a>
|
||||
</li>
|
||||
<li id="ai-tab-{{ person.id }}-corrections">
|
||||
<li id="ai-tab-{{ person.id }}-corrections" class="ai-top-tab-mitigation">
|
||||
<a onclick="giaWorkspaceOpenTab('{{ person.id }}', 'corrections', false); return false;">Corrections</a>
|
||||
</li>
|
||||
<li id="ai-tab-{{ person.id }}-engage">
|
||||
<li id="ai-tab-{{ person.id }}-engage" class="ai-top-tab-mitigation">
|
||||
<a onclick="giaWorkspaceOpenTab('{{ person.id }}', 'engage', false); return false;">Engage</a>
|
||||
</li>
|
||||
<li id="ai-tab-{{ person.id }}-fundamentals">
|
||||
<li id="ai-tab-{{ person.id }}-fundamentals" class="ai-top-tab-mitigation">
|
||||
<a onclick="giaWorkspaceOpenTab('{{ person.id }}', 'fundamentals', false); return false;">Fundamentals</a>
|
||||
</li>
|
||||
<li id="ai-tab-{{ person.id }}-auto">
|
||||
<li id="ai-tab-{{ person.id }}-auto" class="ai-top-tab-mitigation">
|
||||
<a onclick="giaWorkspaceOpenTab('{{ person.id }}', 'auto', false); return false;">Auto</a>
|
||||
</li>
|
||||
<li id="ai-tab-{{ person.id }}-ask_ai">
|
||||
<li id="ai-tab-{{ person.id }}-ask_ai" class="ai-top-tab-mitigation">
|
||||
<a onclick="giaWorkspaceOpenTab('{{ person.id }}', 'ask_ai', false); return false;">Ask AI</a>
|
||||
</li>
|
||||
<li id="ai-tab-{{ person.id }}-summarise">
|
||||
<li id="ai-tab-{{ person.id }}-summarise" class="ai-top-tab-output ai-top-tab-output-start">
|
||||
<a onclick="giaWorkspaceOpenTab('{{ person.id }}', 'summarise', false); return false;">Summary</a>
|
||||
</li>
|
||||
<li id="ai-tab-{{ person.id }}-draft_reply">
|
||||
<li id="ai-tab-{{ person.id }}-draft_reply" class="ai-top-tab-output">
|
||||
<a onclick="giaWorkspaceOpenTab('{{ person.id }}', 'draft_reply', false); return false;">Draft</a>
|
||||
</li>
|
||||
<li id="ai-tab-{{ person.id }}-extract_patterns">
|
||||
<li id="ai-tab-{{ person.id }}-extract_patterns" class="ai-top-tab-output">
|
||||
<a onclick="giaWorkspaceOpenTab('{{ person.id }}', 'extract_patterns', false); return false;">Patterns</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -179,6 +183,41 @@
|
||||
.ai-response-capsule {
|
||||
transition: all 180ms ease-out;
|
||||
}
|
||||
.ai-person-widget .ai-top-tabs li.ai-top-tab-output-start {
|
||||
margin-left: 0.35rem;
|
||||
}
|
||||
.ai-person-widget .ai-top-tabs li.ai-top-tab-mitigation a {
|
||||
background: rgba(51, 114, 209, 0.08);
|
||||
border-color: rgba(51, 114, 209, 0.26);
|
||||
}
|
||||
.ai-person-widget .ai-top-tabs li.ai-top-tab-output a {
|
||||
background: rgba(245, 171, 53, 0.1);
|
||||
border-color: rgba(223, 145, 22, 0.3);
|
||||
}
|
||||
.ai-person-widget .ai-top-tabs li.ai-top-tab-mitigation.is-active a {
|
||||
background: #3273dc;
|
||||
border-color: #3273dc;
|
||||
color: #fff;
|
||||
}
|
||||
.ai-person-widget .ai-top-tabs li.ai-top-tab-output.is-active a {
|
||||
background: #e09116;
|
||||
border-color: #e09116;
|
||||
color: #fff;
|
||||
}
|
||||
.ai-person-widget .ai-top-tabs li a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 2.55rem;
|
||||
line-height: 1.15;
|
||||
text-align: center;
|
||||
white-space: normal;
|
||||
}
|
||||
@media screen and (max-width: 768px) {
|
||||
.ai-person-widget .ai-top-tabs li a {
|
||||
min-height: 2.8rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
@@ -639,15 +678,24 @@
|
||||
if (!form) {
|
||||
return;
|
||||
}
|
||||
const card = form.closest(".mitigation-artifact-card");
|
||||
const editing = button.dataset.editState === "edit";
|
||||
const fields = form.querySelectorAll('[data-editable="1"]');
|
||||
const toggles = form.querySelectorAll('[data-editable-toggle="1"]');
|
||||
if (!editing) {
|
||||
fields.forEach(function(field) {
|
||||
field.removeAttribute("readonly");
|
||||
});
|
||||
toggles.forEach(function(field) {
|
||||
field.removeAttribute("disabled");
|
||||
});
|
||||
if (card) {
|
||||
card.classList.add("is-editing");
|
||||
}
|
||||
button.dataset.editState = "edit";
|
||||
button.textContent = "Save";
|
||||
button.classList.remove("is-light");
|
||||
button.title = "Save";
|
||||
button.innerHTML = '<span class="icon is-small"><i class="fa-solid fa-check"></i></span>';
|
||||
} else {
|
||||
form.requestSubmit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user