From 2a76294a537fd881d9d538937d8990ce401739fe Mon Sep 17 00:00:00 2001 From: David Jakowenko Date: Fri, 10 Sep 2021 01:44:10 -0400 Subject: [PATCH] refactor: tweak train asset card Badges are now clickable to view training result --- frontend/src/components/Asset.vue | 76 +++++++++++++++++++------------ 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/frontend/src/components/Asset.vue b/frontend/src/components/Asset.vue index a1674588..67fd1782 100644 --- a/frontend/src/components/Asset.vue +++ b/frontend/src/components/Asset.vue @@ -24,6 +24,9 @@ :style="box(detector.box)" > +
+
{{ selectedDetector.result }}
+
- - - - - - - - +
+
+ +
+
untrained
@@ -180,6 +174,7 @@ export default { folder: null, loadedCount: 0, reprocessing: false, + selectedDetector: null, }), created() { setInterval(() => { @@ -327,10 +322,6 @@ export default { position: relative; } - .p-badge { - font-size: 0.75rem; - } - .icon { width: 10px; height: 10px; @@ -353,6 +344,31 @@ export default { } } +.p-badge.clickable { + cursor: pointer; + + &:hover, + &.selected { + opacity: 0.8; + } +} + +.train-result { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(32, 38, 46, 0.85); + + pre { + font-size: 0.9rem; + margin: 0; + overflow: hidden; + text-overflow: ellipsis; + } +} + .open-link { position: absolute; top: 0;