Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added media/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 14 additions & 5 deletions media/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,26 +108,29 @@
function setToolMenu(button, menu, open) {
if (!button || !menu) { return; }

const parentMenu = button.closest('.analysis-mode-menu');
const existingTimer = closeTimeouts.get(menu);
if (existingTimer) {
clearTimeout(existingTimer);
closeTimeouts.delete(menu);
}

if (open) {
if (parentMenu) { parentMenu.classList.add('menu-open'); }
menu.classList.remove('is-closing');
menu.hidden = false;
button.setAttribute('aria-expanded', 'true');
} else {
button.setAttribute('aria-expanded', 'false');
if (menu.hidden) {
button.setAttribute('aria-expanded', 'false');
if (parentMenu) { parentMenu.classList.remove('menu-open'); }
return;
}
button.setAttribute('aria-expanded', 'false');
menu.classList.add('is-closing');
const timer = setTimeout(() => {
menu.hidden = true;
menu.classList.remove('is-closing');
if (parentMenu) { parentMenu.classList.remove('menu-open'); }
closeTimeouts.delete(menu);
}, 160);
closeTimeouts.set(menu, timer);
Expand Down Expand Up @@ -413,7 +416,7 @@

setScanMode(persistedState.scanWorkspace === true);
setAnalysisProfile(saved.analysisProfile || 'full');
restoreToolSelection('.static-tool', saved.staticTools, saved.staticEnabled !== false);
restoreToolSelection('.static-tool', saved.staticTools, saved.staticEnabled !== false, saved.dynamicTools);
restoreToolSelection('.dynamic-tool', saved.dynamicTools, saved.dynamicEnabled !== false);
const isWs = persistedState.scanWorkspace === true;
setValue('only-function', saved.onlyFunction || '');
Expand Down Expand Up @@ -524,10 +527,16 @@
return Array.from(document.querySelectorAll(`${selector}:checked`)).map(element => element.value);
}

function restoreToolSelection(selector, savedTools, enabled) {
function restoreToolSelection(selector, savedTools, enabled, fallbackSavedTools) {
const selected = Array.isArray(savedTools) ? savedTools : null;
document.querySelectorAll(selector).forEach(tool => {
tool.checked = selected ? selected.includes(tool.value) : enabled;
if (selected) {
const inSaved = selected.includes(tool.value);
const inFallback = Array.isArray(fallbackSavedTools) && fallbackSavedTools.includes(tool.value);
tool.checked = inSaved || inFallback;
} else {
tool.checked = enabled;
}
});
}

Expand Down
34 changes: 33 additions & 1 deletion media/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ body {
animation: view-enter 0.22s ease both;
}

#dashboard-view {
position: relative;
z-index: 50;
}

#settings-view {
position: relative;
z-index: 50;
}

#dashboard-results {
position: relative;
z-index: 1;
}

.settings-panel {
display: none;
}
Expand Down Expand Up @@ -442,6 +457,8 @@ body {
}

.run-controls {
position: relative;
z-index: 60;
display: flex;
align-items: stretch;
gap: 7px;
Expand Down Expand Up @@ -512,6 +529,8 @@ body {
}

.analysis-mode-row {
position: relative;
z-index: 70;
display: flex;
gap: 3px;
flex: 0 0 auto;
Expand All @@ -522,6 +541,13 @@ body {
flex: 1;
}

.analysis-mode-menu.menu-open,
.analysis-mode-menu:focus-within,
.analysis-mode-menu:has(.analysis-mode-toggle[aria-expanded="true"]),
.analysis-mode-menu:has(.tool-dropdown:not([hidden])) {
z-index: 100;
}

.analysis-mode-toggle {
height: 100%;
min-height: 42px;
Expand All @@ -541,6 +567,12 @@ body {
}

.analysis-mode-toggle svg { width: 13px; height: 13px; }
.analysis-mode-toggle .mode-logo {
width: 14px;
height: 14px;
object-fit: contain;
flex-shrink: 0;
}
.analysis-mode-toggle:hover { color: var(--coretrace-text); }
.analysis-mode-toggle.active {
color: var(--coretrace-red-bright);
Expand All @@ -559,7 +591,7 @@ body {

.tool-dropdown {
position: absolute;
z-index: 20;
z-index: 1000;
top: calc(100% + 6px);
left: 0;
min-width: 174px;
Expand Down
Loading
Loading