Improve item display (#283)

* Refactor item display to separate component

* Load assets and render item models

* Cache rendered items
This commit is contained in:
Misode
2022-10-04 19:15:28 +02:00
committed by GitHub
parent 681dc6a273
commit 86687ea6b9
9 changed files with 250 additions and 46 deletions

View File

@@ -1163,6 +1163,32 @@ hr {
font-weight: 100;
}
.item-display {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
}
.item-display > img {
width: 26px;
position: relative;
image-rendering: pixelated;
}
.item-display > svg {
width: 26px;
height: 20px;
position: relative;
fill: var(--node-text-dimmed);
}
.item-display > canvas {
width: 32px;
height: 32px;
}
.file-view {
background-color: var(--background-2);
color: var(--text-2);