feature: WIP - a functioning history popup
This commit is contained in:
parent
d169b3f2b1
commit
77b17604f3
|
|
@ -18,14 +18,14 @@
|
||||||
<main title = "main content">
|
<main title = "main content">
|
||||||
<div id = "perma-widget">
|
<div id = "perma-widget">
|
||||||
<div id = "sidebar-toggle-wrapper">
|
<div id = "sidebar-toggle-wrapper">
|
||||||
<label for = "sidebar-toggler" id = "sidebar-toggler-button" title = "Toggle sidebar" tabindex = "0">☰</label>
|
<label for = "hide-sidebar-checkbox" id = "sidebar-toggler-button" title = "Toggle sidebar" tabindex = "0">☰</label>
|
||||||
</div>
|
</div>
|
||||||
<h1 id = "page-title">OliveTin</h1>
|
<h1 id = "page-title">OliveTin</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id = "content-sidebar">
|
<div id = "content-sidebar">
|
||||||
<input type = "checkbox" id = "sidebar-toggler" hidden checked />
|
<input type = "checkbox" id = "hide-sidebar-checkbox" hidden checked />
|
||||||
<aside>
|
<aside>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a id = "showActions">Actions</a></li>
|
<li><a id = "showActions">Actions</a></li>
|
||||||
|
|
@ -130,14 +130,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template id = "tplActionButton">
|
<template id = "tplActionButton">
|
||||||
<div>
|
|
||||||
<button>
|
<button>
|
||||||
<span role = "icon" title = "action button icon" class = "icon">💩</span>
|
<span role = "icon" title = "action button icon" class = "icon">💩</span>
|
||||||
<span role = "title" class = "title">Untitled Button</span>
|
<span role = "title" class = "title">Untitled Button</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class = "executions">
|
<div class = "action-button-footer">
|
||||||
</div>
|
<details class = "executions">
|
||||||
|
<summary>Not executed yet.</summary>
|
||||||
|
</details>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,9 @@ class ActionButton extends window.HTMLElement {
|
||||||
|
|
||||||
const btnExecution = document.createElement('execution-button')
|
const btnExecution = document.createElement('execution-button')
|
||||||
btnExecution.constructFromJson(startActionArgs.uuid)
|
btnExecution.constructFromJson(startActionArgs.uuid)
|
||||||
this.querySelector('div.executions').appendChild(btnExecution)
|
this.querySelector('.executions').appendChild(btnExecution)
|
||||||
|
|
||||||
|
this.querySelector('summary').innerText = (this.querySelector('.executions').children.length - 1) + ' executions.'
|
||||||
|
|
||||||
window.fetch(this.actionCallUrl, {
|
window.fetch(this.actionCallUrl, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ function showSection (name) {
|
||||||
|
|
||||||
document.getElementById('show' + name).classList.add('activeSection')
|
document.getElementById('show' + name).classList.add('activeSection')
|
||||||
document.getElementById('content' + name).hidden = false
|
document.getElementById('content' + name).hidden = false
|
||||||
|
|
||||||
|
document.getElementById('hide-sidebar-checkbox').checked = true
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupSections () {
|
function setupSections () {
|
||||||
|
|
|
||||||
109
webui/style.css
109
webui/style.css
|
|
@ -73,6 +73,7 @@ aside {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border: 0 0 10px 0;
|
border: 0 0 10px 0;
|
||||||
box-shadow: 0 0 10px 0 #444;
|
box-shadow: 0 0 10px 0 #444;
|
||||||
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked ~ aside {
|
input:checked ~ aside {
|
||||||
|
|
@ -173,7 +174,16 @@ div.entity h2 {
|
||||||
grid-column: 1 / span all;
|
grid-column: 1 / span all;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Buttons */
|
details {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
details[open] {
|
||||||
|
margin-top: 1em;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* General Buttons */
|
||||||
|
|
||||||
button,
|
button,
|
||||||
input[type="submit"] {
|
input[type="submit"] {
|
||||||
|
|
@ -186,6 +196,53 @@ input[type="submit"] {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Action Buttons */
|
||||||
|
action-button {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
action-button button {
|
||||||
|
width: 100%;
|
||||||
|
flex-grow: 1;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
action-button details {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
action-button details[open] {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
action-button details summary div {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
action-button details summary div span:first-child {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-button-footer {
|
||||||
|
display: block;
|
||||||
|
text-align: left;
|
||||||
|
font-size: smaller;
|
||||||
|
padding: 0.2em;
|
||||||
|
background-color: #efefef;
|
||||||
|
border-top: 0;
|
||||||
|
border-left: 1px solid #999;
|
||||||
|
border-right: 1px solid #999;
|
||||||
|
border-bottom: 1px solid #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
execution-button button {
|
||||||
|
margin-top: 0.2em;
|
||||||
|
margin-bottom: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Button states */
|
||||||
|
|
||||||
button:hover,
|
button:hover,
|
||||||
input[type="submit"]:hover {
|
input[type="submit"]:hover {
|
||||||
box-shadow: 0 0 10px 0 #666;
|
box-shadow: 0 0 10px 0 #666;
|
||||||
|
|
@ -204,45 +261,6 @@ input[type="submit"]:disabled {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.executions button {
|
|
||||||
margin-top: .2em;
|
|
||||||
margin-bottom: .2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset#section-switcher {
|
|
||||||
border: 0;
|
|
||||||
text-align: right;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset#section-switcher button {
|
|
||||||
padding: 1em;
|
|
||||||
color: black;
|
|
||||||
display: table-cell;
|
|
||||||
text-align: center;
|
|
||||||
border: 1px solid #999;
|
|
||||||
background-color: white;
|
|
||||||
box-shadow: 0 0 6px 0 #aaa;
|
|
||||||
user-select: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset#root-group action-button button {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset#section-switcher button:first-child {
|
|
||||||
border-radius: 1em 0 0 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldset#section-switcher button:last-child {
|
|
||||||
border-radius: 0 1em 1em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.active-section {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Button animations */
|
/* Button animations */
|
||||||
|
|
||||||
|
|
@ -301,15 +319,6 @@ summary {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
details {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
details[open] {
|
|
||||||
margin-top: 1em;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
form div.wrapper {
|
form div.wrapper {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
@ -326,7 +335,7 @@ label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 1em;
|
top: 1em;
|
||||||
left: 1em;
|
left: 1em;
|
||||||
z-index: 2;
|
z-index: 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
#perma-widget label {
|
#perma-widget label {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue