mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
fix PR comments
This commit is contained in:
parent
5e9d562712
commit
0fbf2f375f
3 changed files with 11 additions and 11 deletions
|
@ -64,9 +64,8 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
chartOptions() {
|
||||
const minuteTimeFormat = `${
|
||||
this.use12HourTimeFormat ? "hh" : "HH"
|
||||
}:mm${
|
||||
const hourTimeFormat = this.use12HourTimeFormat ? "hh" : "HH";
|
||||
const minuteTimeFormat = `${hourTimeFormat}:mm${
|
||||
this.use12HourTimeFormat ? " A" : ""
|
||||
}`;
|
||||
return {
|
||||
|
|
|
@ -838,5 +838,8 @@
|
|||
"successDisabled": "Disabled Successfully.",
|
||||
"successEnabled": "Enabled Successfully.",
|
||||
"tagNotFound": "Tag not found.",
|
||||
"foundChromiumVersion": "Found Chromium/Chrome. Version: {0}"
|
||||
"foundChromiumVersion": "Found Chromium/Chrome. Version: {0}",
|
||||
"Time Format": "Time Format",
|
||||
"12-hour": "12 Hour",
|
||||
"24-hour": "24 Hour"
|
||||
}
|
||||
|
|
|
@ -35,17 +35,15 @@ export default {
|
|||
/**
|
||||
* Return a given value in the format YYYY-MM-DD HH:mm:ss
|
||||
* @param {any} value Value to format as date time
|
||||
* @param {boolean} use12HourFormat Whether to use 12-hour format
|
||||
* @param {boolean} use12HourTimeFormat Whether to use 12-hour format
|
||||
* @returns {string} Formatted string
|
||||
*/
|
||||
datetime(value, use12HourFormat = false) {
|
||||
datetime(value, use12HourTimeFormat = false) {
|
||||
const hourTimeFormat = use12HourTimeFormat ? "hh" : "HH";
|
||||
const timeFormat =
|
||||
`YYYY-MM-DD ${
|
||||
use12HourFormat ? "hh" : "HH"
|
||||
}:mm:ss${
|
||||
use12HourFormat ? " A" : ""
|
||||
`YYYY-MM-DD ${hourTimeFormat}:mm:ss${
|
||||
use12HourTimeFormat ? " A" : ""
|
||||
}`;
|
||||
console.log(timeFormat);
|
||||
return this.datetimeFormat(value, timeFormat);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue