From bf985f8a1176615dd1aceeda206a9f656a683993 Mon Sep 17 00:00:00 2001 From: MarcZierle Date: Thu, 16 Jun 2022 19:08:54 +0200 Subject: [PATCH] add usage of templates when creating new photo logs --- src/views/CameraCapture.vue | 10 +-- src/views/CreateLog.vue | 165 +++++++++++++++++++++++++++++++++--- 2 files changed, 159 insertions(+), 16 deletions(-) diff --git a/src/views/CameraCapture.vue b/src/views/CameraCapture.vue index 752af26..674b816 100644 --- a/src/views/CameraCapture.vue +++ b/src/views/CameraCapture.vue @@ -224,9 +224,9 @@ export default { return } - let r = Math.floor(Math.random() * 256).toString(16) - let g = Math.floor(Math.random() * 256).toString(16) - let b = Math.floor(Math.random() * 256).toString(16) + let r = Math.floor(Math.random() * 256).toString(16).padStart(2, '0') + let g = Math.floor(Math.random() * 256).toString(16).padStart(2, '0') + let b = Math.floor(Math.random() * 256).toString(16).padStart(2, '0') let color = '#' + r + g + b @@ -333,7 +333,7 @@ html, body { } #take_photo .camera_btn { - margin-top: 5vh; + margin-top: 2vh; display: inline-block; background-color: #7ec090; color: white; @@ -344,7 +344,7 @@ html, body { } #take_photo .n-button { - margin-top: 5vh; + margin-top: 2vh; } .camera_btn:hover { diff --git a/src/views/CreateLog.vue b/src/views/CreateLog.vue index 68ec98f..2833654 100644 --- a/src/views/CreateLog.vue +++ b/src/views/CreateLog.vue @@ -51,7 +51,6 @@ - - @@ -165,6 +163,45 @@ + + + + + + + + + + + + + + + + + +