Skip to content
Snippets Groups Projects
Commit 087160bc authored by Sytze de Witte's avatar Sytze de Witte
Browse files

sidebar GUI minor changes

parent dc31dc77
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,7 @@
}
}
constantsUl.innerHTML = "";
constantsUl.innerHTML = "";
for (const file of constants) {
if (file.uri === uri) {
for (const constant of file.constants) {
......@@ -151,6 +151,10 @@
break;
}
}
constantsUl.innerHTML = constantsUl.innerHTML === ""
? "There are no undefined constants."
: constantsUl.innerHTML;
vscode.setState({ tools: oldState.tools, constants: constants, options: oldState.options, currentUri: uri });
}
......@@ -160,7 +164,7 @@
*/
function updateOptions(options) {
const optionsUl = document.querySelector("#options");
optionsUl.innerHTML = "";
optionsUl.innerHTML = options.length === 0 ? "There are no undefined options." : "";
for (const option of options) {
addOptionItem(optionsUl, option.name, option.value);
}
......
......@@ -20,6 +20,10 @@ ul {
padding-left: var(--container-paddding);
}
h3 {
padding-top: 8px;
}
body > *,
form > * {
margin-block-start: var(--input-margin-vertical);
......
......@@ -435,14 +435,15 @@ class ModestSidebarProvider implements vscode.WebviewViewProvider {
<title>Modest run dialog</title>
</head>
<body>
<h3>Select tool</h3>
<div id="run-box">
<select class="tools-dropdown" id="tools"> </select>
<button id="run-button"><i class="codicon codicon-play"></i></button>
</div>
<h3>Constants</h3>
<ul class="option-list" id="constants"> </ul>
<ul class="option-list" id="constants">There are no undefined constants.</ul>
<h3>Options</h3>
<ul class="option-list" id="options"> </ul>
<ul class="option-list" id="options">There are no undefined options.</ul>
<script nonce="${nonce}" src="${scriptUri}"></script>
</body>
</html>`;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment