Skip to content

feat: Allow vertical scan and add camera resolution options #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
node_modules
dist
build
CaptureImageModal

# local env files
.env.local
Expand Down
15 changes: 15 additions & 0 deletions VINScanner/assets/phone-rotate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 0 additions & 28 deletions VINScanner/assets/settings.svg

This file was deleted.

147 changes: 61 additions & 86 deletions VINScanner/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,12 @@ img {
}

.scanner-container .header .camera-list {
width: 165px;
position: absolute;
top: 46px;
left: 0;
background-color: #000000;
border-right: #aaaaaa;
z-index: 1;
z-index: 3;
display: none;
}

Expand Down Expand Up @@ -226,32 +225,6 @@ img {
z-index: 1;
}

.scanner-container .camera-view-container .scan-mode-container {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
bottom: -55%;
left: 0;
right: 0;
z-index: 1;
cursor: pointer;
gap: 0.5rem;
font-size: 24px;
font-family: OpenSans-Regular;
color: #ffffff;
user-select: none;
}

.scanner-container .camera-view-container .scan-mode-container:hover {
opacity: 0.8;
}

.scanner-container .camera-view-container .scan-mode-container .settings-btn {
width: 24px;
height: 24px;
}

.result-container {
position: absolute;
width: 100%;
Expand All @@ -266,7 +239,7 @@ img {
}

.result-container .result-btn-container {
padding: 15px 15px 7.5px 30px;
padding: 15px 15px 0 30px;
display: flex;
gap: 2rem;
}
Expand Down Expand Up @@ -300,6 +273,10 @@ img {
cursor: pointer;
}

.result-container #result-image-container {
display: flex;
justify-content: center;
}
.result-container .parsed-result-area {
width: 100%;
padding: 15px 15px 0 30px;
Expand Down Expand Up @@ -332,6 +309,7 @@ img {
align-items: center;
margin-top: auto;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
background-color: #2b2b2b;
}

.result-container .restart-video .btn-restart-video {
Expand All @@ -344,59 +322,62 @@ img {
font-family: "Oswald-Regular";
}

.settings-modal {
.scan-mode-container {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.4);
z-index: 2;
justify-content: center;
align-items: center;
position: fixed;
bottom: 15%;
left: 5%;
right: 5%;
z-index: 2;
}

.settings-modal-content {
background-color: #323234;
padding: 1rem 2rem 2rem;
color: #ffffff;
font-family: Oswald-Light;
font-size: 20px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.settings-modal-top {
.scan-mode-container .scan-mode-content {
position: relative;
display: flex;
justify-content: space-between;
justify-content: center;
align-items: center;
margin-bottom: 0.5rem;
}

.settings-option-title {
font-family: Oswald-Regular;
margin: 0;
margin-bottom: 0.5rem;
font-weight: normal;
background-color: rgb(34, 34, 34);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
border-radius: 8px;
padding: 0.5rem;
width: max-content;
opacity: 0.8;
}

.settings-option-btn {
background-color: rgb(34, 34, 34);
.scan-option-btn {
background-color: transparent;
padding: 0.5rem;
font-family: OpenSans-Regular;
color: white;
width: 5rem;
}

.selected {
background-color: #fe8e14;
color: white;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-settings-btn {
display: flex;
.scan-orientation-btn {
position: absolute;
top: -90%;
right: 0;
padding: 0.5rem;
display: none;
justify-content: center;
align-items: center;
background: transparent;
border-radius: 8px;
opacity: 0.8;
background-color: rgb(34, 34, 34);
}

.scan-orientation-btn .scan-orientation-icon {
width: 24px;
height: 24px;
filter: invert(0.4);
}

#notification {
Expand Down Expand Up @@ -431,7 +412,25 @@ img {
}
.banner-success {
background-color: rgb(124, 252, 0, 0.4);
border: 1px solid #7cfc00;
border: 1px solid #00fc15;
}

.get-demo-code {
display: flex;
justify-content: center;
align-items: center;
color: #ffae38;
margin-left: auto;
margin-right: 1rem;
font-family: Oswald-Regular;
text-decoration: none;
}

.dbr-download-code-icon {
width: 16px;
height: 16px;
stroke: #ffae38;
margin-left: 5px;
}

@keyframes dce-rotate {
Expand All @@ -443,15 +442,6 @@ img {
}
}

@keyframes dce-scanlight {
from {
top: 0;
}
to {
top: 97%;
}
}

@media screen and (max-width: 800px) {
html,
body {
Expand All @@ -469,27 +459,12 @@ img {
.home-page .description .start-btn {
font-size: 20px;
}

.scanner-container .camera-view-container .scan-mode-container .settings-btn {
width: 16px;
height: 16px;
}

.settings-modal-content {
width: 100%;
height: 100%;
}
}
@media screen and (max-width: 1300px) {
.scanner-container .camera-view-container .scan-help-msg {
font-size: 12px;
top: -35%;
}

.scanner-container .camera-view-container .scan-mode-container {
bottom: -45%;
font-size: 12px;
}
}
@media screen and (max-width: 800px) and (orientation: landscape) {
.result-container .parsed-result-area .parsed-filed {
Expand Down
Loading