Skip to content
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

Update time format and change the slider theme #343

Merged
merged 2 commits into from
Mar 26, 2018
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
21 changes: 13 additions & 8 deletions frontend/src/images/ui/Image.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
</h3>
<p>
<span>Step:</span>
<span>{{imgData.step}};</span>
<span>{{imgData.wall_time | formatTime}}</span>
<span>{{imgData.step}}</span>
<span class="visual-del-image-time">{{imgData.wall_time | formatTime}}</span>
</p>
<v-slider label="step"
:max="steps"
<v-slider :max="steps"
:min="slider.min"
:step="1"
v-model="currentIndex"
dark></v-slider>
></v-slider>

<img :width="imageWidth" :height="imageHeight" :src="imgData.imgSrc" />
</v-card>
Expand Down Expand Up @@ -45,9 +44,13 @@ export default {
if (!value) {
return;
}
let time = new Date();
time.setTime(value.toString().split('.')[0]);
return time;
// The value was made in seconds, must convert it to milliseconds
let time = new Date(value * 1000);
var options = {
weekday: "short", year: "numeric", month: "short",
day: "numeric", hour: "2-digit", minute: "2-digit", second: "2-digit"
};
return time.toLocaleDateString("en-US", options);
}
},
data() {
Expand Down Expand Up @@ -154,5 +157,7 @@ export default {
.sm-form-item
width 300px
display inline-block
.visual-del-image-time
float right
</style>

21 changes: 13 additions & 8 deletions frontend/src/texts/ui/Chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
</h3>
<p>
<span>Step:</span>
<span>{{textData.step}};</span>
<span>{{textData.wall_time | formatTime}}</span>
<span>{{textData.step}}</span>
<span class="visual-del-text-time">{{textData.wall_time | formatTime}}</span>
</p>
<v-slider label="step"
:max="steps"
<v-slider :max="steps"
:min="slider.min"
:step="1"
v-model="currentIndex"
dark></v-slider>
></v-slider>

<p> {{textData.message}} </p>
</v-card>
Expand All @@ -38,9 +37,13 @@ export default {
if (!value) {
return;
}
let time = new Date();
time.setTime(value.toString().split('.')[0]);
return time;
// The value was made in seconds, must convert it to milliseconds
let time = new Date(value * 1000);
var options = {
weekday: "short", year: "numeric", month: "short",
day: "numeric", hour: "2-digit", minute: "2-digit", second: "2-digit",
};
return time.toLocaleDateString("en-US", options);
}
},
data() {
Expand Down Expand Up @@ -142,5 +145,7 @@ export default {
.sm-form-item
width 300px
display inline-block
.visual-del-text-time
float right
</style>