1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-18 22:04:05 +00:00

More UI improvements

This commit is contained in:
2023-01-13 16:56:48 +01:00
parent 90ffdc6a8b
commit 516f25801f
9 changed files with 84 additions and 17 deletions

View File

@ -105,9 +105,9 @@
<style>
.grid {
background-color: #fff;
width: 100%;
height: 100%;
background-color: #fff;
}
.grid.contained {
border: 1px solid #ccc;
@ -152,6 +152,8 @@
button.toggle {
color: inherit;
padding: 0;
margin: 0;
display: contents;
}
button.toggle :global(svg) {
width: 15px;

View File

@ -28,7 +28,6 @@
}
else {
items = dissectObject(data);
console.log(items);
}
}
@ -55,11 +54,13 @@
}
function dissectObject(object) {
return Object.entries(object).map(([ key, value ]) => {
const entries = [ ...Array.isArray(object) ? object.entries() : Object.entries(object) ];
return entries.map(([ key, value ]) => {
key = key + '';
const type = getType(value);
const child = { key, value, type };
if (type.startsWith('object')) {
if (type.startsWith('object') || type.startsWith('array')) {
child.children = dissectObject(value);
}

View File

@ -44,6 +44,7 @@
border-bottom: none;
border-radius: 5px 5px 0 0;
cursor: pointer;
background-color: #fff;
}
.tabs li.active button {
color: #fff;