initial files
This commit is contained in:
30
public/views/integrated/styleconfig.hbs
Normal file
30
public/views/integrated/styleconfig.hbs
Normal file
@@ -0,0 +1,30 @@
|
||||
<header>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</header>
|
||||
|
||||
|
||||
<div style="width:100%;height:calc(100% - 64px);">
|
||||
<div id="jsonStyleTree" class="json-tree"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
fetch('/api/getStyles', { method: 'POST' })
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
const tree = createJsonTree({
|
||||
container: document.getElementById("jsonStyleTree"),
|
||||
data: json,
|
||||
expandInitially: true,
|
||||
onSave: json => {
|
||||
fetch('/style', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(json, null, 2)
|
||||
}).then(() => writeEventLog(0, 'Stylesheet', JSON.stringify(tree.getChanges())) );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user