mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 21:14:01 +08:00
add duration to heartbeat, add timezone array
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
import relativeTime from "dayjs/plugin/relativeTime"
|
||||
import utc from 'dayjs/plugin/utc'
|
||||
import timezone from 'dayjs/plugin/timezone' // dependent on utc plugin
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
dayjs.extend(relativeTime)
|
||||
|
||||
export default {
|
||||
@@ -14,6 +18,9 @@ export default {
|
||||
|
||||
computed: {
|
||||
displayText() {
|
||||
|
||||
console.log(dayjs.tz.guess())
|
||||
|
||||
return this.value
|
||||
},
|
||||
}
|
||||
|
@@ -10,9 +10,8 @@
|
||||
<div class="mb-3">
|
||||
<label for="timezone" class="form-label">Timezone</label>
|
||||
<select class="form-select" aria-label="Default select example" id="timezone">
|
||||
<option value="1">One</option>
|
||||
<option value="2">Two</option>
|
||||
<option value="3">Three</option>
|
||||
<option name="auto">Auto: {{ guessTimezone }}</option>
|
||||
<option v-for="timezone in timezoneList" :value="timezone.value">{{ timezone.name }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -64,7 +63,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import dayjs from "dayjs";
|
||||
import utc from 'dayjs/plugin/utc'
|
||||
import timezone from 'dayjs/plugin/timezone'
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
import {timezoneList} from "../../server/util";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -72,6 +76,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timezoneList: timezoneList(),
|
||||
guessTimezone: dayjs.tz.guess(),
|
||||
invalidPassword: false,
|
||||
password: {
|
||||
currentPassword: "",
|
||||
|
Reference in New Issue
Block a user